@mastra/mcp-docs-server 0.13.39 → 1.0.0-beta.1
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%2Fai-sdk-v4.md +1 -0
- package/.docs/organized/changelogs/%40internal%2Fchangeset-cli.md +0 -10
- package/.docs/organized/changelogs/%40internal%2Fexternal-types.md +0 -10
- package/.docs/organized/changelogs/%40internal%2Fstorage-test-utils.md +36 -36
- package/.docs/organized/changelogs/%40internal%2Ftypes-builder.md +0 -10
- package/.docs/organized/changelogs/%40mastra%2Fagent-builder.md +70 -70
- package/.docs/organized/changelogs/%40mastra%2Fai-sdk.md +40 -40
- package/.docs/organized/changelogs/%40mastra%2Fastra.md +19 -19
- package/.docs/organized/changelogs/%40mastra%2Fauth.md +4 -14
- package/.docs/organized/changelogs/%40mastra%2Fchroma.md +18 -18
- package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +199 -199
- package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +220 -220
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +190 -190
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +199 -199
- package/.docs/organized/changelogs/%40mastra%2Fcodemod.md +7 -0
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +210 -210
- package/.docs/organized/changelogs/%40mastra%2Fcouchbase.md +16 -16
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +69 -69
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +67 -67
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +70 -70
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +67 -67
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +209 -209
- package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +191 -191
- package/.docs/organized/changelogs/%40mastra%2Fevals.md +34 -34
- package/.docs/organized/changelogs/%40mastra%2Ffastembed.md +5 -13
- package/.docs/organized/changelogs/%40mastra%2Flance.md +182 -182
- package/.docs/organized/changelogs/%40mastra%2Flibsql.md +199 -199
- package/.docs/organized/changelogs/%40mastra%2Floggers.md +20 -20
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +56 -56
- package/.docs/organized/changelogs/%40mastra%2Fmcp-registry-registry.md +20 -20
- package/.docs/organized/changelogs/%40mastra%2Fmcp.md +65 -65
- package/.docs/organized/changelogs/%40mastra%2Fmemory.md +228 -228
- package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +199 -199
- package/.docs/organized/changelogs/%40mastra%2Fmssql.md +206 -206
- package/.docs/organized/changelogs/%40mastra%2Fopensearch.md +19 -19
- package/.docs/organized/changelogs/%40mastra%2Fpg.md +197 -197
- package/.docs/organized/changelogs/%40mastra%2Fpinecone.md +16 -16
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +216 -216
- package/.docs/organized/changelogs/%40mastra%2Fqdrant.md +16 -16
- package/.docs/organized/changelogs/%40mastra%2Frag.md +61 -61
- package/.docs/organized/changelogs/%40mastra%2Freact.md +66 -66
- package/.docs/organized/changelogs/%40mastra%2Fs3vectors.md +9 -17
- package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +6 -30
- package/.docs/organized/changelogs/%40mastra%2Fserver.md +203 -203
- package/.docs/organized/changelogs/%40mastra%2Fturbopuffer.md +16 -16
- package/.docs/organized/changelogs/%40mastra%2Fupstash.md +190 -190
- package/.docs/organized/changelogs/%40mastra%2Fvectorize.md +18 -18
- package/.docs/organized/changelogs/%40mastra%2Fvoice-azure.md +21 -21
- package/.docs/organized/changelogs/%40mastra%2Fvoice-cloudflare.md +20 -20
- package/.docs/organized/changelogs/%40mastra%2Fvoice-deepgram.md +20 -20
- package/.docs/organized/changelogs/%40mastra%2Fvoice-elevenlabs.md +20 -20
- package/.docs/organized/changelogs/%40mastra%2Fvoice-gladia.md +20 -20
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google-gemini-live.md +56 -56
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google.md +20 -20
- package/.docs/organized/changelogs/%40mastra%2Fvoice-murf.md +20 -20
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai-realtime.md +56 -56
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai.md +20 -20
- package/.docs/organized/changelogs/%40mastra%2Fvoice-playai.md +20 -20
- package/.docs/organized/changelogs/%40mastra%2Fvoice-sarvam.md +20 -20
- package/.docs/organized/changelogs/%40mastra%2Fvoice-speechify.md +20 -20
- package/.docs/organized/changelogs/create-mastra.md +29 -29
- package/.docs/organized/changelogs/mastra.md +93 -93
- package/.docs/organized/code-examples/a2a.md +4 -2
- package/.docs/organized/code-examples/agui.md +12 -9
- package/.docs/organized/code-examples/ai-sdk-useChat.md +12 -18
- package/.docs/organized/code-examples/ai-sdk-v5.md +4 -2
- package/.docs/organized/code-examples/bird-checker-with-express.md +5 -4
- package/.docs/organized/code-examples/bird-checker-with-nextjs-and-eval.md +4 -3
- package/.docs/organized/code-examples/bird-checker-with-nextjs.md +4 -3
- package/.docs/organized/code-examples/client-side-tools.md +1 -0
- package/.docs/organized/code-examples/crypto-chatbot.md +1 -1
- package/.docs/organized/code-examples/experimental-auth-weather-agent.md +8 -177
- package/.docs/organized/code-examples/fireworks-r1.md +2 -2
- package/.docs/organized/code-examples/heads-up-game.md +10 -7
- package/.docs/organized/code-examples/mcp-configuration.md +5 -3
- package/.docs/organized/code-examples/mcp-registry-registry.md +3 -2
- package/.docs/organized/code-examples/memory-per-resource-example.md +4 -2
- package/.docs/organized/code-examples/memory-todo-agent.md +1 -0
- package/.docs/organized/code-examples/memory-with-context.md +2 -1
- 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 +13 -8
- package/.docs/organized/code-examples/memory-with-upstash.md +5 -3
- package/.docs/organized/code-examples/openapi-spec-writer.md +32 -41
- package/.docs/organized/code-examples/quick-start.md +5 -32
- package/.docs/organized/code-examples/stock-price-tool.md +6 -5
- package/.docs/organized/code-examples/weather-agent.md +21 -16
- package/.docs/organized/code-examples/workflow-ai-recruiter.md +3 -2
- package/.docs/organized/code-examples/workflow-with-inline-steps.md +9 -12
- package/.docs/organized/code-examples/workflow-with-memory.md +16 -15
- package/.docs/organized/code-examples/workflow-with-separate-steps.md +2 -2
- package/.docs/organized/code-examples/workflow-with-suspend-resume.md +3 -2
- package/.docs/raw/agents/adding-voice.mdx +27 -22
- package/.docs/raw/agents/agent-memory.mdx +24 -16
- package/.docs/raw/agents/guardrails.mdx +33 -12
- package/.docs/raw/agents/networks.mdx +8 -4
- package/.docs/raw/agents/overview.mdx +23 -17
- package/.docs/raw/agents/using-tools.mdx +11 -8
- package/.docs/raw/auth/auth0.mdx +9 -9
- package/.docs/raw/auth/clerk.mdx +7 -7
- package/.docs/raw/auth/firebase.mdx +9 -9
- package/.docs/raw/auth/index.mdx +6 -6
- package/.docs/raw/auth/jwt.mdx +7 -7
- package/.docs/raw/auth/supabase.mdx +8 -8
- package/.docs/raw/auth/workos.mdx +9 -9
- package/.docs/raw/community/contributing-templates.mdx +3 -3
- package/.docs/raw/community/discord.mdx +1 -1
- package/.docs/raw/course/01-first-agent/03-verifying-installation.md +1 -1
- package/.docs/raw/course/01-first-agent/08-exporting-your-agent.md +2 -1
- package/.docs/raw/course/01-first-agent/16-adding-memory-to-agent.md +2 -1
- package/.docs/raw/course/02-agent-tools-mcp/02-installing-mcp.md +1 -1
- package/.docs/raw/course/02-agent-tools-mcp/31-enhancing-memory-configuration.md +2 -0
- 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 +1 -0
- 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 +2 -0
- package/.docs/raw/course/03-agent-memory/16-configuring-semantic-recall.md +2 -0
- package/.docs/raw/course/03-agent-memory/18-advanced-configuration-semantic-recall.md +1 -0
- package/.docs/raw/course/03-agent-memory/21-configuring-working-memory.md +2 -0
- package/.docs/raw/course/03-agent-memory/22-custom-working-memory-templates.md +1 -0
- package/.docs/raw/course/03-agent-memory/25-combining-memory-features.md +1 -0
- package/.docs/raw/course/03-agent-memory/27-creating-learning-assistant.md +1 -0
- package/.docs/raw/course/04-workflows/08-running-workflows-programmatically.md +2 -2
- package/.docs/raw/deployment/cloud-providers/amazon-ec2.mdx +6 -6
- package/.docs/raw/deployment/cloud-providers/aws-lambda.mdx +8 -6
- package/.docs/raw/deployment/cloud-providers/azure-app-services.mdx +5 -5
- package/.docs/raw/deployment/cloud-providers/digital-ocean.mdx +5 -5
- package/.docs/raw/deployment/cloud-providers/index.mdx +11 -8
- package/.docs/raw/deployment/monorepo.mdx +2 -2
- package/.docs/raw/deployment/overview.mdx +2 -2
- package/.docs/raw/deployment/server-deployment.mdx +2 -10
- package/.docs/raw/deployment/serverless-platforms/cloudflare-deployer.mdx +5 -5
- package/.docs/raw/deployment/serverless-platforms/index.mdx +10 -7
- package/.docs/raw/deployment/serverless-platforms/netlify-deployer.mdx +5 -5
- package/.docs/raw/deployment/serverless-platforms/vercel-deployer.mdx +5 -5
- package/.docs/raw/deployment/web-framework.mdx +8 -8
- package/.docs/raw/{scorers → evals}/custom-scorers.mdx +6 -6
- package/.docs/raw/evals/off-the-shelf-scorers.mdx +50 -0
- package/.docs/raw/{scorers → evals}/overview.mdx +9 -9
- package/.docs/raw/evals/running-in-ci.mdx +113 -0
- package/.docs/raw/frameworks/agentic-uis/ai-sdk.mdx +26 -25
- package/.docs/raw/frameworks/agentic-uis/assistant-ui.mdx +1 -1
- package/.docs/raw/frameworks/agentic-uis/copilotkit.mdx +17 -17
- package/.docs/raw/frameworks/agentic-uis/openrouter.mdx +4 -1
- package/.docs/raw/frameworks/servers/express.mdx +11 -10
- package/.docs/raw/frameworks/web-frameworks/astro.mdx +18 -18
- package/.docs/raw/frameworks/web-frameworks/next-js.mdx +7 -7
- package/.docs/raw/frameworks/web-frameworks/sveltekit.mdx +16 -16
- package/.docs/raw/frameworks/web-frameworks/vite-react.mdx +7 -7
- package/.docs/raw/getting-started/installation.mdx +26 -25
- package/.docs/raw/getting-started/mcp-docs-server.mdx +1 -1
- package/.docs/raw/getting-started/project-structure.mdx +4 -4
- package/.docs/raw/getting-started/studio.mdx +8 -8
- package/.docs/raw/getting-started/templates.mdx +6 -6
- package/.docs/raw/guides/guide/ai-recruiter.mdx +264 -0
- package/.docs/raw/guides/guide/chef-michel.mdx +271 -0
- package/.docs/raw/guides/guide/notes-mcp-server.mdx +450 -0
- package/.docs/raw/guides/guide/research-assistant.mdx +380 -0
- package/.docs/raw/guides/guide/stock-agent.mdx +185 -0
- package/.docs/raw/guides/guide/web-search.mdx +291 -0
- package/.docs/raw/guides/index.mdx +43 -0
- package/.docs/raw/guides/migrations/agentnetwork.mdx +114 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/_template.mdx +50 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/agent.mdx +265 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/cli.mdx +48 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/client.mdx +153 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/evals.mdx +230 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/mastra.mdx +171 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/mcp.mdx +114 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/memory.mdx +241 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/overview.mdx +83 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/processors.mdx +62 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/storage.mdx +270 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/tools.mdx +115 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/tracing.mdx +280 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/vectors.mdx +23 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/voice.mdx +39 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/workflows.mdx +178 -0
- package/.docs/raw/guides/migrations/vnext-to-standard-apis.mdx +367 -0
- package/.docs/raw/guides/quickstarts/nextjs.mdx +275 -0
- package/.docs/raw/index.mdx +9 -9
- package/.docs/raw/{observability/logging.mdx → logging.mdx} +4 -4
- package/.docs/raw/mastra-cloud/dashboard.mdx +2 -2
- package/.docs/raw/mastra-cloud/observability.mdx +6 -6
- package/.docs/raw/mastra-cloud/overview.mdx +2 -2
- package/.docs/raw/mastra-cloud/setting-up.mdx +4 -4
- package/.docs/raw/memory/conversation-history.mdx +1 -0
- package/.docs/raw/memory/memory-processors.mdx +4 -3
- package/.docs/raw/memory/overview.mdx +10 -6
- package/.docs/raw/memory/semantic-recall.mdx +13 -8
- package/.docs/raw/memory/storage/memory-with-libsql.mdx +12 -7
- package/.docs/raw/memory/storage/memory-with-pg.mdx +11 -6
- package/.docs/raw/memory/storage/memory-with-upstash.mdx +11 -6
- package/.docs/raw/memory/threads-and-resources.mdx +11 -13
- package/.docs/raw/memory/working-memory.mdx +30 -14
- package/.docs/raw/observability/overview.mdx +13 -30
- package/.docs/raw/observability/{ai-tracing → tracing}/exporters/arize.mdx +11 -19
- package/.docs/raw/observability/{ai-tracing → tracing}/exporters/braintrust.mdx +8 -17
- package/.docs/raw/observability/{ai-tracing → tracing}/exporters/cloud.mdx +11 -17
- package/.docs/raw/observability/{ai-tracing → tracing}/exporters/default.mdx +16 -20
- package/.docs/raw/observability/{ai-tracing → tracing}/exporters/langfuse.mdx +8 -17
- package/.docs/raw/observability/{ai-tracing → tracing}/exporters/langsmith.mdx +8 -17
- package/.docs/raw/observability/{ai-tracing → tracing}/exporters/otel.mdx +12 -21
- package/.docs/raw/observability/{ai-tracing → tracing}/overview.mdx +107 -142
- package/.docs/raw/observability/{ai-tracing → tracing}/processors/sensitive-data-filter.mdx +14 -13
- package/.docs/raw/rag/chunking-and-embedding.mdx +5 -5
- package/.docs/raw/rag/overview.mdx +3 -13
- package/.docs/raw/rag/retrieval.mdx +24 -12
- package/.docs/raw/rag/vector-databases.mdx +7 -1
- package/.docs/raw/reference/agents/agent.mdx +35 -30
- package/.docs/raw/reference/agents/generate.mdx +10 -10
- package/.docs/raw/reference/agents/generateLegacy.mdx +8 -8
- package/.docs/raw/reference/agents/getDefaultGenerateOptions.mdx +21 -15
- package/.docs/raw/reference/agents/getDefaultOptions.mdx +69 -0
- package/.docs/raw/reference/agents/getDefaultStreamOptions.mdx +22 -16
- package/.docs/raw/reference/agents/getDescription.mdx +1 -1
- package/.docs/raw/reference/agents/getInstructions.mdx +8 -8
- package/.docs/raw/reference/agents/getLLM.mdx +9 -9
- package/.docs/raw/reference/agents/getMemory.mdx +9 -9
- package/.docs/raw/reference/agents/getModel.mdx +10 -10
- package/.docs/raw/reference/agents/getVoice.mdx +8 -8
- package/.docs/raw/reference/agents/listAgents.mdx +9 -9
- package/.docs/raw/reference/agents/listScorers.mdx +7 -7
- package/.docs/raw/reference/agents/listTools.mdx +7 -7
- package/.docs/raw/reference/agents/listWorkflows.mdx +7 -7
- package/.docs/raw/reference/agents/network.mdx +11 -10
- package/.docs/raw/reference/auth/auth0.mdx +4 -4
- package/.docs/raw/reference/auth/clerk.mdx +4 -4
- package/.docs/raw/reference/auth/firebase.mdx +6 -6
- package/.docs/raw/reference/auth/jwt.mdx +4 -4
- package/.docs/raw/reference/auth/supabase.mdx +4 -4
- package/.docs/raw/reference/auth/workos.mdx +4 -4
- package/.docs/raw/reference/cli/create-mastra.mdx +10 -10
- package/.docs/raw/reference/cli/mastra.mdx +7 -7
- package/.docs/raw/reference/client-js/agents.mdx +6 -2
- package/.docs/raw/reference/client-js/mastra-client.mdx +7 -7
- package/.docs/raw/reference/client-js/memory.mdx +24 -16
- package/.docs/raw/reference/client-js/observability.mdx +11 -11
- package/.docs/raw/reference/client-js/workflows.mdx +6 -34
- 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 +2 -2
- package/.docs/raw/reference/core/getLogger.mdx +2 -2
- package/.docs/raw/reference/core/getMCPServer.mdx +31 -15
- package/.docs/raw/reference/core/getMCPServerById.mdx +81 -0
- package/.docs/raw/reference/core/getScorer.mdx +3 -3
- package/.docs/raw/reference/core/getScorerById.mdx +79 -0
- package/.docs/raw/reference/core/getServer.mdx +2 -2
- package/.docs/raw/reference/core/getStorage.mdx +2 -2
- package/.docs/raw/reference/core/getTelemetry.mdx +2 -2
- package/.docs/raw/reference/core/getVector.mdx +2 -2
- package/.docs/raw/reference/core/getWorkflow.mdx +1 -1
- package/.docs/raw/reference/core/listAgents.mdx +1 -1
- package/.docs/raw/reference/core/listLogs.mdx +2 -2
- package/.docs/raw/reference/core/listLogsByRunId.mdx +2 -2
- package/.docs/raw/reference/core/listMCPServers.mdx +65 -0
- package/.docs/raw/reference/core/listScorers.mdx +3 -3
- package/.docs/raw/reference/core/listVectors.mdx +36 -0
- package/.docs/raw/reference/core/listWorkflows.mdx +6 -6
- package/.docs/raw/reference/core/mastra-class.mdx +3 -2
- package/.docs/raw/reference/core/setLogger.mdx +2 -2
- package/.docs/raw/reference/core/setStorage.mdx +3 -2
- package/.docs/raw/reference/core/setTelemetry.mdx +2 -2
- package/.docs/raw/reference/deployer/cloudflare.mdx +2 -2
- package/.docs/raw/reference/deployer/deployer.mdx +0 -6
- package/.docs/raw/reference/deployer/netlify.mdx +2 -2
- package/.docs/raw/reference/deployer/vercel.mdx +3 -3
- package/.docs/raw/reference/evals/answer-relevancy.mdx +164 -126
- package/.docs/raw/reference/{scorers → evals}/answer-similarity.mdx +27 -27
- package/.docs/raw/reference/evals/bias.mdx +149 -115
- package/.docs/raw/reference/evals/completeness.mdx +148 -117
- package/.docs/raw/reference/evals/content-similarity.mdx +126 -113
- package/.docs/raw/reference/evals/context-precision.mdx +290 -133
- package/.docs/raw/reference/{scorers → evals}/context-relevance.mdx +6 -6
- package/.docs/raw/reference/{scorers → evals}/create-scorer.mdx +69 -60
- package/.docs/raw/reference/evals/faithfulness.mdx +163 -121
- package/.docs/raw/reference/evals/hallucination.mdx +159 -132
- package/.docs/raw/reference/evals/keyword-coverage.mdx +169 -125
- package/.docs/raw/reference/{scorers → evals}/mastra-scorer.mdx +7 -5
- package/.docs/raw/reference/{scorers → evals}/noise-sensitivity.mdx +9 -9
- package/.docs/raw/reference/evals/prompt-alignment.mdx +604 -182
- package/.docs/raw/reference/{scorers/run-experiment.mdx → evals/run-evals.mdx} +17 -18
- package/.docs/raw/reference/evals/textual-difference.mdx +149 -117
- package/.docs/raw/reference/evals/tone-consistency.mdx +149 -125
- package/.docs/raw/reference/{scorers → evals}/tool-call-accuracy.mdx +8 -6
- package/.docs/raw/reference/evals/toxicity.mdx +152 -96
- package/.docs/raw/reference/{observability/logging → logging}/pino-logger.mdx +2 -2
- package/.docs/raw/reference/memory/createThread.mdx +5 -5
- package/.docs/raw/reference/memory/deleteMessages.mdx +7 -7
- package/.docs/raw/reference/memory/getThreadById.mdx +4 -4
- package/.docs/raw/reference/memory/listThreadsByResourceId.mdx +110 -0
- package/.docs/raw/reference/memory/memory-class.mdx +13 -9
- package/.docs/raw/reference/memory/query.mdx +58 -57
- package/.docs/raw/reference/memory/recall.mdx +185 -0
- package/.docs/raw/reference/observability/tracing/configuration.mdx +245 -0
- package/.docs/raw/reference/observability/{ai-tracing → tracing}/exporters/arize.mdx +13 -13
- package/.docs/raw/reference/observability/{ai-tracing → tracing}/exporters/braintrust.mdx +11 -8
- package/.docs/raw/reference/observability/{ai-tracing → tracing}/exporters/cloud-exporter.mdx +21 -19
- package/.docs/raw/reference/observability/{ai-tracing → tracing}/exporters/console-exporter.mdx +49 -17
- package/.docs/raw/reference/observability/{ai-tracing → tracing}/exporters/default-exporter.mdx +42 -41
- package/.docs/raw/reference/observability/{ai-tracing → tracing}/exporters/langfuse.mdx +10 -7
- package/.docs/raw/reference/observability/{ai-tracing → tracing}/exporters/langsmith.mdx +10 -7
- package/.docs/raw/reference/observability/{ai-tracing → tracing}/exporters/otel.mdx +5 -5
- package/.docs/raw/reference/observability/tracing/instances.mdx +168 -0
- package/.docs/raw/reference/observability/{ai-tracing → tracing}/interfaces.mdx +115 -89
- package/.docs/raw/reference/observability/{ai-tracing → tracing}/processors/sensitive-data-filter.mdx +3 -3
- package/.docs/raw/reference/observability/{ai-tracing/span.mdx → tracing/spans.mdx} +59 -41
- package/.docs/raw/reference/processors/batch-parts-processor.mdx +9 -3
- package/.docs/raw/reference/processors/language-detector.mdx +9 -3
- package/.docs/raw/reference/processors/moderation-processor.mdx +9 -3
- package/.docs/raw/reference/processors/pii-detector.mdx +9 -3
- package/.docs/raw/reference/processors/prompt-injection-detector.mdx +9 -3
- package/.docs/raw/reference/processors/system-prompt-scrubber.mdx +9 -3
- package/.docs/raw/reference/processors/token-limiter-processor.mdx +9 -3
- package/.docs/raw/reference/processors/unicode-normalizer.mdx +9 -3
- package/.docs/raw/reference/rag/chunk.mdx +1 -8
- package/.docs/raw/reference/rag/database-config.mdx +7 -7
- package/.docs/raw/reference/rag/metadata-filters.mdx +14 -11
- package/.docs/raw/reference/storage/cloudflare-d1.mdx +1 -1
- package/.docs/raw/reference/storage/cloudflare.mdx +1 -1
- package/.docs/raw/reference/storage/dynamodb.mdx +3 -3
- package/.docs/raw/reference/storage/lance.mdx +1 -1
- package/.docs/raw/reference/storage/libsql.mdx +3 -1
- package/.docs/raw/reference/storage/mongodb.mdx +1 -1
- package/.docs/raw/reference/storage/mssql.mdx +6 -1
- package/.docs/raw/reference/storage/postgresql.mdx +7 -1
- package/.docs/raw/reference/storage/upstash.mdx +2 -1
- package/.docs/raw/reference/streaming/agents/stream.mdx +12 -12
- package/.docs/raw/reference/streaming/agents/streamLegacy.mdx +8 -8
- package/.docs/raw/reference/streaming/workflows/observeStream.mdx +3 -3
- package/.docs/raw/reference/streaming/workflows/observeStreamVNext.mdx +3 -3
- package/.docs/raw/reference/streaming/workflows/resumeStreamVNext.mdx +6 -6
- package/.docs/raw/reference/streaming/workflows/stream.mdx +10 -10
- package/.docs/raw/reference/streaming/workflows/streamVNext.mdx +11 -11
- package/.docs/raw/reference/templates/overview.mdx +3 -3
- package/.docs/raw/reference/tools/create-tool.mdx +52 -35
- package/.docs/raw/reference/tools/graph-rag-tool.mdx +15 -15
- package/.docs/raw/reference/tools/mcp-client.mdx +1 -1
- package/.docs/raw/reference/tools/mcp-server.mdx +119 -35
- package/.docs/raw/reference/tools/vector-query-tool.mdx +27 -26
- package/.docs/raw/reference/vectors/couchbase.mdx +8 -2
- package/.docs/raw/reference/vectors/libsql.mdx +2 -1
- package/.docs/raw/reference/vectors/mongodb.mdx +7 -1
- package/.docs/raw/reference/vectors/pg.mdx +3 -0
- package/.docs/raw/reference/vectors/s3vectors.mdx +1 -1
- package/.docs/raw/reference/vectors/upstash.mdx +1 -0
- package/.docs/raw/reference/voice/google-gemini-live.mdx +1 -1
- package/.docs/raw/reference/voice/voice.addTools.mdx +3 -3
- package/.docs/raw/reference/workflows/run-methods/cancel.mdx +4 -4
- package/.docs/raw/reference/workflows/run-methods/resume.mdx +14 -14
- package/.docs/raw/reference/workflows/run-methods/start.mdx +17 -17
- package/.docs/raw/reference/workflows/run.mdx +1 -8
- package/.docs/raw/reference/workflows/step.mdx +5 -5
- package/.docs/raw/reference/workflows/workflow-methods/branch.mdx +2 -2
- package/.docs/raw/reference/workflows/workflow-methods/commit.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/create-run.mdx +7 -13
- 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 +5 -0
- package/.docs/raw/reference/workflows/workflow-methods/parallel.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/sendEvent.mdx +2 -2
- 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 +1 -1
- package/.docs/raw/server-db/custom-api-routes.mdx +2 -2
- package/.docs/raw/server-db/mastra-client.mdx +23 -22
- package/.docs/raw/server-db/middleware.mdx +7 -7
- package/.docs/raw/server-db/production-server.mdx +4 -4
- package/.docs/raw/server-db/{runtime-context.mdx → request-context.mdx} +46 -45
- package/.docs/raw/server-db/storage.mdx +29 -21
- package/.docs/raw/streaming/events.mdx +3 -3
- package/.docs/raw/streaming/overview.mdx +5 -5
- package/.docs/raw/streaming/tool-streaming.mdx +18 -17
- package/.docs/raw/streaming/workflow-streaming.mdx +1 -1
- package/.docs/raw/tools-mcp/advanced-usage.mdx +5 -4
- package/.docs/raw/tools-mcp/mcp-overview.mdx +33 -20
- package/.docs/raw/tools-mcp/overview.mdx +11 -11
- package/.docs/raw/voice/overview.mdx +63 -43
- package/.docs/raw/voice/speech-to-speech.mdx +5 -3
- package/.docs/raw/voice/speech-to-text.mdx +10 -9
- package/.docs/raw/voice/text-to-speech.mdx +13 -12
- package/.docs/raw/workflows/agents-and-tools.mdx +9 -5
- package/.docs/raw/workflows/control-flow.mdx +3 -3
- package/.docs/raw/workflows/error-handling.mdx +2 -21
- package/.docs/raw/workflows/human-in-the-loop.mdx +7 -4
- package/.docs/raw/workflows/inngest-workflow.mdx +3 -3
- package/.docs/raw/workflows/input-data-mapping.mdx +107 -0
- package/.docs/raw/workflows/overview.mdx +17 -16
- package/.docs/raw/workflows/snapshots.mdx +13 -11
- package/.docs/raw/workflows/suspend-and-resume.mdx +23 -15
- package/CHANGELOG.md +55 -53
- package/README.md +11 -2
- package/dist/{chunk-TUAHUTTB.js → chunk-5NJC7NRO.js} +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/prepare-docs/copy-raw.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 +402 -30
- package/dist/tools/migration.d.ts +40 -0
- package/dist/tools/migration.d.ts.map +1 -0
- package/package.json +8 -12
- package/.docs/organized/changelogs/%40mastra%2Fcloud.md +0 -302
- 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/getTools.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/getAgents.mdx +0 -35
- package/.docs/raw/reference/core/getLogs.mdx +0 -96
- package/.docs/raw/reference/core/getLogsByRunId.mdx +0 -87
- package/.docs/raw/reference/core/getMCPServers.mdx +0 -36
- package/.docs/raw/reference/core/getMemory.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/getVectors.mdx +0 -36
- package/.docs/raw/reference/core/getWorkflows.mdx +0 -45
- 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 -185
- package/.docs/raw/reference/observability/ai-tracing/configuration.mdx +0 -238
- 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/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/workflows/run-methods/watch.mdx +0 -73
- 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/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
|
@@ -18,7 +18,7 @@ OPENAI_API_KEY=<your-api-key>
|
|
|
18
18
|
And install the following package:
|
|
19
19
|
|
|
20
20
|
```bash copy
|
|
21
|
-
npm install @mastra/libsql
|
|
21
|
+
npm install @mastra/libsql@beta
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
## Adding memory to an agent
|
|
@@ -32,16 +32,18 @@ import { openai } from "@ai-sdk/openai";
|
|
|
32
32
|
import { LibSQLStore } from "@mastra/libsql";
|
|
33
33
|
|
|
34
34
|
export const libsqlAgent = new Agent({
|
|
35
|
-
|
|
35
|
+
id: "libsql-agent",
|
|
36
|
+
name: "LibSQL Agent",
|
|
36
37
|
instructions:
|
|
37
38
|
"You are an AI agent with the ability to automatically recall memories from previous interactions.",
|
|
38
39
|
model: openai("gpt-4o"),
|
|
39
40
|
memory: new Memory({
|
|
40
41
|
storage: new LibSQLStore({
|
|
42
|
+
id: 'libsql-agent-storage',
|
|
41
43
|
url: "file:libsql-agent.db",
|
|
42
44
|
}),
|
|
43
45
|
options: {
|
|
44
|
-
generateTitle: true,
|
|
46
|
+
generateTitle: true, // Explicitly enable automatic title generation
|
|
45
47
|
},
|
|
46
48
|
}),
|
|
47
49
|
});
|
|
@@ -54,7 +56,7 @@ Embeddings are numeric vectors used by memory’s `semanticRecall` to retrieve r
|
|
|
54
56
|
Install `fastembed` to get started:
|
|
55
57
|
|
|
56
58
|
```bash copy
|
|
57
|
-
npm install @mastra/fastembed
|
|
59
|
+
npm install @mastra/fastembed@beta
|
|
58
60
|
```
|
|
59
61
|
|
|
60
62
|
Add the following to your agent:
|
|
@@ -67,15 +69,18 @@ import { LibSQLStore, LibSQLVector } from "@mastra/libsql";
|
|
|
67
69
|
import { fastembed } from "@mastra/fastembed";
|
|
68
70
|
|
|
69
71
|
export const libsqlAgent = new Agent({
|
|
70
|
-
|
|
72
|
+
id: "libsql-agent",
|
|
73
|
+
name: "LibSQL Agent",
|
|
71
74
|
instructions:
|
|
72
75
|
"You are an AI agent with the ability to automatically recall memories from previous interactions.",
|
|
73
76
|
model: openai("gpt-4o"),
|
|
74
77
|
memory: new Memory({
|
|
75
78
|
storage: new LibSQLStore({
|
|
79
|
+
id: 'libsql-agent-storage',
|
|
76
80
|
url: "file:libsql-agent.db",
|
|
77
81
|
}),
|
|
78
82
|
vector: new LibSQLVector({
|
|
83
|
+
id: 'libsql-agent-vector',
|
|
79
84
|
connectionUrl: "file:libsql-agent.db",
|
|
80
85
|
}),
|
|
81
86
|
embedder: fastembed,
|
|
@@ -86,7 +91,7 @@ export const libsqlAgent = new Agent({
|
|
|
86
91
|
messageRange: 2,
|
|
87
92
|
},
|
|
88
93
|
threads: {
|
|
89
|
-
generateTitle: true,
|
|
94
|
+
generateTitle: true, // Explicitly enable automatic title generation
|
|
90
95
|
},
|
|
91
96
|
},
|
|
92
97
|
}),
|
|
@@ -137,4 +142,4 @@ for await (const chunk of stream.textStream) {
|
|
|
137
142
|
|
|
138
143
|
## Related
|
|
139
144
|
|
|
140
|
-
- [Calling Agents](/examples/agents/calling-agents)
|
|
145
|
+
- [Calling Agents](/examples/v1/agents/calling-agents)
|
|
@@ -19,7 +19,7 @@ DATABASE_URL=<your-connection-string>
|
|
|
19
19
|
And install the following package:
|
|
20
20
|
|
|
21
21
|
```bash copy
|
|
22
|
-
npm install @mastra/pg
|
|
22
|
+
npm install @mastra/pg@beta
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
## Adding memory to an agent
|
|
@@ -33,16 +33,18 @@ import { openai } from "@ai-sdk/openai";
|
|
|
33
33
|
import { PostgresStore } from "@mastra/pg";
|
|
34
34
|
|
|
35
35
|
export const pgAgent = new Agent({
|
|
36
|
-
|
|
36
|
+
id: "pg-agent",
|
|
37
|
+
name: "PG Agent",
|
|
37
38
|
instructions:
|
|
38
39
|
"You are an AI agent with the ability to automatically recall memories from previous interactions.",
|
|
39
40
|
model: openai("gpt-4o"),
|
|
40
41
|
memory: new Memory({
|
|
41
42
|
storage: new PostgresStore({
|
|
43
|
+
id: 'pg-agent-storage',
|
|
42
44
|
connectionString: process.env.DATABASE_URL!,
|
|
43
45
|
}),
|
|
44
46
|
options: {
|
|
45
|
-
generateTitle: true,
|
|
47
|
+
generateTitle: true, // Explicitly enable automatic title generation
|
|
46
48
|
},
|
|
47
49
|
}),
|
|
48
50
|
});
|
|
@@ -55,7 +57,7 @@ Embeddings are numeric vectors used by memory’s `semanticRecall` to retrieve r
|
|
|
55
57
|
Install `fastembed` to get started:
|
|
56
58
|
|
|
57
59
|
```bash copy
|
|
58
|
-
npm install @mastra/fastembed
|
|
60
|
+
npm install @mastra/fastembed@beta
|
|
59
61
|
```
|
|
60
62
|
|
|
61
63
|
Add the following to your agent:
|
|
@@ -68,15 +70,18 @@ import { PostgresStore, PgVector } from "@mastra/pg";
|
|
|
68
70
|
import { fastembed } from "@mastra/fastembed";
|
|
69
71
|
|
|
70
72
|
export const pgAgent = new Agent({
|
|
71
|
-
|
|
73
|
+
id: "pg-agent",
|
|
74
|
+
name: "PG Agent",
|
|
72
75
|
instructions:
|
|
73
76
|
"You are an AI agent with the ability to automatically recall memories from previous interactions.",
|
|
74
77
|
model: openai("gpt-4o"),
|
|
75
78
|
memory: new Memory({
|
|
76
79
|
storage: new PostgresStore({
|
|
80
|
+
id: 'pg-agent-storage',
|
|
77
81
|
connectionString: process.env.DATABASE_URL!,
|
|
78
82
|
}),
|
|
79
83
|
vector: new PgVector({
|
|
84
|
+
id: 'pg-agent-vector',
|
|
80
85
|
connectionString: process.env.DATABASE_URL!,
|
|
81
86
|
}),
|
|
82
87
|
embedder: fastembed,
|
|
@@ -135,4 +140,4 @@ for await (const chunk of stream.textStream) {
|
|
|
135
140
|
|
|
136
141
|
## Related
|
|
137
142
|
|
|
138
|
-
- [Calling Agents](/examples/agents/calling-agents)
|
|
143
|
+
- [Calling Agents](/examples/v1/agents/calling-agents)
|
|
@@ -24,7 +24,7 @@ You can get your Upstash credentials by signing up at [upstash.com](https://upst
|
|
|
24
24
|
And install the following package:
|
|
25
25
|
|
|
26
26
|
```bash copy
|
|
27
|
-
npm install @mastra/upstash
|
|
27
|
+
npm install @mastra/upstash@beta
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
## Adding memory to an agent
|
|
@@ -38,17 +38,19 @@ import { openai } from "@ai-sdk/openai";
|
|
|
38
38
|
import { UpstashStore } from "@mastra/upstash";
|
|
39
39
|
|
|
40
40
|
export const upstashAgent = new Agent({
|
|
41
|
-
|
|
41
|
+
id: "upstash-agent",
|
|
42
|
+
name: "Upstash Agent",
|
|
42
43
|
instructions:
|
|
43
44
|
"You are an AI agent with the ability to automatically recall memories from previous interactions.",
|
|
44
45
|
model: openai("gpt-4o"),
|
|
45
46
|
memory: new Memory({
|
|
46
47
|
storage: new UpstashStore({
|
|
48
|
+
id: 'upstash-agent-storage',
|
|
47
49
|
url: process.env.UPSTASH_REDIS_REST_URL!,
|
|
48
50
|
token: process.env.UPSTASH_REDIS_REST_TOKEN!,
|
|
49
51
|
}),
|
|
50
52
|
options: {
|
|
51
|
-
generateTitle: true,
|
|
53
|
+
generateTitle: true, // Explicitly enable automatic title generation
|
|
52
54
|
},
|
|
53
55
|
}),
|
|
54
56
|
});
|
|
@@ -61,7 +63,7 @@ Embeddings are numeric vectors used by memory’s `semanticRecall` to retrieve r
|
|
|
61
63
|
Install `fastembed` to get started:
|
|
62
64
|
|
|
63
65
|
```bash copy
|
|
64
|
-
npm install @mastra/fastembed
|
|
66
|
+
npm install @mastra/fastembed@beta
|
|
65
67
|
```
|
|
66
68
|
|
|
67
69
|
Add the following to your agent:
|
|
@@ -74,16 +76,19 @@ import { UpstashStore, UpstashVector } from "@mastra/upstash";
|
|
|
74
76
|
import { fastembed } from "@mastra/fastembed";
|
|
75
77
|
|
|
76
78
|
export const upstashAgent = new Agent({
|
|
77
|
-
|
|
79
|
+
id: "upstash-agent",
|
|
80
|
+
name: "Upstash Agent",
|
|
78
81
|
instructions:
|
|
79
82
|
"You are an AI agent with the ability to automatically recall memories from previous interactions.",
|
|
80
83
|
model: openai("gpt-4o"),
|
|
81
84
|
memory: new Memory({
|
|
82
85
|
storage: new UpstashStore({
|
|
86
|
+
id: 'upstash-agent-storage',
|
|
83
87
|
url: process.env.UPSTASH_REDIS_REST_URL!,
|
|
84
88
|
token: process.env.UPSTASH_REDIS_REST_TOKEN!,
|
|
85
89
|
}),
|
|
86
90
|
vector: new UpstashVector({
|
|
91
|
+
id: 'upstash-agent-vector',
|
|
87
92
|
url: process.env.UPSTASH_VECTOR_REST_URL!,
|
|
88
93
|
token: process.env.UPSTASH_VECTOR_REST_TOKEN!,
|
|
89
94
|
}),
|
|
@@ -143,4 +148,4 @@ for await (const chunk of stream.textStream) {
|
|
|
143
148
|
|
|
144
149
|
## Related
|
|
145
150
|
|
|
146
|
-
- [Calling Agents](/examples/agents/calling-agents)
|
|
151
|
+
- [Calling Agents](/examples/v1/agents/calling-agents)
|
|
@@ -10,13 +10,13 @@ Mastra organizes memory into threads, which are records that group related inter
|
|
|
10
10
|
1. **`thread`**: A globally unique ID representing the conversation (e.g., `support_123`). Must be unique across all resources.
|
|
11
11
|
2. **`resource`**: The user or entity that owns the thread (e.g., `user_123`, `org_456`).
|
|
12
12
|
|
|
13
|
-
The `resource` is especially important for [resource-scoped memory](./working-memory#resource-scoped-memory), which allows memory to persist across all threads associated with the same user or entity.
|
|
13
|
+
The `resource` is especially important for [resource-scoped memory](./working-memory#resource-scoped-memory-default), which allows memory to persist across all threads associated with the same user or entity.
|
|
14
14
|
|
|
15
15
|
```typescript {4} showLineNumbers
|
|
16
16
|
const stream = await agent.stream("message for agent", {
|
|
17
17
|
memory: {
|
|
18
|
-
thread: "
|
|
19
|
-
resource: "
|
|
18
|
+
thread: "conversation-123",
|
|
19
|
+
resource: "user-123",
|
|
20
20
|
},
|
|
21
21
|
});
|
|
22
22
|
```
|
|
@@ -31,21 +31,19 @@ Even with memory configured, agents won’t store or recall information unless b
|
|
|
31
31
|
|
|
32
32
|
### Thread title generation
|
|
33
33
|
|
|
34
|
-
Mastra can automatically generate descriptive thread titles based on the user's first message. Enable it by setting `generateTitle` to `true`. This improves organization and makes it easier to display conversations in your UI.
|
|
34
|
+
Mastra can automatically generate descriptive thread titles based on the user's first message. This feature is disabled by default. Enable it by setting `generateTitle` to `true`. This improves organization and makes it easier to display conversations in your UI.
|
|
35
35
|
|
|
36
36
|
```typescript {3-7} showLineNumbers
|
|
37
37
|
export const testAgent = new Agent({
|
|
38
38
|
memory: new Memory({
|
|
39
39
|
options: {
|
|
40
|
-
|
|
41
|
-
generateTitle: true,
|
|
42
|
-
}
|
|
40
|
+
generateTitle: true, // Explicitly enable automatic title generation
|
|
43
41
|
},
|
|
44
42
|
}),
|
|
45
43
|
});
|
|
46
44
|
```
|
|
47
45
|
|
|
48
|
-
> Title generation runs asynchronously after the agent responds and does not affect response time. See the [full configuration reference](/reference/memory/memory-class) for details and examples.
|
|
46
|
+
> Title generation runs asynchronously after the agent responds and does not affect response time. See the [full configuration reference](/reference/v1/memory/memory-class) for details and examples.
|
|
49
47
|
|
|
50
48
|
#### Optimizing title generation
|
|
51
49
|
|
|
@@ -70,7 +68,7 @@ export const testAgent = new Agent({
|
|
|
70
68
|
|
|
71
69
|
#### Dynamic model selection and instructions
|
|
72
70
|
|
|
73
|
-
You can configure thread title generation dynamically by passing functions to `model` and `instructions`. These functions receive the `
|
|
71
|
+
You can configure thread title generation dynamically by passing functions to `model` and `instructions`. These functions receive the `requestContext` object, allowing you to adapt title generation based on user-specific values.
|
|
74
72
|
|
|
75
73
|
```typescript {7-16} showLineNumbers
|
|
76
74
|
export const testAgent = new Agent({
|
|
@@ -79,14 +77,14 @@ export const testAgent = new Agent({
|
|
|
79
77
|
options: {
|
|
80
78
|
threads: {
|
|
81
79
|
generateTitle: {
|
|
82
|
-
model: ({
|
|
83
|
-
const userTier =
|
|
80
|
+
model: ({ requestContext }) => {
|
|
81
|
+
const userTier = requestContext.get("userTier");
|
|
84
82
|
return userTier === "premium"
|
|
85
83
|
? openai("gpt-4.1")
|
|
86
84
|
: openai("gpt-4.1-nano");
|
|
87
85
|
},
|
|
88
|
-
instructions: ({
|
|
89
|
-
const language =
|
|
86
|
+
instructions: ({ requestContext }) => {
|
|
87
|
+
const language = requestContext.get("userLanguage") || "English";
|
|
90
88
|
return `Generate a concise, engaging title in ${language} based on the user's first message.`;
|
|
91
89
|
},
|
|
92
90
|
},
|
|
@@ -7,7 +7,7 @@ import YouTube from "@site/src/components/YouTube-player";
|
|
|
7
7
|
|
|
8
8
|
# Working Memory
|
|
9
9
|
|
|
10
|
-
While [conversation history](/docs/memory/conversation-history) and [semantic recall](./semantic-recall) help agents remember conversations, working memory allows them to maintain persistent information about users across interactions.
|
|
10
|
+
While [conversation history](/docs/v1/memory/conversation-history) and [semantic recall](./semantic-recall) help agents remember conversations, working memory allows them to maintain persistent information about users across interactions.
|
|
11
11
|
|
|
12
12
|
Think of it as the agent's active thoughts or scratchpad – the key information they keep available about the user or task. It's similar to how a person would naturally remember someone's name, preferences, or important details during a conversation.
|
|
13
13
|
|
|
@@ -15,8 +15,8 @@ This is useful for maintaining ongoing state that's always relevant and should a
|
|
|
15
15
|
|
|
16
16
|
Working memory can persist at two different scopes:
|
|
17
17
|
|
|
18
|
-
- **
|
|
19
|
-
- **
|
|
18
|
+
- **Resource-scoped** (default): Memory persists across all conversation threads for the same user
|
|
19
|
+
- **Thread-scoped**: Memory is isolated per conversation thread
|
|
20
20
|
|
|
21
21
|
**Important:** Switching between scopes means the agent won't see memory from the other scope - thread-scoped memory is completely separate from resource-scoped memory.
|
|
22
22
|
|
|
@@ -31,6 +31,7 @@ import { openai } from "@ai-sdk/openai";
|
|
|
31
31
|
|
|
32
32
|
// Create agent with working memory enabled
|
|
33
33
|
const agent = new Agent({
|
|
34
|
+
id: "personal-assistant",
|
|
34
35
|
name: "PersonalAssistant",
|
|
35
36
|
instructions: "You are a helpful personal assistant.",
|
|
36
37
|
model: openai("gpt-4o"),
|
|
@@ -54,9 +55,9 @@ Working memory is a block of Markdown text that the agent is able to update over
|
|
|
54
55
|
|
|
55
56
|
Working memory can operate in two different scopes, allowing you to choose how memory persists across conversations:
|
|
56
57
|
|
|
57
|
-
###
|
|
58
|
+
### Resource-Scoped Memory (Default)
|
|
58
59
|
|
|
59
|
-
By default, working memory
|
|
60
|
+
By default, working memory persists across all conversation threads for the same user (resourceId), enabling persistent user memory:
|
|
60
61
|
|
|
61
62
|
```typescript
|
|
62
63
|
const memory = new Memory({
|
|
@@ -64,11 +65,13 @@ const memory = new Memory({
|
|
|
64
65
|
options: {
|
|
65
66
|
workingMemory: {
|
|
66
67
|
enabled: true,
|
|
67
|
-
scope:
|
|
68
|
+
scope: "resource", // Memory persists across all user threads
|
|
68
69
|
template: `# User Profile
|
|
69
70
|
- **Name**:
|
|
71
|
+
- **Location**:
|
|
70
72
|
- **Interests**:
|
|
71
|
-
- **
|
|
73
|
+
- **Preferences**:
|
|
74
|
+
- **Long-term Goals**:
|
|
72
75
|
`,
|
|
73
76
|
},
|
|
74
77
|
},
|
|
@@ -76,13 +79,26 @@ const memory = new Memory({
|
|
|
76
79
|
```
|
|
77
80
|
|
|
78
81
|
**Use cases:**
|
|
79
|
-
- Different conversations about separate topics
|
|
80
|
-
- Temporary or session-specific information
|
|
81
|
-
- Workflows where each thread needs working memory but threads are ephemeral and not related to each other
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
- Personal assistants that remember user preferences
|
|
84
|
+
- Customer service bots that maintain customer context
|
|
85
|
+
- Educational applications that track student progress
|
|
86
|
+
|
|
87
|
+
### Usage with Agents
|
|
88
|
+
|
|
89
|
+
When using resource-scoped memory, make sure to pass the `resourceId` parameter:
|
|
90
|
+
|
|
91
|
+
```typescript
|
|
92
|
+
// Resource-scoped memory requires resourceId
|
|
93
|
+
const response = await agent.generate("Hello!", {
|
|
94
|
+
threadId: "conversation-123",
|
|
95
|
+
resourceId: "user-alice-456", // Same user across different threads
|
|
96
|
+
});
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Thread-Scoped Memory
|
|
84
100
|
|
|
85
|
-
|
|
101
|
+
Thread-scoped memory isolates working memory to individual conversation threads. Each thread maintains its own isolated memory:
|
|
86
102
|
|
|
87
103
|
```typescript
|
|
88
104
|
const memory = new Memory({
|
|
@@ -362,6 +378,6 @@ await memory.updateWorkingMemory({
|
|
|
362
378
|
|
|
363
379
|
## Examples
|
|
364
380
|
|
|
365
|
-
- [Working memory with template](/examples/memory/working-memory-template)
|
|
366
|
-
- [Working memory with schema](/examples/memory/working-memory-schema)
|
|
381
|
+
- [Working memory with template](/examples/v1/memory/working-memory-template)
|
|
382
|
+
- [Working memory with schema](/examples/v1/memory/working-memory-schema)
|
|
367
383
|
- [Per-resource working memory](https://github.com/mastra-ai/mastra/tree/main/examples/memory-per-resource-example) - Complete example showing resource-scoped memory persistence
|
|
@@ -9,62 +9,45 @@ Mastra provides comprehensive observability features designed specifically for A
|
|
|
9
9
|
|
|
10
10
|
## Key Features
|
|
11
11
|
|
|
12
|
-
###
|
|
13
|
-
|
|
14
|
-
Debug applications with contextual logging:
|
|
15
|
-
|
|
16
|
-
- **Context propagation**: Automatic correlation with traces
|
|
17
|
-
- **Configurable levels**: Filter by severity in development and production
|
|
18
|
-
|
|
19
|
-
### AI Tracing
|
|
12
|
+
### Tracing
|
|
20
13
|
|
|
21
14
|
Specialized tracing for AI operations that captures:
|
|
22
15
|
|
|
23
|
-
- **
|
|
16
|
+
- **Model interactions**: Token usage, latency, prompts, and completions
|
|
24
17
|
- **Agent execution**: Decision paths, tool calls, and memory operations
|
|
25
18
|
- **Workflow steps**: Branching logic, parallel execution, and step outputs
|
|
26
19
|
- **Automatic instrumentation**: Zero-configuration tracing with decorators
|
|
27
20
|
|
|
28
|
-
### OTEL Tracing
|
|
29
|
-
|
|
30
|
-
Traditional distributed tracing with OpenTelemetry:
|
|
31
|
-
|
|
32
|
-
- **Standard OTLP protocol**: Compatible with existing observability infrastructure
|
|
33
|
-
- **HTTP and database instrumentation**: Automatic spans for common operations
|
|
34
|
-
- **Provider integrations**: Datadog, New Relic, Jaeger, and other OTLP collectors
|
|
35
|
-
- **Distributed context**: W3C Trace Context propagation
|
|
36
|
-
|
|
37
21
|
## Quick Start
|
|
38
22
|
|
|
39
23
|
Configure Observability in your Mastra instance:
|
|
40
24
|
|
|
41
25
|
```typescript title="src/mastra/index.ts"
|
|
42
26
|
import { Mastra } from "@mastra/core";
|
|
43
|
-
import { PinoLogger } from "@mastra/
|
|
27
|
+
import { PinoLogger } from "@mastra/loggers";
|
|
44
28
|
import { LibSqlStorage } from "@mastra/libsql";
|
|
29
|
+
import { Observability } from "@mastra/observability";
|
|
45
30
|
|
|
46
31
|
export const mastra = new Mastra({
|
|
47
32
|
// ... other config
|
|
48
33
|
logger: new PinoLogger(),
|
|
49
|
-
observability: {
|
|
50
|
-
default: { enabled: true }, // Enables AI Tracing
|
|
51
|
-
},
|
|
52
34
|
storage: new LibSQLStore({
|
|
35
|
+
id: 'mastra-storage',
|
|
53
36
|
url: "file:./mastra.db", // Storage is required for tracing
|
|
54
37
|
}),
|
|
55
|
-
|
|
56
|
-
enabled: true,
|
|
57
|
-
},
|
|
38
|
+
observability: new Observability({ // Enables Tracing
|
|
39
|
+
default: { enabled: true },
|
|
40
|
+
}),
|
|
58
41
|
});
|
|
59
42
|
```
|
|
60
43
|
|
|
61
44
|
With this basic setup, you will see Traces and Logs in both Studio and in Mastra Cloud.
|
|
62
45
|
|
|
63
|
-
We also support various external tracing providers like Langfuse, Braintrust, and any OpenTelemetry-compatible platform (Datadog, New Relic, SigNoz, etc.). See more about this in the [
|
|
46
|
+
We also support various external tracing providers like Langfuse, Braintrust, and any OpenTelemetry-compatible platform (Datadog, New Relic, SigNoz, etc.). See more about this in the [Tracing](/docs/v1/observability/tracing/overview) documentation.
|
|
64
47
|
|
|
65
48
|
## What's Next?
|
|
66
49
|
|
|
67
|
-
- **[Set up
|
|
68
|
-
- **[Configure Logging](/docs/
|
|
69
|
-
- **[View Examples](/examples/observability/basic-
|
|
70
|
-
- **[API Reference](/reference/observability/
|
|
50
|
+
- **[Set up Tracing](/docs/v1/observability/tracing/overview)**: Configure tracing for your application
|
|
51
|
+
- **[Configure Logging](/docs/v1/logging)**: Add structured logging
|
|
52
|
+
- **[View Examples](/examples/v1/observability/basic-tracing)**: See observability in action
|
|
53
|
+
- **[API Reference](/reference/v1/observability/tracing/instances)**: Detailed configuration options
|
|
@@ -1,26 +1,16 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Arize Exporter |
|
|
3
|
-
description: "Send
|
|
2
|
+
title: "Arize Exporter | Tracing | Observability | Mastra Docs"
|
|
3
|
+
description: "Send traces to Arize Phoenix or Arize AX using OpenTelemetry and OpenInference"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Arize Exporter
|
|
7
7
|
|
|
8
|
-
[Arize](https://arize.com/) provides observability platforms for AI applications through [Phoenix](https://phoenix.arize.com/) (open-source) and [Arize AX](https://arize.com/generative-ai/) (enterprise). The Arize exporter sends
|
|
9
|
-
|
|
10
|
-
## When to Use Arize
|
|
11
|
-
|
|
12
|
-
Arize is ideal when you need:
|
|
13
|
-
|
|
14
|
-
- **OpenInference standards** - Industry-standard semantic conventions for AI traces
|
|
15
|
-
- **Flexible deployment** - Self-hosted Phoenix or managed Arize AX
|
|
16
|
-
- **OpenTelemetry compatibility** - Works with any OTLP-compatible platform
|
|
17
|
-
- **Comprehensive AI observability** - LLM traces, embeddings, and retrieval analytics
|
|
18
|
-
- **Open-source option** - Full-featured local deployment with Phoenix
|
|
8
|
+
[Arize](https://arize.com/) provides observability platforms for AI applications through [Phoenix](https://phoenix.arize.com/) (open-source) and [Arize AX](https://arize.com/generative-ai/) (enterprise). The Arize exporter sends traces using OpenTelemetry and [OpenInference](https://github.com/Arize-ai/openinference/tree/main/spec) semantic conventions, compatible with any OpenTelemetry platform that supports OpenInference.
|
|
19
9
|
|
|
20
10
|
## Installation
|
|
21
11
|
|
|
22
12
|
```bash npm2yarn
|
|
23
|
-
npm install @mastra/arize
|
|
13
|
+
npm install @mastra/arize@beta
|
|
24
14
|
```
|
|
25
15
|
|
|
26
16
|
## Configuration
|
|
@@ -46,10 +36,11 @@ PHOENIX_PROJECT_NAME=mastra-service # Optional, defaults to 'mastra-service'
|
|
|
46
36
|
|
|
47
37
|
```typescript title="src/mastra/index.ts"
|
|
48
38
|
import { Mastra } from "@mastra/core";
|
|
39
|
+
import { Observability } from "@mastra/observability";
|
|
49
40
|
import { ArizeExporter } from "@mastra/arize";
|
|
50
41
|
|
|
51
42
|
export const mastra = new Mastra({
|
|
52
|
-
observability: {
|
|
43
|
+
observability: new Observability({
|
|
53
44
|
configs: {
|
|
54
45
|
arize: {
|
|
55
46
|
serviceName: process.env.PHOENIX_PROJECT_NAME || "mastra-service",
|
|
@@ -62,7 +53,7 @@ export const mastra = new Mastra({
|
|
|
62
53
|
],
|
|
63
54
|
},
|
|
64
55
|
},
|
|
65
|
-
},
|
|
56
|
+
}),
|
|
66
57
|
});
|
|
67
58
|
```
|
|
68
59
|
|
|
@@ -103,10 +94,11 @@ ARIZE_PROJECT_NAME=mastra-service # Optional
|
|
|
103
94
|
|
|
104
95
|
```typescript title="src/mastra/index.ts"
|
|
105
96
|
import { Mastra } from "@mastra/core";
|
|
97
|
+
import { Observability } from "@mastra/observability";
|
|
106
98
|
import { ArizeExporter } from "@mastra/arize";
|
|
107
99
|
|
|
108
100
|
export const mastra = new Mastra({
|
|
109
|
-
observability: {
|
|
101
|
+
observability: new Observability({
|
|
110
102
|
configs: {
|
|
111
103
|
arize: {
|
|
112
104
|
serviceName: process.env.ARIZE_PROJECT_NAME || "mastra-service",
|
|
@@ -119,7 +111,7 @@ export const mastra = new Mastra({
|
|
|
119
111
|
],
|
|
120
112
|
},
|
|
121
113
|
},
|
|
122
|
-
},
|
|
114
|
+
}),
|
|
123
115
|
});
|
|
124
116
|
```
|
|
125
117
|
|
|
@@ -196,7 +188,7 @@ This exporter implements the [OpenInference Semantic Conventions](https://github
|
|
|
196
188
|
|
|
197
189
|
## Related
|
|
198
190
|
|
|
199
|
-
- [
|
|
191
|
+
- [Tracing Overview](/docs/v1/observability/tracing/overview)
|
|
200
192
|
- [Phoenix Documentation](https://docs.arize.com/phoenix)
|
|
201
193
|
- [Arize AX Documentation](https://docs.arize.com/)
|
|
202
194
|
- [OpenInference Specification](https://github.com/Arize-ai/openinference/tree/main/spec)
|
|
@@ -1,26 +1,16 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Braintrust Exporter |
|
|
3
|
-
description: "Send
|
|
2
|
+
title: "Braintrust Exporter | Tracing | Observability | Mastra Docs"
|
|
3
|
+
description: "Send traces to Braintrust for evaluation and monitoring"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Braintrust Exporter
|
|
7
7
|
|
|
8
|
-
[Braintrust](https://www.braintrust.dev/) is an evaluation and monitoring platform that helps you measure and improve LLM application quality. The Braintrust exporter sends your
|
|
9
|
-
|
|
10
|
-
## When to Use Braintrust
|
|
11
|
-
|
|
12
|
-
Braintrust excels at:
|
|
13
|
-
|
|
14
|
-
- **Evaluation workflows** - Systematic quality measurement
|
|
15
|
-
- **Experiment tracking** - Compare model versions and prompts
|
|
16
|
-
- **Dataset management** - Curate test cases and golden datasets
|
|
17
|
-
- **Regression testing** - Ensure improvements don't break existing functionality
|
|
18
|
-
- **Team collaboration** - Share experiments and insights
|
|
8
|
+
[Braintrust](https://www.braintrust.dev/) is an evaluation and monitoring platform that helps you measure and improve LLM application quality. The Braintrust exporter sends your traces to Braintrust, enabling systematic evaluation, scoring, and experimentation.
|
|
19
9
|
|
|
20
10
|
## Installation
|
|
21
11
|
|
|
22
12
|
```bash npm2yarn
|
|
23
|
-
npm install @mastra/braintrust
|
|
13
|
+
npm install @mastra/braintrust@beta
|
|
24
14
|
```
|
|
25
15
|
|
|
26
16
|
## Configuration
|
|
@@ -41,10 +31,11 @@ BRAINTRUST_PROJECT_NAME=my-project # Optional, defaults to 'mastra-tracing'
|
|
|
41
31
|
|
|
42
32
|
```typescript title="src/mastra/index.ts"
|
|
43
33
|
import { Mastra } from "@mastra/core";
|
|
34
|
+
import { Observability } from "@mastra/observability";
|
|
44
35
|
import { BraintrustExporter } from "@mastra/braintrust";
|
|
45
36
|
|
|
46
37
|
export const mastra = new Mastra({
|
|
47
|
-
observability: {
|
|
38
|
+
observability: new Observability({
|
|
48
39
|
configs: {
|
|
49
40
|
braintrust: {
|
|
50
41
|
serviceName: "my-service",
|
|
@@ -56,7 +47,7 @@ export const mastra = new Mastra({
|
|
|
56
47
|
],
|
|
57
48
|
},
|
|
58
49
|
},
|
|
59
|
-
},
|
|
50
|
+
}),
|
|
60
51
|
});
|
|
61
52
|
```
|
|
62
53
|
|
|
@@ -76,5 +67,5 @@ new BraintrustExporter({
|
|
|
76
67
|
|
|
77
68
|
## Related
|
|
78
69
|
|
|
79
|
-
- [
|
|
70
|
+
- [Tracing Overview](/docs/v1/observability/tracing/overview)
|
|
80
71
|
- [Braintrust Documentation](https://www.braintrust.dev/docs)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Cloud Exporter |
|
|
2
|
+
title: "Cloud Exporter | Tracing | Observability | Mastra Docs"
|
|
3
3
|
description: "Send traces to Mastra Cloud for production monitoring"
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -7,15 +7,6 @@ description: "Send traces to Mastra Cloud for production monitoring"
|
|
|
7
7
|
|
|
8
8
|
The `CloudExporter` sends traces to Mastra Cloud for centralized monitoring and team collaboration. It's automatically enabled when using the default observability configuration with a valid access token.
|
|
9
9
|
|
|
10
|
-
## When to Use CloudExporter
|
|
11
|
-
|
|
12
|
-
CloudExporter is ideal for:
|
|
13
|
-
|
|
14
|
-
- **Production monitoring** - Centralized trace visualization
|
|
15
|
-
- **Team collaboration** - Share traces across your organization
|
|
16
|
-
- **Advanced analytics** - Insights and performance metrics
|
|
17
|
-
- **Zero maintenance** - No infrastructure to manage
|
|
18
|
-
|
|
19
10
|
## Configuration
|
|
20
11
|
|
|
21
12
|
### Prerequisites
|
|
@@ -32,10 +23,10 @@ MASTRA_CLOUD_ACCESS_TOKEN=mst_xxxxxxxxxxxxxxxx
|
|
|
32
23
|
|
|
33
24
|
```typescript title="src/mastra/index.ts"
|
|
34
25
|
import { Mastra } from "@mastra/core";
|
|
35
|
-
import { CloudExporter } from "@mastra/
|
|
26
|
+
import { Observability, CloudExporter } from "@mastra/observability";
|
|
36
27
|
|
|
37
28
|
export const mastra = new Mastra({
|
|
38
|
-
observability: {
|
|
29
|
+
observability: new Observability({
|
|
39
30
|
configs: {
|
|
40
31
|
production: {
|
|
41
32
|
serviceName: "my-service",
|
|
@@ -44,7 +35,7 @@ export const mastra = new Mastra({
|
|
|
44
35
|
],
|
|
45
36
|
},
|
|
46
37
|
},
|
|
47
|
-
},
|
|
38
|
+
}),
|
|
48
39
|
});
|
|
49
40
|
```
|
|
50
41
|
|
|
@@ -53,10 +44,13 @@ export const mastra = new Mastra({
|
|
|
53
44
|
When using the default observability configuration, CloudExporter is automatically included if the access token is set:
|
|
54
45
|
|
|
55
46
|
```typescript
|
|
47
|
+
import { Mastra } from "@mastra/core";
|
|
48
|
+
import { Observability } from "@mastra/observability";
|
|
49
|
+
|
|
56
50
|
export const mastra = new Mastra({
|
|
57
|
-
observability: {
|
|
51
|
+
observability: new Observability({
|
|
58
52
|
default: { enabled: true }, // Automatically includes CloudExporter if token exists
|
|
59
|
-
},
|
|
53
|
+
}),
|
|
60
54
|
});
|
|
61
55
|
```
|
|
62
56
|
|
|
@@ -116,6 +110,6 @@ CloudExporter uses intelligent batching to optimize network usage. Traces are bu
|
|
|
116
110
|
|
|
117
111
|
## Related
|
|
118
112
|
|
|
119
|
-
- [
|
|
120
|
-
- [DefaultExporter](/docs/observability/
|
|
113
|
+
- [Tracing Overview](/docs/v1/observability/tracing/overview)
|
|
114
|
+
- [DefaultExporter](/docs/v1/observability/tracing/exporters/default)
|
|
121
115
|
- [Mastra Cloud Documentation](https://cloud.mastra.ai/docs)
|