@mastra/mcp-docs-server 0.0.0-bundle-recursion-20251030002519 → 0.0.0-bundle-version-20260121091645
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.docs/organized/changelogs/%40internal%2Fchangeset-cli.md +1 -15
- package/.docs/organized/changelogs/%40internal%2Fexternal-types.md +1 -7
- package/.docs/organized/changelogs/%40internal%2Fplayground.md +60 -0
- package/.docs/organized/changelogs/%40internal%2Fstorage-test-utils.md +201 -1
- package/.docs/organized/changelogs/%40internal%2Ftypes-builder.md +1 -55
- package/.docs/organized/changelogs/%40mastra%2Fagent-builder.md +368 -168
- package/.docs/organized/changelogs/%40mastra%2Fai-sdk.md +362 -162
- package/.docs/organized/changelogs/%40mastra%2Fastra.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fauth.md +52 -0
- package/.docs/organized/changelogs/%40mastra%2Fchroma.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +701 -191
- package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +400 -200
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +596 -191
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +629 -190
- package/.docs/organized/changelogs/%40mastra%2Fcodemod.md +235 -0
- package/.docs/organized/changelogs/%40mastra%2Fconvex.md +502 -0
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +376 -176
- package/.docs/organized/changelogs/%40mastra%2Fcouchbase.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +360 -160
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +377 -177
- package/.docs/organized/changelogs/%40mastra%2Fduckdb.md +112 -0
- package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +575 -197
- package/.docs/organized/changelogs/%40mastra%2Felasticsearch.md +133 -0
- package/.docs/organized/changelogs/%40mastra%2Fevals.md +211 -11
- package/.docs/organized/changelogs/%40mastra%2Ffastembed.md +64 -0
- package/.docs/organized/changelogs/%40mastra%2Flance.md +621 -191
- package/.docs/organized/changelogs/%40mastra%2Flibsql.md +788 -192
- package/.docs/organized/changelogs/%40mastra%2Floggers.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +336 -136
- package/.docs/organized/changelogs/%40mastra%2Fmcp-registry-registry.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmcp.md +384 -184
- package/.docs/organized/changelogs/%40mastra%2Fmemory.md +576 -178
- package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +729 -196
- package/.docs/organized/changelogs/%40mastra%2Fmssql.md +670 -191
- package/.docs/organized/changelogs/%40mastra%2Fopensearch.md +231 -31
- package/.docs/organized/changelogs/%40mastra%2Fpg.md +913 -167
- package/.docs/organized/changelogs/%40mastra%2Fpinecone.md +248 -48
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +376 -176
- package/.docs/organized/changelogs/%40mastra%2Fqdrant.md +204 -4
- package/.docs/organized/changelogs/%40mastra%2Frag.md +414 -214
- package/.docs/organized/changelogs/%40mastra%2Freact.md +358 -158
- package/.docs/organized/changelogs/%40mastra%2Fs3vectors.md +101 -0
- package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +220 -0
- package/.docs/organized/changelogs/%40mastra%2Fserver.md +363 -163
- package/.docs/organized/changelogs/%40mastra%2Fturbopuffer.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fupstash.md +640 -193
- package/.docs/organized/changelogs/%40mastra%2Fvectorize.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-azure.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-cloudflare.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-deepgram.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-elevenlabs.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-gladia.md +107 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google-gemini-live.md +183 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-murf.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai-realtime.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-playai.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-sarvam.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-speechify.md +201 -1
- package/.docs/organized/changelogs/create-mastra.md +291 -91
- package/.docs/organized/changelogs/mastra.md +365 -165
- package/.docs/organized/code-examples/a2a.md +6 -4
- package/.docs/organized/code-examples/agent-v6.md +221 -0
- package/.docs/organized/code-examples/agui.md +16 -12
- package/.docs/organized/code-examples/ai-elements.md +4 -4
- package/.docs/organized/code-examples/ai-sdk-useChat.md +16 -22
- package/.docs/organized/code-examples/ai-sdk-v5.md +9 -6
- package/.docs/organized/code-examples/assistant-ui.md +7 -7
- package/.docs/organized/code-examples/bird-checker-with-express.md +7 -6
- package/.docs/organized/code-examples/bird-checker-with-nextjs-and-eval.md +8 -7
- package/.docs/organized/code-examples/bird-checker-with-nextjs.md +8 -7
- package/.docs/organized/code-examples/client-side-tools.md +6 -5
- package/.docs/organized/code-examples/crypto-chatbot.md +7 -7
- package/.docs/organized/code-examples/experimental-auth-weather-agent.md +9 -178
- package/.docs/organized/code-examples/fireworks-r1.md +5 -5
- package/.docs/organized/code-examples/heads-up-game.md +8 -5
- package/.docs/organized/code-examples/inngest.md +1075 -0
- package/.docs/organized/code-examples/mcp-configuration.md +6 -7
- package/.docs/organized/code-examples/mcp-registry-registry.md +3 -2
- package/.docs/organized/code-examples/mcp-server-adapters.md +720 -0
- package/.docs/organized/code-examples/memory-per-resource-example.md +7 -5
- package/.docs/organized/code-examples/memory-todo-agent.md +2 -1
- package/.docs/organized/code-examples/memory-with-context.md +3 -2
- package/.docs/organized/code-examples/memory-with-libsql.md +4 -2
- package/.docs/organized/code-examples/memory-with-mongodb.md +4 -2
- package/.docs/organized/code-examples/memory-with-pg.md +4 -2
- package/.docs/organized/code-examples/memory-with-processors.md +15 -10
- package/.docs/organized/code-examples/memory-with-upstash.md +5 -3
- package/.docs/organized/code-examples/openapi-spec-writer.md +36 -35
- package/.docs/organized/code-examples/processors-with-ai-sdk.md +14 -0
- package/.docs/organized/code-examples/quick-start.md +8 -39
- package/.docs/organized/code-examples/server-app-access.md +342 -0
- package/.docs/organized/code-examples/server-express-adapter.md +87 -0
- package/.docs/organized/code-examples/server-fastify-adapter.md +83 -0
- package/.docs/organized/code-examples/server-hono-adapter.md +85 -0
- package/.docs/organized/code-examples/server-koa-adapter.md +94 -0
- package/.docs/organized/code-examples/stock-price-tool.md +27 -27
- package/.docs/organized/code-examples/weather-agent.md +21 -16
- package/.docs/organized/code-examples/workflow-ai-recruiter.md +5 -4
- package/.docs/organized/code-examples/workflow-with-inline-steps.md +11 -14
- package/.docs/organized/code-examples/workflow-with-memory.md +18 -17
- package/.docs/organized/code-examples/workflow-with-separate-steps.md +4 -4
- package/.docs/organized/code-examples/workflow-with-suspend-resume.md +5 -4
- package/.docs/raw/agents/adding-voice.mdx +92 -23
- package/.docs/raw/agents/agent-approval.mdx +386 -0
- package/.docs/raw/agents/agent-memory.mdx +53 -41
- package/.docs/raw/agents/guardrails.mdx +141 -68
- package/.docs/raw/agents/network-approval.mdx +281 -0
- package/.docs/raw/agents/networks.mdx +79 -19
- package/.docs/raw/agents/overview.mdx +69 -194
- package/.docs/raw/agents/processors.mdx +496 -0
- package/.docs/raw/agents/structured-output.mdx +294 -0
- package/.docs/raw/agents/using-tools.mdx +86 -22
- package/.docs/raw/community/contributing-templates.mdx +1 -1
- package/.docs/raw/community/discord.mdx +2 -2
- package/.docs/raw/community/licensing.mdx +1 -1
- package/.docs/raw/course/01-first-agent/04-project-structure.md +2 -0
- package/.docs/raw/course/01-first-agent/05-running-playground.md +5 -5
- package/.docs/raw/course/01-first-agent/07-creating-your-agent.md +1 -2
- package/.docs/raw/course/01-first-agent/08-exporting-your-agent.md +2 -1
- package/.docs/raw/course/01-first-agent/09-testing-your-agent.md +3 -3
- package/.docs/raw/course/01-first-agent/12-connecting-tool-to-agent.md +1 -1
- package/.docs/raw/course/01-first-agent/13-testing-your-tool.md +3 -3
- package/.docs/raw/course/01-first-agent/15-installing-memory.md +1 -1
- package/.docs/raw/course/01-first-agent/16-adding-memory-to-agent.md +3 -3
- package/.docs/raw/course/01-first-agent/17-testing-memory.md +2 -2
- package/.docs/raw/course/02-agent-tools-mcp/04-initializing-mcp-tools.md +2 -2
- package/.docs/raw/course/02-agent-tools-mcp/05-updating-your-agent.md +1 -1
- package/.docs/raw/course/02-agent-tools-mcp/10-updating-agent-instructions-zapier.md +1 -1
- package/.docs/raw/course/02-agent-tools-mcp/16-updating-agent-instructions-github.md +1 -1
- package/.docs/raw/course/02-agent-tools-mcp/21-updating-agent-instructions-hackernews.md +1 -1
- package/.docs/raw/course/02-agent-tools-mcp/27-updating-agent-instructions-filesystem.md +1 -1
- package/.docs/raw/course/02-agent-tools-mcp/31-enhancing-memory-configuration.md +5 -3
- package/.docs/raw/course/02-agent-tools-mcp/32-conclusion.md +1 -1
- package/.docs/raw/course/03-agent-memory/03-installing-memory.md +1 -1
- package/.docs/raw/course/03-agent-memory/04-creating-basic-memory-agent.md +2 -2
- package/.docs/raw/course/03-agent-memory/07-understanding-memory-threads.md +35 -0
- package/.docs/raw/course/03-agent-memory/08-configuring-conversation-history.md +1 -2
- package/.docs/raw/course/03-agent-memory/10-storage-configuration.md +2 -3
- package/.docs/raw/course/03-agent-memory/13-vector-store-configuration.md +3 -1
- package/.docs/raw/course/03-agent-memory/16-configuring-semantic-recall.md +6 -5
- package/.docs/raw/course/03-agent-memory/18-advanced-configuration-semantic-recall.md +2 -1
- package/.docs/raw/course/03-agent-memory/21-configuring-working-memory.md +5 -4
- package/.docs/raw/course/03-agent-memory/22-custom-working-memory-templates.md +4 -4
- package/.docs/raw/course/03-agent-memory/25-combining-memory-features.md +4 -4
- package/.docs/raw/course/03-agent-memory/27-creating-learning-assistant.md +4 -4
- package/.docs/raw/course/04-workflows/07-using-playground.md +1 -1
- package/.docs/raw/course/04-workflows/08-running-workflows-programmatically.md +2 -2
- package/.docs/raw/course/04-workflows/11-creating-an-ai-agent.md +2 -3
- package/.docs/raw/deployment/cloud-providers.mdx +22 -0
- package/.docs/raw/deployment/mastra-server.mdx +140 -0
- package/.docs/raw/deployment/monorepo.mdx +106 -42
- package/.docs/raw/deployment/overview.mdx +37 -50
- package/.docs/raw/deployment/web-framework.mdx +18 -20
- package/.docs/raw/deployment/workflow-runners.mdx +16 -0
- package/.docs/raw/evals/built-in-scorers.mdx +54 -0
- package/.docs/raw/{scorers → evals}/custom-scorers.mdx +68 -22
- package/.docs/raw/{scorers → evals}/overview.mdx +19 -20
- package/.docs/raw/evals/running-in-ci.mdx +113 -0
- package/.docs/raw/getting-started/{installation.mdx → manual-install.mdx} +30 -103
- package/.docs/raw/getting-started/mcp-docs-server.mdx +57 -32
- package/.docs/raw/getting-started/project-structure.mdx +4 -4
- package/.docs/raw/getting-started/start.mdx +88 -0
- package/.docs/raw/getting-started/studio.mdx +39 -56
- package/.docs/raw/guides/agent-frameworks/ai-sdk.mdx +151 -0
- package/.docs/raw/guides/build-your-ui/ai-sdk-ui.mdx +1581 -0
- package/.docs/raw/{frameworks/agentic-uis → guides/build-your-ui}/assistant-ui.mdx +75 -23
- package/.docs/raw/guides/build-your-ui/copilotkit.mdx +227 -0
- package/.docs/raw/{deployment/cloud-providers → guides/deployment}/amazon-ec2.mdx +13 -13
- package/.docs/raw/{deployment/cloud-providers → guides/deployment}/aws-lambda.mdx +18 -19
- package/.docs/raw/{deployment/cloud-providers → guides/deployment}/azure-app-services.mdx +7 -9
- package/.docs/raw/{deployment/serverless-platforms → guides/deployment}/cloudflare-deployer.mdx +10 -7
- package/.docs/raw/{deployment/cloud-providers → guides/deployment}/digital-ocean.mdx +22 -27
- package/.docs/raw/guides/deployment/index.mdx +32 -0
- package/.docs/raw/guides/deployment/inngest.mdx +673 -0
- package/.docs/raw/{deployment/serverless-platforms → guides/deployment}/netlify-deployer.mdx +52 -17
- package/.docs/raw/{deployment/serverless-platforms → guides/deployment}/vercel-deployer.mdx +10 -7
- package/.docs/raw/guides/getting-started/astro.mdx +441 -0
- package/.docs/raw/guides/getting-started/express.mdx +128 -0
- package/.docs/raw/guides/getting-started/hono.mdx +227 -0
- package/.docs/raw/guides/getting-started/next-js.mdx +388 -0
- package/.docs/raw/guides/getting-started/nuxt.mdx +505 -0
- package/.docs/raw/guides/getting-started/quickstart.mdx +97 -0
- package/.docs/raw/guides/getting-started/sveltekit.mdx +329 -0
- package/.docs/raw/guides/getting-started/vite-react.mdx +425 -0
- package/.docs/raw/guides/guide/ai-recruiter.mdx +263 -0
- package/.docs/raw/guides/guide/chef-michel.mdx +268 -0
- package/.docs/raw/guides/guide/notes-mcp-server.mdx +450 -0
- package/.docs/raw/guides/guide/research-assistant.mdx +379 -0
- package/.docs/raw/guides/guide/stock-agent.mdx +183 -0
- package/.docs/raw/guides/guide/web-search.mdx +293 -0
- package/.docs/raw/guides/guide/whatsapp-chat-bot.mdx +421 -0
- package/.docs/raw/guides/index.mdx +10 -0
- package/.docs/raw/guides/migrations/agentnetwork.mdx +114 -0
- package/.docs/raw/guides/migrations/ai-sdk-v4-to-v5.mdx +119 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/_template.mdx +50 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/agent.mdx +416 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/cli.mdx +62 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/client.mdx +363 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/deployment.mdx +42 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/evals.mdx +260 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/mastra.mdx +160 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/mcp.mdx +114 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/memory.mdx +306 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/overview.mdx +120 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/processors.mdx +73 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/rag.mdx +47 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/storage.mdx +596 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/tools.mdx +180 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/tracing.mdx +335 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/vectors.mdx +92 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/voice.mdx +39 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/workflows.mdx +353 -0
- package/.docs/raw/guides/migrations/vnext-to-standard-apis.mdx +365 -0
- package/.docs/raw/index.mdx +9 -9
- package/.docs/raw/mastra-cloud/deployment.mdx +86 -0
- package/.docs/raw/mastra-cloud/observability.mdx +17 -25
- package/.docs/raw/mastra-cloud/overview.mdx +15 -49
- package/.docs/raw/mastra-cloud/setup.mdx +64 -0
- package/.docs/raw/mastra-cloud/studio.mdx +35 -0
- package/.docs/raw/mcp/overview.mdx +393 -0
- package/.docs/raw/mcp/publishing-mcp-server.mdx +142 -0
- package/.docs/raw/memory/memory-processors.mdx +273 -82
- package/.docs/raw/memory/message-history.mdx +72 -0
- package/.docs/raw/memory/overview.mdx +42 -76
- package/.docs/raw/memory/semantic-recall.mdx +77 -59
- package/.docs/raw/memory/storage.mdx +248 -0
- package/.docs/raw/memory/working-memory.mdx +41 -21
- package/.docs/raw/observability/logging.mdx +21 -20
- package/.docs/raw/observability/overview.mdx +37 -35
- package/.docs/raw/observability/tracing/bridges/otel.mdx +203 -0
- package/.docs/raw/observability/{ai-tracing → tracing}/exporters/arize.mdx +89 -24
- package/.docs/raw/observability/{ai-tracing → tracing}/exporters/braintrust.mdx +40 -20
- package/.docs/raw/observability/{ai-tracing → tracing}/exporters/cloud.mdx +34 -21
- package/.docs/raw/observability/tracing/exporters/datadog.mdx +175 -0
- package/.docs/raw/observability/{ai-tracing → tracing}/exporters/default.mdx +45 -28
- package/.docs/raw/observability/tracing/exporters/laminar.mdx +89 -0
- package/.docs/raw/observability/tracing/exporters/langfuse.mdx +205 -0
- package/.docs/raw/observability/tracing/exporters/langsmith.mdx +121 -0
- package/.docs/raw/observability/tracing/exporters/otel.mdx +457 -0
- package/.docs/raw/observability/tracing/exporters/posthog.mdx +137 -0
- package/.docs/raw/observability/tracing/exporters/sentry.mdx +198 -0
- package/.docs/raw/observability/tracing/overview.mdx +1128 -0
- package/.docs/raw/observability/{ai-tracing → tracing}/processors/sensitive-data-filter.mdx +40 -20
- package/.docs/raw/rag/chunking-and-embedding.mdx +37 -49
- package/.docs/raw/rag/graph-rag.mdx +223 -0
- package/.docs/raw/rag/overview.mdx +11 -17
- package/.docs/raw/rag/retrieval.mdx +110 -97
- package/.docs/raw/rag/vector-databases.mdx +150 -29
- package/.docs/raw/reference/agents/agent.mdx +54 -50
- package/.docs/raw/reference/agents/generate.mdx +410 -146
- package/.docs/raw/reference/agents/generateLegacy.mdx +13 -11
- package/.docs/raw/reference/agents/getDefaultGenerateOptions.mdx +24 -16
- package/.docs/raw/reference/agents/getDefaultOptions.mdx +71 -0
- package/.docs/raw/reference/agents/getDefaultStreamOptions.mdx +25 -17
- package/.docs/raw/reference/agents/getDescription.mdx +4 -2
- package/.docs/raw/reference/agents/getInstructions.mdx +12 -10
- package/.docs/raw/reference/agents/getLLM.mdx +14 -12
- package/.docs/raw/reference/agents/getMemory.mdx +13 -11
- package/.docs/raw/reference/agents/getModel.mdx +14 -12
- package/.docs/raw/reference/agents/getTools.mdx +11 -9
- package/.docs/raw/reference/agents/getVoice.mdx +12 -10
- package/.docs/raw/reference/agents/listAgents.mdx +13 -11
- package/.docs/raw/reference/agents/listScorers.mdx +71 -0
- package/.docs/raw/reference/agents/listTools.mdx +71 -0
- package/.docs/raw/reference/agents/listWorkflows.mdx +71 -0
- package/.docs/raw/reference/agents/network.mdx +134 -60
- package/.docs/raw/reference/ai-sdk/chat-route.mdx +130 -0
- package/.docs/raw/reference/ai-sdk/handle-chat-stream.mdx +119 -0
- package/.docs/raw/reference/ai-sdk/handle-network-stream.mdx +66 -0
- package/.docs/raw/reference/ai-sdk/handle-workflow-stream.mdx +118 -0
- package/.docs/raw/reference/ai-sdk/network-route.mdx +102 -0
- package/.docs/raw/reference/ai-sdk/to-ai-sdk-stream.mdx +293 -0
- package/.docs/raw/reference/ai-sdk/to-ai-sdk-v4-messages.mdx +130 -0
- package/.docs/raw/reference/ai-sdk/to-ai-sdk-v5-messages.mdx +110 -0
- package/.docs/raw/reference/ai-sdk/with-mastra.mdx +122 -0
- package/.docs/raw/reference/ai-sdk/workflow-route.mdx +113 -0
- package/.docs/raw/reference/auth/auth0.mdx +9 -7
- package/.docs/raw/reference/auth/clerk.mdx +9 -7
- package/.docs/raw/reference/auth/firebase.mdx +12 -11
- package/.docs/raw/reference/auth/jwt.mdx +9 -7
- package/.docs/raw/reference/auth/supabase.mdx +9 -7
- package/.docs/raw/reference/auth/workos.mdx +9 -7
- package/.docs/raw/reference/cli/create-mastra.mdx +13 -11
- package/.docs/raw/reference/cli/mastra.mdx +72 -23
- package/.docs/raw/reference/client-js/agents.mdx +316 -86
- package/.docs/raw/reference/client-js/error-handling.mdx +4 -4
- package/.docs/raw/reference/client-js/logs.mdx +4 -2
- package/.docs/raw/reference/client-js/mastra-client.mdx +20 -18
- package/.docs/raw/reference/client-js/memory.mdx +116 -20
- package/.docs/raw/reference/client-js/observability.mdx +14 -12
- package/.docs/raw/reference/client-js/telemetry.mdx +3 -1
- package/.docs/raw/reference/client-js/tools.mdx +4 -2
- package/.docs/raw/reference/client-js/vectors.mdx +3 -1
- package/.docs/raw/reference/client-js/workflows.mdx +132 -87
- package/.docs/raw/reference/configuration.mdx +761 -0
- package/.docs/raw/reference/core/addGateway.mdx +61 -0
- package/.docs/raw/reference/core/getAgent.mdx +4 -2
- package/.docs/raw/reference/core/getAgentById.mdx +4 -2
- package/.docs/raw/reference/core/getDeployer.mdx +4 -2
- package/.docs/raw/reference/core/getGateway.mdx +61 -0
- package/.docs/raw/reference/core/getGatewayById.mdx +64 -0
- package/.docs/raw/reference/core/getLogger.mdx +5 -3
- package/.docs/raw/reference/core/getMCPServer.mdx +34 -16
- package/.docs/raw/reference/core/getMCPServerById.mdx +83 -0
- package/.docs/raw/reference/core/getMemory.mdx +50 -9
- package/.docs/raw/reference/core/getScorer.mdx +6 -4
- package/.docs/raw/reference/core/getScorerById.mdx +81 -0
- package/.docs/raw/reference/core/getServer.mdx +7 -5
- package/.docs/raw/reference/core/getStorage.mdx +6 -4
- package/.docs/raw/reference/core/getStoredAgentById.mdx +185 -0
- package/.docs/raw/reference/core/getTelemetry.mdx +6 -4
- package/.docs/raw/reference/core/getVector.mdx +4 -2
- package/.docs/raw/reference/core/getWorkflow.mdx +4 -2
- package/.docs/raw/reference/core/{getAgents.mdx → listAgents.mdx} +8 -6
- package/.docs/raw/reference/core/listGateways.mdx +55 -0
- package/.docs/raw/reference/core/{getLogs.mdx → listLogs.mdx} +9 -7
- package/.docs/raw/reference/core/{getLogsByRunId.mdx → listLogsByRunId.mdx} +9 -7
- package/.docs/raw/reference/core/listMCPServers.mdx +67 -0
- package/.docs/raw/reference/core/listMemory.mdx +74 -0
- package/.docs/raw/reference/core/listScorers.mdx +45 -0
- package/.docs/raw/reference/core/listStoredAgents.mdx +153 -0
- package/.docs/raw/reference/core/{getVectors.mdx → listVectors.mdx} +8 -6
- package/.docs/raw/reference/core/{getWorkflows.mdx → listWorkflows.mdx} +8 -6
- package/.docs/raw/reference/core/mastra-class.mdx +47 -23
- package/.docs/raw/reference/core/mastra-model-gateway.mdx +229 -0
- package/.docs/raw/reference/core/setLogger.mdx +5 -3
- package/.docs/raw/reference/core/setStorage.mdx +8 -5
- package/.docs/raw/reference/deployer/cloudflare.mdx +24 -55
- package/.docs/raw/reference/deployer/deployer.mdx +3 -8
- package/.docs/raw/reference/deployer/netlify.mdx +6 -4
- package/.docs/raw/reference/deployer/vercel.mdx +8 -7
- package/.docs/raw/reference/evals/answer-relevancy.mdx +99 -128
- package/.docs/raw/reference/evals/answer-similarity.mdx +196 -0
- package/.docs/raw/reference/evals/bias.mdx +91 -112
- package/.docs/raw/reference/evals/completeness.mdx +93 -118
- package/.docs/raw/reference/evals/content-similarity.mdx +73 -117
- package/.docs/raw/reference/evals/context-precision.mdx +195 -137
- package/.docs/raw/reference/{scorers → evals}/context-relevance.mdx +19 -17
- package/.docs/raw/reference/{scorers → evals}/create-scorer.mdx +80 -63
- package/.docs/raw/reference/evals/faithfulness.mdx +94 -122
- package/.docs/raw/reference/evals/hallucination.mdx +89 -134
- package/.docs/raw/reference/evals/keyword-coverage.mdx +94 -126
- package/.docs/raw/reference/{scorers → evals}/mastra-scorer.mdx +9 -5
- package/.docs/raw/reference/{scorers → evals}/noise-sensitivity.mdx +22 -20
- package/.docs/raw/reference/evals/prompt-alignment.mdx +606 -182
- package/.docs/raw/reference/{scorers/run-experiment.mdx → evals/run-evals.mdx} +21 -20
- package/.docs/raw/reference/evals/scorer-utils.mdx +365 -0
- package/.docs/raw/reference/evals/textual-difference.mdx +80 -118
- package/.docs/raw/reference/evals/tone-consistency.mdx +80 -126
- package/.docs/raw/reference/{scorers → evals}/tool-call-accuracy.mdx +37 -33
- package/.docs/raw/reference/evals/toxicity.mdx +93 -97
- package/.docs/raw/reference/index.mdx +2 -0
- package/.docs/raw/reference/{observability/logging → logging}/pino-logger.mdx +12 -10
- package/.docs/raw/reference/memory/clone-utilities.mdx +345 -0
- package/.docs/raw/reference/memory/cloneThread.mdx +237 -0
- package/.docs/raw/reference/memory/createThread.mdx +7 -5
- package/.docs/raw/reference/memory/deleteMessages.mdx +10 -8
- package/.docs/raw/reference/memory/getThreadById.mdx +4 -2
- package/.docs/raw/reference/memory/listThreads.mdx +187 -0
- package/.docs/raw/reference/memory/memory-class.mdx +38 -29
- package/.docs/raw/reference/memory/{query.mdx → recall.mdx} +60 -61
- package/.docs/raw/reference/observability/tracing/bridges/otel.mdx +181 -0
- package/.docs/raw/reference/observability/tracing/configuration.mdx +292 -0
- package/.docs/raw/reference/observability/{ai-tracing → tracing}/exporters/arize.mdx +66 -18
- package/.docs/raw/reference/observability/{ai-tracing → tracing}/exporters/braintrust.mdx +35 -11
- package/.docs/raw/reference/observability/{ai-tracing → tracing}/exporters/cloud-exporter.mdx +32 -20
- package/.docs/raw/reference/observability/{ai-tracing → tracing}/exporters/console-exporter.mdx +53 -18
- package/.docs/raw/reference/observability/tracing/exporters/datadog.mdx +172 -0
- package/.docs/raw/reference/observability/{ai-tracing → tracing}/exporters/default-exporter.mdx +53 -42
- package/.docs/raw/reference/observability/tracing/exporters/laminar.mdx +139 -0
- package/.docs/raw/reference/observability/tracing/exporters/langfuse.mdx +184 -0
- package/.docs/raw/reference/observability/{ai-tracing → tracing}/exporters/langsmith.mdx +38 -9
- package/.docs/raw/reference/observability/{ai-tracing → tracing}/exporters/otel.mdx +87 -80
- package/.docs/raw/reference/observability/tracing/exporters/posthog.mdx +153 -0
- package/.docs/raw/reference/observability/tracing/exporters/sentry.mdx +224 -0
- package/.docs/raw/reference/observability/tracing/instances.mdx +166 -0
- package/.docs/raw/reference/observability/{ai-tracing → tracing}/interfaces.mdx +165 -94
- package/.docs/raw/reference/observability/{ai-tracing → tracing}/processors/sensitive-data-filter.mdx +6 -4
- package/.docs/raw/reference/observability/{ai-tracing/span.mdx → tracing/spans.mdx} +60 -44
- package/.docs/raw/reference/processors/batch-parts-processor.mdx +22 -18
- package/.docs/raw/reference/processors/language-detector.mdx +41 -37
- package/.docs/raw/reference/processors/message-history-processor.mdx +134 -0
- package/.docs/raw/reference/processors/moderation-processor.mdx +66 -35
- package/.docs/raw/reference/processors/pii-detector.mdx +67 -37
- package/.docs/raw/reference/processors/processor-interface.mdx +805 -0
- package/.docs/raw/reference/processors/prompt-injection-detector.mdx +40 -35
- package/.docs/raw/reference/processors/semantic-recall-processor.mdx +202 -0
- package/.docs/raw/reference/processors/system-prompt-scrubber.mdx +38 -36
- package/.docs/raw/reference/processors/token-limiter-processor.mdx +80 -40
- package/.docs/raw/reference/processors/tool-call-filter.mdx +127 -0
- package/.docs/raw/reference/processors/unicode-normalizer.mdx +26 -19
- package/.docs/raw/reference/processors/working-memory-processor.mdx +224 -0
- package/.docs/raw/reference/rag/chunk.mdx +7 -13
- package/.docs/raw/reference/rag/database-config.mdx +12 -10
- package/.docs/raw/reference/rag/document.mdx +3 -1
- package/.docs/raw/reference/rag/embeddings.mdx +8 -6
- package/.docs/raw/reference/rag/extract-params.mdx +58 -4
- package/.docs/raw/reference/rag/graph-rag.mdx +3 -1
- package/.docs/raw/reference/rag/metadata-filters.mdx +32 -9
- package/.docs/raw/reference/rag/rerank.mdx +4 -3
- package/.docs/raw/reference/rag/rerankWithScorer.mdx +3 -2
- package/.docs/raw/reference/server/create-route.mdx +330 -0
- package/.docs/raw/reference/server/express-adapter.mdx +221 -0
- package/.docs/raw/reference/server/fastify-adapter.mdx +130 -0
- package/.docs/raw/reference/server/hono-adapter.mdx +204 -0
- package/.docs/raw/reference/server/koa-adapter.mdx +129 -0
- package/.docs/raw/reference/server/mastra-server.mdx +334 -0
- package/.docs/raw/reference/server/routes.mdx +313 -0
- package/.docs/raw/reference/storage/cloudflare-d1.mdx +44 -2
- package/.docs/raw/reference/storage/cloudflare.mdx +13 -3
- package/.docs/raw/reference/storage/composite.mdx +245 -0
- package/.docs/raw/reference/storage/convex.mdx +166 -0
- package/.docs/raw/reference/storage/dynamodb.mdx +135 -13
- package/.docs/raw/reference/storage/lance.mdx +40 -3
- package/.docs/raw/reference/storage/libsql.mdx +92 -31
- package/.docs/raw/reference/storage/mongodb.mdx +149 -11
- package/.docs/raw/reference/storage/mssql.mdx +53 -6
- package/.docs/raw/{server-db/storage.mdx → reference/storage/overview.mdx} +15 -90
- package/.docs/raw/reference/storage/postgresql.mdx +268 -80
- package/.docs/raw/reference/storage/upstash.mdx +80 -3
- package/.docs/raw/reference/streaming/ChunkType.mdx +33 -5
- package/.docs/raw/reference/streaming/agents/MastraModelOutput.mdx +68 -7
- package/.docs/raw/reference/streaming/agents/stream.mdx +126 -156
- package/.docs/raw/reference/streaming/agents/streamLegacy.mdx +11 -9
- package/.docs/raw/reference/streaming/workflows/observeStream.mdx +13 -13
- package/.docs/raw/reference/streaming/workflows/{resumeStreamVNext.mdx → resumeStream.mdx} +60 -18
- package/.docs/raw/reference/streaming/workflows/stream.mdx +112 -38
- package/.docs/raw/reference/streaming/workflows/timeTravelStream.mdx +172 -0
- package/.docs/raw/reference/templates/overview.mdx +6 -8
- package/.docs/raw/reference/tools/client.mdx +5 -3
- package/.docs/raw/reference/tools/create-tool.mdx +306 -36
- package/.docs/raw/reference/tools/document-chunker-tool.mdx +3 -1
- package/.docs/raw/reference/tools/graph-rag-tool.mdx +59 -22
- package/.docs/raw/reference/tools/mcp-client.mdx +248 -31
- package/.docs/raw/reference/tools/mcp-server.mdx +442 -56
- package/.docs/raw/reference/tools/vector-query-tool.mdx +106 -42
- package/.docs/raw/reference/vectors/astra.mdx +6 -4
- package/.docs/raw/reference/vectors/chroma.mdx +87 -5
- package/.docs/raw/reference/vectors/convex.mdx +431 -0
- package/.docs/raw/reference/vectors/couchbase.mdx +39 -24
- package/.docs/raw/reference/vectors/duckdb.mdx +464 -0
- package/.docs/raw/reference/vectors/elasticsearch.mdx +318 -0
- package/.docs/raw/reference/vectors/lance.mdx +45 -27
- package/.docs/raw/reference/vectors/libsql.mdx +102 -15
- package/.docs/raw/reference/vectors/mongodb.mdx +133 -14
- package/.docs/raw/reference/vectors/opensearch.mdx +68 -20
- package/.docs/raw/reference/vectors/pg.mdx +105 -43
- package/.docs/raw/reference/vectors/pinecone.mdx +90 -8
- package/.docs/raw/reference/vectors/qdrant.mdx +185 -6
- package/.docs/raw/reference/vectors/s3vectors.mdx +10 -8
- package/.docs/raw/reference/vectors/turbopuffer.mdx +81 -5
- package/.docs/raw/reference/vectors/upstash.mdx +62 -7
- package/.docs/raw/reference/vectors/vectorize.mdx +6 -4
- package/.docs/raw/reference/voice/azure.mdx +98 -81
- package/.docs/raw/reference/voice/cloudflare.mdx +3 -1
- package/.docs/raw/reference/voice/composite-voice.mdx +76 -29
- package/.docs/raw/reference/voice/deepgram.mdx +3 -1
- package/.docs/raw/reference/voice/elevenlabs.mdx +3 -1
- package/.docs/raw/reference/voice/google-gemini-live.mdx +6 -3
- package/.docs/raw/reference/voice/google.mdx +162 -21
- package/.docs/raw/reference/voice/mastra-voice.mdx +3 -1
- package/.docs/raw/reference/voice/murf.mdx +3 -1
- package/.docs/raw/reference/voice/openai-realtime.mdx +6 -3
- package/.docs/raw/reference/voice/openai.mdx +3 -1
- package/.docs/raw/reference/voice/playai.mdx +3 -1
- package/.docs/raw/reference/voice/sarvam.mdx +3 -1
- package/.docs/raw/reference/voice/speechify.mdx +3 -1
- package/.docs/raw/reference/voice/voice.addInstructions.mdx +6 -4
- package/.docs/raw/reference/voice/voice.addTools.mdx +8 -5
- package/.docs/raw/reference/voice/voice.answer.mdx +6 -2
- package/.docs/raw/reference/voice/voice.close.mdx +5 -2
- package/.docs/raw/reference/voice/voice.connect.mdx +7 -3
- package/.docs/raw/reference/voice/voice.events.mdx +3 -1
- package/.docs/raw/reference/voice/voice.getSpeakers.mdx +4 -1
- package/.docs/raw/reference/voice/voice.listen.mdx +93 -53
- package/.docs/raw/reference/voice/voice.off.mdx +4 -2
- package/.docs/raw/reference/voice/voice.on.mdx +7 -3
- package/.docs/raw/reference/voice/voice.send.mdx +6 -2
- package/.docs/raw/reference/voice/voice.speak.mdx +82 -41
- package/.docs/raw/reference/voice/voice.updateConfig.mdx +4 -2
- package/.docs/raw/reference/workflows/run-methods/cancel.mdx +59 -9
- package/.docs/raw/reference/workflows/run-methods/restart.mdx +142 -0
- package/.docs/raw/reference/workflows/run-methods/resume.mdx +63 -17
- package/.docs/raw/reference/workflows/run-methods/start.mdx +68 -22
- package/.docs/raw/reference/workflows/run-methods/startAsync.mdx +145 -0
- package/.docs/raw/reference/workflows/run-methods/timeTravel.mdx +312 -0
- package/.docs/raw/reference/workflows/run.mdx +38 -15
- package/.docs/raw/reference/workflows/step.mdx +73 -7
- package/.docs/raw/reference/workflows/workflow-methods/branch.mdx +5 -3
- package/.docs/raw/reference/workflows/workflow-methods/commit.mdx +4 -2
- package/.docs/raw/reference/workflows/workflow-methods/create-run.mdx +45 -14
- package/.docs/raw/reference/workflows/workflow-methods/dountil.mdx +4 -2
- package/.docs/raw/reference/workflows/workflow-methods/dowhile.mdx +4 -2
- package/.docs/raw/reference/workflows/workflow-methods/foreach.mdx +72 -5
- package/.docs/raw/reference/workflows/workflow-methods/map.mdx +80 -3
- package/.docs/raw/reference/workflows/workflow-methods/parallel.mdx +4 -2
- package/.docs/raw/reference/workflows/workflow-methods/sleep.mdx +5 -7
- package/.docs/raw/reference/workflows/workflow-methods/sleepUntil.mdx +5 -7
- package/.docs/raw/reference/workflows/workflow-methods/then.mdx +4 -2
- package/.docs/raw/reference/workflows/workflow.mdx +207 -11
- package/.docs/raw/{auth → server/auth}/auth0.mdx +47 -28
- package/.docs/raw/{auth → server/auth}/clerk.mdx +42 -21
- package/.docs/raw/{auth → server/auth}/firebase.mdx +54 -32
- package/.docs/raw/{auth → server/auth}/index.mdx +9 -7
- package/.docs/raw/{auth → server/auth}/jwt.mdx +29 -17
- package/.docs/raw/{auth → server/auth}/supabase.mdx +52 -32
- package/.docs/raw/{auth → server/auth}/workos.mdx +48 -29
- package/.docs/raw/server/custom-adapters.mdx +396 -0
- package/.docs/raw/{server-db → server}/custom-api-routes.mdx +11 -11
- package/.docs/raw/{server-db → server}/mastra-client.mdx +41 -44
- package/.docs/raw/server/mastra-server.mdx +86 -0
- package/.docs/raw/{server-db → server}/middleware.mdx +43 -41
- package/.docs/raw/server/request-context.mdx +235 -0
- package/.docs/raw/server/server-adapters.mdx +410 -0
- package/.docs/raw/streaming/events.mdx +18 -9
- package/.docs/raw/streaming/overview.mdx +52 -28
- package/.docs/raw/streaming/tool-streaming.mdx +75 -33
- package/.docs/raw/streaming/workflow-streaming.mdx +15 -21
- package/.docs/raw/tools-mcp/advanced-usage.mdx +11 -9
- package/.docs/raw/tools-mcp/mcp-overview.mdx +72 -27
- package/.docs/raw/tools-mcp/overview.mdx +21 -20
- package/.docs/raw/voice/overview.mdx +124 -42
- package/.docs/raw/voice/speech-to-speech.mdx +14 -7
- package/.docs/raw/voice/speech-to-text.mdx +8 -4
- package/.docs/raw/voice/text-to-speech.mdx +7 -4
- package/.docs/raw/workflows/agents-and-tools.mdx +73 -26
- package/.docs/raw/workflows/control-flow.mdx +697 -134
- package/.docs/raw/workflows/error-handling.mdx +198 -42
- package/.docs/raw/workflows/human-in-the-loop.mdx +161 -210
- package/.docs/raw/workflows/input-data-mapping.mdx +11 -9
- package/.docs/raw/workflows/overview.mdx +202 -83
- package/.docs/raw/workflows/snapshots.mdx +28 -50
- package/.docs/raw/workflows/suspend-and-resume.mdx +125 -208
- package/.docs/raw/workflows/time-travel.mdx +317 -0
- package/.docs/raw/workflows/workflow-state.mdx +189 -0
- package/CHANGELOG.md +419 -4
- package/README.md +47 -2
- package/dist/{chunk-TUAHUTTB.js → chunk-4CM2BQNP.js} +27 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/logger.d.ts +3 -0
- package/dist/logger.d.ts.map +1 -1
- package/dist/prepare-docs/copy-raw.d.ts.map +1 -1
- package/dist/prepare-docs/package-changes.d.ts.map +1 -1
- package/dist/prepare-docs/prepare.js +1 -1
- package/dist/prompts/migration.d.ts +6 -0
- package/dist/prompts/migration.d.ts.map +1 -0
- package/dist/stdio.js +1107 -40
- package/dist/tools/course.d.ts.map +1 -1
- package/dist/tools/embedded-docs.d.ts +276 -0
- package/dist/tools/embedded-docs.d.ts.map +1 -0
- package/dist/tools/migration.d.ts +40 -0
- package/dist/tools/migration.d.ts.map +1 -0
- package/package.json +17 -17
- package/.docs/raw/deployment/cloud-providers/index.mdx +0 -55
- package/.docs/raw/deployment/server-deployment.mdx +0 -81
- package/.docs/raw/deployment/serverless-platforms/index.mdx +0 -55
- package/.docs/raw/frameworks/agentic-uis/ai-sdk.mdx +0 -671
- package/.docs/raw/frameworks/agentic-uis/cedar-os.mdx +0 -123
- package/.docs/raw/frameworks/agentic-uis/copilotkit.mdx +0 -382
- package/.docs/raw/frameworks/agentic-uis/openrouter.mdx +0 -176
- package/.docs/raw/frameworks/servers/express.mdx +0 -209
- package/.docs/raw/frameworks/web-frameworks/astro.mdx +0 -602
- package/.docs/raw/frameworks/web-frameworks/next-js.mdx +0 -379
- package/.docs/raw/frameworks/web-frameworks/sveltekit.mdx +0 -486
- package/.docs/raw/frameworks/web-frameworks/vite-react.mdx +0 -255
- package/.docs/raw/getting-started/templates.mdx +0 -65
- package/.docs/raw/mastra-cloud/dashboard.mdx +0 -100
- package/.docs/raw/mastra-cloud/setting-up.mdx +0 -105
- package/.docs/raw/memory/conversation-history.mdx +0 -23
- package/.docs/raw/memory/storage/memory-with-libsql.mdx +0 -140
- package/.docs/raw/memory/storage/memory-with-pg.mdx +0 -138
- package/.docs/raw/memory/storage/memory-with-upstash.mdx +0 -146
- package/.docs/raw/memory/threads-and-resources.mdx +0 -95
- package/.docs/raw/observability/ai-tracing/exporters/langfuse.mdx +0 -122
- package/.docs/raw/observability/ai-tracing/exporters/langsmith.mdx +0 -88
- package/.docs/raw/observability/ai-tracing/exporters/otel.mdx +0 -263
- package/.docs/raw/observability/ai-tracing/overview.mdx +0 -812
- package/.docs/raw/observability/nextjs-tracing.mdx +0 -109
- package/.docs/raw/observability/otel-tracing.mdx +0 -189
- package/.docs/raw/reference/agents/getScorers.mdx +0 -69
- package/.docs/raw/reference/agents/getWorkflows.mdx +0 -69
- package/.docs/raw/reference/client-js/workflows-legacy.mdx +0 -143
- package/.docs/raw/reference/core/getMCPServers.mdx +0 -36
- package/.docs/raw/reference/core/getScorerByName.mdx +0 -78
- package/.docs/raw/reference/core/getScorers.mdx +0 -43
- package/.docs/raw/reference/core/setTelemetry.mdx +0 -36
- package/.docs/raw/reference/evals/context-position.mdx +0 -197
- package/.docs/raw/reference/evals/context-relevancy.mdx +0 -196
- package/.docs/raw/reference/evals/contextual-recall.mdx +0 -196
- package/.docs/raw/reference/evals/summarization.mdx +0 -212
- package/.docs/raw/reference/legacyWorkflows/after.mdx +0 -89
- package/.docs/raw/reference/legacyWorkflows/afterEvent.mdx +0 -79
- package/.docs/raw/reference/legacyWorkflows/commit.mdx +0 -33
- package/.docs/raw/reference/legacyWorkflows/createRun.mdx +0 -76
- package/.docs/raw/reference/legacyWorkflows/else.mdx +0 -68
- package/.docs/raw/reference/legacyWorkflows/events.mdx +0 -305
- package/.docs/raw/reference/legacyWorkflows/execute.mdx +0 -110
- package/.docs/raw/reference/legacyWorkflows/if.mdx +0 -108
- package/.docs/raw/reference/legacyWorkflows/resume.mdx +0 -158
- package/.docs/raw/reference/legacyWorkflows/resumeWithEvent.mdx +0 -133
- package/.docs/raw/reference/legacyWorkflows/snapshots.mdx +0 -207
- package/.docs/raw/reference/legacyWorkflows/start.mdx +0 -87
- package/.docs/raw/reference/legacyWorkflows/step-class.mdx +0 -100
- package/.docs/raw/reference/legacyWorkflows/step-condition.mdx +0 -137
- package/.docs/raw/reference/legacyWorkflows/step-function.mdx +0 -93
- package/.docs/raw/reference/legacyWorkflows/step-options.mdx +0 -69
- package/.docs/raw/reference/legacyWorkflows/step-retries.mdx +0 -196
- package/.docs/raw/reference/legacyWorkflows/suspend.mdx +0 -70
- package/.docs/raw/reference/legacyWorkflows/then.mdx +0 -72
- package/.docs/raw/reference/legacyWorkflows/until.mdx +0 -168
- package/.docs/raw/reference/legacyWorkflows/watch.mdx +0 -124
- package/.docs/raw/reference/legacyWorkflows/while.mdx +0 -168
- package/.docs/raw/reference/legacyWorkflows/workflow.mdx +0 -234
- package/.docs/raw/reference/memory/getThreadsByResourceId.mdx +0 -79
- package/.docs/raw/reference/memory/getThreadsByResourceIdPaginated.mdx +0 -110
- package/.docs/raw/reference/observability/ai-tracing/ai-tracing.mdx +0 -186
- package/.docs/raw/reference/observability/ai-tracing/configuration.mdx +0 -238
- package/.docs/raw/reference/observability/ai-tracing/exporters/langfuse.mdx +0 -116
- package/.docs/raw/reference/observability/otel-tracing/otel-config.mdx +0 -117
- package/.docs/raw/reference/observability/otel-tracing/providers/arize-ax.mdx +0 -81
- package/.docs/raw/reference/observability/otel-tracing/providers/arize-phoenix.mdx +0 -121
- package/.docs/raw/reference/observability/otel-tracing/providers/braintrust.mdx +0 -40
- package/.docs/raw/reference/observability/otel-tracing/providers/dash0.mdx +0 -40
- package/.docs/raw/reference/observability/otel-tracing/providers/index.mdx +0 -20
- package/.docs/raw/reference/observability/otel-tracing/providers/keywordsai.mdx +0 -73
- package/.docs/raw/reference/observability/otel-tracing/providers/laminar.mdx +0 -41
- package/.docs/raw/reference/observability/otel-tracing/providers/langfuse.mdx +0 -84
- package/.docs/raw/reference/observability/otel-tracing/providers/langsmith.mdx +0 -48
- package/.docs/raw/reference/observability/otel-tracing/providers/langwatch.mdx +0 -43
- package/.docs/raw/reference/observability/otel-tracing/providers/new-relic.mdx +0 -40
- package/.docs/raw/reference/observability/otel-tracing/providers/signoz.mdx +0 -40
- package/.docs/raw/reference/observability/otel-tracing/providers/traceloop.mdx +0 -40
- package/.docs/raw/reference/scorers/answer-relevancy.mdx +0 -227
- package/.docs/raw/reference/scorers/answer-similarity.mdx +0 -439
- package/.docs/raw/reference/scorers/bias.mdx +0 -228
- package/.docs/raw/reference/scorers/completeness.mdx +0 -214
- package/.docs/raw/reference/scorers/content-similarity.mdx +0 -197
- package/.docs/raw/reference/scorers/context-precision.mdx +0 -352
- package/.docs/raw/reference/scorers/faithfulness.mdx +0 -241
- package/.docs/raw/reference/scorers/hallucination.mdx +0 -252
- package/.docs/raw/reference/scorers/keyword-coverage.mdx +0 -229
- package/.docs/raw/reference/scorers/prompt-alignment.mdx +0 -668
- package/.docs/raw/reference/scorers/textual-difference.mdx +0 -203
- package/.docs/raw/reference/scorers/tone-consistency.mdx +0 -211
- package/.docs/raw/reference/scorers/toxicity.mdx +0 -228
- package/.docs/raw/reference/streaming/workflows/observeStreamVNext.mdx +0 -47
- package/.docs/raw/reference/streaming/workflows/streamVNext.mdx +0 -153
- package/.docs/raw/reference/workflows/run-methods/watch.mdx +0 -73
- package/.docs/raw/reference/workflows/workflow-methods/sendEvent.mdx +0 -70
- package/.docs/raw/reference/workflows/workflow-methods/waitForEvent.mdx +0 -66
- package/.docs/raw/scorers/evals-old-api/custom-eval.mdx +0 -24
- package/.docs/raw/scorers/evals-old-api/overview.mdx +0 -106
- package/.docs/raw/scorers/evals-old-api/running-in-ci.mdx +0 -85
- package/.docs/raw/scorers/evals-old-api/textual-evals.mdx +0 -58
- package/.docs/raw/scorers/off-the-shelf-scorers.mdx +0 -50
- package/.docs/raw/server-db/production-server.mdx +0 -89
- package/.docs/raw/server-db/runtime-context.mdx +0 -193
- package/.docs/raw/workflows/inngest-workflow.mdx +0 -363
- package/.docs/raw/workflows-legacy/control-flow.mdx +0 -774
- package/.docs/raw/workflows-legacy/dynamic-workflows.mdx +0 -239
- package/.docs/raw/workflows-legacy/error-handling.mdx +0 -187
- package/.docs/raw/workflows-legacy/nested-workflows.mdx +0 -360
- package/.docs/raw/workflows-legacy/overview.mdx +0 -182
- package/.docs/raw/workflows-legacy/runtime-variables.mdx +0 -156
- package/.docs/raw/workflows-legacy/steps.mdx +0 -115
- package/.docs/raw/workflows-legacy/suspend-and-resume.mdx +0 -406
- package/.docs/raw/workflows-legacy/variables.mdx +0 -318
|
@@ -1,15 +1,34 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "
|
|
2
|
+
title: "Deploy in a Monorepo | Deployment"
|
|
3
3
|
description: Learn how to deploy Mastra applications that are part of a monorepo setup
|
|
4
|
+
packages:
|
|
5
|
+
- "@mastra/deployer"
|
|
4
6
|
---
|
|
5
7
|
|
|
6
|
-
|
|
8
|
+
import Tabs from "@theme/Tabs";
|
|
9
|
+
import TabItem from "@theme/TabItem";
|
|
7
10
|
|
|
8
|
-
|
|
11
|
+
# Deploy in a Monorepo
|
|
9
12
|
|
|
10
|
-
|
|
13
|
+
Deploying Mastra in a monorepo follows the same process as a standalone application. This guide covers monorepo-specific considerations. For the core build and deployment steps, see [Deploy a Mastra Server](/docs/deployment/mastra-server).
|
|
11
14
|
|
|
12
|
-
|
|
15
|
+
## Supported monorepos
|
|
16
|
+
|
|
17
|
+
Mastra works with:
|
|
18
|
+
|
|
19
|
+
- npm workspaces
|
|
20
|
+
- pnpm workspaces
|
|
21
|
+
- Yarn workspaces
|
|
22
|
+
- Turborepo
|
|
23
|
+
|
|
24
|
+
Known limitations:
|
|
25
|
+
|
|
26
|
+
- Bun workspaces - partial support; known issues
|
|
27
|
+
- Nx - You can use Nx's [supported dependency strategies](https://nx.dev/concepts/decisions/dependency-management) but you need to have `package.json` files inside your workspace packages
|
|
28
|
+
|
|
29
|
+
## Example structure
|
|
30
|
+
|
|
31
|
+
In this example, the Mastra application is located at `apps/api`:
|
|
13
32
|
|
|
14
33
|
```
|
|
15
34
|
apps/
|
|
@@ -29,69 +48,114 @@ packages/
|
|
|
29
48
|
package.json
|
|
30
49
|
```
|
|
31
50
|
|
|
32
|
-
##
|
|
51
|
+
## Building from a monorepo
|
|
52
|
+
|
|
53
|
+
Use your monorepo tool to run the build command from the correct package. There's no need for special flags.
|
|
54
|
+
|
|
55
|
+
Examples:
|
|
33
56
|
|
|
34
|
-
|
|
57
|
+
<Tabs>
|
|
58
|
+
<TabItem value="npm" label="npm">
|
|
35
59
|
|
|
60
|
+
```bash
|
|
61
|
+
npm run build --workspace=apps/api
|
|
36
62
|
```
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
63
|
+
|
|
64
|
+
</TabItem>
|
|
65
|
+
|
|
66
|
+
<TabItem value="pnpm" label="pnpm">
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
pnpm --filter api run build
|
|
43
70
|
```
|
|
44
71
|
|
|
45
|
-
|
|
72
|
+
</TabItem>
|
|
46
73
|
|
|
47
|
-
|
|
74
|
+
<TabItem value="yarn" label="yarn">
|
|
48
75
|
|
|
49
|
-
|
|
76
|
+
```bash
|
|
77
|
+
yarn workspace api build
|
|
78
|
+
```
|
|
50
79
|
|
|
51
|
-
|
|
80
|
+
</TabItem>
|
|
52
81
|
|
|
53
|
-
|
|
82
|
+
<TabItem value="turborepo" label="Turborepo">
|
|
54
83
|
|
|
55
|
-
|
|
56
|
-
|
|
84
|
+
```bash
|
|
85
|
+
turbo run build --filter=api
|
|
86
|
+
```
|
|
57
87
|
|
|
58
|
-
|
|
88
|
+
</TabItem>
|
|
59
89
|
|
|
60
|
-
|
|
90
|
+
</Tabs>
|
|
61
91
|
|
|
62
|
-
|
|
92
|
+
Your package's `build` script should run `mastra build`:
|
|
63
93
|
|
|
64
|
-
|
|
94
|
+
```json title="apps/api/package.json"
|
|
95
|
+
{
|
|
96
|
+
"scripts": {
|
|
97
|
+
"build": "mastra build"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
```
|
|
65
101
|
|
|
66
|
-
|
|
102
|
+
## Workspace packages
|
|
67
103
|
|
|
68
|
-
|
|
69
|
-
import { Mastra } from "@mastra/core/mastra";
|
|
104
|
+
When your Mastra application imports from other workspace packages, Mastra handles this automatically:
|
|
70
105
|
|
|
106
|
+
- If the package is pre-compiled (e.g., built with `tsc` or `tsdown`), Mastra imports the compiled JavaScript
|
|
107
|
+
- If the package contains uncompiled TypeScript, Mastra transpiles it during the build
|
|
108
|
+
|
|
109
|
+
For most setups, this works without configuration. If you encounter issues with workspace package imports, add the package to [`transpilePackages`](/reference/configuration#bundlertranspilepackages):
|
|
110
|
+
|
|
111
|
+
```typescript title="src/mastra/index.ts"
|
|
71
112
|
export const mastra = new Mastra({
|
|
72
|
-
// ...
|
|
73
113
|
bundler: {
|
|
74
|
-
transpilePackages: ["utils"],
|
|
75
|
-
externals: ["ui"],
|
|
76
|
-
sourcemap: true,
|
|
114
|
+
transpilePackages: ["@my-org/utils"],
|
|
77
115
|
},
|
|
78
116
|
});
|
|
79
117
|
```
|
|
80
118
|
|
|
81
|
-
|
|
119
|
+
## Environment variables
|
|
82
120
|
|
|
83
|
-
|
|
121
|
+
Store `.env` files in the Mastra application directory (e.g., `apps/api/.env`), not the monorepo root.
|
|
84
122
|
|
|
85
|
-
|
|
123
|
+
## Deployment configuration
|
|
86
124
|
|
|
87
|
-
|
|
88
|
-
- pnpm workspaces
|
|
89
|
-
- Yarn workspaces
|
|
90
|
-
- Turborepo
|
|
125
|
+
When deploying to cloud providers, ensure the correct package is selected as the deploy target. Selecting the monorepo root instead of the application directory (e.g., `apps/api`) is a common mistake.
|
|
91
126
|
|
|
92
|
-
|
|
127
|
+
Most providers let you specify the root directory in their dashboard or configuration file.
|
|
128
|
+
|
|
129
|
+
### Mastra Cloud
|
|
130
|
+
|
|
131
|
+
The image below shows how to select `apps/api` as the project root when deploying to [Mastra Cloud](/docs/mastra-cloud/overview). While the interface may differ between providers, the configuration remains the same.
|
|
132
|
+
|
|
133
|
+

|
|
134
|
+
|
|
135
|
+
## Dependency management
|
|
136
|
+
|
|
137
|
+
Keep dependencies consistent to avoid version conflicts and build errors:
|
|
138
|
+
|
|
139
|
+
- Use a **single lockfile** at the monorepo root so all packages resolve the same versions
|
|
140
|
+
- Align versions of **shared libraries** (like Mastra or frameworks) to prevent duplicates
|
|
141
|
+
|
|
142
|
+
## Troubleshooting
|
|
143
|
+
|
|
144
|
+
### Workspace package not found
|
|
145
|
+
|
|
146
|
+
If Mastra can't resolve a workspace package, ensure:
|
|
147
|
+
- The package is listed in your `package.json` dependencies
|
|
148
|
+
- Your lockfile is up to date (`pnpm install`, `npm install`, etc.)
|
|
149
|
+
- The package has a valid `main` or `exports` field in its `package.json`
|
|
150
|
+
|
|
151
|
+
### TypeScript errors from workspace packages
|
|
152
|
+
|
|
153
|
+
If you see type errors from uncompiled workspace packages, either:
|
|
154
|
+
- Build the package first (recommended for faster Mastra builds)
|
|
155
|
+
- Add the package to [`transpilePackages`](/reference/configuration#bundlertranspilepackages) in your Mastra config
|
|
93
156
|
|
|
94
|
-
|
|
95
|
-
- Nx — You can use Nx's [supported dependency strategies](https://nx.dev/concepts/decisions/dependency-management) but you need to have `package.json` files inside your workspace packages
|
|
157
|
+
## Related
|
|
96
158
|
|
|
97
|
-
|
|
159
|
+
- [Deploy a Mastra Server](/docs/deployment/mastra-server) - Core build and deployment guide
|
|
160
|
+
- [Configuration Reference](/reference/configuration) - `bundler.transpilePackages` and other options
|
|
161
|
+
- [CLI Reference](/reference/cli/mastra) - Build command flags
|
|
@@ -1,82 +1,69 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Deployment Overview | Deployment
|
|
2
|
+
title: "Deployment Overview | Deployment"
|
|
3
3
|
description: Learn about different deployment options for your Mastra applications
|
|
4
|
+
packages:
|
|
5
|
+
- "@mastra/deployer"
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
# Deployment Overview
|
|
7
9
|
|
|
8
|
-
Mastra
|
|
10
|
+
Mastra applications can be deployed to any Node.js-compatible environment. You can deploy a Mastra server, integrate with an existing web framework, deploy to cloud providers, or use Mastra Cloud for managed hosting.
|
|
9
11
|
|
|
10
|
-
##
|
|
12
|
+
## Runtime support
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
| ------------------------ | ------------------------------------------------------------- | -------------------------------------------------------------------- |
|
|
14
|
-
| **Mastra Cloud** | Teams wanting to ship quickly without infrastructure concerns | Fully-managed, automatic scaling, built-in observability |
|
|
15
|
-
| **Framework Deployment** | Teams already using Next.js, Astro etc | Simplify deployment with a unified codebase for frontend and backend |
|
|
16
|
-
| **Server Deployment** | Teams needing maximum control and customization | Full control, custom middleware, integrate with existing apps |
|
|
17
|
-
| **Serverless Platforms** | Teams already using Vercel, Netlify, or Cloudflare | Platform integration, simplified deployment, automatic scaling |
|
|
14
|
+
Mastra can run against any of these runtime environments:
|
|
18
15
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
### Runtime support
|
|
22
|
-
|
|
23
|
-
- Node.js `v20.0` or higher
|
|
16
|
+
- Node.js `v22.13.0` or later
|
|
24
17
|
- Bun
|
|
25
18
|
- Deno
|
|
26
|
-
-
|
|
19
|
+
- Cloudflare
|
|
27
20
|
|
|
28
|
-
|
|
21
|
+
## Deployment Options
|
|
29
22
|
|
|
30
|
-
Mastra
|
|
23
|
+
### Mastra Server
|
|
31
24
|
|
|
32
|
-
-
|
|
33
|
-
- Deployment on git push
|
|
34
|
-
- Agent testing interface
|
|
35
|
-
- Comprehensive logs and traces
|
|
36
|
-
- Custom domains for each project
|
|
25
|
+
Mastra provides a [server](/docs/server/mastra-server) powered by Hono that can be deployed independently. Use the `mastra build` command to build your application and deploy the output to your preferred VM, container, or PaaS platform.
|
|
37
26
|
|
|
38
|
-
[
|
|
27
|
+
Use this option when you need full control over your infrastructure, long-running processes, or WebSocket connections. The [Mastra server deployment guide](/docs/deployment/mastra-server) provides more details.
|
|
39
28
|
|
|
40
|
-
###
|
|
29
|
+
### Monorepo
|
|
41
30
|
|
|
42
|
-
|
|
31
|
+
Deploy a Mastra server as part of a monorepo setup, following the same approach as standalone deployment.
|
|
43
32
|
|
|
44
|
-
|
|
45
|
-
- [With Astro](../frameworks/web-frameworks/astro)
|
|
33
|
+
Read about [monorepo deployment](/docs/deployment/monorepo).
|
|
46
34
|
|
|
47
|
-
|
|
35
|
+
### Cloud Providers
|
|
48
36
|
|
|
49
|
-
|
|
37
|
+
Mastra applications can be deployed to cloud providers and serverless platforms. Mastra includes optional built-in deployers for Vercel, Netlify, and Cloudflare to automate the build and deployment process.
|
|
50
38
|
|
|
51
|
-
|
|
39
|
+
Use this option for auto-scaling, minimal infrastructure management, or when you're already using one of these platforms.
|
|
52
40
|
|
|
53
|
-
|
|
41
|
+
- [Amazon EC2](/guides/deployment/amazon-ec2)
|
|
42
|
+
- [AWS Lambda](/guides/deployment/aws-lambda)
|
|
43
|
+
- [Azure App Services](/guides/deployment/azure-app-services)
|
|
44
|
+
- [Cloudflare](/guides/deployment/cloudflare-deployer)
|
|
45
|
+
- [Digital Ocean](/guides/deployment/digital-ocean)
|
|
46
|
+
- [Netlify](/guides/deployment/netlify-deployer)
|
|
47
|
+
- [Vercel](/guides/deployment/vercel-deployer)
|
|
54
48
|
|
|
55
|
-
|
|
56
|
-
- Configurable CORS and authentication
|
|
57
|
-
- Deploy to VMs, containers, or PaaS platforms
|
|
58
|
-
- Ideal for integrating with existing Node.js applications
|
|
49
|
+
### Web Framework
|
|
59
50
|
|
|
60
|
-
|
|
51
|
+
When Mastra is integrated with a web framework, it deploys alongside your application using the framework's standard deployment process. The guides below cover framework-specific configuration requirements for deployment.
|
|
61
52
|
|
|
62
|
-
|
|
53
|
+
Use these guides when adding Mastra to an existing Next.js or Astro application.
|
|
63
54
|
|
|
64
|
-
|
|
55
|
+
- [With Next.js on Vercel](/docs/deployment/web-framework#with-nextjs-on-vercel)
|
|
56
|
+
- [With Astro on Vercel](/docs/deployment/web-framework#with-astro-on-vercel)
|
|
57
|
+
- [With Astro on Netlify](/docs/deployment/web-framework#with-astro-on-netlify)
|
|
65
58
|
|
|
66
|
-
|
|
67
|
-
- Platform-specific optimizations
|
|
68
|
-
- Simplified deployment process
|
|
69
|
-
- Automatic scaling through the platform
|
|
59
|
+
### Mastra Cloud
|
|
70
60
|
|
|
71
|
-
|
|
61
|
+
We're building Mastra Cloud to be the easiest place to deploy and observe your Mastra agents. It's currently in beta.
|
|
72
62
|
|
|
73
|
-
|
|
63
|
+
Learn more in the [Mastra Cloud docs](/docs/mastra-cloud/overview).
|
|
74
64
|
|
|
75
|
-
|
|
65
|
+
## Workflow Runners
|
|
76
66
|
|
|
77
|
-
-
|
|
78
|
-
- Authentication and request handling
|
|
79
|
-
- Retries and error handling
|
|
80
|
-
- Support for streaming responses
|
|
67
|
+
Mastra workflows run using the built-in execution engine by default. For production workloads requiring managed infrastructure, workflows can also be deployed to specialized platforms like [Inngest](https://www.inngest.com) that provide step memoization, automatic retries, and real-time monitoring.
|
|
81
68
|
|
|
82
|
-
[
|
|
69
|
+
Visit the [Workflow Runners guide](/docs/deployment/workflow-runners) for execution options and the [Inngest deployment guide](/guides/deployment/inngest) for setup instructions.
|
|
@@ -1,24 +1,28 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Web Framework
|
|
2
|
+
title: "Deploy with a Web Framework | Deployment"
|
|
3
3
|
description: "Learn how Mastra can be deployed when integrated with a Web Framework"
|
|
4
|
+
packages:
|
|
5
|
+
- "@mastra/deployer"
|
|
4
6
|
---
|
|
5
7
|
|
|
6
|
-
# Web Framework
|
|
8
|
+
# Deploy with a Web Framework
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
When Mastra is integrated with a web framework, it deploys alongside your application using the framework's standard deployment process. Follow the instructions below to ensure your Mastra integration deploys correctly.
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
:::warning
|
|
13
|
+
If you're deploying to a cloud provider, remove any usage of [LibSQLStore](/reference/storage/libsql) from your Mastra configuration. LibSQLStore requires filesystem access and is not compatible with serverless platforms.
|
|
14
|
+
:::
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
Integration guides:
|
|
14
17
|
|
|
15
|
-
|
|
18
|
+
- [With Next.js](/guides/getting-started/next-js)
|
|
19
|
+
- [With Astro](/guides/getting-started/astro)
|
|
16
20
|
|
|
17
|
-
|
|
21
|
+
## With Next.js on Vercel
|
|
18
22
|
|
|
19
|
-
|
|
23
|
+
If you've integrated Mastra with Next.js [by following our guide](/guides/getting-started/next-js) and plan to deploy to Vercel, add `serverExternalPackages: ["@mastra/*"]` to your `next.config.ts`:
|
|
20
24
|
|
|
21
|
-
```typescript {4} title="next.config.ts"
|
|
25
|
+
```typescript {4} title="next.config.ts"
|
|
22
26
|
import type { NextConfig } from "next";
|
|
23
27
|
|
|
24
28
|
const nextConfig: NextConfig = {
|
|
@@ -30,16 +34,13 @@ export default nextConfig;
|
|
|
30
34
|
|
|
31
35
|
## With Astro on Vercel
|
|
32
36
|
|
|
33
|
-
If you've integrated Mastra with Astro [by following our guide](/
|
|
37
|
+
If you've integrated Mastra with Astro [by following our guide](/guides/getting-started/astro) and plan to deploy to Vercel, add the Vercel adapter and server output to your `astro.config.mjs`:
|
|
34
38
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
```javascript {2,6,7} title="astro.config.mjs" showLineNumbers copy
|
|
39
|
+
```javascript {2,5-6} title="astro.config.mjs"
|
|
38
40
|
import { defineConfig } from "astro/config";
|
|
39
41
|
import vercel from "@astrojs/vercel";
|
|
40
42
|
|
|
41
43
|
export default defineConfig({
|
|
42
|
-
// ...
|
|
43
44
|
adapter: vercel(),
|
|
44
45
|
output: "server",
|
|
45
46
|
});
|
|
@@ -47,16 +48,13 @@ export default defineConfig({
|
|
|
47
48
|
|
|
48
49
|
## With Astro on Netlify
|
|
49
50
|
|
|
50
|
-
If you've integrated Mastra with Astro [by following our guide](/
|
|
51
|
-
|
|
52
|
-
The only thing to verify is that you've added the following to your `astro.config.mjs` and removed any usage of [LibSQLStore](/docs/deployment/overview), which is not supported in serverless environments:
|
|
51
|
+
If you've integrated Mastra with Astro [by following our guide](/guides/getting-started/astro) and plan to deploy to Netlify, add the Netlify adapter and server output to your `astro.config.mjs`:
|
|
53
52
|
|
|
54
|
-
```javascript {2,6
|
|
53
|
+
```javascript {2,5-6} title="astro.config.mjs"
|
|
55
54
|
import { defineConfig } from "astro/config";
|
|
56
55
|
import netlify from "@astrojs/netlify";
|
|
57
56
|
|
|
58
57
|
export default defineConfig({
|
|
59
|
-
// ...
|
|
60
58
|
adapter: netlify(),
|
|
61
59
|
output: "server",
|
|
62
60
|
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Workflow Runners | Deployment"
|
|
3
|
+
description: "Deploy Mastra workflows to specialized workflow execution platforms"
|
|
4
|
+
packages:
|
|
5
|
+
- "@mastra/deployer"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Workflow Runners
|
|
9
|
+
|
|
10
|
+
Mastra [workflows](../workflows/overview.mdx) can be executed using the built-in workflow runner or deployed to specialized workflow execution platforms that handle orchestration, monitoring, and reliability.
|
|
11
|
+
|
|
12
|
+
## Inngest
|
|
13
|
+
|
|
14
|
+
Inngest is a developer platform for running background workflows without managing infrastructure. Mastra workflows can be deployed to Inngest, which provides step memoization, automatic retries, real-time monitoring, and suspend/resume capabilities.
|
|
15
|
+
|
|
16
|
+
Visit the [Inngest deployment guide](/guides/deployment/inngest) for setup instructions and the [Inngest workflow example](https://github.com/mastra-ai/mastra/tree/main/examples/inngest) for a complete implementation.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Built-in Scorers | Evals"
|
|
3
|
+
description: "Overview of Mastra's ready-to-use scorers for evaluating AI outputs across quality, safety, and performance dimensions."
|
|
4
|
+
packages:
|
|
5
|
+
- "@mastra/evals"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Built-in Scorers
|
|
9
|
+
|
|
10
|
+
Mastra provides a comprehensive set of built-in scorers for evaluating AI outputs. These scorers are optimized for common evaluation scenarios and are ready to use in your agents and workflows.
|
|
11
|
+
|
|
12
|
+
To create your own scorers, see the [Custom Scorers](/docs/evals/custom-scorers) guide.
|
|
13
|
+
|
|
14
|
+
## Available scorers
|
|
15
|
+
|
|
16
|
+
### Accuracy and reliability
|
|
17
|
+
|
|
18
|
+
These scorers evaluate how correct, truthful, and complete your agent's answers are:
|
|
19
|
+
|
|
20
|
+
- [`answer-relevancy`](/reference/evals/answer-relevancy): Evaluates how well responses address the input query (`0-1`, higher is better)
|
|
21
|
+
- [`answer-similarity`](/reference/evals/answer-similarity): Compares agent outputs against ground-truth answers for CI/CD testing using semantic analysis (`0-1`, higher is better)
|
|
22
|
+
- [`faithfulness`](/reference/evals/faithfulness): Measures how accurately responses represent provided context (`0-1`, higher is better)
|
|
23
|
+
- [`hallucination`](/reference/evals/hallucination): Detects factual contradictions and unsupported claims (`0-1`, lower is better)
|
|
24
|
+
- [`completeness`](/reference/evals/completeness): Checks if responses include all necessary information (`0-1`, higher is better)
|
|
25
|
+
- [`content-similarity`](/reference/evals/content-similarity): Measures textual similarity using character-level matching (`0-1`, higher is better)
|
|
26
|
+
- [`textual-difference`](/reference/evals/textual-difference): Measures textual differences between strings (`0-1`, higher means more similar)
|
|
27
|
+
- [`tool-call-accuracy`](/reference/evals/tool-call-accuracy): Evaluates whether the LLM selects the correct tool from available options (`0-1`, higher is better)
|
|
28
|
+
- [`prompt-alignment`](/reference/evals/prompt-alignment): Measures how well agent responses align with user prompt intent, requirements, completeness, and format (`0-1`, higher is better)
|
|
29
|
+
|
|
30
|
+
### Context quality
|
|
31
|
+
|
|
32
|
+
These scorers evaluate the quality and relevance of context used in generating responses:
|
|
33
|
+
|
|
34
|
+
- [`context-precision`](/reference/evals/context-precision): Evaluates context relevance and ranking using Mean Average Precision, rewarding early placement of relevant context (`0-1`, higher is better)
|
|
35
|
+
- [`context-relevance`](/reference/evals/context-relevance): Measures context utility with nuanced relevance levels, usage tracking, and missing context detection (`0-1`, higher is better)
|
|
36
|
+
|
|
37
|
+
> tip Context Scorer Selection
|
|
38
|
+
>
|
|
39
|
+
>- Use **Context Precision** when context ordering matters and you need standard IR metrics (ideal for RAG ranking evaluation)
|
|
40
|
+
>- Use **Context Relevance** when you need detailed relevance assessment and want to track context usage and identify gaps
|
|
41
|
+
>
|
|
42
|
+
>Both context scorers support:
|
|
43
|
+
>
|
|
44
|
+
>- **Static context**: Pre-defined context arrays
|
|
45
|
+
>- **Dynamic context extraction**: Extract context from runs using custom functions (ideal for RAG systems, vector databases, etc.)
|
|
46
|
+
|
|
47
|
+
### Output quality
|
|
48
|
+
|
|
49
|
+
These scorers evaluate adherence to format, style, and safety requirements:
|
|
50
|
+
|
|
51
|
+
- [`tone-consistency`](/reference/evals/tone-consistency): Measures consistency in formality, complexity, and style (`0-1`, higher is better)
|
|
52
|
+
- [`toxicity`](/reference/evals/toxicity): Detects harmful or inappropriate content (`0-1`, lower is better)
|
|
53
|
+
- [`bias`](/reference/evals/bias): Detects potential biases in the output (`0-1`, lower is better)
|
|
54
|
+
- [`keyword-coverage`](/reference/evals/keyword-coverage): Assesses technical terminology usage (`0-1`, higher is better)
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Custom Scorers |
|
|
2
|
+
title: "Custom Scorers | Evals"
|
|
3
|
+
packages:
|
|
4
|
+
- "@mastra/core"
|
|
3
5
|
---
|
|
4
6
|
|
|
5
7
|
# Custom scorers
|
|
@@ -33,21 +35,22 @@ Each step can use either **functions** or **prompt objects** (LLM-based evaluati
|
|
|
33
35
|
- Natural language understanding tasks
|
|
34
36
|
- Nuanced context evaluation
|
|
35
37
|
|
|
38
|
+
**What “prompt object” means:** Instead of a function, the step is an object with `description` + `createPrompt` (and `outputSchema` for `preprocess`/`analyze`). That object tells Mastra to run the judge LLM for the step and store the structured output in `results.<step>StepResult`.
|
|
39
|
+
|
|
36
40
|
You can mix and match approaches within a single scorer - for example, use a function for preprocessing data and an LLM for analyzing quality.
|
|
37
41
|
|
|
38
42
|
### Initializing a Scorer
|
|
39
43
|
|
|
40
|
-
Every scorer starts with the `createScorer` factory function, which requires
|
|
44
|
+
Every scorer starts with the `createScorer` factory function, which requires an id and description, and optionally accepts a type specification and judge configuration.
|
|
41
45
|
|
|
42
46
|
```typescript
|
|
43
|
-
import { createScorer } from '@mastra/core/
|
|
44
|
-
import { openai } from '@ai-sdk/openai';
|
|
47
|
+
import { createScorer } from '@mastra/core/evals';
|
|
45
48
|
|
|
46
49
|
const glutenCheckerScorer = createScorer({
|
|
47
|
-
|
|
50
|
+
id: 'gluten-checker',
|
|
48
51
|
description: 'Check if recipes contain gluten ingredients',
|
|
49
52
|
judge: { // Optional: for prompt object steps
|
|
50
|
-
model: openai
|
|
53
|
+
model: 'openai/gpt-5.1',
|
|
51
54
|
instructions: 'You are a Chef that identifies if recipes contain gluten.'
|
|
52
55
|
}
|
|
53
56
|
})
|
|
@@ -60,13 +63,55 @@ const glutenCheckerScorer = createScorer({
|
|
|
60
63
|
|
|
61
64
|
The judge configuration is only needed if you plan to use prompt objects in any step. Individual steps can override this default configuration with their own judge settings.
|
|
62
65
|
|
|
66
|
+
If all steps are function-based, the judge is never called and there is no judge output. To see LLM output, define at least one step as a prompt object and read the corresponding step result (for example, `results.analyzeStepResult`).
|
|
67
|
+
|
|
68
|
+
#### Minimal judge example (prompt object)
|
|
69
|
+
|
|
70
|
+
This example uses a prompt object in `analyze`, so the judge runs and its structured output is available as `results.analyzeStepResult`.
|
|
71
|
+
|
|
72
|
+
```typescript
|
|
73
|
+
import { createScorer } from "@mastra/core/evals";
|
|
74
|
+
import { z } from "zod";
|
|
75
|
+
|
|
76
|
+
const quoteSourcesScorer = createScorer({
|
|
77
|
+
id: "quote-sources",
|
|
78
|
+
description: "Check if the response includes sources",
|
|
79
|
+
judge: {
|
|
80
|
+
model: "openai/gpt-4.1-nano",
|
|
81
|
+
instructions: "You are a strict evaluator.",
|
|
82
|
+
},
|
|
83
|
+
})
|
|
84
|
+
.analyze({
|
|
85
|
+
description: "Detect whether sources are present",
|
|
86
|
+
outputSchema: z.object({
|
|
87
|
+
hasSources: z.boolean(),
|
|
88
|
+
sources: z.array(z.string()),
|
|
89
|
+
}),
|
|
90
|
+
createPrompt: ({ run }) => `
|
|
91
|
+
Does the response contain sources? Extract them as a list.
|
|
92
|
+
|
|
93
|
+
Response:
|
|
94
|
+
${run.output}
|
|
95
|
+
`,
|
|
96
|
+
})
|
|
97
|
+
.generateScore(({ results }) => (results.analyzeStepResult.hasSources ? 1 : 0));
|
|
98
|
+
|
|
99
|
+
// Run the scorer and inspect judge output
|
|
100
|
+
const result = await quoteSourcesScorer.run({
|
|
101
|
+
input: "What is the capital of France?",
|
|
102
|
+
output: "Paris is the capital of France [1]. Source: [1] Wikipedia",
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
console.log(result.score); // 1
|
|
106
|
+
console.log(result.analyzeStepResult); // { hasSources: true, sources: ["Wikipedia"] }
|
|
107
|
+
```
|
|
108
|
+
|
|
63
109
|
#### Agent Type for Agent Evaluation
|
|
64
110
|
|
|
65
111
|
For type safety and compatibility with both live agent scoring and trace scoring, use `type: 'agent'` when creating scorers for agent evaluation. This allows you to use the same scorer for an agent and also use it to score traces:
|
|
66
112
|
|
|
67
113
|
```typescript
|
|
68
114
|
const myScorer = createScorer({
|
|
69
|
-
// ...
|
|
70
115
|
type: "agent", // Automatically handles agent input/output types
|
|
71
116
|
}).generateScore(({ run, results }) => {
|
|
72
117
|
// run.output is automatically typed as ScorerRunOutputForAgent
|
|
@@ -187,7 +232,7 @@ const glutenCheckerScorer = createScorer({...})
|
|
|
187
232
|
})
|
|
188
233
|
```
|
|
189
234
|
|
|
190
|
-
**Prompt Objects:** See the [`createScorer`](/reference/
|
|
235
|
+
**Prompt Objects:** See the [`createScorer`](/reference/evals/create-scorer) API reference for details on using prompt objects with generateScore, including required `calculateScore` function.
|
|
191
236
|
|
|
192
237
|
**Data Flow:** The score is available to generateReason as the `score` parameter
|
|
193
238
|
|
|
@@ -242,11 +287,14 @@ A custom scorer in Mastra uses `createScorer` with four core components:
|
|
|
242
287
|
|
|
243
288
|
Together, these components allow you to define custom evaluation logic using LLMs as judges.
|
|
244
289
|
|
|
245
|
-
|
|
290
|
+
:::info
|
|
291
|
+
|
|
292
|
+
Visit [createScorer](/reference/evals/create-scorer) for the full API and configuration options.
|
|
246
293
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
294
|
+
:::
|
|
295
|
+
|
|
296
|
+
```typescript title="src/mastra/scorers/gluten-checker.ts"
|
|
297
|
+
import { createScorer } from "@mastra/core/evals";
|
|
250
298
|
import { z } from "zod";
|
|
251
299
|
|
|
252
300
|
export const GLUTEN_INSTRUCTIONS = `You are a Chef that identifies if recipes contain gluten.`;
|
|
@@ -300,10 +348,10 @@ Return your response in this format:
|
|
|
300
348
|
"This recipe is [gluten-free/contains gluten] because [explanation]"`;
|
|
301
349
|
|
|
302
350
|
export const glutenCheckerScorer = createScorer({
|
|
303
|
-
|
|
351
|
+
id: "gluten-checker",
|
|
304
352
|
description: "Check if the output contains any gluten",
|
|
305
353
|
judge: {
|
|
306
|
-
model: openai
|
|
354
|
+
model: "openai/gpt-4.1-nano",
|
|
307
355
|
instructions: GLUTEN_INSTRUCTIONS,
|
|
308
356
|
},
|
|
309
357
|
})
|
|
@@ -338,7 +386,7 @@ Sets up the LLM model and defines its role as a domain expert.
|
|
|
338
386
|
|
|
339
387
|
```typescript
|
|
340
388
|
judge: {
|
|
341
|
-
model: openai
|
|
389
|
+
model: 'openai/gpt-4.1-nano',
|
|
342
390
|
instructions: GLUTEN_INSTRUCTIONS,
|
|
343
391
|
}
|
|
344
392
|
```
|
|
@@ -397,11 +445,9 @@ Provides human-readable explanations for the score using another LLM call.
|
|
|
397
445
|
|
|
398
446
|
The reason generation step creates explanations that help users understand why a particular score was assigned, using both the boolean result and the specific gluten sources identified by the analysis step.
|
|
399
447
|
|
|
400
|
-
````
|
|
401
|
-
|
|
402
448
|
## High gluten-free example
|
|
403
449
|
|
|
404
|
-
```typescript title="src/example-high-gluten-free.ts"
|
|
450
|
+
```typescript title="src/example-high-gluten-free.ts"
|
|
405
451
|
const result = await glutenCheckerScorer.run({
|
|
406
452
|
input: [{ role: 'user', content: 'Mix rice, beans, and vegetables' }],
|
|
407
453
|
output: { text: 'Mix rice, beans, and vegetables' },
|
|
@@ -410,7 +456,7 @@ const result = await glutenCheckerScorer.run({
|
|
|
410
456
|
console.log('Score:', result.score);
|
|
411
457
|
console.log('Gluten sources:', result.analyzeStepResult.glutenSources);
|
|
412
458
|
console.log('Reason:', result.reason);
|
|
413
|
-
|
|
459
|
+
```
|
|
414
460
|
|
|
415
461
|
### High gluten-free output
|
|
416
462
|
|
|
@@ -427,7 +473,7 @@ console.log('Reason:', result.reason);
|
|
|
427
473
|
|
|
428
474
|
## Partial gluten example
|
|
429
475
|
|
|
430
|
-
```typescript title="src/example-partial-gluten.ts"
|
|
476
|
+
```typescript title="src/example-partial-gluten.ts"
|
|
431
477
|
const result = await glutenCheckerScorer.run({
|
|
432
478
|
input: [{ role: "user", content: "Mix flour and water to make dough" }],
|
|
433
479
|
output: { text: "Mix flour and water to make dough" },
|
|
@@ -453,7 +499,7 @@ console.log("Reason:", result.reason);
|
|
|
453
499
|
|
|
454
500
|
## Low gluten-free example
|
|
455
501
|
|
|
456
|
-
```typescript title="src/example-low-gluten-free.ts"
|
|
502
|
+
```typescript title="src/example-low-gluten-free.ts"
|
|
457
503
|
const result = await glutenCheckerScorer.run({
|
|
458
504
|
input: [{ role: "user", content: "Add soy sauce and noodles" }],
|
|
459
505
|
output: { text: "Add soy sauce and noodles" },
|
|
@@ -479,5 +525,5 @@ console.log("Reason:", result.reason);
|
|
|
479
525
|
|
|
480
526
|
**Examples and Resources:**
|
|
481
527
|
|
|
482
|
-
- [createScorer API Reference](/reference/
|
|
528
|
+
- [createScorer API Reference](/reference/evals/create-scorer) - Complete technical documentation
|
|
483
529
|
- [Built-in Scorers Source Code](https://github.com/mastra-ai/mastra/tree/main/packages/evals/src/scorers) - Real implementations for reference
|