# Mastra > title: "Adding Voice to Agents | Agents" ## Pages - [Mastra Documentation](mastra-documentation.md): title: "Adding Voice to Agents | Agents" - [Adding Voice to Agents](adding-voice-to-agents.md): [EN] Source: - [Agent memory](agent-memory.md): [EN] Source: - [Guardrails](guardrails.md): [EN] Source: - [Agent Networks](agent-networks.md): [EN] Source: - [Using Agents](using-agents.md): [EN] Source: - [Using Tools](using-tools.md): [EN] Source: - [MastraAuthAuth0 Class](mastraauthauth0-class.md): [EN] Source: - [MastraAuthClerk Class](mastraauthclerk-class.md): [EN] Source: - [MastraAuthFirebase Class](mastraauthfirebase-class.md): [EN] Source: - [FIREBASE_DATABASE_ID=(default)](firebase-database-iddefault.md): **Note:** Store your service account JSON file securely and never commit it to version control. - [Auth Overview](auth-overview.md): [EN] Source: - [MastraJwtAuth Class](mastrajwtauth-class.md): [EN] Source: - [MastraAuthSupabase Class](mastraauthsupabase-class.md): [EN] Source: - [MastraAuthWorkos Class](mastraauthworkos-class.md): [EN] Source: - [Contributing Templates](contributing-templates.md): [EN] Source: - [Discord Community](discord-community.md): [EN] Source: - [License](license.md): [EN] Source: - [Building Mastra](building-mastra.md): [EN] Source: - [Amazon EC2](amazon-ec2.md): [EN] Source: - [Add other required environment variables](add-other-required-environment-variables.md): Build the application: - [AWS Lambda](aws-lambda.md): [EN] Source: - [Azure App Services](azure-app-services.md): [EN] Source: - [CloudflareDeployer](cloudflaredeployer.md): [EN] Source: - [Digital Ocean](digital-ocean.md): [EN] Source: - [Add other required environment variables](add-other-required-environment-variables-2.md): Build the application - [Cloud Providers](cloud-providers.md): [EN] Source: - [NetlifyDeployer](netlifydeployer.md): [EN] Source: - [VercelDeployer](verceldeployer.md): [EN] Source: - [Navigating the Dashboard](navigating-the-dashboard.md): [EN] Source: - [Understanding Tracing and Logs](understanding-tracing-and-logs.md): [EN] Source: - [Mastra Cloud](mastra-cloud.md): [EN] Source: - [Setting Up and Deploying](setting-up-and-deploying.md): [EN] Source: - [Monorepo Deployment](monorepo-deployment.md): [EN] Source: - [Deployment Overview](deployment-overview.md): [EN] Source: - [Web Framework Integration](web-framework-integration.md): [EN] Source: - [Using Vercel AI SDK](using-vercel-ai-sdk.md): [EN] Source: - [Using with Assistant UI](using-with-assistant-ui.md): [EN] Source: - [Integrate Cedar-OS with Mastra](integrate-cedar-os-with-mastra.md): [EN] Source: - [Integrate CopilotKit with Mastra](integrate-copilotkit-with-mastra.md): [EN] Source: - [Use OpenRouter with Mastra](use-openrouter-with-mastra.md): [EN] Source: - [Integrate Mastra in your Express project](integrate-mastra-in-your-express-project.md): [EN] Source: - [Integrate Mastra in your Astro project](integrate-mastra-in-your-astro-project.md): [EN] Source: - [Integrate Mastra in your Next.js project](integrate-mastra-in-your-nextjs-project.md): [EN] Source: - [Integrate Mastra in your SvelteKit project](integrate-mastra-in-your-sveltekit-project.md): [EN] Source: - [Integrate Mastra in your Vite/React project](integrate-mastra-in-your-vitereact-project.md): [EN] Source: - [Install Mastra](install-mastra.md): [EN] Source: - [Mastra Docs Server](mastra-docs-server.md): [EN] Source: - [Project Structure](project-structure.md): [EN] Source: - [Studio](studio.md): [EN] Source: - [Templates](templates.md): [EN] Source: - [About Mastra](about-mastra.md): [EN] Source: - [MCP Overview](mcp-overview.md): [EN] Source: - [Publishing an MCP Server](publishing-an-mcp-server.md): [EN] Source: - [Conversation History](conversation-history.md): [EN] Source: - [Memory Processors](memory-processors.md): [EN] Source: - [Memory overview](memory-overview.md): [EN] Source: - [Semantic Recall](semantic-recall.md): [EN] Source: - [Memory with LibSQL](memory-with-libsql.md): [EN] Source: - [Memory with MongoDB](memory-with-mongodb.md): [EN] Source: - [Memory with Postgres](memory-with-postgres.md): [EN] Source: - [Memory with Upstash](memory-with-upstash.md): [EN] Source: - [Memory threads and resources](memory-threads-and-resources.md): [EN] Source: - [Working Memory](working-memory.md): [EN] Source: - [User Profile](user-profile.md): - Name: - [User Profile](user-profile-2.md): - Name: - [User Profile](user-profile-3.md): - Name: Sam - [User Profile](user-profile-4.md): - Name: Sam - [Arize Exporter](arize-exporter.md): [EN] Source: - [Braintrust Exporter](braintrust-exporter.md): [EN] Source: - [Cloud Exporter](cloud-exporter.md): [EN] Source: - [Default Exporter](default-exporter.md): [EN] Source: - [Langfuse Exporter](langfuse-exporter.md): [EN] Source: - [LangSmith Exporter](langsmith-exporter.md): [EN] Source: - [OpenTelemetry Exporter](opentelemetry-exporter.md): [EN] Source: - [AI Tracing](ai-tracing.md): [EN] Source: - [Sensitive Data Filter](sensitive-data-filter.md): [EN] Source: - [Logging](logging.md): [EN] Source: - [Next.js Tracing](nextjs-tracing.md): [EN] Source: - [OTEL Tracing](otel-tracing.md): [EN] Source: - [Observability Overview](observability-overview.md): [EN] Source: - [Chunking and Embedding Documents](chunking-and-embedding-documents.md): [EN] Source: - [RAG (Retrieval-Augmented Generation) in Mastra](rag-retrieval-augmented-generation-in-mastra.md): [EN] Source: - [Retrieval in RAG Systems](retrieval-in-rag-systems.md): [EN] Source: - [Storing Embeddings in A Vector Database](storing-embeddings-in-a-vector-database.md): [EN] Source: - [Built-in Scorers](built-in-scorers.md): [EN] Source: - [Custom Scorers](custom-scorers.md): [EN] Source: - [Create a Custom Eval](create-a-custom-eval.md): [EN] Source: - [Evals Overview](evals-overview.md): [EN] Source: - [Running Evals in CI](running-evals-in-ci.md): [EN] Source: - [Textual Evals](textual-evals.md): [EN] Source: - [Scorers Overview](scorers-overview.md): [EN] Source: - [Custom API Routes](custom-api-routes.md): [EN] Source: - [Mastra Client SDK](mastra-client-sdk.md): [EN] Source: - [Mastra Server](mastra-server.md): [EN] Source: - [Middleware](middleware.md): [EN] Source: - [Related](related.md): - [Runtime Context](./runtime-context) - [Runtime Context](runtime-context.md): [EN] Source: - [MastraStorage](mastrastorage.md): [EN] Source: - [Streaming Events](streaming-events.md): [EN] Source: - [Streaming Overview](streaming-overview.md): [EN] Source: - [Tool streaming](tool-streaming.md): [EN] Source: - [Workflow streaming](workflow-streaming.md): [EN] Source: - [Voice in Mastra](voice-in-mastra.md): [EN] Source: - [Speech-to-Speech Capabilities in Mastra](speech-to-speech-capabilities-in-mastra.md): [EN] Source: - [Speech-to-Text (STT)](speech-to-text-stt.md): [EN] Source: - [Text-to-Speech (TTS)](text-to-speech-tts.md): [EN] Source: - [Agents and Tools](agents-and-tools.md): [EN] Source: - [Control Flow](control-flow.md): [EN] Source: - [Error Handling](error-handling.md): [EN] Source: - [Human-in-the-loop (HITL)](human-in-the-loop-hitl.md): [EN] Source: - [Inngest Workflow](inngest-workflow.md): [EN] Source: - [Workflows overview](workflows-overview.md): [EN] Source: - [Snapshots](snapshots.md): [EN] Source: - [Suspend & Resume](suspend-resume.md): [EN] Source: - [Control Flow in Legacy Workflows: Branching, Merging, and Conditions](control-flow-in-legacy-workflows-branching-merging-and-conditions.md): [EN] Source: - [Dynamic Workflows (Legacy)](dynamic-workflows-legacy.md): [EN] Source: - [Error Handling in Workflows (Legacy)](error-handling-in-workflows-legacy.md): [EN] Source: - [Nested Workflows (Legacy)](nested-workflows-legacy.md): [EN] Source: - [Handling Complex LLM Operations with Workflows (Legacy)](handling-complex-llm-operations-with-workflows-legacy.md): [EN] Source: - [Workflow Runtime Variables (Legacy)](workflow-runtime-variables-legacy.md): [EN] Source: - [Defining Steps in a Workflow (Legacy)](defining-steps-in-a-workflow-legacy.md): [EN] Source: - [Suspend and Resume in Workflows (Legacy)](suspend-and-resume-in-workflows-legacy.md): [EN] Source: - [Data Mapping with Workflow Variables](data-mapping-with-workflow-variables.md): [EN] Source: - [Example: AI SDK v5 Integration](example-ai-sdk-v5-integration.md): [EN] Source: - [Calling Agents](calling-agents.md): [EN] Source: - [Image Analysis](image-analysis.md): [EN] Source: - [Runtime Context](runtime-context-2.md): [EN] Source: - [Supervisor Agent](supervisor-agent.md): [EN] Source: - [Changing the System Prompt](changing-the-system-prompt.md): [EN] Source: - [WhatsApp Chat Bot](whatsapp-chat-bot.md): [EN] Source: - [Answer Relevancy Evaluation](answer-relevancy-evaluation.md): [EN] Source: - [Bias Evaluation](bias-evaluation.md): [EN] Source: - [Completeness Evaluation](completeness-evaluation.md): [EN] Source: - [Content Similarity Evaluation](content-similarity-evaluation.md): [EN] Source: - [Context Position Evaluation](context-position-evaluation.md): [EN] Source: - [Context Precision Evaluation](context-precision-evaluation.md): [EN] Source: - [Context Relevancy Evaluation](context-relevancy-evaluation.md): [EN] Source: - [Contextual Recall Evaluation](contextual-recall-evaluation.md): [EN] Source: - [LLM as a Judge Evaluation](llm-as-a-judge-evaluation.md): [EN] Source: - [Custom Native JavaScript Evaluation](custom-native-javascript-evaluation.md): [EN] Source: - [Faithfulness Evaluation](faithfulness-evaluation.md): [EN] Source: - [Hallucination Evaluation](hallucination-evaluation.md): [EN] Source: - [Keyword Coverage Evaluation](keyword-coverage-evaluation.md): [EN] Source: - [Prompt Alignment Evaluation](prompt-alignment-evaluation.md): [EN] Source: - [Summarization Evaluation](summarization-evaluation.md): [EN] Source: - [Textual Difference Evaluation](textual-difference-evaluation.md): [EN] Source: - [Tone Consistency Evaluation](tone-consistency-evaluation.md): [EN] Source: - [Toxicity Evaluation](toxicity-evaluation.md): [EN] Source: - [Examples](examples.md): [EN] Source: - [Working Memory with Schema](working-memory-with-schema.md): [EN] Source: - [Todo List](todo-list.md): 1. 🛠️ **Task:** Build a new feature for our app - [Working Memory with Template](working-memory-with-template.md): [EN] Source: - [Todo List](todo-list-2.md): 1. 🛠️ **Task:** Build a new feature for our app - [Basic AI Tracing Example](basic-ai-tracing-example.md): [EN] Source: - [Message Length Limiter](message-length-limiter.md): [EN] Source: - [Response Length Limiter](response-length-limiter.md): [EN] Source: - [Response Validator](response-validator.md): [EN] Source: - [Adjust Chunk Delimiters](adjust-chunk-delimiters.md): [EN] Source: - [Adjust Chunk Size](adjust-chunk-size.md): [EN] Source: - [Semantically Chunking HTML](semantically-chunking-html.md): [EN] Source: - [Semantically Chunking JSON](semantically-chunking-json.md): [EN] Source: - [Chunk Markdown](chunk-markdown.md): [EN] Source: - [Chunk Text](chunk-text.md): [EN] Source: - [Embed Chunk Array](embed-chunk-array.md): [EN] Source: - [Embed Text Chunk](embed-text-chunk.md): [EN] Source: - [Embed Text with Cohere](embed-text-with-cohere.md): [EN] Source: - [Metadata Extraction](metadata-extraction.md): [EN] Source: - [Hybrid Vector Search](hybrid-vector-search.md): [EN] Source: - [Retrieving Top-K Results](retrieving-top-k-results.md): [EN] Source: - [Re-ranking Results with Tools](re-ranking-results-with-tools.md): [EN] Source: - [Re-ranking Results](re-ranking-results.md): [EN] Source: - [Reranking with Cohere](reranking-with-cohere.md): [EN] Source: - [Reranking with ZeroEntropy](reranking-with-zeroentropy.md): [EN] Source: - [Upsert Embeddings](upsert-embeddings.md): [EN] Source: - [Using the Vector Query Tool](using-the-vector-query-tool.md): [EN] Source: - [Optimizing Information Density](optimizing-information-density.md): [EN] Source: - [Chain of Thought Prompting](chain-of-thought-prompting.md): [EN] Source: - [Structured Reasoning with Workflows](structured-reasoning-with-workflows.md): [EN] Source: - [Database-Specific Configurations](database-specific-configurations.md): [EN] Source: - [Agent-Driven Metadata Filtering](agent-driven-metadata-filtering.md): [EN] Source: - [Graph RAG](graph-rag.md): [EN] Source: - [Riverdale Heights: Community Development Study](riverdale-heights-community-development-study.md): // ... text content ... - [Call Analysis with Mastra](call-analysis-with-mastra.md): [EN] Source: - [Smart Voice Memo App](smart-voice-memo-app.md): [EN] Source: - [Interactive Story Generator](interactive-story-generator.md): [EN] Source: - [AI Debate with Turn Taking](ai-debate-with-turn-taking.md): [EN] Source: - [Inngest Workflow](inngest-workflow-2.md): [EN] Source: - [Branching Paths](branching-paths.md): [EN] Source: - [Calling an Agent From a Workflow (Legacy)](calling-an-agent-from-a-workflow-legacy.md): [EN] Source: - [Workflow (Legacy) with Conditional Branching (experimental)](workflow-legacy-with-conditional-branching-experimental.md): [EN] Source: - [Creating a Simple Workflow (Legacy)](creating-a-simple-workflow-legacy.md): [EN] Source: - [Workflow (Legacy) with Cyclical dependencies](workflow-legacy-with-cyclical-dependencies.md): [EN] Source: - [Human in the Loop Workflow (Legacy)](human-in-the-loop-workflow-legacy.md): [EN] Source: - [Parallel Execution with Steps](parallel-execution-with-steps.md): [EN] Source: - [Workflow (Legacy) with Sequential Steps](workflow-legacy-with-sequential-steps.md): [EN] Source: - [Workflow (Legacy) with Suspend and Resume](workflow-legacy-with-suspend-and-resume.md): [EN] Source: - [Tool as a Workflow step (Legacy)](tool-as-a-workflow-step-legacy.md): [EN] Source: - [Data Mapping with Workflow Variables (Legacy)](data-mapping-with-workflow-variables-legacy.md): [EN] Source: - [Building an AI Recruiter](building-an-ai-recruiter.md): [EN] Source: - [Building an AI Chef Assistant](building-an-ai-chef-assistant.md): [EN] Source: - [Building a Notes MCP Server](building-a-notes-mcp-server.md): [EN] Source: - [Building a Research Paper Assistant with RAG](building-a-research-paper-assistant-with-rag.md): [EN] Source: - [Building an AI Stock Agent](building-an-ai-stock-agent.md): [EN] Source: - [Building an Agent that can search the web](building-an-agent-that-can-search-the-web.md): [EN] Source: - [Guides](guides.md): [EN] Source: - [Migrate from AgentNetwork to `.network()`](migrate-from-agentnetwork-to-network.md): [EN] Source: - [Upgrade to Mastra v1](upgrade-to-mastra-v1.md): [EN] Source: - [Migrate from VNext to Standard APIs](migrate-from-vnext-to-standard-apis.md): [EN] Source: - [Next.js Quickstart](nextjs-quickstart.md): [EN] Source: - [Embedding Models](embedding-models.md): [EN] Source: - [.env](env.md): OPENAI_API_KEY=sk-... - [Gateway Providers](gateway-providers.md): [EN] Source: - [Netlify](netlifylogo-classnameinline-w-8-h-8-mr-2-align-middle-netlify.md): [EN] Source: - [Use gateway API key](use-gateway-api-key.md): NETLIFY_API_KEY=your-gateway-key - [Or use provider API keys directly](or-use-provider-api-keys-directly.md): OPENAI_API_KEY=sk-... - [OpenRouter logoOpenRouter](img-srchttpsmodelsdevlogosopenroutersvg-altopenrouter-logo-classnameinline-w-8-h.md): [EN] Source: - [Use gateway API key](use-gateway-api-key-2.md): OPENROUTER_API_KEY=your-gateway-key - [Or use provider API keys directly](or-use-provider-api-keys-directly-2.md): OPENAI_API_KEY=sk-... - [Vercel logoVercel](img-srchttpsmodelsdevlogosvercelsvg-altvercel-logo-classnameinline-w-8-h-8-mr-2-.md): [EN] Source: - [Use gateway API key](use-gateway-api-key-3.md): VERCEL_API_KEY=your-gateway-key - [Or use provider API keys directly](or-use-provider-api-keys-directly-3.md): OPENAI_API_KEY=sk-... - [Model Providers](model-providers.md): [EN] Source: - [AIHubMix logoAIHubMix](img-srchttpsmodelsdevlogosaihubmixsvg-altaihubmix-logo-classnameinline-w-8-h-8-m.md): [EN] Source: - [Alibaba (China) logoAlibaba (China)](img-srchttpsmodelsdevlogosalibaba-cnsvg-altalibaba-china-logo-classnameinline-w-.md): [EN] Source: - [Alibaba logoAlibaba](img-srchttpsmodelsdevlogosalibabasvg-altalibaba-logo-classnameinline-w-8-h-8-mr-.md): [EN] Source: - [Amazon Bedrock logoAmazon Bedrock](img-srchttpsmodelsdevlogosamazon-bedrocksvg-altamazon-bedrock-logo-classnameinli.md): [EN] Source: - [Anthropic logoAnthropic](img-srchttpsmodelsdevlogosanthropicsvg-altanthropic-logo-classnameinline-w-8-h-8.md): [EN] Source: - [Azure logoAzure](img-srchttpsmodelsdevlogosazuresvg-altazure-logo-classnameinline-w-8-h-8-mr-2-al.md): [EN] Source: - [Baseten logoBaseten](img-srchttpsmodelsdevlogosbasetensvg-altbaseten-logo-classnameinline-w-8-h-8-mr-.md): [EN] Source: - [Cerebras logoCerebras](img-srchttpsmodelsdevlogoscerebrassvg-altcerebras-logo-classnameinline-w-8-h-8-m.md): [EN] Source: - [Chutes logoChutes](img-srchttpsmodelsdevlogoschutessvg-altchutes-logo-classnameinline-w-8-h-8-mr-2-.md): [EN] Source: - [Cloudflare Workers AI logoCloudflare Workers AI](img-srchttpsmodelsdevlogoscloudflare-workers-aisvg-altcloudflare-workers-ai-logo.md): [EN] Source: - [Cortecs logoCortecs](img-srchttpsmodelsdevlogoscortecssvg-altcortecs-logo-classnameinline-w-8-h-8-mr-.md): [EN] Source: - [Deep Infra logoDeep Infra](img-srchttpsmodelsdevlogosdeepinfrasvg-altdeep-infra-logo-classnameinline-w-8-h-.md): [EN] Source: - [DeepSeek logoDeepSeek](img-srchttpsmodelsdevlogosdeepseeksvg-altdeepseek-logo-classnameinline-w-8-h-8-m.md): [EN] Source: - [FastRouter logoFastRouter](img-srchttpsmodelsdevlogosfastroutersvg-altfastrouter-logo-classnameinline-w-8-h.md): [EN] Source: - [Fireworks AI logoFireworks AI](img-srchttpsmodelsdevlogosfireworks-aisvg-altfireworks-ai-logo-classnameinline-w.md): [EN] Source: - [GitHub Models logoGitHub Models](img-srchttpsmodelsdevlogosgithub-modelssvg-altgithub-models-logo-classnameinline.md): [EN] Source: - [Vertex logoVertex](img-srchttpsmodelsdevlogosgoogle-vertexsvg-altvertex-logo-classnameinline-w-8-h-.md): [EN] Source: - [Google logoGoogle](img-srchttpsmodelsdevlogosgooglesvg-altgoogle-logo-classnameinline-w-8-h-8-mr-2-.md): [EN] Source: - [Groq logoGroq](img-srchttpsmodelsdevlogosgroqsvg-altgroq-logo-classnameinline-w-8-h-8-mr-2-alig.md): [EN] Source: - [Hugging Face logoHugging Face](img-srchttpsmodelsdevlogoshuggingfacesvg-althugging-face-logo-classnameinline-w-.md): [EN] Source: - [Inception logoInception](img-srchttpsmodelsdevlogosinceptionsvg-altinception-logo-classnameinline-w-8-h-8.md): [EN] Source: - [Model Providers](model-providers-2.md): [EN] Source: - [Inference logoInference](img-srchttpsmodelsdevlogosinferencesvg-altinference-logo-classnameinline-w-8-h-8.md): [EN] Source: - [Llama logoLlama](img-srchttpsmodelsdevlogosllamasvg-altllama-logo-classnameinline-w-8-h-8-mr-2-al.md): [EN] Source: - [LMStudio logoLMStudio](img-srchttpsmodelsdevlogoslmstudiosvg-altlmstudio-logo-classnameinline-w-8-h-8-m.md): [EN] Source: - [LucidQuery AI logoLucidQuery AI](img-srchttpsmodelsdevlogoslucidquerysvg-altlucidquery-ai-logo-classnameinline-w-.md): [EN] Source: - [Mistral logoMistral](img-srchttpsmodelsdevlogosmistralsvg-altmistral-logo-classnameinline-w-8-h-8-mr-.md): [EN] Source: - [ModelScope logoModelScope](img-srchttpsmodelsdevlogosmodelscopesvg-altmodelscope-logo-classnameinline-w-8-h.md): [EN] Source: - [Moonshot AI (China) logoMoonshot AI (China)](img-srchttpsmodelsdevlogosmoonshotai-cnsvg-altmoonshot-ai-china-logo-classnamein.md): [EN] Source: - [Moonshot AI logoMoonshot AI](img-srchttpsmodelsdevlogosmoonshotaisvg-altmoonshot-ai-logo-classnameinline-w-8-.md): [EN] Source: - [Morph logoMorph](img-srchttpsmodelsdevlogosmorphsvg-altmorph-logo-classnameinline-w-8-h-8-mr-2-al.md): [EN] Source: - [Nebius AI Studio logoNebius AI Studio](img-srchttpsmodelsdevlogosnebiussvg-altnebius-ai-studio-logo-classnameinline-w-8.md): [EN] Source: - [Nvidia logoNvidia](img-srchttpsmodelsdevlogosnvidiasvg-altnvidia-logo-classnameinline-w-8-h-8-mr-2-.md): [EN] Source: - [Ollama logoOllama](img-srchttpsmodelsdevlogosollamasvg-altollama-logo-classnameinline-w-8-h-8-mr-2-.md): [EN] Source: - [OpenAI logoOpenAI](img-srchttpsmodelsdevlogosopenaisvg-altopenai-logo-classnameinline-w-8-h-8-mr-2-.md): [EN] Source: - [OpenCode Zen logoOpenCode Zen](img-srchttpsmodelsdevlogosopencodesvg-altopencode-zen-logo-classnameinline-w-8-h.md): [EN] Source: - [Perplexity logoPerplexity](img-srchttpsmodelsdevlogosperplexitysvg-altperplexity-logo-classnameinline-w-8-h.md): [EN] Source: - [Requesty logoRequesty](img-srchttpsmodelsdevlogosrequestysvg-altrequesty-logo-classnameinline-w-8-h-8-m.md): [EN] Source: - [Scaleway logoScaleway](img-srchttpsmodelsdevlogosscalewaysvg-altscaleway-logo-classnameinline-w-8-h-8-m.md): [EN] Source: - [submodel logosubmodel](img-srchttpsmodelsdevlogossubmodelsvg-altsubmodel-logo-classnameinline-w-8-h-8-m.md): [EN] Source: - [Synthetic logoSynthetic](img-srchttpsmodelsdevlogossyntheticsvg-altsynthetic-logo-classnameinline-w-8-h-8.md): [EN] Source: - [Together AI logoTogether AI](img-srchttpsmodelsdevlogostogetheraisvg-alttogether-ai-logo-classnameinline-w-8-.md): [EN] Source: - [Upstage logoUpstage](img-srchttpsmodelsdevlogosupstagesvg-altupstage-logo-classnameinline-w-8-h-8-mr-.md): [EN] Source: - [Venice AI logoVenice AI](img-srchttpsmodelsdevlogosvenicesvg-altvenice-ai-logo-classnameinline-w-8-h-8-mr.md): [EN] Source: - [Vultr logoVultr](img-srchttpsmodelsdevlogosvultrsvg-altvultr-logo-classnameinline-w-8-h-8-mr-2-al.md): [EN] Source: - [Weights & Biases logoWeights & Biases](img-srchttpsmodelsdevlogoswandbsvg-altweights-biases-logo-classnameinline-w-8-h-.md): [EN] Source: - [xAI logoxAI](img-srchttpsmodelsdevlogosxaisvg-altxai-logo-classnameinline-w-8-h-8-mr-2-align-.md): [EN] Source: - [Z.AI Coding Plan logoZ.AI Coding Plan](img-srchttpsmodelsdevlogoszai-coding-plansvg-altzai-coding-plan-logo-classnamein.md): [EN] Source: - [Z.AI logoZ.AI](img-srchttpsmodelsdevlogoszaisvg-altzai-logo-classnameinline-w-8-h-8-mr-2-align-.md): [EN] Source: - [ZenMux logoZenMux](img-srchttpsmodelsdevlogoszenmuxsvg-altzenmux-logo-classnameinline-w-8-h-8-mr-2-.md): [EN] Source: - [Zhipu AI Coding Plan logoZhipu AI Coding Plan](img-srchttpsmodelsdevlogoszhipuai-coding-plansvg-altzhipu-ai-coding-plan-logo-cl.md): [EN] Source: - [Zhipu AI logoZhipu AI](img-srchttpsmodelsdevlogoszhipuaisvg-altzhipu-ai-logo-classnameinline-w-8-h-8-mr.md): [EN] Source: - [Agent Class](agent-class.md): [EN] Source: - [Agent.generate()](agentgenerate.md): [EN] Source: - [Agent.generateLegacy() (Legacy)](agentgeneratelegacy-legacy.md): [EN] Source: - [Agent.getDefaultGenerateOptions()](agentgetdefaultgenerateoptions.md): [EN] Source: - [Agent.getDefaultStreamOptions()](agentgetdefaultstreamoptions.md): [EN] Source: - [Agent.getDescription()](agentgetdescription.md): [EN] Source: - [Agent.getInstructions()](agentgetinstructions.md): [EN] Source: - [Agent.getLLM()](agentgetllm.md): [EN] Source: - [Agent.getMemory()](agentgetmemory.md): [EN] Source: - [Agent.getModel()](agentgetmodel.md): [EN] Source: - [Agent.getScorers()](agentgetscorers.md): [EN] Source: - [Agent.getTools()](agentgettools.md): [EN] Source: - [Agent.getVoice()](agentgetvoice.md): [EN] Source: - [Agent.getWorkflows()](agentgetworkflows.md): [EN] Source: - [Agent.listAgents()](agentlistagents.md): [EN] Source: - [Agent.listScorers()](agentlistscorers.md): [EN] Source: - [Agent.listWorkflows()](agentlistworkflows.md): [EN] Source: - [Agent.network()](agentnetwork.md): [EN] Source: - [MastraAuthAuth0 Class](mastraauthauth0-class-2.md): [EN] Source: - [MastraAuthClerk Class](mastraauthclerk-class-2.md): [EN] Source: - [MastraAuthFirebase Class](mastraauthfirebase-class-2.md): [EN] Source: - [MastraJwtAuth Class](mastrajwtauth-class-2.md): [EN] Source: - [MastraAuthSupabase Class](mastraauthsupabase-class-2.md): [EN] Source: - [MastraAuthWorkos Class](mastraauthworkos-class-2.md): [EN] Source: - [create-mastra](create-mastra.md): [EN] Source: - [CLI Commands](cli-commands.md): [EN] Source: - [Agents API](agents-api.md): [EN] Source: - [Error Handling](error-handling-2.md): [EN] Source: - [Logs API](logs-api.md): [EN] Source: - [Mastra Client SDK](mastra-client-sdk-2.md): [EN] Source: - [Memory API](memory-api.md): [EN] Source: - [Observability API](observability-api.md): [EN] Source: - [Telemetry API](telemetry-api.md): [EN] Source: - [Tools API](tools-api.md): [EN] Source: - [Vectors API](vectors-api.md): [EN] Source: - [Workflows (Legacy) API](workflows-legacy-api.md): [EN] Source: - [Workflows API](workflows-api.md): [EN] Source: - [Mastra.getAgent()](mastragetagent.md): [EN] Source: - [Mastra.getAgentById()](mastragetagentbyid.md): [EN] Source: - [Mastra.getAgents()](mastragetagents.md): [EN] Source: - [Mastra.getDeployer()](mastragetdeployer.md): [EN] Source: - [Mastra.getLogger()](mastragetlogger.md): [EN] Source: - [Mastra.getLogs()](mastragetlogs.md): [EN] Source: - [Mastra.getLogsByRunId()](mastragetlogsbyrunid.md): [EN] Source: - [Mastra.getMCPServer()](mastragetmcpserver.md): [EN] Source: - [Mastra.getMCPServers()](mastragetmcpservers.md): [EN] Source: - [Mastra.getMemory()](mastragetmemory.md): [EN] Source: - [getScorer()](getscorer.md): [EN] Source: - [getScorerByName()](getscorerbyname.md): [EN] Source: - [getScorers()](getscorers.md): [EN] Source: - [Mastra.getServer()](mastragetserver.md): [EN] Source: - [Mastra.getStorage()](mastragetstorage.md): [EN] Source: - [Mastra.getTelemetry()](mastragettelemetry.md): [EN] Source: - [Mastra.getVector()](mastragetvector.md): [EN] Source: - [Mastra.getVectors()](mastragetvectors.md): [EN] Source: - [Mastra.getWorkflow()](mastragetworkflow.md): [EN] Source: - [Mastra.getWorkflows()](mastragetworkflows.md): [EN] Source: - [Mastra.listLogs()](mastralistlogs.md): [EN] Source: - [Mastra.listLogsByRunId()](mastralistlogsbyrunid.md): [EN] Source: - [listScorers()](listscorers.md): [EN] Source: - [Mastra.getWorkflows()](mastragetworkflows-2.md): [EN] Source: - [Mastra Class](mastra-class.md): [EN] Source: - [Mastra.setLogger()](mastrasetlogger.md): [EN] Source: - [Mastra.setStorage()](mastrasetstorage.md): [EN] Source: - [Mastra.setTelemetry()](mastrasettelemetry.md): [EN] Source: - [CloudflareDeployer](cloudflaredeployer-2.md): [EN] Source: - [Deployer](deployer.md): [EN] Source: - [NetlifyDeployer](netlifydeployer-2.md): [EN] Source: - [VercelDeployer](verceldeployer-2.md): [EN] Source: - [AnswerRelevancyMetric](answerrelevancymetric.md): [EN] Source: - [BiasMetric](biasmetric.md): [EN] Source: - [CompletenessMetric](completenessmetric.md): [EN] Source: - [ContentSimilarityMetric](contentsimilaritymetric.md): [EN] Source: - [ContextPositionMetric](contextpositionmetric.md): [EN] Source: - [ContextPrecisionMetric](contextprecisionmetric.md): [EN] Source: - [ContextRelevancyMetric](contextrelevancymetric.md): [EN] Source: - [ContextualRecallMetric](contextualrecallmetric.md): [EN] Source: - [FaithfulnessMetric Reference](faithfulnessmetric-reference.md): [EN] Source: - [HallucinationMetric](hallucinationmetric.md): [EN] Source: - [KeywordCoverageMetric](keywordcoveragemetric.md): [EN] Source: - [PromptAlignmentMetric](promptalignmentmetric.md): [EN] Source: - [SummarizationMetric](summarizationmetric.md): [EN] Source: - [TextualDifferenceMetric](textualdifferencemetric.md): [EN] Source: - [ToneConsistencyMetric](toneconsistencymetric.md): [EN] Source: - [ToxicityMetric](toxicitymetric.md): [EN] Source: - [Reference](reference.md): [EN] Source: - [.after()](after.md): [EN] Source: - [afterEvent()](afterevent.md): [EN] Source: - [Workflow.commit()](workflowcommit.md): [EN] Source: - [Workflow.createRun()](workflowcreaterun.md): [EN] Source: - [Workflow.else()](workflowelse.md): [EN] Source: - [Event-Driven Workflows](event-driven-workflows.md): [EN] Source: - [Workflow.execute()](workflowexecute.md): [EN] Source: - [Workflow.if()](workflowif.md): [EN] Source: - [run.resume()](runresume.md): [EN] Source: - [resumeWithEvent()](resumewithevent.md): [EN] Source: - [Snapshots](snapshots-2.md): [EN] Source: - [start()](start.md): [EN] Source: - [Step](step.md): [EN] Source: - [StepCondition](stepcondition.md): [EN] Source: - [Workflow.step()](workflowstep.md): [EN] Source: - [StepOptions](stepoptions.md): [EN] Source: - [Step Retries](step-retries.md): [EN] Source: - [suspend()](suspend.md): [EN] Source: - [Workflow.then()](workflowthen.md): [EN] Source: - [Workflow.until()](workflowuntil.md): [EN] Source: - [run.watch()](runwatch.md): [EN] Source: - [Workflow.while()](workflowwhile.md): [EN] Source: - [Workflow Class](workflow-class.md): [EN] Source: - [Memory.createThread()](memorycreatethread.md): [EN] Source: - [Memory.deleteMessages()](memorydeletemessages.md): [EN] Source: - [Memory.getThreadById()](memorygetthreadbyid.md): [EN] Source: - [Memory.getThreadsByResourceId()](memorygetthreadsbyresourceid.md): [EN] Source: - [Memory.getThreadsByResourceIdPaginated()](memorygetthreadsbyresourceidpaginated.md): [EN] Source: - [Memory Class](memory-class.md): [EN] Source: - [Memory.query()](memoryquery.md): [EN] Source: - [AITracing](aitracing.md): [EN] Source: - [Configuration](configuration.md): [EN] Source: - [Registry Functions](registry-functions.md): function setupAITracing(config: ObservabilityRegistryConfig): void; - [ArizeExporter](arizeexporter.md): [EN] Source: - [BraintrustExporter](braintrustexporter.md): [EN] Source: - [CloudExporter](cloudexporter.md): [EN] Source: - [ConsoleExporter](consoleexporter.md): [EN] Source: - [DefaultExporter](defaultexporter.md): [EN] Source: - [LangfuseExporter](langfuseexporter.md): [EN] Source: - [LangSmithExporter](langsmithexporter.md): [EN] Source: - [OtelExporter](otelexporter.md): [EN] Source: - [Interfaces](interfaces.md): [EN] Source: - [SensitiveDataFilter](sensitivedatafilter.md): [EN] Source: - [Span](span.md): [EN] Source: - [PinoLogger](pinologger.md): [EN] Source: - [OtelConfig](otelconfig.md): [EN] Source: - [Arize AX](arize-ax.md): [EN] Source: - [Arize Phoenix](arize-phoenix.md): [EN] Source: - [Optional: If authentication enabled](optional-if-authentication-enabled.md): PHOENIX_API_KEY="your-api-key" - [Braintrust](braintrust.md): [EN] Source: - [Dash0](dash0.md): [EN] Source: - [OTLP Providers](otlp-providers.md): [EN] Source: - [Laminar](laminar.md): [EN] Source: - [Langfuse](langfuse.md): [EN] Source: - [OTEL_EXPORTER_OTLP_ENDPOINT="https://us.cloud.langfuse.com/api/public/otel/v1/traces" # 🇺🇸 US data region](otel-exporter-otlp-endpointhttpsuscloudlangfusecomapipublicotelv1traces-us-data-.md): OTEL_EXPORTER_OTLP_HEADERS="Authorization=Basic ${AUTH_STRING}" - [LangSmith](langsmith.md): [EN] Source: - [LangWatch](langwatch.md): [EN] Source: - [New Relic](new-relic.md): [EN] Source: - [SigNoz](signoz.md): [EN] Source: - [Traceloop](traceloop.md): [EN] Source: - [BatchPartsProcessor](batchpartsprocessor.md): [EN] Source: - [LanguageDetector](languagedetector.md): [EN] Source: - [ModerationProcessor](moderationprocessor.md): [EN] Source: - [PIIDetector](piidetector.md): [EN] Source: - [PromptInjectionDetector](promptinjectiondetector.md): [EN] Source: - [SystemPromptScrubber](systempromptscrubber.md): [EN] Source: - [TokenLimiterProcessor](tokenlimiterprocessor.md): [EN] Source: - [UnicodeNormalizer](unicodenormalizer.md): [EN] Source: - [Reference: .chunk()](reference-chunk.md): [EN] Source: - [Introduction](introduction.md): This is a sample document that we want to split into chunks. - [DatabaseConfig](databaseconfig.md): [EN] Source: - [MDocument](mdocument.md): [EN] Source: - [Embed](embed.md): [EN] Source: - [ExtractParams](extractparams.md): [EN] Source: - [GraphRAG](graphrag.md): [EN] Source: - [Metadata Filters](metadata-filters.md): [EN] Source: - [rerank()](rerank.md): [EN] Source: - [rerankWithScorer()](rerankwithscorer.md): [EN] Source: - [Answer Relevancy Scorer](answer-relevancy-scorer.md): [EN] Source: - [Answer Similarity Scorer](answer-similarity-scorer.md): [EN] Source: - [Bias Scorer](bias-scorer.md): [EN] Source: - [Completeness Scorer](completeness-scorer.md): [EN] Source: - [Content Similarity Scorer](content-similarity-scorer.md): [EN] Source: - [Context Precision Scorer](context-precision-scorer.md): [EN] Source: - [Context Relevance Scorer](context-relevance-scorer.md): [EN] Source: - [createScorer](createscorer.md): [EN] Source: - [Faithfulness Scorer](faithfulness-scorer.md): [EN] Source: - [Hallucination Scorer](hallucination-scorer.md): [EN] Source: - [Keyword Coverage Scorer](keyword-coverage-scorer.md): [EN] Source: - [MastraScorer](mastrascorer.md): [EN] Source: - [Noise Sensitivity Scorer (CI/Testing Only)](noise-sensitivity-scorer-citesting-only.md): [EN] Source: - [Prompt Alignment Scorer](prompt-alignment-scorer.md): [EN] Source: - [runExperiment](runexperiment.md): [EN] Source: - [Textual Difference Scorer](textual-difference-scorer.md): [EN] Source: - [Tone Consistency Scorer](tone-consistency-scorer.md): [EN] Source: - [Tool Call Accuracy Scorers](tool-call-accuracy-scorers.md): [EN] Source: - [Toxicity Scorer](toxicity-scorer.md): [EN] Source: - [Cloudflare D1 Storage](cloudflare-d1-storage.md): [EN] Source: - [Cloudflare Storage](cloudflare-storage.md): [EN] Source: - [DynamoDB Storage](dynamodb-storage.md): [EN] Source: - [or](or.md): yarn add @mastra/dynamodb@latest - [LanceDB Storage](lancedb-storage.md): [EN] Source: - [LibSQL Storage](libsql-storage.md): [EN] Source: - [MongoDB Storage](mongodb-storage.md): [EN] Source: - [MSSQL Storage](mssql-storage.md): [EN] Source: - [PostgreSQL Storage](postgresql-storage.md): [EN] Source: - [Upstash Storage](upstash-storage.md): [EN] Source: - [ChunkType](chunktype.md): [EN] Source: - [MastraModelOutput](mastramodeloutput.md): [EN] Source: - [Agent.stream()](agentstream.md): [EN] Source: - [Agent.streamLegacy() (Legacy)](agentstreamlegacy-legacy.md): [EN] Source: - [Run.observeStream()](runobservestream.md): [EN] Source: - [Run.observeStreamVNext() (Experimental)](runobservestreamvnext-experimental.md): [EN] Source: - [Run.resumeStreamVNext() (Experimental)](runresumestreamvnext-experimental.md): [EN] Source: - [Run.stream()](runstream.md): [EN] Source: - [Run.streamVNext() (Experimental)](runstreamvnext-experimental.md): [EN] Source: - [Overview](overview.md): [EN] Source: - [LLM provider API keys (choose one or more)](llm-provider-api-keys-choose-one-or-more.md): OPENAI_API_KEY=your_openai_api_key_here - [Other service API keys as needed](other-service-api-keys-as-needed.md): OTHER_SERVICE_API_KEY=your_api_key_here - [Template Name](template-name.md): Brief description of what the template demonstrates. - [MastraMCPClient (Deprecated)](mastramcpclient-deprecated.md): [EN] Source: - [createTool()](createtool.md): [EN] Source: - [createDocumentChunkerTool()](createdocumentchunkertool.md): [EN] Source: - [createGraphRAGTool()](creategraphragtool.md): [EN] Source: - [MCPClient](mcpclient.md): [EN] Source: - [MCPServer](mcpserver.md): [EN] Source: - [createVectorQueryTool()](createvectorquerytool.md): [EN] Source: - [Astra Vector Store](astra-vector-store.md): [EN] Source: - [Chroma Vector Store](chroma-vector-store.md): [EN] Source: - [Couchbase Vector Store](couchbase-vector-store.md): [EN] Source: - [Lance Vector Store](lance-vector-store.md): [EN] Source: - [LibSQLVector Store](libsqlvector-store.md): [EN] Source: - [MongoDB Vector Store](mongodb-vector-store.md): [EN] Source: - [OpenSearch Vector Store](opensearch-vector-store.md): [EN] Source: - [PG Vector Store](pg-vector-store.md): [EN] Source: - [Pinecone Vector Store](pinecone-vector-store.md): [EN] Source: - [Qdrant Vector Store](qdrant-vector-store.md): [EN] Source: - [Amazon S3 Vectors Store](amazon-s3-vectors-store.md): [EN] Source: - [Turbopuffer Vector Store](turbopuffer-vector-store.md): [EN] Source: - [Upstash Vector Store](upstash-vector-store.md): [EN] Source: - [Cloudflare Vector Store](cloudflare-vector-store.md): [EN] Source: - [Azure](azure.md): [EN] Source: - [Cloudflare](cloudflare.md): [EN] Source: - [CompositeVoice](compositevoice.md): [EN] Source: - [Deepgram](deepgram.md): [EN] Source: - [ElevenLabs](elevenlabs.md): [EN] Source: - [Google Gemini Live Voice](google-gemini-live-voice.md): [EN] Source: - [Google](google.md): [EN] Source: - [MastraVoice](mastravoice.md): [EN] Source: - [Murf](murf.md): [EN] Source: - [OpenAI Realtime Voice](openai-realtime-voice.md): [EN] Source: - [OpenAI](openai.md): [EN] Source: - [PlayAI](playai.md): [EN] Source: - [Sarvam](sarvam.md): [EN] Source: - [Speechify](speechify.md): [EN] Source: - [voice.addInstructions()](voiceaddinstructions.md): [EN] Source: - [voice.addTools()](voiceaddtools.md): [EN] Source: - [voice.answer()](voiceanswer.md): [EN] Source: - [voice.close()](voiceclose.md): [EN] Source: - [voice.connect()](voiceconnect.md): [EN] Source: - [Voice Events](voice-events.md): [EN] Source: - [voice.getSpeakers()](voicegetspeakers.md): [EN] Source: - [voice.listen()](voicelisten.md): [EN] Source: - [voice.off()](voiceoff.md): [EN] Source: - [voice.on()](voiceon.md): [EN] Source: - [voice.send()](voicesend.md): [EN] Source: - [voice.speak()](voicespeak.md): [EN] Source: - [voice.updateConfig()](voiceupdateconfig.md): [EN] Source: - [Run.cancel()](runcancel.md): [EN] Source: - [Run.resume()](runresume-2.md): [EN] Source: - [Run.start()](runstart.md): [EN] Source: - [Run.watch()](runwatch-2.md): [EN] Source: - [Run Class](run-class.md): [EN] Source: - [Step Class](step-class.md): [EN] Source: - [Workflow.branch()](workflowbranch.md): [EN] Source: - [Workflow.commit()](workflowcommit-2.md): [EN] Source: - [Workflow.createRunAsync()](workflowcreaterunasync.md): [EN] Source: - [Workflow.dountil()](workflowdountil.md): [EN] Source: - [Workflow.dowhile()](workflowdowhile.md): [EN] Source: - [Workflow.foreach()](workflowforeach.md): [EN] Source: - [Workflow.map()](workflowmap.md): [EN] Source: - [Workflow.parallel()](workflowparallel.md): [EN] Source: - [Workflow.sendEvent()](workflowsendevent.md): [EN] Source: - [Workflow.sleep()](workflowsleep.md): [EN] Source: - [Workflow.sleepUntil()](workflowsleepuntil.md): [EN] Source: - [Workflow.then()](workflowthen-2.md): [EN] Source: - [Workflow.waitForEvent()](workflowwaitforevent.md): [EN] Source: - [Workflow Class](workflow-class-2.md): [EN] Source: