### Mastra Installation Guide Source: https://mastra.ai/docs/observability/logging A guide on installing Mastra and setting up prerequisites for various LLM providers. It covers the initial setup required to start using the Mastra framework. ```bash Guide on installing Mastra and setting up the necessary prerequisites for running it with various LLM providers. ``` -------------------------------- ### Mastra Getting Started - Installation Page Source: https://mastra.ai/examples/scorers/toxicity Provides front matter details for the Mastra installation guide, including title, description, and file path. ```json { \"name\":\"installation\", \"route\":\"/en/docs/getting-started/installation\", \"frontMatter\":{ \"title\":\"Installing Mastra | Getting Started | Mastra Docs\", \"description\":\"Guide on installing Mastra and setting up the necessary prerequisites for running it with various LLM providers.\", \"filePath\":\"src/content/en/docs/getting-started/installation.mdx\" }, \"title\":\"Installation\" } ``` -------------------------------- ### Mastra AI LLM Interactive Installation Source: https://mastra.ai/docs/getting-started/mcp-docs-server This snippet describes how to add the MCP Docs Server during the interactive installation of Mastra AI for new projects. It guides users through the setup prompts. ```English For new projects, the MCP Docs Server can be added during installation either through the interactive setup prompts, or by specifying the -m flag using the ``` -------------------------------- ### Install Mastra AI LLMs Source: https://mastra.ai/docs/getting-started/mcp-docs-server Guide on installing Mastra and setting up necessary prerequisites for running it with various LLM providers. This includes instructions for different environments and configurations. ```bash npm install mastra-ai-llms ``` -------------------------------- ### Mastra AI Getting Started - Installation Source: https://mastra.ai/docs/deployment/cloud-providers/digital-ocean Guide on installing Mastra AI and setting up prerequisites for various LLM providers. Includes details on the installation process. ```json { "name": "installation", "route": "/en/docs/getting-started/installation", "frontMatter": { "title": "Installing Mastra | Getting Started | Mastra Docs", "description": "Guide on installing Mastra and setting up the necessary prerequisites for running it with various LLM providers.", "filePath": "src/content/en/docs/getting-started/installation.mdx" }, "title": "Installation" } ``` -------------------------------- ### Install Mastra AI LLMs Source: https://mastra.ai/reference/cli/build Guide on installing Mastra and setting up the necessary prerequisites for running it with various LLM providers. This section covers the initial setup and dependencies required to get started with the Mastra framework. ```bash npm install mastra ``` -------------------------------- ### Mastra Client SDK Setup and Usage Source: https://mastra.ai/docs/frameworks/web-frameworks/vite-react Learn how to set up and use the Mastra Client SDK. ```markdown ## MastraClient Learn how to set up and use the Mastra Client SDK ``` -------------------------------- ### Getting started with Mastra and Express Source: https://mastra.ai/docs/frameworks/web-frameworks/vite-react A step-by-step guide to integrating Mastra with an Express backend. ```markdown ## With Express A step-by-step guide to integrating Mastra with an Express backend. ``` -------------------------------- ### Guides for Building AI Applications with Mastra Source: https://mastra.ai/docs/frameworks/web-frameworks/vite-react General guides on building applications with Mastra. This section covers various AI agent and workflow examples. ```mdx ## Guides Guides on building with Mastra ``` -------------------------------- ### Getting Started with Mastra and Vite/React Source: https://mastra.ai/docs/frameworks/web-frameworks/vite-react A step-by-step guide to integrating Mastra with Vite and React. ```markdown ## With Vite/React A step-by-step guide to integrating Mastra with Vite and React. ``` -------------------------------- ### Getting Started with Mastra and Astro Source: https://mastra.ai/docs/frameworks/web-frameworks/vite-react A step-by-step guide to integrating Mastra with Astro. ```markdown ## With Astro A step-by-step guide to integrating Mastra with Astro. ``` -------------------------------- ### Vue.js Quickstart with Clerk Source: https://clerk.com/docs Get started installing and initializing Clerk in a new Vue + Vite app. This guide covers the initial setup and basic integration steps. ```javascript console.log('Vue.js Quickstart with Clerk'); // Further code examples would go here. ``` -------------------------------- ### Deploying an MCPServer Source: https://mastra.ai/docs/getting-started/mcp-docs-server Example of setting up, building, and deploying a Mastra MCPServer using the stdio transport and publishing it to NPM. ```mdx Example of setting up, building, and deploying a Mastra MCPServer using the stdio transport and publishing it to NPM.\ ``` -------------------------------- ### Mastra Cloud Setup & Deploy Source: https://mastra.ai/docs/frameworks/next-js Configuration steps for Mastra Cloud projects. This guide details how to set up and deploy your projects using Mastra Cloud. ```markdown Configuration steps for Mastra Cloud projects ``` -------------------------------- ### Upstash Search Python SDK - Getting Started Source: https://upstash.com/vector Guide to getting started with the Upstash Search Python SDK, covering installation and basic setup for search functionalities. ```Python from upstash_vector import Index index = Index(url="YOUR_UPSTASH_URL", token="YOUR_UPSTASH_TOKEN") def main(): # Example: Upserting data index.upsert(vectors=[{"id": "1", "vector": [0.1, 0.2], "metadata": {"name": "example"}}]) print("Data upserted") if __name__ == "__main__": main() ``` -------------------------------- ### Upstash Search TypeScript SDK - Getting Started Source: https://upstash.com/vector Guide to getting started with the Upstash Search TypeScript SDK, covering installation and basic setup for search functionalities. ```TypeScript import { Client } from '@upstash/vector'; const client = new Client({ url: 'YOUR_UPSTASH_URL', token: 'YOUR_UPSTASH_TOKEN', }); async function main() { // Example: Upserting data await client.upsert({ id: '1', vector: [0.1, 0.2], metadata: { name: 'example' } }); console.log('Data upserted'); } ``` -------------------------------- ### Next.js Quickstart Guides Source: https://clerk.com/docs Guides for getting started with Clerk in Next.js applications, covering both App Router and Pages Router quickstarts. Includes setup instructions and integration steps. ```nextjs { "title": "Quickstart (App Router)", "href": "/docs/quickstarts/nextjs", "sdk": [ "nextjs" ], "sections": "$1a:props:children:props:manifest:0:0:items:0:0:items:0:0:items:0:0:sections" } ``` ```nextjs { "title": "Quickstart (Pages Router)", "href": "/docs/quickstarts/nextjs-pages-router", "sdk": [ "nextjs" ], "sections": "$1a:props:children:props:manifest:0:0:items:0:0:items:0:0:items:0:0:sections" } ``` -------------------------------- ### Mastra Templates Guide Source: https://mastra.ai/docs/getting-started/mcp-docs-server Information on using pre-built project templates in Mastra. These templates demonstrate common use cases and patterns, helping developers get started quickly. ```markdown ## Templates Utilize Mastra's pre-built project templates to quickly bootstrap common AI application patterns and use cases. These templates serve as excellent starting points for your projects. ``` -------------------------------- ### Deploying MCPServer Example Source: https://mastra.ai/docs/frameworks/next-js This example provides instructions on deploying an MCPServer within the Mastra framework. It covers the necessary steps for setting up and running the server. ```mdx import { Page } from "@/components/Page"; export const meta = { title: "Example: Deploying an MCPServer | Agents | Mastra Docs", description: "E ``` -------------------------------- ### Mastra Server and DB Configuration Source: https://mastra.ai/docs/getting-started/mcp-docs-server Guide on configuring the server and database components for Mastra. This includes setup instructions for backend services and data persistence layers. ```markdown ## Server & DB This section provides guidance on configuring the server infrastructure and database connections for Mastra applications. Ensure proper setup for robust data handling and application performance. ``` -------------------------------- ### Get started with DeepSeek R1 Source: https://ai-sdk.dev/providers/openai-compatible-providers This guide covers how to get started with DeepSeek R1, focusing on its reasoning capabilities. It likely includes setup instructions and basic usage examples. ```mdx This guide covers how to get started with DeepSeek R1, focusing on its reasoning capabilities. It likely includes setup instructions and basic usage examples. ``` -------------------------------- ### Install Mastra AI Docs Server Source: https://mastra.ai/docs/getting-started/mcp-docs-server Installs the Mastra AI documentation server using npx. This command fetches and runs the package, ensuring you have the latest version for serving documentation. ```bash npx @mastra/mcp-docs-server ``` -------------------------------- ### Supervisor Agent Example Source: https://mastra.ai/docs/frameworks/next-js This example showcases the creation of a supervisor agent using Mastra. In this setup, agents communicate with each other through tool functions. ```mdx import { Page } from "@/components/Page"; export const meta = { title: "Example: Supervisor agent | Agents | Mastra", description: "Example of creating a supervisor agent using Mastra, where agents interact through tool functions.", filePath: "src/content/en/examples/agents/supervisor-agent.mdx", }; export default () => ; ``` -------------------------------- ### Getting Started with Mastra and SvelteKit Source: https://mastra.ai/docs/getting-started/mcp-docs-server A step-by-step guide to integrating Mastra with SvelteKit. This covers web framework integration. ```javascript import { Mastra } from '@mastra/core'; const mastra = new Mastra(); // Example SvelteKit page or server load function export async function load() { const data = await mastra.getData(); return { mastraData: data }; } // ... (rest of SvelteKit application) ``` -------------------------------- ### Install Mastra with bun Source: https://mastra.ai/docs/frameworks/web-frameworks/vite-react Installs the necessary Mastra packages using bun. This command is part of the initial setup for using Mastra AI LLMs in a Vite/React project. ```bash bun add @mastra/core @mastra/ui ``` -------------------------------- ### Install Mastra with pnpm Source: https://mastra.ai/docs/frameworks/web-frameworks/vite-react Installs the necessary Mastra packages using pnpm. This command is part of the initial setup for using Mastra AI LLMs in a Vite/React project. ```bash pnpm add @mastra/core @mastra/ui ``` -------------------------------- ### Mastra Observability Setup Source: https://mastra.ai/docs/getting-started/mcp-docs-server Guide on setting up observability for Mastra applications. This includes configuring logging, monitoring, and tracing to gain insights into application behavior and performance. ```markdown ## Observability Implement robust observability for your Mastra applications. This section details how to set up logging, metrics, and tracing to monitor and troubleshoot your AI systems effectively. ``` -------------------------------- ### Set up Environment with .env Source: https://github.com/mastra-ai/mastra/tree/main/examples/memory-per-resource-example This snippet shows how to set up the project environment by copying a sample .env file and adding the OpenAI API key. This is a crucial first step before running the application. ```shell cp .env.example .env # Add your OpenAI API key to .env ``` -------------------------------- ### Install Mastra with yarn Source: https://mastra.ai/docs/frameworks/web-frameworks/vite-react Installs the necessary Mastra packages using yarn. This command is part of the initial setup for using Mastra AI LLMs in a Vite/React project. ```bash yarn add @mastra/core @mastra/ui ``` -------------------------------- ### Getting Started with Mastra and Next.js Source: https://mastra.ai/docs/frameworks/web-frameworks/vite-react A step-by-step guide to integrating Mastra with Next.js. ```markdown ## With Next.js A step-by-step guide to integrating Mastra with Next.js. ``` -------------------------------- ### Install Mastra with npm Source: https://mastra.ai/docs/frameworks/web-frameworks/vite-react Installs the necessary Mastra packages using npm. This command is part of the initial setup for using Mastra AI LLMs in a Vite/React project. ```bash npm install @mastra/core @mastra/ui ``` -------------------------------- ### AI SDK v5 Integration Example Source: https://mastra.ai/docs/getting-started/mcp-docs-server This example provides guidance on integrating with Mastra's AI SDK version 5. It covers the necessary steps and configurations for utilizing the latest SDK features. ```python from mastra.sdk.v5 import MastraClient # Initialize the Mastra client with your API key client = MastraClient(api_key="YOUR_MASTRA_API_KEY") # Example of using a model response = client.completions.create( model="mastra-model-xyz", prompt="Translate 'hello' to French." ) print(response.choices[0].text) ``` -------------------------------- ### Mastra AI LLM Automatic Installation Source: https://mastra.ai/docs/getting-started/mcp-docs-server This section details the automatic installation process for Mastra AI, specifically for new projects. It covers both interactive setup prompts and non-interactive methods using command-line flags. ```English Automatic installation ``` -------------------------------- ### CoAgent Quickstart Source: https://docs.copilotkit.ai/ This section likely details how to get started with CoAgents, which are AI agents that can interact with CopilotKit. It may involve setup or basic usage examples. ```N/A {\"name\": \"CoAgent Quickstart\", \"url\": \"../coagents/quickstart\", \"external\": false} ``` -------------------------------- ### Vercel Web Analytics: Getting Started Source: https://vercel.com/docs/observability/otel-overview/quickstart Guides on getting started with Vercel Web Analytics for various frameworks like Next.js, SvelteKit, Remix, Create React App, Nuxt, Vue, Astro, and HTML. This section covers initial setup and integration. -------------------------------- ### Install Mastra using create mastra CLI Source: https://mastra.ai/docs/getting-started/installation This command initiates the setup process for Mastra AI using the command-line interface. It's the recommended and fastest way to get started. ```bash create mastra ``` -------------------------------- ### Angular Rspack Getting Started Guide Source: https://nx.dev/concepts/decisions/dependency-management A guide on how to get started with Angular projects using Rspack as the build tool, covering initial setup and configuration. -------------------------------- ### Install Mastra AI Source: https://mastra.ai/reference/scorers/keyword-coverage Guide on installing Mastra and setting up the necessary prerequisites for running it with various LLM providers. This section covers the initial setup and dependencies required to get started with Mastra. ```bash npm install mastra-ai ``` -------------------------------- ### Install Mastra AI LLMs Source: https://mastra.ai/reference/scorers/completeness Guide on installing Mastra and setting up prerequisites for running with various LLM providers. This section covers the initial setup and configuration needed to get started with the Mastra framework. ```bash npm install @mastra/core # or yarn add @mastra/core ``` -------------------------------- ### Mastra Project Structure Guide Source: https://mastra.ai/docs/getting-started/mcp-docs-server Guide on organizing folders and files within a Mastra project. It outlines best practices and recommended structures for efficient development and maintainability. ```markdown ## Mastra Project Structure - `src/` - `content/` - `en/` - `docs/` - `index.mdx` - `getting-started/` - `installation.mdx` - `project-structure.mdx` - `mcp-docs-server.mdx` - `model-providers.mdx` - `model-capability.mdx` - `templates.mdx` - `agents/` - `overview.mdx` - `agent-memory.mdx` - `using-tools-and-mcp.mdx` - `input-processors.mdx` - `adding-voice.mdx` - `runtime-context.mdx` - `dynamic-agents.mdx` - `lib/` - `components/` - `public/` - `package.json` ``` -------------------------------- ### Prompt Examples for Mastra Docs Server Source: https://mastra.ai/docs/getting-started/mcp-docs-server This section provides example prompts for interacting with the Mastra Docs Server. These prompts cover adding features to an agent, retrieving information about integrations, and debugging or updating existing code. ```text “Add evals to my agent and write tests” ``` ```text “Write me a workflow that does the following [task]” ``` ```text “Make a new tool that allows my agent to access [3rd party API]” ``` ```text “Does Mastra work with the AI SDK? How can I use it in my [React/Svelte/etc] project?” ``` ```text “What’s the latest Mastra news around MCP?” ``` ```text “Does Mastra support [provider] speech and voice APIs? Show me an example in my code of how I can use it.” ``` -------------------------------- ### React Quickstart: Install and Initialize Clerk Source: https://clerk.com/docs This snippet guides you through installing and initializing Clerk in a new React + Vite application. It covers the essential steps to get started with Clerk's authentication features. ```javascript self.__next_f.push([1,"6e:[\"$\",\"div\",null,{\"className\":\"flex-auto\",\"children\":[[\"$\",\"h3\",null,{\"className\":\"mb-2 text-[0.875rem]/5 font-medium text-gray-950 dark:text-white\",\"children\":[\"$\",\"$L45\",null,{\"href\":\"/docs/quickstarts/react\",\"children\":[[\"\",[\"$\",\"span\",null,{\"className\":\"whitespace-nowrap\",\"children\":[\"React\",false,[\"$\",\"svg\",null,{\"viewBox\":\"0 0 16 16\",\"fill\":\"none\",\"aria-hidden\":true,\"className\":\"relative top-[0.1875rem] ml-0.5 inline-block size-4 -translate-x-2 stroke-gray-400 align-top opacity-0 transition duration-300 ease-[cubic-bezier(0.175,0.885,0.32,1.275)] group-hover/card:translate-x-0 group-hover/card:stroke-gray-950 group-hover/card:opacity-100 dark:group-hover/card:stroke-white\",\"children\":[\"$\",\"path\",null,{\"strokeLinecap\":\"round\",\"strokeLinejoin\":\"round\",\"strokeWidth\":\"1.5\",\"d\":\"M6.75 4.75 10.25 8l-3.5 3.25\"}]}]]},[\"$\",\"span\",null,{\"className\":\"absolute inset-0\"}]]}]}]}],\"$\",\"div\",null,{\"className\":\"text-[0.875rem]/5 text-gray-600 dark:text-gray-400\",\"children\":[\"$\",\"p\",\".1\",{\"children\":\"Get started installing and initializing Clerk in a new React + Vite app.\"}]}]}]]) ``` -------------------------------- ### Mastra Authentication Setup Source: https://mastra.ai/docs/getting-started/mcp-docs-server Guide on setting up authentication for Mastra applications. This covers different authentication methods and best practices for securing your AI applications. ```markdown ## Auth Secure your Mastra applications by configuring authentication. This section details the available authentication methods and provides guidance on implementing secure access controls. ``` -------------------------------- ### Edge Config Getting Started Source: https://vercel.com/docs/cli A guide to getting started with Edge Config, outlining the initial setup and basic configurations. ```English Getting Started ``` -------------------------------- ### Running Workflows Source: https://mastra.ai/docs/getting-started/mcp-docs-server Example for how to run workflows. ```mdx Example for how to run workflows.\ ``` -------------------------------- ### Deployment Examples for Mastra Server Source: https://mastra.ai/docs/frameworks/web-frameworks/vite-react Provides an overview of deployment examples for a Mastra server. This includes setting up middleware for authentication, CORS, and logging, as well as creating custom API routes. ```mdx ## Deployment examples Overview of deployment examples for a Mastra server. ``` ```mdx ## Auth Middleware Guide on setting up authentication middleware for a Mastra server. ``` ```mdx ## CORS Middleware Guide on configuring CORS middleware for a Mastra server. ``` ```mdx ## Logging Middleware Guide on implementing logging middleware for a Mastra server. ``` ```mdx ## Custom API Route Guide on creating custom API routes within a Mastra server. ``` ```mdx ## Deploying a Mastra Server Instructions on how to deploy a Mastra server. ``` -------------------------------- ### Initialize Mastra CLI Source: https://mastra.ai/docs/frameworks/next-js Run the Mastra CLI to customize the setup. It prompts for installation location, defaulting to 'src'. For root-level Pages Router, use '.' as the location. ```bash npx mastra@latest init ``` -------------------------------- ### Getting Started with Mastra and Astro Source: https://mastra.ai/docs/getting-started/mcp-docs-server A step-by-step guide to integrating Mastra with Astro. This covers web framework integration. ```javascript import { Mastra } from '@mastra/core'; const mastra = new Mastra(); // Example Astro component or page script const mastraData = await mastra.getData(); console.log(mastraData); // ... (rest of Astro site) ``` -------------------------------- ### Mastra Installation Guide Source: https://mastra.ai/reference/evals/prompt-alignment This guide covers the installation of Mastra and the setup of prerequisites for various LLM providers. It ensures a smooth start for users. ```TypeScript Guide on installing Mastra and setting up the necessary prerequisites for running it with various LLM providers. ``` -------------------------------- ### Install Mastra with a Template Source: https://mastra.ai/docs/getting-started/installation Starts a Mastra project using a pre-built template to demonstrate specific use cases. Users can browse available templates for various applications. ```bash npx create-mastra@latest --template template-name ``` ```bash npx create-mastra@latest --template text-to-sql ``` -------------------------------- ### React Authentication with Clerk Source: https://clerk.com/docs Get started with Clerk authentication in a React + Vite application. This setup guide helps you install and initialize Clerk for user management in your React projects. ```javascript // src/main.jsx import React from 'react'; import ReactDOM from 'react-dom/client'; import App from './App'; import { ClerkProvider } from '@clerk/clerk-react'; // Ensure that your publishable key is set if (!process.env.CLERK_PUBLISHABLE_KEY) { throw new Error('CLERK_PUBLISHABLE_KEY is not set'); } ReactDOM.createRoot(document.getElementById('root')).render( ); ``` -------------------------------- ### Mastra CLI: Start Application Source: https://mastra.ai/docs/frameworks/web-frameworks/astro Starts your built Mastra application using the `mastra start` command. ```bash mastra start ``` -------------------------------- ### Getting started with Mastra and Express Source: https://mastra.ai/docs/getting-started/mcp-docs-server A step-by-step guide to integrating Mastra with an Express backend. This covers server-side integration. ```javascript const express = require('express'); const { Mastra } = require('@mastra/core'); const app = express(); const mastra = new Mastra(); // Example Express route app.get('/mastra-data', async (req, res) => { const data = await mastra.getData(); res.json(data); }); // ... (rest of Express server setup) ``` -------------------------------- ### Get started with Llama 3.1 Source: https://ai-sdk.dev/providers/openai-compatible-providers This guide provides instructions for getting started with Llama 3.1. It likely covers the setup and initial usage of this AI model. ```mdx This guide provides instructions for getting started with Llama 3.1. It likely covers the setup and initial usage of this AI model. ``` -------------------------------- ### Getting Started with Mastra and Vite/React Source: https://mastra.ai/docs/getting-started/mcp-docs-server A step-by-step guide to integrating Mastra with Vite and React. This covers web framework integration. ```javascript import React from 'react'; import { Mastra } from '@mastra/core'; const mastra = new Mastra(); function App() { // Example React component using Mastra return (

