@mastra/mcp-docs-server 1.0.0-beta.0 → 1.0.0-beta.10
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%2Fstorage-test-utils.md +201 -1
- package/.docs/organized/changelogs/%40internal%2Ftypes-builder.md +1 -55
- package/.docs/organized/changelogs/%40mastra%2Fagent-builder.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fai-sdk.md +250 -50
- package/.docs/organized/changelogs/%40mastra%2Fastra.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fauth.md +6 -0
- package/.docs/organized/changelogs/%40mastra%2Fchroma.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fcodemod.md +26 -0
- package/.docs/organized/changelogs/%40mastra%2Fconvex.md +89 -0
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +396 -196
- package/.docs/organized/changelogs/%40mastra%2Fcouchbase.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +201 -1
- 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 +200 -0
- package/.docs/organized/changelogs/%40mastra%2Fduckdb.md +42 -0
- package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Felasticsearch.md +61 -0
- package/.docs/organized/changelogs/%40mastra%2Fevals.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Flance.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Flibsql.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Floggers.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmcp-registry-registry.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmcp.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmemory.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmssql.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fopensearch.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fpg.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fpinecone.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +251 -51
- package/.docs/organized/changelogs/%40mastra%2Fqdrant.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Frag.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Freact.md +128 -1
- package/.docs/organized/changelogs/%40mastra%2Fs3vectors.md +18 -0
- package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +42 -0
- package/.docs/organized/changelogs/%40mastra%2Fserver.md +251 -51
- package/.docs/organized/changelogs/%40mastra%2Fturbopuffer.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fupstash.md +201 -1
- 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 +92 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google-gemini-live.md +67 -1
- 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 +201 -1
- package/.docs/organized/changelogs/mastra.md +201 -1
- package/.docs/organized/code-examples/agui.md +1 -0
- package/.docs/organized/code-examples/ai-elements.md +2 -2
- package/.docs/organized/code-examples/ai-sdk-useChat.md +2 -2
- package/.docs/organized/code-examples/ai-sdk-v5.md +3 -2
- package/.docs/organized/code-examples/assistant-ui.md +2 -2
- package/.docs/organized/code-examples/bird-checker-with-express.md +1 -1
- package/.docs/organized/code-examples/bird-checker-with-nextjs-and-eval.md +2 -2
- package/.docs/organized/code-examples/bird-checker-with-nextjs.md +2 -2
- package/.docs/organized/code-examples/client-side-tools.md +1 -1
- package/.docs/organized/code-examples/crypto-chatbot.md +2 -2
- package/.docs/organized/code-examples/fireworks-r1.md +1 -1
- package/.docs/organized/code-examples/heads-up-game.md +1 -1
- package/.docs/organized/code-examples/mcp-configuration.md +0 -3
- package/.docs/organized/code-examples/mcp-server-adapters.md +720 -0
- package/.docs/organized/code-examples/memory-per-resource-example.md +1 -1
- package/.docs/organized/code-examples/memory-with-processors.md +1 -1
- package/.docs/organized/code-examples/openapi-spec-writer.md +1 -1
- package/.docs/organized/code-examples/processors-with-ai-sdk.md +14 -0
- package/.docs/organized/code-examples/quick-start.md +2 -2
- 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-hono-adapter.md +85 -0
- package/.docs/organized/code-examples/stock-price-tool.md +1 -21
- package/.docs/organized/code-examples/workflow-ai-recruiter.md +1 -1
- package/.docs/organized/code-examples/workflow-with-inline-steps.md +1 -1
- package/.docs/organized/code-examples/workflow-with-memory.md +1 -1
- package/.docs/organized/code-examples/workflow-with-separate-steps.md +1 -1
- package/.docs/organized/code-examples/workflow-with-suspend-resume.md +1 -1
- package/.docs/raw/agents/adding-voice.mdx +56 -10
- package/.docs/raw/agents/agent-approval.mdx +189 -0
- package/.docs/raw/agents/agent-memory.mdx +2 -2
- package/.docs/raw/agents/guardrails.mdx +27 -24
- package/.docs/raw/agents/networks.mdx +3 -3
- package/.docs/raw/agents/overview.mdx +19 -168
- package/.docs/raw/agents/processors.mdx +279 -0
- package/.docs/raw/agents/structured-output.mdx +224 -0
- package/.docs/raw/agents/using-tools.mdx +14 -14
- package/.docs/raw/auth/auth0.mdx +2 -2
- package/.docs/raw/auth/clerk.mdx +2 -2
- package/.docs/raw/auth/firebase.mdx +2 -2
- package/.docs/raw/auth/index.mdx +1 -1
- package/.docs/raw/auth/jwt.mdx +2 -2
- package/.docs/raw/auth/supabase.mdx +2 -2
- package/.docs/raw/auth/workos.mdx +2 -2
- 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/03-verifying-installation.md +1 -1
- package/.docs/raw/course/01-first-agent/05-running-playground.md +5 -5
- package/.docs/raw/course/01-first-agent/09-testing-your-agent.md +3 -3
- package/.docs/raw/course/01-first-agent/13-testing-your-tool.md +3 -3
- package/.docs/raw/course/01-first-agent/17-testing-memory.md +2 -2
- package/.docs/raw/course/02-agent-tools-mcp/02-installing-mcp.md +1 -1
- package/.docs/raw/course/03-agent-memory/03-installing-memory.md +1 -1
- package/.docs/raw/course/04-workflows/07-using-playground.md +1 -1
- package/.docs/raw/deployment/{server-deployment.mdx → building-mastra.mdx} +4 -4
- package/.docs/raw/deployment/cloud-providers/amazon-ec2.mdx +3 -3
- package/.docs/raw/deployment/cloud-providers/aws-lambda.mdx +4 -4
- package/.docs/raw/deployment/cloud-providers/azure-app-services.mdx +4 -4
- package/.docs/raw/deployment/{serverless-platforms → cloud-providers}/cloudflare-deployer.mdx +2 -2
- package/.docs/raw/deployment/cloud-providers/digital-ocean.mdx +3 -3
- package/.docs/raw/deployment/cloud-providers/index.mdx +26 -29
- package/.docs/raw/deployment/{serverless-platforms → cloud-providers}/netlify-deployer.mdx +46 -15
- package/.docs/raw/deployment/{serverless-platforms → cloud-providers}/vercel-deployer.mdx +2 -2
- package/.docs/raw/{mastra-cloud → deployment/mastra-cloud}/dashboard.mdx +3 -3
- package/.docs/raw/deployment/mastra-cloud/observability.mdx +53 -0
- package/.docs/raw/{mastra-cloud → deployment/mastra-cloud}/overview.mdx +3 -3
- package/.docs/raw/{mastra-cloud → deployment/mastra-cloud}/setting-up.mdx +4 -4
- package/.docs/raw/deployment/monorepo.mdx +3 -3
- package/.docs/raw/deployment/overview.mdx +7 -7
- package/.docs/raw/deployment/web-framework.mdx +6 -6
- package/.docs/raw/evals/{off-the-shelf-scorers.mdx → built-in-scorers.mdx} +17 -15
- package/.docs/raw/evals/custom-scorers.mdx +4 -6
- package/.docs/raw/evals/overview.mdx +6 -7
- package/.docs/raw/evals/running-in-ci.mdx +2 -4
- package/.docs/raw/getting-started/{installation.mdx → manual-install.mdx} +15 -89
- package/.docs/raw/getting-started/mcp-docs-server.mdx +6 -6
- package/.docs/raw/getting-started/project-structure.mdx +2 -2
- package/.docs/raw/getting-started/start.mdx +72 -0
- package/.docs/raw/getting-started/studio.mdx +8 -6
- package/.docs/raw/guides/agent-frameworks/ai-sdk.mdx +147 -0
- package/.docs/raw/guides/build-your-ui/ai-sdk-ui.mdx +627 -0
- package/.docs/raw/{frameworks/agentic-uis → guides/build-your-ui}/assistant-ui.mdx +72 -20
- package/.docs/raw/guides/build-your-ui/copilotkit.mdx +206 -0
- package/.docs/raw/{frameworks/web-frameworks → guides/getting-started}/astro.mdx +28 -30
- package/.docs/raw/{frameworks/servers → guides/getting-started}/express.mdx +4 -5
- package/.docs/raw/guides/getting-started/next-js.mdx +276 -0
- package/.docs/raw/guides/getting-started/quickstart.mdx +97 -0
- package/.docs/raw/{frameworks/web-frameworks → guides/getting-started}/sveltekit.mdx +28 -30
- package/.docs/raw/{frameworks/web-frameworks → guides/getting-started}/vite-react.mdx +12 -12
- package/.docs/raw/guides/guide/ai-recruiter.mdx +2 -3
- package/.docs/raw/guides/guide/chef-michel.mdx +2 -3
- package/.docs/raw/guides/guide/notes-mcp-server.mdx +3 -3
- package/.docs/raw/guides/guide/research-assistant.mdx +8 -18
- package/.docs/raw/guides/guide/stock-agent.mdx +4 -6
- package/.docs/raw/guides/guide/web-search.mdx +12 -10
- package/.docs/raw/guides/guide/whatsapp-chat-bot.mdx +421 -0
- package/.docs/raw/guides/index.mdx +3 -35
- package/.docs/raw/guides/migrations/agentnetwork.mdx +4 -4
- package/.docs/raw/guides/migrations/ai-sdk-v4-to-v5.mdx +119 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/agent.mdx +56 -6
- package/.docs/raw/guides/migrations/upgrade-to-v1/client.mdx +42 -2
- package/.docs/raw/guides/migrations/upgrade-to-v1/evals.mdx +31 -1
- package/.docs/raw/guides/migrations/upgrade-to-v1/mastra.mdx +29 -5
- package/.docs/raw/guides/migrations/upgrade-to-v1/mcp.mdx +3 -3
- package/.docs/raw/guides/migrations/upgrade-to-v1/memory.mdx +28 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/overview.mdx +59 -37
- package/.docs/raw/guides/migrations/upgrade-to-v1/storage.mdx +80 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/tools.mdx +70 -5
- package/.docs/raw/guides/migrations/upgrade-to-v1/tracing.mdx +13 -13
- package/.docs/raw/guides/migrations/upgrade-to-v1/vectors.mdx +25 -1
- package/.docs/raw/guides/migrations/upgrade-to-v1/voice.mdx +1 -1
- package/.docs/raw/guides/migrations/upgrade-to-v1/workflows.mdx +175 -2
- package/.docs/raw/guides/migrations/vnext-to-standard-apis.mdx +2 -2
- package/.docs/raw/index.mdx +4 -4
- package/.docs/raw/mcp/overview.mdx +358 -0
- package/.docs/raw/mcp/publishing-mcp-server.mdx +139 -0
- package/.docs/raw/memory/conversation-history.mdx +1 -1
- package/.docs/raw/memory/memory-processors.mdx +265 -80
- package/.docs/raw/memory/overview.mdx +3 -3
- package/.docs/raw/memory/semantic-recall.mdx +10 -10
- package/.docs/raw/memory/storage/memory-with-libsql.mdx +5 -10
- package/.docs/raw/memory/storage/memory-with-mongodb.mdx +150 -0
- package/.docs/raw/memory/storage/memory-with-pg.mdx +5 -10
- package/.docs/raw/memory/storage/memory-with-upstash.mdx +5 -10
- package/.docs/raw/memory/threads-and-resources.mdx +4 -4
- package/.docs/raw/memory/working-memory.mdx +16 -8
- package/.docs/raw/{logging.mdx → observability/logging.mdx} +8 -8
- package/.docs/raw/observability/overview.mdx +5 -6
- package/.docs/raw/observability/tracing/bridges/otel.mdx +200 -0
- package/.docs/raw/observability/tracing/exporters/arize.mdx +39 -3
- package/.docs/raw/observability/tracing/exporters/braintrust.mdx +22 -3
- package/.docs/raw/observability/tracing/exporters/cloud.mdx +4 -4
- package/.docs/raw/observability/tracing/exporters/default.mdx +6 -6
- package/.docs/raw/observability/tracing/exporters/langfuse.mdx +86 -3
- package/.docs/raw/observability/tracing/exporters/langsmith.mdx +15 -3
- package/.docs/raw/observability/tracing/exporters/otel.mdx +128 -30
- package/.docs/raw/observability/tracing/exporters/posthog.mdx +127 -0
- package/.docs/raw/observability/tracing/overview.mdx +100 -29
- package/.docs/raw/observability/tracing/processors/sensitive-data-filter.mdx +2 -3
- package/.docs/raw/rag/chunking-and-embedding.mdx +16 -17
- package/.docs/raw/rag/overview.mdx +5 -4
- package/.docs/raw/rag/retrieval.mdx +44 -39
- package/.docs/raw/rag/vector-databases.mdx +94 -3
- package/.docs/raw/reference/agents/agent.mdx +10 -14
- package/.docs/raw/reference/agents/generate.mdx +67 -99
- package/.docs/raw/reference/agents/generateLegacy.mdx +3 -3
- package/.docs/raw/reference/agents/getDefaultGenerateOptions.mdx +1 -1
- package/.docs/raw/reference/agents/getDefaultOptions.mdx +1 -1
- package/.docs/raw/reference/agents/getDefaultStreamOptions.mdx +1 -1
- package/.docs/raw/reference/agents/getDescription.mdx +1 -1
- package/.docs/raw/reference/agents/getInstructions.mdx +1 -1
- package/.docs/raw/reference/agents/getLLM.mdx +2 -2
- package/.docs/raw/reference/agents/getMemory.mdx +1 -1
- package/.docs/raw/reference/agents/getModel.mdx +1 -1
- package/.docs/raw/reference/agents/getTools.mdx +69 -0
- package/.docs/raw/reference/agents/getVoice.mdx +1 -1
- package/.docs/raw/reference/agents/listAgents.mdx +1 -1
- package/.docs/raw/reference/agents/listScorers.mdx +1 -1
- package/.docs/raw/reference/agents/listTools.mdx +2 -2
- package/.docs/raw/reference/agents/listWorkflows.mdx +1 -1
- package/.docs/raw/reference/agents/network.mdx +33 -72
- package/.docs/raw/reference/ai-sdk/chat-route.mdx +127 -0
- package/.docs/raw/reference/ai-sdk/handle-chat-stream.mdx +117 -0
- package/.docs/raw/reference/ai-sdk/handle-network-stream.mdx +64 -0
- package/.docs/raw/reference/ai-sdk/handle-workflow-stream.mdx +116 -0
- package/.docs/raw/reference/ai-sdk/network-route.mdx +99 -0
- package/.docs/raw/reference/ai-sdk/to-ai-sdk-stream.mdx +289 -0
- package/.docs/raw/reference/ai-sdk/with-mastra.mdx +119 -0
- package/.docs/raw/reference/ai-sdk/workflow-route.mdx +110 -0
- package/.docs/raw/reference/auth/auth0.mdx +1 -1
- package/.docs/raw/reference/auth/clerk.mdx +1 -1
- package/.docs/raw/reference/auth/firebase.mdx +1 -1
- package/.docs/raw/reference/auth/jwt.mdx +1 -1
- package/.docs/raw/reference/auth/supabase.mdx +1 -1
- package/.docs/raw/reference/auth/workos.mdx +1 -1
- package/.docs/raw/reference/cli/create-mastra.mdx +11 -11
- package/.docs/raw/reference/cli/mastra.mdx +25 -12
- package/.docs/raw/reference/client-js/agents.mdx +252 -68
- package/.docs/raw/reference/client-js/error-handling.mdx +1 -1
- package/.docs/raw/reference/client-js/logs.mdx +1 -1
- package/.docs/raw/reference/client-js/mastra-client.mdx +4 -4
- package/.docs/raw/reference/client-js/memory.mdx +48 -2
- package/.docs/raw/reference/client-js/observability.mdx +1 -1
- package/.docs/raw/reference/client-js/telemetry.mdx +1 -1
- package/.docs/raw/reference/client-js/tools.mdx +1 -1
- package/.docs/raw/reference/client-js/vectors.mdx +1 -1
- package/.docs/raw/reference/client-js/workflows.mdx +93 -64
- package/.docs/raw/reference/core/addGateway.mdx +59 -0
- package/.docs/raw/reference/core/getAgent.mdx +1 -1
- package/.docs/raw/reference/core/getAgentById.mdx +1 -1
- package/.docs/raw/reference/core/getDeployer.mdx +1 -1
- package/.docs/raw/reference/core/getGateway.mdx +59 -0
- package/.docs/raw/reference/core/getGatewayById.mdx +62 -0
- package/.docs/raw/reference/core/getLogger.mdx +3 -3
- package/.docs/raw/reference/core/getMCPServer.mdx +4 -4
- package/.docs/raw/reference/core/getMCPServerById.mdx +5 -5
- package/.docs/raw/reference/core/getMemory.mdx +73 -0
- package/.docs/raw/reference/core/getScorer.mdx +1 -1
- package/.docs/raw/reference/core/getScorerById.mdx +1 -1
- package/.docs/raw/reference/core/getServer.mdx +2 -2
- package/.docs/raw/reference/core/getStorage.mdx +1 -1
- package/.docs/raw/reference/core/getStoredAgentById.mdx +183 -0
- package/.docs/raw/reference/core/getTelemetry.mdx +3 -3
- package/.docs/raw/reference/core/getVector.mdx +1 -1
- package/.docs/raw/reference/core/getWorkflow.mdx +1 -1
- package/.docs/raw/reference/core/listAgents.mdx +1 -1
- package/.docs/raw/reference/core/listGateways.mdx +53 -0
- package/.docs/raw/reference/core/listLogs.mdx +3 -3
- package/.docs/raw/reference/core/listLogsByRunId.mdx +3 -3
- package/.docs/raw/reference/core/listMCPServers.mdx +5 -5
- package/.docs/raw/reference/core/listMemory.mdx +70 -0
- package/.docs/raw/reference/core/listScorers.mdx +1 -1
- package/.docs/raw/reference/core/listStoredAgents.mdx +151 -0
- package/.docs/raw/reference/core/listVectors.mdx +1 -1
- package/.docs/raw/reference/core/listWorkflows.mdx +1 -1
- package/.docs/raw/reference/core/mastra-class.mdx +17 -1
- package/.docs/raw/reference/core/mastra-model-gateway.mdx +227 -0
- package/.docs/raw/reference/core/setLogger.mdx +3 -3
- package/.docs/raw/reference/core/setStorage.mdx +1 -1
- package/.docs/raw/reference/core/setTelemetry.mdx +3 -3
- package/.docs/raw/reference/deployer/cloudflare.mdx +1 -1
- package/.docs/raw/reference/deployer/deployer.mdx +1 -1
- package/.docs/raw/reference/deployer/netlify.mdx +2 -3
- package/.docs/raw/reference/deployer/vercel.mdx +1 -1
- package/.docs/raw/reference/evals/answer-relevancy.mdx +29 -99
- package/.docs/raw/reference/evals/answer-similarity.mdx +13 -259
- package/.docs/raw/reference/evals/bias.mdx +30 -88
- package/.docs/raw/reference/evals/completeness.mdx +32 -91
- package/.docs/raw/reference/evals/content-similarity.mdx +29 -89
- package/.docs/raw/reference/evals/context-precision.mdx +29 -131
- package/.docs/raw/reference/evals/context-relevance.mdx +12 -12
- package/.docs/raw/reference/evals/create-scorer.mdx +59 -50
- package/.docs/raw/reference/evals/faithfulness.mdx +29 -102
- package/.docs/raw/reference/evals/hallucination.mdx +29 -104
- package/.docs/raw/reference/evals/keyword-coverage.mdx +29 -108
- package/.docs/raw/reference/evals/mastra-scorer.mdx +3 -1
- package/.docs/raw/reference/evals/noise-sensitivity.mdx +12 -12
- package/.docs/raw/reference/evals/prompt-alignment.mdx +16 -16
- package/.docs/raw/reference/evals/run-evals.mdx +1 -1
- package/.docs/raw/reference/evals/scorer-utils.mdx +362 -0
- package/.docs/raw/reference/evals/textual-difference.mdx +28 -101
- package/.docs/raw/reference/evals/tone-consistency.mdx +26 -99
- package/.docs/raw/reference/evals/tool-call-accuracy.mdx +8 -8
- package/.docs/raw/reference/evals/toxicity.mdx +30 -93
- package/.docs/raw/reference/index.mdx +1 -0
- package/.docs/raw/reference/logging/pino-logger.mdx +2 -2
- package/.docs/raw/reference/memory/createThread.mdx +1 -1
- package/.docs/raw/reference/memory/deleteMessages.mdx +1 -1
- package/.docs/raw/reference/memory/getThreadById.mdx +1 -1
- package/.docs/raw/reference/memory/listThreadsByResourceId.mdx +1 -1
- package/.docs/raw/reference/memory/memory-class.mdx +6 -8
- package/.docs/raw/reference/memory/query.mdx +1 -1
- package/.docs/raw/reference/memory/recall.mdx +1 -1
- package/.docs/raw/reference/observability/tracing/bridges/otel.mdx +177 -0
- package/.docs/raw/reference/observability/tracing/configuration.mdx +12 -16
- package/.docs/raw/reference/observability/tracing/exporters/arize.mdx +31 -2
- package/.docs/raw/reference/observability/tracing/exporters/braintrust.mdx +1 -1
- package/.docs/raw/reference/observability/tracing/exporters/cloud-exporter.mdx +9 -9
- package/.docs/raw/reference/observability/tracing/exporters/console-exporter.mdx +9 -9
- package/.docs/raw/reference/observability/tracing/exporters/default-exporter.mdx +9 -9
- package/.docs/raw/reference/observability/tracing/exporters/langfuse.mdx +44 -1
- package/.docs/raw/reference/observability/tracing/exporters/langsmith.mdx +18 -2
- package/.docs/raw/reference/observability/tracing/exporters/otel.mdx +34 -44
- package/.docs/raw/reference/observability/tracing/exporters/posthog.mdx +132 -0
- package/.docs/raw/reference/observability/tracing/instances.mdx +8 -12
- package/.docs/raw/reference/observability/tracing/interfaces.mdx +36 -11
- package/.docs/raw/reference/observability/tracing/processors/sensitive-data-filter.mdx +1 -1
- package/.docs/raw/reference/observability/tracing/spans.mdx +7 -11
- package/.docs/raw/reference/processors/batch-parts-processor.mdx +10 -4
- package/.docs/raw/reference/processors/language-detector.mdx +19 -6
- package/.docs/raw/reference/processors/message-history-processor.mdx +131 -0
- package/.docs/raw/reference/processors/moderation-processor.mdx +21 -8
- package/.docs/raw/reference/processors/pii-detector.mdx +21 -8
- package/.docs/raw/reference/processors/processor-interface.mdx +502 -0
- package/.docs/raw/reference/processors/prompt-injection-detector.mdx +19 -6
- package/.docs/raw/reference/processors/semantic-recall-processor.mdx +197 -0
- package/.docs/raw/reference/processors/system-prompt-scrubber.mdx +12 -7
- package/.docs/raw/reference/processors/token-limiter-processor.mdx +11 -5
- package/.docs/raw/reference/processors/tool-call-filter.mdx +125 -0
- package/.docs/raw/reference/processors/unicode-normalizer.mdx +10 -4
- package/.docs/raw/reference/processors/working-memory-processor.mdx +221 -0
- package/.docs/raw/reference/rag/chunk.mdx +1 -1
- package/.docs/raw/reference/rag/database-config.mdx +1 -1
- package/.docs/raw/reference/rag/document.mdx +1 -1
- package/.docs/raw/reference/rag/embeddings.mdx +6 -6
- package/.docs/raw/reference/rag/extract-params.mdx +1 -1
- package/.docs/raw/reference/rag/graph-rag.mdx +1 -1
- package/.docs/raw/reference/rag/metadata-filters.mdx +1 -1
- package/.docs/raw/reference/rag/rerank.mdx +2 -3
- package/.docs/raw/reference/rag/rerankWithScorer.mdx +1 -2
- package/.docs/raw/reference/server/create-route.mdx +328 -0
- package/.docs/raw/reference/server/express-adapter.mdx +260 -0
- package/.docs/raw/reference/server/hono-adapter.mdx +242 -0
- package/.docs/raw/reference/server/mastra-server.mdx +345 -0
- package/.docs/raw/reference/server/routes.mdx +250 -0
- package/.docs/raw/reference/storage/cloudflare-d1.mdx +39 -2
- package/.docs/raw/reference/storage/cloudflare.mdx +2 -2
- package/.docs/raw/reference/storage/convex.mdx +164 -0
- package/.docs/raw/reference/storage/dynamodb.mdx +4 -4
- package/.docs/raw/reference/storage/lance.mdx +35 -2
- package/.docs/raw/reference/storage/libsql.mdx +39 -2
- package/.docs/raw/reference/storage/mongodb.mdx +41 -2
- package/.docs/raw/reference/storage/mssql.mdx +39 -2
- package/.docs/raw/reference/storage/postgresql.mdx +39 -2
- package/.docs/raw/reference/storage/upstash.mdx +2 -2
- package/.docs/raw/reference/streaming/ChunkType.mdx +2 -2
- package/.docs/raw/reference/streaming/agents/MastraModelOutput.mdx +1 -1
- package/.docs/raw/reference/streaming/agents/stream.mdx +68 -95
- package/.docs/raw/reference/streaming/agents/streamLegacy.mdx +1 -1
- package/.docs/raw/reference/streaming/workflows/observeStream.mdx +8 -10
- package/.docs/raw/reference/streaming/workflows/{resumeStreamVNext.mdx → resumeStream.mdx} +51 -11
- package/.docs/raw/reference/streaming/workflows/stream.mdx +84 -25
- package/.docs/raw/reference/streaming/workflows/timeTravelStream.mdx +170 -0
- package/.docs/raw/reference/templates/overview.mdx +3 -6
- package/.docs/raw/reference/tools/client.mdx +2 -3
- package/.docs/raw/reference/tools/create-tool.mdx +135 -4
- package/.docs/raw/reference/tools/document-chunker-tool.mdx +1 -1
- package/.docs/raw/reference/tools/graph-rag-tool.mdx +7 -7
- package/.docs/raw/reference/tools/mcp-client.mdx +131 -23
- package/.docs/raw/reference/tools/mcp-server.mdx +56 -8
- package/.docs/raw/reference/tools/vector-query-tool.mdx +16 -17
- package/.docs/raw/reference/vectors/astra.mdx +1 -1
- package/.docs/raw/reference/vectors/chroma.mdx +82 -2
- package/.docs/raw/reference/vectors/convex.mdx +429 -0
- package/.docs/raw/reference/vectors/couchbase.mdx +33 -20
- package/.docs/raw/reference/vectors/duckdb.mdx +462 -0
- package/.docs/raw/reference/vectors/elasticsearch.mdx +310 -0
- package/.docs/raw/reference/vectors/lance.mdx +39 -23
- package/.docs/raw/reference/vectors/libsql.mdx +37 -4
- package/.docs/raw/reference/vectors/mongodb.mdx +43 -4
- package/.docs/raw/reference/vectors/opensearch.mdx +38 -17
- package/.docs/raw/reference/vectors/pg.mdx +44 -37
- package/.docs/raw/reference/vectors/pinecone.mdx +70 -3
- package/.docs/raw/reference/vectors/qdrant.mdx +37 -2
- package/.docs/raw/reference/vectors/s3vectors.mdx +2 -2
- package/.docs/raw/reference/vectors/turbopuffer.mdx +75 -1
- package/.docs/raw/reference/vectors/upstash.mdx +1 -1
- package/.docs/raw/reference/vectors/vectorize.mdx +1 -1
- package/.docs/raw/reference/voice/azure.mdx +96 -81
- package/.docs/raw/reference/voice/cloudflare.mdx +1 -1
- package/.docs/raw/reference/voice/composite-voice.mdx +72 -29
- package/.docs/raw/reference/voice/deepgram.mdx +1 -1
- package/.docs/raw/reference/voice/elevenlabs.mdx +1 -1
- package/.docs/raw/reference/voice/google-gemini-live.mdx +1 -1
- package/.docs/raw/reference/voice/google.mdx +160 -21
- package/.docs/raw/reference/voice/mastra-voice.mdx +1 -1
- package/.docs/raw/reference/voice/murf.mdx +1 -1
- package/.docs/raw/reference/voice/openai-realtime.mdx +3 -3
- package/.docs/raw/reference/voice/openai.mdx +1 -1
- package/.docs/raw/reference/voice/playai.mdx +1 -1
- package/.docs/raw/reference/voice/sarvam.mdx +1 -1
- package/.docs/raw/reference/voice/speechify.mdx +1 -1
- package/.docs/raw/reference/voice/voice.addInstructions.mdx +3 -4
- package/.docs/raw/reference/voice/voice.addTools.mdx +2 -2
- package/.docs/raw/reference/voice/voice.answer.mdx +2 -2
- package/.docs/raw/reference/voice/voice.close.mdx +2 -2
- package/.docs/raw/reference/voice/voice.connect.mdx +2 -2
- package/.docs/raw/reference/voice/voice.events.mdx +1 -1
- package/.docs/raw/reference/voice/voice.getSpeakers.mdx +1 -1
- package/.docs/raw/reference/voice/voice.listen.mdx +87 -53
- package/.docs/raw/reference/voice/voice.off.mdx +2 -2
- package/.docs/raw/reference/voice/voice.on.mdx +2 -2
- package/.docs/raw/reference/voice/voice.send.mdx +2 -2
- package/.docs/raw/reference/voice/voice.speak.mdx +76 -41
- package/.docs/raw/reference/voice/voice.updateConfig.mdx +2 -2
- package/.docs/raw/reference/workflows/run-methods/cancel.mdx +1 -1
- package/.docs/raw/reference/workflows/run-methods/restart.mdx +142 -0
- package/.docs/raw/reference/workflows/run-methods/resume.mdx +45 -1
- package/.docs/raw/reference/workflows/run-methods/start.mdx +48 -4
- package/.docs/raw/reference/workflows/run-methods/timeTravel.mdx +310 -0
- package/.docs/raw/reference/workflows/run.mdx +28 -6
- package/.docs/raw/reference/workflows/step.mdx +65 -1
- package/.docs/raw/reference/workflows/workflow-methods/branch.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/commit.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/create-run.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/dountil.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/dowhile.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/foreach.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/map.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/parallel.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/sendEvent.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/sleep.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/sleepUntil.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/then.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/waitForEvent.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow.mdx +21 -2
- package/.docs/raw/server-db/custom-adapters.mdx +386 -0
- package/.docs/raw/server-db/custom-api-routes.mdx +6 -6
- package/.docs/raw/server-db/mastra-client.mdx +7 -8
- package/.docs/raw/server-db/{production-server.mdx → mastra-server.mdx} +16 -8
- package/.docs/raw/server-db/middleware.mdx +31 -31
- package/.docs/raw/server-db/request-context.mdx +3 -4
- package/.docs/raw/server-db/server-adapters.mdx +312 -0
- package/.docs/raw/server-db/storage.mdx +12 -1
- package/.docs/raw/streaming/events.mdx +1 -1
- package/.docs/raw/streaming/overview.mdx +27 -16
- package/.docs/raw/streaming/tool-streaming.mdx +58 -19
- package/.docs/raw/streaming/workflow-streaming.mdx +6 -12
- package/.docs/raw/tools-mcp/advanced-usage.mdx +2 -3
- package/.docs/raw/tools-mcp/mcp-overview.mdx +5 -7
- package/.docs/raw/tools-mcp/overview.mdx +1 -1
- package/.docs/raw/voice/overview.mdx +88 -41
- package/.docs/raw/voice/speech-to-speech.mdx +5 -5
- package/.docs/raw/voice/speech-to-text.mdx +3 -4
- package/.docs/raw/voice/text-to-speech.mdx +3 -4
- package/.docs/raw/workflows/agents-and-tools.mdx +43 -5
- package/.docs/raw/workflows/control-flow.mdx +186 -1
- package/.docs/raw/workflows/error-handling.mdx +5 -4
- package/.docs/raw/workflows/human-in-the-loop.mdx +160 -213
- package/.docs/raw/workflows/inngest-workflow.mdx +2 -2
- package/.docs/raw/workflows/input-data-mapping.mdx +1 -1
- package/.docs/raw/workflows/overview.mdx +67 -47
- package/.docs/raw/workflows/snapshots.mdx +5 -3
- package/.docs/raw/workflows/suspend-and-resume.mdx +121 -204
- package/.docs/raw/workflows/time-travel.mdx +313 -0
- package/.docs/raw/workflows/workflow-state.mdx +190 -0
- package/CHANGELOG.md +88 -0
- package/dist/{chunk-5NJC7NRO.js → chunk-4CM2BQNP.js} +24 -4
- package/dist/prepare-docs/package-changes.d.ts.map +1 -1
- package/dist/prepare-docs/prepare.js +1 -1
- package/dist/stdio.js +17 -19
- package/package.json +11 -15
- package/.docs/raw/deployment/serverless-platforms/index.mdx +0 -58
- package/.docs/raw/frameworks/agentic-uis/ai-sdk.mdx +0 -688
- 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 -179
- package/.docs/raw/frameworks/web-frameworks/next-js.mdx +0 -379
- package/.docs/raw/getting-started/templates.mdx +0 -73
- package/.docs/raw/mastra-cloud/observability.mdx +0 -51
- package/.docs/raw/reference/streaming/workflows/observeStreamVNext.mdx +0 -47
- package/.docs/raw/reference/streaming/workflows/streamVNext.mdx +0 -153
package/.docs/raw/deployment/{serverless-platforms → cloud-providers}/cloudflare-deployer.mdx
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "CloudflareDeployer | Deployment
|
|
2
|
+
title: "CloudflareDeployer | Deployment"
|
|
3
3
|
description: "Learn how to deploy a Mastra application to Cloudflare using the Mastra CloudflareDeployer"
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -10,7 +10,7 @@ The `CloudflareDeployer` class handles deployment of standalone Mastra applicati
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
12
12
|
```bash copy
|
|
13
|
-
npm install @mastra/deployer-cloudflare@
|
|
13
|
+
npm install @mastra/deployer-cloudflare@beta
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## Usage example
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Digital Ocean | Deployment
|
|
2
|
+
title: "Digital Ocean | Deployment"
|
|
3
3
|
description: "Deploy your Mastra applications to Digital Ocean."
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -14,9 +14,9 @@ Deploy your Mastra applications to Digital Ocean's App Platform and Droplets.
|
|
|
14
14
|
|
|
15
15
|
:::note
|
|
16
16
|
This guide assumes your Mastra application has been created using the default
|
|
17
|
-
`npx create-mastra@
|
|
17
|
+
`npx create-mastra@beta` command.
|
|
18
18
|
For more information on how to create a new Mastra application,
|
|
19
|
-
refer to our [getting started guide](
|
|
19
|
+
refer to our [getting started guide](/guides/v1/getting-started/quickstart)
|
|
20
20
|
:::
|
|
21
21
|
|
|
22
22
|
<Tabs>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Cloud Providers | Deployment
|
|
2
|
+
title: "Cloud Providers | Deployment"
|
|
3
3
|
description: "Deploy your Mastra applications to popular cloud providers."
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -9,16 +9,19 @@ Standalone Mastra applications can be deployed to popular cloud providers, see o
|
|
|
9
9
|
|
|
10
10
|
- [Amazon EC2](/docs/v1/deployment/cloud-providers/amazon-ec2)
|
|
11
11
|
- [AWS Lambda](/docs/v1/deployment/cloud-providers/aws-lambda)
|
|
12
|
-
- [Digital Ocean](/docs/v1/deployment/cloud-providers/digital-ocean)
|
|
13
12
|
- [Azure App Services](/docs/v1/deployment/cloud-providers/azure-app-services)
|
|
13
|
+
- [Cloudflare](/docs/v1/deployment/cloud-providers/cloudflare-deployer)
|
|
14
|
+
- [Digital Ocean](/docs/v1/deployment/cloud-providers/digital-ocean)
|
|
15
|
+
- [Netlify](/docs/v1/deployment/cloud-providers/netlify-deployer)
|
|
16
|
+
- [Vercel](/docs/v1/deployment/cloud-providers/vercel-deployer)
|
|
14
17
|
|
|
15
|
-
For self-hosted Node.js server deployment, see the [Creating A Mastra Server](/docs/v1/deployment/
|
|
18
|
+
For self-hosted Node.js server deployment, see the [Creating A Mastra Server](/docs/v1/deployment/building-mastra) guide.
|
|
16
19
|
|
|
17
20
|
## Prerequisites
|
|
18
21
|
|
|
19
22
|
Before deploying to a cloud provider, ensure you have:
|
|
20
23
|
|
|
21
|
-
- A [Mastra application](/
|
|
24
|
+
- A [Mastra application](/guides/v1/getting-started/quickstart)
|
|
22
25
|
- Node.js `v22.13.0` or later
|
|
23
26
|
- A GitHub repository for your application (required for most CI/CD setups)
|
|
24
27
|
- Domain name management access (for SSL and HTTPS)
|
|
@@ -26,33 +29,27 @@ Before deploying to a cloud provider, ensure you have:
|
|
|
26
29
|
|
|
27
30
|
## LibSQLStore
|
|
28
31
|
|
|
29
|
-
`LibSQLStore` writes to the local filesystem, which is not supported in cloud environments that use ephemeral file systems. If you're deploying to platforms like
|
|
32
|
+
`LibSQLStore` writes to the local filesystem, which is not supported in cloud environments that use ephemeral file systems. If you're deploying to platforms like AWS Lambda, Netlify, Azure App Services, or Digital Ocean App Platform, you must remove all usage of `LibSQLStore`.
|
|
30
33
|
|
|
31
|
-
Specifically, ensure you've removed it from
|
|
34
|
+
Specifically, ensure you've removed it from all Mastra files, including configuration on the main Mastra instance and any agents using it, e.g. for memory storage.
|
|
32
35
|
|
|
33
|
-
```
|
|
34
|
-
export const mastra = new Mastra({
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
url: ":memory:", // [!code --]
|
|
41
|
-
}), //[!code --]
|
|
42
|
-
});
|
|
36
|
+
```diff title="src/mastra/index.ts"
|
|
37
|
+
export const mastra = new Mastra({
|
|
38
|
+
- storage: new LibSQLStore({
|
|
39
|
+
- id: 'mastra-storage',
|
|
40
|
+
- url: ":memory:",
|
|
41
|
+
- }),
|
|
42
|
+
});
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
```
|
|
46
|
-
export const weatherAgent = new Agent({
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}), // [!code --]
|
|
56
|
-
}), // [!code --]
|
|
57
|
-
});
|
|
45
|
+
```diff
|
|
46
|
+
export const weatherAgent = new Agent({
|
|
47
|
+
id: "weather-agent",
|
|
48
|
+
memory: new Memory({
|
|
49
|
+
- storage: new LibSQLStore({
|
|
50
|
+
- id: 'mastra-storage',
|
|
51
|
+
- url: "file:../mastra.db",
|
|
52
|
+
- }),
|
|
53
|
+
}),
|
|
54
|
+
});
|
|
58
55
|
```
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "NetlifyDeployer | Deployment
|
|
2
|
+
title: "NetlifyDeployer | Deployment"
|
|
3
3
|
description: "Learn how to deploy a Mastra application to Netlify using the Mastra NetlifyDeployer"
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -10,17 +10,16 @@ The `NetlifyDeployer` class handles deployment of standalone Mastra applications
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
12
12
|
```bash copy
|
|
13
|
-
npm install @mastra/deployer-netlify@
|
|
13
|
+
npm install @mastra/deployer-netlify@beta
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## Usage example
|
|
17
17
|
|
|
18
|
-
```typescript title="src/mastra/index.ts"
|
|
18
|
+
```typescript title="src/mastra/index.ts" copy
|
|
19
19
|
import { Mastra } from "@mastra/core";
|
|
20
20
|
import { NetlifyDeployer } from "@mastra/deployer-netlify";
|
|
21
21
|
|
|
22
22
|
export const mastra = new Mastra({
|
|
23
|
-
// ...
|
|
24
23
|
deployer: new NetlifyDeployer(),
|
|
25
24
|
});
|
|
26
25
|
```
|
|
@@ -43,32 +42,64 @@ Your project is now configured with automatic deployments which occur whenever y
|
|
|
43
42
|
|
|
44
43
|
## Manual deployment
|
|
45
44
|
|
|
46
|
-
Manual deployments are also possible using the [Netlify CLI](https://docs.netlify.com/cli/get-started/). With the Netlify CLI installed run the following from your project root to deploy your application.
|
|
45
|
+
Manual deployments are also possible using the [Netlify CLI](https://docs.netlify.com/cli/get-started/). With the Netlify CLI installed run the following from your project root to deploy your application. You can also run `netlify dev` from your project root to test your Mastra application locally.
|
|
47
46
|
|
|
48
47
|
```bash copy
|
|
49
48
|
netlify deploy --prod
|
|
50
49
|
```
|
|
51
50
|
|
|
52
|
-
|
|
51
|
+
:::warning
|
|
53
52
|
|
|
54
|
-
|
|
53
|
+
When using `netlify deploy` instead of continuous deployment, you need to create a `netlify.toml` file with these contents:
|
|
54
|
+
|
|
55
|
+
```toml
|
|
56
|
+
[build]
|
|
57
|
+
command = "npm run build"
|
|
58
|
+
publish = ".netlify/v1/functions"
|
|
55
59
|
|
|
56
|
-
|
|
60
|
+
[functions]
|
|
61
|
+
directory = ".netlify/v1/functions"
|
|
62
|
+
node_bundler = "none"
|
|
63
|
+
included_files = [".netlify/v1/functions/**"]
|
|
57
64
|
|
|
65
|
+
[[redirects]]
|
|
66
|
+
from = "/*"
|
|
67
|
+
to = "/.netlify/functions/api/:splat"
|
|
68
|
+
status = 200
|
|
69
|
+
|
|
70
|
+
[build.environment]
|
|
71
|
+
NODE_VERSION = "22.13.0"
|
|
58
72
|
```
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
73
|
+
|
|
74
|
+
Adjust the `build.command` to your project.
|
|
75
|
+
|
|
76
|
+
:::
|
|
77
|
+
|
|
78
|
+
## Build output
|
|
79
|
+
|
|
80
|
+
The build output for Mastra applications using the `NetlifyDeployer` includes all agents, tools, and workflows in your project, along with Mastra-specific files required to run your application on Netlify.
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
your-project/
|
|
84
|
+
└── .netlify/
|
|
85
|
+
└── v1/
|
|
86
|
+
├── config.json
|
|
87
|
+
└── functions/
|
|
88
|
+
└── api/
|
|
89
|
+
├── index.js
|
|
90
|
+
├── package.json
|
|
91
|
+
└── node_modules/
|
|
66
92
|
```
|
|
67
93
|
|
|
68
94
|
The `NetlifyDeployer` automatically generates a `config.json` configuration file in `.netlify/v1` with the following settings:
|
|
69
95
|
|
|
70
96
|
```json
|
|
71
97
|
{
|
|
98
|
+
"functions": {
|
|
99
|
+
"directory": ".netlify/v1/functions",
|
|
100
|
+
"node_bundler": "none",
|
|
101
|
+
"included_files": [".netlify/v1/functions/**"]
|
|
102
|
+
},
|
|
72
103
|
"redirects": [
|
|
73
104
|
{
|
|
74
105
|
"force": true,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "VercelDeployer | Deployment
|
|
2
|
+
title: "VercelDeployer | Deployment"
|
|
3
3
|
description: "Learn how to deploy a Mastra application to Vercel using the Mastra VercelDeployer"
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -10,7 +10,7 @@ The `VercelDeployer` class handles deployment of standalone Mastra applications
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
12
12
|
```bash copy
|
|
13
|
-
npm install @mastra/deployer-vercel@
|
|
13
|
+
npm install @mastra/deployer-vercel@beta
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## Usage example
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Navigating the Dashboard | Mastra Cloud
|
|
2
|
+
title: "Navigating the Dashboard | Mastra Cloud"
|
|
3
3
|
description: Details of each feature available in Mastra Cloud
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -7,7 +7,7 @@ import { MastraCloudCallout } from "@site/src/components/MastraCloudCallout";
|
|
|
7
7
|
|
|
8
8
|
# Navigating the Dashboard
|
|
9
9
|
|
|
10
|
-
This page explains how to navigate the Mastra Cloud dashboard, where you can configure your project, view deployment details, and interact with agents and workflows using the built-in [Studio](/docs/v1/mastra-cloud/dashboard#studio).
|
|
10
|
+
This page explains how to navigate the Mastra Cloud dashboard, where you can configure your project, view deployment details, and interact with agents and workflows using the built-in [Studio](/docs/v1/deployment/mastra-cloud/dashboard#studio).
|
|
11
11
|
|
|
12
12
|
<MastraCloudCallout />
|
|
13
13
|
|
|
@@ -97,4 +97,4 @@ Each MCP Server includes API endpoints for HTTP and SSE, along with IDE configur
|
|
|
97
97
|
|
|
98
98
|
## Next steps
|
|
99
99
|
|
|
100
|
-
- [Understanding Tracing and Logs](/docs/v1/mastra-cloud/observability)
|
|
100
|
+
- [Understanding Tracing and Logs](/docs/v1/deployment/mastra-cloud/observability)
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Understanding Tracing and Logs | Mastra Cloud"
|
|
3
|
+
description: Monitoring and debugging tools for Mastra Cloud deployments
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
import { MastraCloudCallout } from "@site/src/components/MastraCloudCallout";
|
|
7
|
+
|
|
8
|
+
# Understanding Tracing and Logs
|
|
9
|
+
|
|
10
|
+
Mastra Cloud provides full observability for production applications, giving you insight into how your agents and workflows behave. Observability can be enabled whether your application is deployed to Mastra Cloud, running locally, or hosted on your own infrastructure. Any Mastra project can send traces and logs to the platform regardless of where it's running.
|
|
11
|
+
|
|
12
|
+
For details on configuring observability, see the [Cloud Exporter](/docs/v1/observability/tracing/exporters/cloud) docs.
|
|
13
|
+
|
|
14
|
+
<MastraCloudCallout />
|
|
15
|
+
|
|
16
|
+
## Traces
|
|
17
|
+
|
|
18
|
+
More detailed traces are available for both agents and workflows by enabling [observability](/docs/v1/observability/tracing/overview) using one of our [supported providers](/docs/v1/observability/tracing/overview#exporters).
|
|
19
|
+
|
|
20
|
+
### Agents
|
|
21
|
+
|
|
22
|
+
With observability enabled, you can view detailed outputs from your agents in the **Traces** section in Studio.
|
|
23
|
+
|
|
24
|
+

|
|
25
|
+
|
|
26
|
+
Key features:
|
|
27
|
+
|
|
28
|
+
Agent traces break a run into clear steps, model calls, tool calls, and intermediate chunks, each with timing, inputs, outputs, and errors. You can drill into any span to inspect prompts, token usage, and results, making it easy to diagnose issues and understand how the agent produced its output.
|
|
29
|
+
|
|
30
|
+
### Workflows
|
|
31
|
+
|
|
32
|
+
With observability enabled, you can view detailed outputs from your workflows in the **Traces** section in Studio.
|
|
33
|
+
|
|
34
|
+

|
|
35
|
+
|
|
36
|
+
Key features:
|
|
37
|
+
|
|
38
|
+
Workflow traces capture each step in the run, including transitions, branching, timing, and any tool calls inside the workflow. You can inspect inputs, outputs, and errors for every step, making it easy to debug long-running or multi-step processes and understand how data flows through the workflow.
|
|
39
|
+
|
|
40
|
+
## Logs
|
|
41
|
+
|
|
42
|
+
You can view detailed logs for debugging and monitoring your application's behavior on the [Logs](/docs/v1/deployment/mastra-cloud/dashboard#logs) page of the Dashboard.
|
|
43
|
+
|
|
44
|
+

|
|
45
|
+
|
|
46
|
+
Key features:
|
|
47
|
+
|
|
48
|
+
Each log entry includes its severity level and a detailed message showing agent, workflow, or storage activity.
|
|
49
|
+
|
|
50
|
+
## Next steps
|
|
51
|
+
|
|
52
|
+
- [Logging](/docs/v1/observability/logging)
|
|
53
|
+
- [Tracing](/docs/v1/observability/tracing/overview)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Mastra Cloud | Mastra Cloud
|
|
2
|
+
title: "Mastra Cloud | Mastra Cloud"
|
|
3
3
|
description: Deployment and monitoring service for Mastra applications
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -7,7 +7,7 @@ import { MastraCloudCallout } from "@site/src/components/MastraCloudCallout";
|
|
|
7
7
|
|
|
8
8
|
# Mastra Cloud
|
|
9
9
|
|
|
10
|
-
[Mastra Cloud](https://mastra.ai/cloud) is a platform for deploying, managing, monitoring, and debugging Mastra applications. When you [deploy](/docs/v1/mastra-cloud/setting-up) your application, Mastra Cloud exposes your agents, tools, and workflows as REST API endpoints.
|
|
10
|
+
[Mastra Cloud](https://mastra.ai/cloud) is a platform for deploying, managing, monitoring, and debugging Mastra applications. When you [deploy](/docs/v1/deployment/mastra-cloud/setting-up) your application, Mastra Cloud exposes your agents, tools, and workflows as REST API endpoints.
|
|
11
11
|
|
|
12
12
|
<MastraCloudCallout />
|
|
13
13
|
|
|
@@ -62,4 +62,4 @@ Mastra Cloud is purpose-built for Mastra agents, tools, and workflows. It handle
|
|
|
62
62
|
|
|
63
63
|
## Next steps
|
|
64
64
|
|
|
65
|
-
- [Setting Up and Deploying](/docs/v1/mastra-cloud/setting-up)
|
|
65
|
+
- [Setting Up and Deploying](/docs/v1/deployment/mastra-cloud/setting-up)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Setting Up and Deploying | Mastra Cloud
|
|
2
|
+
title: "Setting Up and Deploying | Mastra Cloud"
|
|
3
3
|
description: Configuration steps for Mastra Cloud projects
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -18,7 +18,7 @@ This page explains how to set up a project on [Mastra Cloud](https://mastra.ai/c
|
|
|
18
18
|
- A [Mastra Cloud](https://mastra.ai/cloud) account
|
|
19
19
|
- A GitHub account / repository containing a Mastra application
|
|
20
20
|
|
|
21
|
-
> See our [Getting started](/
|
|
21
|
+
> See our [Getting started](/guides/v1/getting-started/quickstart) guide to scaffold out a new Mastra project with sensible defaults.
|
|
22
22
|
|
|
23
23
|
## Setup and Deploy process
|
|
24
24
|
|
|
@@ -98,8 +98,8 @@ Your project is now configured with automatic deployments which occur whenever y
|
|
|
98
98
|
|
|
99
99
|
## Testing your application
|
|
100
100
|
|
|
101
|
-
After a successful deployment you can test your agents and workflows [Studio](/docs/v1/mastra-cloud/dashboard#studio) in Mastra Cloud, or interact with them using our [Client SDK](/docs/v1/server-db/mastra-client).
|
|
101
|
+
After a successful deployment you can test your agents and workflows [Studio](/docs/v1/deployment/mastra-cloud/dashboard#studio) in Mastra Cloud, or interact with them using our [Client SDK](/docs/v1/server-db/mastra-client).
|
|
102
102
|
|
|
103
103
|
## Next steps
|
|
104
104
|
|
|
105
|
-
- [Navigating the Dashboard](/docs/v1/mastra-cloud/dashboard)
|
|
105
|
+
- [Navigating the Dashboard](/docs/v1/deployment/mastra-cloud/dashboard)
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Monorepo Deployment | Deployment
|
|
2
|
+
title: "Monorepo Deployment | Deployment"
|
|
3
3
|
description: Learn how to deploy Mastra applications that are part of a monorepo setup
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Monorepo Deployment
|
|
7
7
|
|
|
8
|
-
Deploying Mastra in a monorepo follows the same approach as deploying a standalone application. While some [Cloud](./cloud-providers/) or [Serverless Platform](./
|
|
8
|
+
Deploying Mastra in a monorepo follows the same approach as deploying a standalone application. While some [Cloud](./cloud-providers/) or [Serverless Platform](./cloud-providers/) providers may introduce extra requirements, the core setup is the same.
|
|
9
9
|
|
|
10
10
|
## Example monorepo
|
|
11
11
|
|
|
@@ -44,7 +44,7 @@ api/
|
|
|
44
44
|
|
|
45
45
|
## Deployment configuration
|
|
46
46
|
|
|
47
|
-
The image below shows how to select `apps/api` as the project root when deploying to [Mastra Cloud](
|
|
47
|
+
The image below shows how to select `apps/api` as the project root when deploying to [Mastra Cloud](./mastra-cloud/overview). While the interface may differ between providers, the configuration remains the same.
|
|
48
48
|
|
|
49
49
|

|
|
50
50
|
|
|
@@ -1,5 +1,5 @@
|
|
|
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
4
|
---
|
|
5
5
|
|
|
@@ -23,7 +23,7 @@ Mastra offers multiple deployment options to suit your application's needs, from
|
|
|
23
23
|
- Node.js `v22.13.0` or later
|
|
24
24
|
- Bun
|
|
25
25
|
- Deno
|
|
26
|
-
- [Cloudflare](../deployment/
|
|
26
|
+
- [Cloudflare](../deployment/cloud-providers/cloudflare-deployer)
|
|
27
27
|
|
|
28
28
|
### Mastra Cloud
|
|
29
29
|
|
|
@@ -35,14 +35,14 @@ Mastra Cloud is a deployment platform that connects to your GitHub repository, a
|
|
|
35
35
|
- Comprehensive logs and traces
|
|
36
36
|
- Custom domains for each project
|
|
37
37
|
|
|
38
|
-
[View Mastra Cloud documentation →](
|
|
38
|
+
[View Mastra Cloud documentation →](./mastra-cloud/overview)
|
|
39
39
|
|
|
40
40
|
### With a Web Framework
|
|
41
41
|
|
|
42
42
|
Mastra can be integrated with a variety of web frameworks. For example, see one of the following for a detailed guide.
|
|
43
43
|
|
|
44
|
-
- [With Next.js](
|
|
45
|
-
- [With Astro](
|
|
44
|
+
- [With Next.js](/guides/v1/getting-started/next-js)
|
|
45
|
+
- [With Astro](/guides/v1/getting-started/astro)
|
|
46
46
|
|
|
47
47
|
When integrated with a framework, Mastra typically requires no additional configuration for deployment.
|
|
48
48
|
|
|
@@ -57,7 +57,7 @@ You can deploy Mastra as a standard Node.js HTTP server, which gives you full co
|
|
|
57
57
|
- Deploy to VMs, containers, or PaaS platforms
|
|
58
58
|
- Ideal for integrating with existing Node.js applications
|
|
59
59
|
|
|
60
|
-
[
|
|
60
|
+
[Building Mastra →](./building-mastra)
|
|
61
61
|
|
|
62
62
|
### Serverless Platforms
|
|
63
63
|
|
|
@@ -68,7 +68,7 @@ Mastra provides platform-specific deployers for popular serverless platforms, en
|
|
|
68
68
|
- Simplified deployment process
|
|
69
69
|
- Automatic scaling through the platform
|
|
70
70
|
|
|
71
|
-
[
|
|
71
|
+
[Building Mastra →](./building-mastra)
|
|
72
72
|
|
|
73
73
|
## Client Configuration
|
|
74
74
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Web Framework Integration | Deployment
|
|
2
|
+
title: "Web Framework Integration | Deployment"
|
|
3
3
|
description: "Learn how Mastra can be deployed when integrated with a Web Framework"
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -7,14 +7,14 @@ description: "Learn how Mastra can be deployed when integrated with a Web Framew
|
|
|
7
7
|
|
|
8
8
|
This guide covers deploying integrated Mastra applications. Mastra can be integrated with a variety of web frameworks, see one of the following for a detailed guide.
|
|
9
9
|
|
|
10
|
-
- [With Next.js](/
|
|
11
|
-
- [With Astro](/
|
|
10
|
+
- [With Next.js](/guides/v1/getting-started/next-js)
|
|
11
|
+
- [With Astro](/guides/v1/getting-started/astro)
|
|
12
12
|
|
|
13
13
|
When integrated with a framework, Mastra typically requires no additional configuration for deployment.
|
|
14
14
|
|
|
15
15
|
## With Next.js on Vercel
|
|
16
16
|
|
|
17
|
-
If you've integrated Mastra with Next.js [by following our guide](/
|
|
17
|
+
If you've integrated Mastra with Next.js [by following our guide](/guides/v1/getting-started/next-js) and plan to deploy to Vercel, no additional setup is required.
|
|
18
18
|
|
|
19
19
|
The only thing to verify is that you've added the following to your `next.config.ts` and removed any usage of [LibSQLStore](/docs/v1/deployment/overview), which is not supported in serverless environments:
|
|
20
20
|
|
|
@@ -30,7 +30,7 @@ export default nextConfig;
|
|
|
30
30
|
|
|
31
31
|
## With Astro on Vercel
|
|
32
32
|
|
|
33
|
-
If you've integrated Mastra with Astro [by following our guide](/
|
|
33
|
+
If you've integrated Mastra with Astro [by following our guide](/guides/v1/getting-started/astro) and plan to deploy to Vercel, no additional setup is required.
|
|
34
34
|
|
|
35
35
|
The only thing to verify is that you've added the following to your `astro.config.mjs` and removed any usage of [LibSQLStore](/docs/v1/deployment/overview), which is not supported in serverless environments:
|
|
36
36
|
|
|
@@ -47,7 +47,7 @@ export default defineConfig({
|
|
|
47
47
|
|
|
48
48
|
## With Astro on Netlify
|
|
49
49
|
|
|
50
|
-
If you've integrated Mastra with Astro [by following our guide](/
|
|
50
|
+
If you've integrated Mastra with Astro [by following our guide](/guides/v1/getting-started/astro) and plan to deploy to Netlify, no additional setup is required.
|
|
51
51
|
|
|
52
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/v1/deployment/overview), which is not supported in serverless environments:
|
|
53
53
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Built-in Scorers | Evals
|
|
2
|
+
title: "Built-in Scorers | Evals"
|
|
3
3
|
description: "Overview of Mastra's ready-to-use scorers for evaluating AI outputs across quality, safety, and performance dimensions."
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -7,14 +7,16 @@ description: "Overview of Mastra's ready-to-use scorers for evaluating AI output
|
|
|
7
7
|
|
|
8
8
|
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.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
To create your own scorers, see the [Custom Scorers](/docs/v1/evals/custom-scorers) guide.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
## Available scorers
|
|
13
|
+
|
|
14
|
+
### Accuracy and reliability
|
|
13
15
|
|
|
14
16
|
These scorers evaluate how correct, truthful, and complete your agent's answers are:
|
|
15
17
|
|
|
16
18
|
- [`answer-relevancy`](/reference/v1/evals/answer-relevancy): Evaluates how well responses address the input query (`0-1`, higher is better)
|
|
17
|
-
- [`answer-similarity`](/reference/v1/evals/answer-similarity): Compares agent outputs against ground
|
|
19
|
+
- [`answer-similarity`](/reference/v1/evals/answer-similarity): Compares agent outputs against ground-truth answers for CI/CD testing using semantic analysis (`0-1`, higher is better)
|
|
18
20
|
- [`faithfulness`](/reference/v1/evals/faithfulness): Measures how accurately responses represent provided context (`0-1`, higher is better)
|
|
19
21
|
- [`hallucination`](/reference/v1/evals/hallucination): Detects factual contradictions and unsupported claims (`0-1`, lower is better)
|
|
20
22
|
- [`completeness`](/reference/v1/evals/completeness): Checks if responses include all necessary information (`0-1`, higher is better)
|
|
@@ -23,7 +25,7 @@ These scorers evaluate how correct, truthful, and complete your agent's answers
|
|
|
23
25
|
- [`tool-call-accuracy`](/reference/v1/evals/tool-call-accuracy): Evaluates whether the LLM selects the correct tool from available options (`0-1`, higher is better)
|
|
24
26
|
- [`prompt-alignment`](/reference/v1/evals/prompt-alignment): Measures how well agent responses align with user prompt intent, requirements, completeness, and format (`0-1`, higher is better)
|
|
25
27
|
|
|
26
|
-
### Context
|
|
28
|
+
### Context quality
|
|
27
29
|
|
|
28
30
|
These scorers evaluate the quality and relevance of context used in generating responses:
|
|
29
31
|
|
|
@@ -31,16 +33,16 @@ These scorers evaluate the quality and relevance of context used in generating r
|
|
|
31
33
|
- [`context-relevance`](/reference/v1/evals/context-relevance): Measures context utility with nuanced relevance levels, usage tracking, and missing context detection (`0-1`, higher is better)
|
|
32
34
|
|
|
33
35
|
> tip Context Scorer Selection
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
Both context scorers support:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
### Output
|
|
36
|
+
>
|
|
37
|
+
>- Use **Context Precision** when context ordering matters and you need standard IR metrics (ideal for RAG ranking evaluation)
|
|
38
|
+
>- Use **Context Relevance** when you need detailed relevance assessment and want to track context usage and identify gaps
|
|
39
|
+
>
|
|
40
|
+
>Both context scorers support:
|
|
41
|
+
>
|
|
42
|
+
>- **Static context**: Pre-defined context arrays
|
|
43
|
+
>- **Dynamic context extraction**: Extract context from runs using custom functions (ideal for RAG systems, vector databases, etc.)
|
|
44
|
+
|
|
45
|
+
### Output quality
|
|
44
46
|
|
|
45
47
|
These scorers evaluate adherence to format, style, and safety requirements:
|
|
46
48
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Custom Scorers | Evals
|
|
2
|
+
title: "Custom Scorers | Evals"
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
# Custom scorers
|
|
@@ -41,13 +41,12 @@ Every scorer starts with the `createScorer` factory function, which requires a n
|
|
|
41
41
|
|
|
42
42
|
```typescript
|
|
43
43
|
import { createScorer } from '@mastra/core/evals';
|
|
44
|
-
import { openai } from '@ai-sdk/openai';
|
|
45
44
|
|
|
46
45
|
const glutenCheckerScorer = createScorer({
|
|
47
46
|
name: 'Gluten Checker',
|
|
48
47
|
description: 'Check if recipes contain gluten ingredients',
|
|
49
48
|
judge: { // Optional: for prompt object steps
|
|
50
|
-
model: openai
|
|
49
|
+
model: 'openai/gpt-5.1',
|
|
51
50
|
instructions: 'You are a Chef that identifies if recipes contain gluten.'
|
|
52
51
|
}
|
|
53
52
|
})
|
|
@@ -245,7 +244,6 @@ Together, these components allow you to define custom evaluation logic using LLM
|
|
|
245
244
|
> See [createScorer](/reference/v1/evals/create-scorer) for the full API and configuration options.
|
|
246
245
|
|
|
247
246
|
```typescript title="src/mastra/scorers/gluten-checker.ts" showLineNumbers copy
|
|
248
|
-
import { openai } from "@ai-sdk/openai";
|
|
249
247
|
import { createScorer } from "@mastra/core/evals";
|
|
250
248
|
import { z } from "zod";
|
|
251
249
|
|
|
@@ -303,7 +301,7 @@ export const glutenCheckerScorer = createScorer({
|
|
|
303
301
|
name: "Gluten Checker",
|
|
304
302
|
description: "Check if the output contains any gluten",
|
|
305
303
|
judge: {
|
|
306
|
-
model: openai
|
|
304
|
+
model: "openai/gpt-4.1-nano",
|
|
307
305
|
instructions: GLUTEN_INSTRUCTIONS,
|
|
308
306
|
},
|
|
309
307
|
})
|
|
@@ -338,7 +336,7 @@ Sets up the LLM model and defines its role as a domain expert.
|
|
|
338
336
|
|
|
339
337
|
```typescript
|
|
340
338
|
judge: {
|
|
341
|
-
model: openai
|
|
339
|
+
model: 'openai/gpt-4.1-nano',
|
|
342
340
|
instructions: GLUTEN_INSTRUCTIONS,
|
|
343
341
|
}
|
|
344
342
|
```
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Scorers overview | Evals
|
|
2
|
+
title: "Scorers overview | Evals"
|
|
3
3
|
description: Overview of scorers in Mastra, detailing their capabilities for evaluating AI outputs and measuring performance.
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -24,7 +24,7 @@ There are different kinds of scorers, each serving a specific purpose. Here are
|
|
|
24
24
|
To access Mastra's scorers feature install the `@mastra/evals` package.
|
|
25
25
|
|
|
26
26
|
```bash copy
|
|
27
|
-
npm install @mastra/evals@
|
|
27
|
+
npm install @mastra/evals@beta
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
## Live evaluations
|
|
@@ -33,11 +33,10 @@ npm install @mastra/evals@latest
|
|
|
33
33
|
|
|
34
34
|
### Adding scorers to agents
|
|
35
35
|
|
|
36
|
-
You can add built-in scorers to your agents to automatically evaluate their outputs. See the [full list of built-in scorers](/docs/v1/evals/
|
|
36
|
+
You can add built-in scorers to your agents to automatically evaluate their outputs. See the [full list of built-in scorers](/docs/v1/evals/built-in-scorers) for all available options.
|
|
37
37
|
|
|
38
38
|
```typescript title="src/mastra/agents/evaluated-agent.ts" showLineNumbers copy
|
|
39
39
|
import { Agent } from "@mastra/core/agent";
|
|
40
|
-
import { openai } from "@ai-sdk/openai";
|
|
41
40
|
import {
|
|
42
41
|
createAnswerRelevancyScorer,
|
|
43
42
|
createToxicityScorer,
|
|
@@ -47,11 +46,11 @@ export const evaluatedAgent = new Agent({
|
|
|
47
46
|
// ...
|
|
48
47
|
scorers: {
|
|
49
48
|
relevancy: {
|
|
50
|
-
scorer: createAnswerRelevancyScorer({ model: openai
|
|
49
|
+
scorer: createAnswerRelevancyScorer({ model: "openai/gpt-4.1-nano" }),
|
|
51
50
|
sampling: { type: "ratio", rate: 0.5 },
|
|
52
51
|
},
|
|
53
52
|
safety: {
|
|
54
|
-
scorer: createToxicityScorer({ model: openai
|
|
53
|
+
scorer: createToxicityScorer({ model: "openai/gpt-4.1-nano" }),
|
|
55
54
|
sampling: { type: "ratio", rate: 1 },
|
|
56
55
|
},
|
|
57
56
|
},
|
|
@@ -135,5 +134,5 @@ For more details, see [Studio](/docs/v1/getting-started/studio) docs.
|
|
|
135
134
|
## Next steps
|
|
136
135
|
|
|
137
136
|
- Learn how to create your own scorers in the [Creating Custom Scorers](/docs/v1/evals/custom-scorers) guide
|
|
138
|
-
- Explore built-in scorers in the [
|
|
137
|
+
- Explore built-in scorers in the [Built-in Scorers](/docs/v1/evals/built-in-scorers) section
|
|
139
138
|
- Test scorers with [Studio](/docs/v1/getting-started/studio)
|