Mastra Integration

{/* ... */}
); } export default App; ``` -------------------------------- ### Workflow: Getting Started and Quickstarts Source: https://upstash.com/vector This section covers the initial steps for using Workflow, including a general getting started guide and quickstarts for various platforms like Vercel/Next.js, Cloudflare Workers, Nuxt, SolidJS, Svelte, Hono, Express, Astro, FastAPI, and Flask. ```Workflow workflow/getstarted workflow/quickstarts/platforms workflow/quickstarts/vercel-nextjs workflow/quickstarts/cloudflare-workers workflow/quickstarts/nuxt workflow/quickstarts/solidjs workflow/quickstarts/svelte workflow/quickstarts/hono workflow/quickstarts/express workflow/quickstarts/astro workflow/quickstarts/fastapi workflow/quickstarts/nextjs-fastapi workflow/quickstarts/flask workflow/quickstarts/nextjs-flask ``` -------------------------------- ### Sequential Steps Workflow Source: https://mastra.ai/docs/getting-started/mcp-docs-server Example of a Mastra workflow demonstrating sequential execution of steps. ```mdx import { workflow } from "@mastra/core"; export const sequentialWorkflow = workflow({ name: "sequential-workflow", steps: { step1: workflow.callAgent({ agent: "agent-a", input: "Input for A" }), step2: workflow.callAgent({ agent: "agent-b", input: "{{step1.output}}" }) } }); ``` -------------------------------- ### Getting Started with Mastra and Next.js Source: https://mastra.ai/docs/getting-started/mcp-docs-server A step-by-step guide to integrating Mastra with Next.js. This covers web framework integration. ```javascript import { Mastra } from '@mastra/core'; const mastra = new Mastra(); // Example Next.js API route or component export async function getServerSideProps(context) { const data = await mastra.getData(); return { props: { data } }; } // ... (rest of Next.js application) ``` -------------------------------- ### Mastra Installation Guide Source: https://mastra.ai/reference/evals/toxicity This guide covers the installation of Mastra and the setup of prerequisites for various LLM providers. It ensures a smooth start for developing AI applications with Mastra. ```TypeScript Guide on installing Mastra and setting up the necessary prerequisites for running it with various LLM providers. ``` -------------------------------- ### Inngest Mastra Workflow Example Source: https://mastra.ai/docs/frameworks/next-js Example of integrating Mastra workflows with Inngest for event-driven execution. ```typescript import { Workflow } from "@mastra/workflow"; import { serve } from "inngest/next"; const workflow = new Workflow({ // Workflow definition }); export const { handler } = serve({ functions: [workflow], // Inngest configuration }); ``` -------------------------------- ### Call Tools with Mastra Source: https://mastra.ai/docs/getting-started/mcp-docs-server Example demonstrating how to call tools using Mastra. ```mdx import { workflow } from "@mastra/core"; export const callingToolsWorkflow = workflow({ name: "calling-tools-workflow", steps: { callMyTool: workflow.callTool({ tool: "my-tool", input: { param1: "value1" } }) } }); ``` -------------------------------- ### Mastra: Calling Tools Source: https://mastra.ai/docs/frameworks/web-frameworks/vite-react An example demonstrating how to call tools using Mastra. This covers the fundamental process of tool integration. ```mdx Example for how to tools agents. ``` -------------------------------- ### Mastra CLI: Create Project Source: https://mastra.ai/docs/frameworks/web-frameworks/astro Creates a new Mastra project with interactive setup options using the `create-mastra` command. ```bash create-mastra ``` -------------------------------- ### Scaffold Mastra with Next.js (Interactive CLI) Source: https://mastra.ai/docs/frameworks/next-js Initiate Mastra integration into your Next.js project using the interactive command-line interface. This allows for customized setup by prompting the user for installation location and other configurations. ```bash npx mastra@latest init ``` -------------------------------- ### Mastra Installation Guide Source: https://mastra.ai/examples/memory/memory-with-pg A guide on installing Mastra and setting up the necessary prerequisites for running it with various LLM providers. This section covers the initial setup process for new users. ```bash Guide on installing Mastra and setting up the necessary prerequisites for running it with various LLM providers. ``` -------------------------------- ### Calling Agents Example Source: https://mastra.ai/docs/frameworks/next-js This example demonstrates how to call agents within the Mastra framework. It serves as a foundational example for agent interaction. ```mdx import { Page } from "@/components/Page"; export const meta = { title: "Calling Agents | Agents | Mastra Docs", description: "Example for how to call agents.", filePath: "src/content/en/examples/agents/calling-agents.mdx", }; export default () => ; ``` -------------------------------- ### Install Mastra Docs Server Package Source: https://mastra.ai/docs/getting-started/mcp-docs-server This snippet shows how to install the `@mastra/mcp-docs-server` package, which provides access to Mastra's knowledge base via the MCP protocol. It is a prerequisite for using Mastra's tools with agents. ```bash npm install @mastra/mcp-docs-server ``` -------------------------------- ### Mastra Installation Guide Source: https://mastra.ai/reference/templates This guide covers the installation of Mastra and the setup of prerequisites for running it with various LLM providers. It ensures a smooth start for developing AI applications. ```TypeScript Guide on installing Mastra and setting up the necessary prerequisites for running it with various LLM providers. ``` -------------------------------- ### Mastra Installation Guide Source: https://mastra.ai/reference/client-js/workflows This guide covers the installation of Mastra and the setup of prerequisites for running it with various Large Language Model (LLM) providers. It ensures a smooth start for users. ```TypeScript Guide on installing Mastra and setting up the necessary prerequisites for running it with various LLM providers. ``` -------------------------------- ### Deploy Mastra Server Source: https://mastra.ai/docs/getting-started/mcp-docs-server Learn how to deploy a Mastra server, including build settings and deployment options. This guide covers the essential steps for setting up your Mastra server environment. ```markdown This section details the process of deploying a Mastra server. It covers configuration, build processes, and deployment strategies. Specific code examples or commands are not provided in this overview, but the documentation guides users through the necessary steps. ``` -------------------------------- ### React Getting Started Guide Source: https://clerk.com/docs Instructions for getting started with Clerk in React applications. This section covers the initial setup process for the Clerk SDK within a React project. ```react { "title": "Getting started", "sdk": [ "react" ], "items": [ { "title": "Set up your Clerk a" } ] } ``` -------------------------------- ### Run Project Example Source: https://github.com/mastra-ai/mastra/tree/main/examples/memory-per-resource-example This command is used to run the project's example. It utilizes the pnpm package manager to start the development server. ```shell pnpm dev ``` -------------------------------- ### Create and Configure Dynamic Tools Source: https://mastra.ai/docs/getting-started/mcp-docs-server Learn how to create and configure dynamic tools using runtime context in Mastra. ```mdx import { tool } from "@mastra/core"; export const dynamicTool = tool({ name: "dynamic-tool", description: "A tool that uses runtime context.", parameters: { type: "object", properties: { contextValue: { type: "string" } } }, execute: async ({ context, parameters }) => { return `Processed with context: ${context.runtimeValue} and parameter: ${parameters.contextValue}`; } }); ``` -------------------------------- ### Get started with OpenAI o3-mini Source: https://ai-sdk.dev/providers/openai-compatible-providers This guide provides instructions for getting started with OpenAI o3-mini, emphasizing its reasoning capabilities. It likely covers initial setup and basic usage. ```mdx This guide provides instructions for getting started with OpenAI o3-mini, emphasizing its reasoning capabilities. It likely covers initial setup and basic usage. ``` -------------------------------- ### Basic RAG Example Source: https://mastra.ai/docs/frameworks/web-frameworks/vite-react Example of implementing a basic RAG system in Mastra using OpenAI embedd ```mdx Example: Using the Vector Query Tool | RAG | Mastra Docs ``` -------------------------------- ### Initialize Mastra Project Source: https://mastra.ai/reference/evals/content-similarity Creates a new Mastra project with interactive setup options using the `mastra init` command. ```cli mastra init ``` -------------------------------- ### Mastra CLI: Initialize Project Source: https://mastra.ai/docs/frameworks/web-frameworks/astro Initializes a new Mastra project with interactive setup options using the `mastra init` command. ```bash mastra init ``` -------------------------------- ### Get started with OpenAI o1 Source: https://ai-sdk.dev/providers/openai-compatible-providers This guide focuses on getting started with OpenAI o1, including its reasoning capabilities. It likely covers the initial setup and basic usage patterns for this model. ```mdx This guide focuses on getting started with OpenAI o1, including its reasoning capabilities. It likely covers the initial setup and basic usage patterns for this model. ``` -------------------------------- ### Upsert Embeddings Example Source: https://mastra.ai/docs/frameworks/web-frameworks/vite-react Examples of using Mastra to store embeddings in various vector databases for similarity search. ```mdx Example: Upsert Embeddings | RAG | Mastra Docs ``` -------------------------------- ### Metadata Extraction Example Source: https://mastra.ai/docs/frameworks/web-frameworks/vite-react Example of extracting and utilizing metadata from documents in Mastra for enhanced document processing and retrieval. ```mdx Example: Metadata Extraction | Retrieval | RAG | Mastra Docs ``` -------------------------------- ### Install Mastra Packages Source: https://mastra.ai/docs/frameworks/web-frameworks/vite-react Installs the latest versions of Mastra core packages using different package managers. ```yarn yarn add mastra@latest @mastra/core@latest @mastra/libsql@latest @mastra/client-js@latest ``` ```pnpm pnpm add mastra@latest @mastra/core@latest @mastra/libsql@latest @mastra/client-js@latest ``` ```bun bun add mastra@latest @mastra/core@latest @mastra/libsql@latest @mastra/client-js@latest ``` -------------------------------- ### Mastra AI LLM Metadata and SEO Configuration Source: https://mastra.ai/docs/getting-started/mcp-docs-server This snippet details the metadata and SEO configuration for the Mastra Docs 'Getting Started' page. It includes title, description, Open Graph tags, and Twitter card information, all aimed at optimizing the page's visibility and presentation on social media and search engines. ```javascript self.__next_f.push([1, "9:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"MCP Docs Server | Getting Started | Mastra Docs\"}], [\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Learn how to use the Mastra MCP documentation server in your IDE to turn it into an agentic Mastra expert.\"}], [\"$\",\"meta\",\"2\",{\"property\":\"og:title\",\"content\":\"MCP Docs Server | Getting Started | Mastra Docs\"}], [\"$\",\"meta\",\"3\",{\"property\":\"og:description\",\"content\":\"Learn how to use the Mastra MCP documentation server in your IDE to turn it into an agentic Mastra expert.\"}], [\"$\",\"meta\",\"4\",{\"property\":\"og:url\",\"content\":\"https://mastra.ai/en/docs/getting-started/mcp-docs-server\"}], [\"$\",\"meta\",\"5\",{\"property\":\"og:image\",\"content\":\"https://mastra.ai/api/og/docs?title=MCP%20Docs%20Server%20|%20Getting%20Started%20|%20Mastra%20Docs%26description=Learn%20how%20to%20use%20the%20Mastra%20MCP%20documentation%20server%20in%20your%20IDE%20to%20turn%20it%20into%20an%20agentic%20Mastra%20expert.\"}], [\"$\",\"meta\",\"6\",{\"property\":\"og:type\",\"content\":\"article\"}], [\"$\",\"meta\",\"7\",{\"name\":\"twitter:card\",\"content\":\"summary_large_image\"}], [\"$\",\"meta\",\"8\",{\"name\":\"twitter:title\",\"content\":\"MCP Docs Server | Getting Started | Mastra Docs\"}], [\"$\",\"meta\",\"9\",{\"name\":\"twitter:description\",\"content\":\"Learn how to use the Mastra MCP documentation server in your IDE to turn it into an agentic Ma\"}]]}) ``` -------------------------------- ### Mastra Installation Guide Source: https://mastra.ai/reference/deployer/netlify A guide on installing Mastra and setting up the necessary prerequisites for running it with various LLM providers. This section covers the initial setup process for new users. ```TypeScript Guide on installing Mastra and setting up the necessary prerequisites for running it with various LLM providers. ``` -------------------------------- ### Run Mastra Workflows Source: https://mastra.ai/docs/frameworks/next-js Example for how to run workflows in Mastra. ```typescript import { Workflow } from "@mastra/workflow"; const workflow = new Workflow({ // Workflow definition }); workflow.run(); ``` -------------------------------- ### Mastra Deployment Strategies Source: https://mastra.ai/docs/getting-started/mcp-docs-server Information on deploying Mastra applications. This covers various deployment strategies, best practices, and considerations for production environments. ```markdown ## Deployment Learn the recommended strategies for deploying your Mastra applications. This guide covers considerations for various environments, ensuring a smooth transition to production. ``` -------------------------------- ### Get started with Mastra and Express Source: https://mastra.ai/reference/evals/toxicity A step-by-step guide to integrating Mastra with an Express backend. This guide covers the initial setup and configuration. ```mdx const express = require('express'); const mastra = require('@mastra/core'); const app = express(); app.use(express.json()); app.post('/api/chat', async (req, res) => { const { message } = req.body; const response = await mastra.chat(message); res.json({ response }); }); const port = process.env.PORT || 3000; app.listen(port, () => { console.log(`Server listening on port ${port}`); }); ``` -------------------------------- ### Mastra Framework Overview Source: https://mastra.ai/docs/getting-started/mcp-docs-server An overview of the Mastra framework, highlighting its core components, architecture, and the primitives it provides for building AI applications. ```markdown ## Frameworks An overview of the Mastra framework, detailing its core primitives such as workflows, agents, RAG, integrations, syncs, and evals, designed for rapid AI application development. ``` -------------------------------- ### Reranking with ZeroEntropy Example Source: https://mastra.ai/docs/frameworks/web-frameworks/vite-react Example of using Mastra to improve document retrieval relevance with ZeroEntropy's reranking service. ```mdx Example: Reranking with ZeroEntropy | RAG | Mastra Docs ``` -------------------------------- ### Logging Middleware Example Source: https://mastra.ai/docs/getting-started/mcp-docs-server Example of using Logging Middleware for deployment. ```mdx Example of using Logging Middleware for deployment. ``` -------------------------------- ### Install Mastra AI Framework Source: https://mastra.ai/docs/agents/streaming Guide on installing Mastra and setting up necessary prerequisites for running it with various LLM providers. This includes instructions for local setup and integration. ```bash npm install mastra-ai ``` -------------------------------- ### Reranking with Cohere Example Source: https://mastra.ai/docs/frameworks/web-frameworks/vite-react Example of using Mastra to improve document retrieval relevance with Cohere's reranking service. ```mdx Example: Reranking with Cohere | RAG | Mastra Docs ``` -------------------------------- ### Example: Install Text-to-SQL Mastra Template Source: https://mastra.ai/docs/getting-started/templates Demonstrates installing a specific Mastra template for a text-to-SQL application using npx. ```bash npx create-mastra@latest --template text-to-sql ``` -------------------------------- ### Re-ranking Results Example Source: https://mastra.ai/docs/frameworks/web-frameworks/vite-react Example of implementing semantic re-ranking in Mastra using OpenAI embeddings and PGVector for vector storage. ```mdx Example: Re-ranking Results | Retrieval | RAG | Mastra Docs ```