@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
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Reference: Server Routes | Server"
|
|
3
|
+
description: "API reference for HTTP routes registered by Mastra server adapters."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Server Routes
|
|
7
|
+
|
|
8
|
+
Server adapters register these routes when you call `server.init()`. All routes are prefixed with the `prefix` option if configured.
|
|
9
|
+
|
|
10
|
+
## Agents
|
|
11
|
+
|
|
12
|
+
| Method | Path | Description |
|
|
13
|
+
|--------|------|-------------|
|
|
14
|
+
| `GET` | `/api/agents` | List all agents |
|
|
15
|
+
| `GET` | `/api/agents/:agentId` | Get agent by ID |
|
|
16
|
+
| `POST` | `/api/agents/:agentId/generate` | Generate agent response |
|
|
17
|
+
| `POST` | `/api/agents/:agentId/stream` | Stream agent response |
|
|
18
|
+
| `GET` | `/api/agents/:agentId/tools` | List agent tools |
|
|
19
|
+
| `POST` | `/api/agents/:agentId/tools/:toolId/execute` | Execute agent tool |
|
|
20
|
+
|
|
21
|
+
### Generate request body
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
{
|
|
25
|
+
messages: CoreMessage[] | string; // Required
|
|
26
|
+
instructions?: string; // System instructions
|
|
27
|
+
system?: string; // System prompt
|
|
28
|
+
context?: CoreMessage[]; // Additional context
|
|
29
|
+
memory?: { key: string } | boolean; // Memory config
|
|
30
|
+
resourceId?: string; // Resource identifier
|
|
31
|
+
threadId?: string; // Thread identifier
|
|
32
|
+
runId?: string; // Run identifier
|
|
33
|
+
maxSteps?: number; // Max tool steps
|
|
34
|
+
activeTools?: string[]; // Tools to enable
|
|
35
|
+
toolChoice?: ToolChoice; // Tool selection mode
|
|
36
|
+
requestContext?: Record<string, unknown>; // Request context
|
|
37
|
+
output?: ZodSchema; // Structured output schema
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Generate response
|
|
42
|
+
|
|
43
|
+
```typescript
|
|
44
|
+
{
|
|
45
|
+
text: string;
|
|
46
|
+
toolCalls?: ToolCall[];
|
|
47
|
+
finishReason: string;
|
|
48
|
+
usage?: {
|
|
49
|
+
promptTokens: number;
|
|
50
|
+
completionTokens: number;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Workflows
|
|
56
|
+
|
|
57
|
+
| Method | Path | Description |
|
|
58
|
+
|--------|------|-------------|
|
|
59
|
+
| `GET` | `/api/workflows` | List all workflows |
|
|
60
|
+
| `GET` | `/api/workflows/:workflowId` | Get workflow by ID |
|
|
61
|
+
| `POST` | `/api/workflows/:workflowId/stream` | Stream workflow execution |
|
|
62
|
+
| `POST` | `/api/workflows/:workflowId/resume` | Resume suspended workflow |
|
|
63
|
+
| `POST` | `/api/workflows/:workflowId/resume-async` | Resume asynchronously |
|
|
64
|
+
| `GET` | `/api/workflows/:workflowId/runs` | List workflow runs |
|
|
65
|
+
| `GET` | `/api/workflows/:workflowId/runs/:runId` | Get specific run |
|
|
66
|
+
|
|
67
|
+
### Stream workflow request body
|
|
68
|
+
|
|
69
|
+
```typescript
|
|
70
|
+
{
|
|
71
|
+
inputData?: unknown;
|
|
72
|
+
initialState?: unknown;
|
|
73
|
+
requestContext?: Record<string, unknown>;
|
|
74
|
+
closeOnSuspend?: boolean;
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Resume request body
|
|
79
|
+
|
|
80
|
+
```typescript
|
|
81
|
+
{
|
|
82
|
+
step?: string | string[];
|
|
83
|
+
resumeData?: unknown;
|
|
84
|
+
requestContext?: Record<string, unknown>;
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Tools
|
|
89
|
+
|
|
90
|
+
| Method | Path | Description |
|
|
91
|
+
|--------|------|-------------|
|
|
92
|
+
| `GET` | `/api/tools` | List all tools |
|
|
93
|
+
| `GET` | `/api/tools/:toolId` | Get tool by ID |
|
|
94
|
+
| `POST` | `/api/tools/:toolId/execute` | Execute tool |
|
|
95
|
+
|
|
96
|
+
### Execute tool request body
|
|
97
|
+
|
|
98
|
+
```typescript
|
|
99
|
+
{
|
|
100
|
+
data: unknown; // Tool input data
|
|
101
|
+
requestContext?: Record<string, unknown>;
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Memory
|
|
106
|
+
|
|
107
|
+
| Method | Path | Description |
|
|
108
|
+
|--------|------|-------------|
|
|
109
|
+
| `GET` | `/api/memory/threads` | List threads |
|
|
110
|
+
| `GET` | `/api/memory/threads/:threadId` | Get thread |
|
|
111
|
+
| `POST` | `/api/memory/threads` | Create thread |
|
|
112
|
+
| `DELETE` | `/api/memory/threads/:threadId` | Delete thread |
|
|
113
|
+
| `GET` | `/api/memory/threads/:threadId/messages` | Get thread messages |
|
|
114
|
+
| `POST` | `/api/memory/threads/:threadId/messages` | Add message |
|
|
115
|
+
|
|
116
|
+
### Create thread request body
|
|
117
|
+
|
|
118
|
+
```typescript
|
|
119
|
+
{
|
|
120
|
+
resourceId: string;
|
|
121
|
+
title?: string;
|
|
122
|
+
metadata?: Record<string, unknown>;
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Vectors
|
|
127
|
+
|
|
128
|
+
| Method | Path | Description |
|
|
129
|
+
|--------|------|-------------|
|
|
130
|
+
| `POST` | `/api/vectors/:vectorName/upsert` | Upsert vectors |
|
|
131
|
+
| `POST` | `/api/vectors/:vectorName/query` | Query vectors |
|
|
132
|
+
| `POST` | `/api/vectors/:vectorName/delete` | Delete vectors |
|
|
133
|
+
|
|
134
|
+
### Upsert request body
|
|
135
|
+
|
|
136
|
+
```typescript
|
|
137
|
+
{
|
|
138
|
+
vectors: Array<{
|
|
139
|
+
id: string;
|
|
140
|
+
values: number[];
|
|
141
|
+
metadata?: Record<string, unknown>;
|
|
142
|
+
}>;
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Query request body
|
|
147
|
+
|
|
148
|
+
```typescript
|
|
149
|
+
{
|
|
150
|
+
vector: number[];
|
|
151
|
+
topK?: number;
|
|
152
|
+
filter?: Record<string, unknown>;
|
|
153
|
+
includeMetadata?: boolean;
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## MCP
|
|
158
|
+
|
|
159
|
+
| Method | Path | Description |
|
|
160
|
+
|--------|------|-------------|
|
|
161
|
+
| `GET` | `/api/mcp/servers` | List MCP servers |
|
|
162
|
+
| `GET` | `/api/mcp/servers/:serverId/tools` | List server tools |
|
|
163
|
+
| `POST` | `/api/mcp/:serverId` | MCP HTTP transport |
|
|
164
|
+
| `GET` | `/api/mcp/:serverId/sse` | MCP SSE transport |
|
|
165
|
+
|
|
166
|
+
## Logs
|
|
167
|
+
|
|
168
|
+
| Method | Path | Description |
|
|
169
|
+
|--------|------|-------------|
|
|
170
|
+
| `GET` | `/api/logs` | List logs |
|
|
171
|
+
| `GET` | `/api/logs/:runId` | Get logs by run ID |
|
|
172
|
+
|
|
173
|
+
### Query parameters
|
|
174
|
+
|
|
175
|
+
```typescript
|
|
176
|
+
{
|
|
177
|
+
page?: number;
|
|
178
|
+
perPage?: number;
|
|
179
|
+
transportId?: string;
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Telemetry
|
|
184
|
+
|
|
185
|
+
| Method | Path | Description |
|
|
186
|
+
|--------|------|-------------|
|
|
187
|
+
| `GET` | `/api/telemetry/traces` | List traces |
|
|
188
|
+
| `GET` | `/api/telemetry/traces/:traceId` | Get trace |
|
|
189
|
+
| `GET` | `/api/telemetry/traces/:traceId/spans` | Get trace spans |
|
|
190
|
+
|
|
191
|
+
## Common query parameters
|
|
192
|
+
|
|
193
|
+
### Pagination
|
|
194
|
+
|
|
195
|
+
Most list endpoints support:
|
|
196
|
+
|
|
197
|
+
```typescript
|
|
198
|
+
{
|
|
199
|
+
page?: number; // Page number (0-indexed)
|
|
200
|
+
perPage?: number; // Items per page (default: 10)
|
|
201
|
+
}
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Or offset-based:
|
|
205
|
+
|
|
206
|
+
```typescript
|
|
207
|
+
{
|
|
208
|
+
offset?: number; // Skip N items
|
|
209
|
+
limit?: number; // Max items (default: 50)
|
|
210
|
+
}
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### Filtering
|
|
214
|
+
|
|
215
|
+
Workflow runs support:
|
|
216
|
+
|
|
217
|
+
```typescript
|
|
218
|
+
{
|
|
219
|
+
fromDate?: string; // ISO date string
|
|
220
|
+
toDate?: string; // ISO date string
|
|
221
|
+
status?: string; // Run status filter
|
|
222
|
+
resourceId?: string; // Filter by resource
|
|
223
|
+
}
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
## Error responses
|
|
227
|
+
|
|
228
|
+
All routes return errors in this format:
|
|
229
|
+
|
|
230
|
+
```typescript
|
|
231
|
+
{
|
|
232
|
+
error: string; // Error message
|
|
233
|
+
details?: unknown; // Additional details
|
|
234
|
+
}
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
Common status codes:
|
|
238
|
+
|
|
239
|
+
| Code | Meaning |
|
|
240
|
+
|------|---------|
|
|
241
|
+
| 400 | Bad Request - Invalid parameters |
|
|
242
|
+
| 401 | Unauthorized - Missing/invalid auth |
|
|
243
|
+
| 403 | Forbidden - Insufficient permissions |
|
|
244
|
+
| 404 | Not Found - Resource doesn't exist |
|
|
245
|
+
| 500 | Internal Server Error |
|
|
246
|
+
|
|
247
|
+
## Related
|
|
248
|
+
|
|
249
|
+
- [createRoute()](/reference/v1/server/create-route) - Creating custom routes
|
|
250
|
+
- [Server Adapters](/docs/v1/server-db/server-adapters) - Using adapters
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Reference: Cloudflare D1 Storage | Storage
|
|
2
|
+
title: "Reference: Cloudflare D1 Storage | Storage"
|
|
3
3
|
description: Documentation for the Cloudflare D1 SQL storage implementation in Mastra.
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -10,7 +10,7 @@ The Cloudflare D1 storage implementation provides a serverless SQL database solu
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
npm install @mastra/cloudflare-d1@
|
|
13
|
+
npm install @mastra/cloudflare-d1@beta
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## Usage
|
|
@@ -95,6 +95,43 @@ The storage implementation handles schema creation and updates automatically. It
|
|
|
95
95
|
- `messages`: Stores individual messages
|
|
96
96
|
- `metadata`: Stores additional metadata for threads and messages
|
|
97
97
|
|
|
98
|
+
### Initialization
|
|
99
|
+
|
|
100
|
+
When you pass storage to the Mastra class, `init()` is called automatically before any storage operation:
|
|
101
|
+
|
|
102
|
+
```typescript copy
|
|
103
|
+
import { Mastra } from "@mastra/core";
|
|
104
|
+
import { D1Store } from "@mastra/cloudflare-d1";
|
|
105
|
+
|
|
106
|
+
const storage = new D1Store({
|
|
107
|
+
binding: D1Database,
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
const mastra = new Mastra({
|
|
111
|
+
storage, // init() is called automatically
|
|
112
|
+
});
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
If you're using storage directly without Mastra, you must call `init()` explicitly to create the tables:
|
|
116
|
+
|
|
117
|
+
```typescript copy
|
|
118
|
+
import { D1Store } from "@mastra/cloudflare-d1";
|
|
119
|
+
|
|
120
|
+
const storage = new D1Store({
|
|
121
|
+
binding: D1Database,
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
// Required when using storage directly
|
|
125
|
+
await storage.init();
|
|
126
|
+
|
|
127
|
+
// Now you can use the storage
|
|
128
|
+
await storage.getThread({ threadId: "..." });
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
:::warning
|
|
132
|
+
If `init()` is not called, tables won't be created and storage operations will fail silently or throw errors.
|
|
133
|
+
:::
|
|
134
|
+
|
|
98
135
|
### Transactions & Consistency
|
|
99
136
|
|
|
100
137
|
Cloudflare D1 provides transactional guarantees for single-row operations. This means that multiple operations can be executed as a single, all-or-nothing unit of work.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Reference: Cloudflare Storage | Storage
|
|
2
|
+
title: "Reference: Cloudflare Storage | Storage"
|
|
3
3
|
description: Documentation for the Cloudflare KV storage implementation in Mastra.
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -10,7 +10,7 @@ The Cloudflare KV storage implementation provides a globally distributed, server
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
12
12
|
```bash copy
|
|
13
|
-
npm install @mastra/cloudflare@
|
|
13
|
+
npm install @mastra/cloudflare@beta
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## Usage
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Reference: Convex Storage | Storage"
|
|
3
|
+
description: Documentation for the Convex storage implementation in Mastra.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Convex Storage
|
|
7
|
+
|
|
8
|
+
The Convex storage implementation provides a serverless storage solution using [Convex](https://convex.dev), a full-stack TypeScript development platform with real-time sync and automatic caching.
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
```bash copy
|
|
13
|
+
npm install @mastra/convex@beta
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Convex Setup
|
|
17
|
+
|
|
18
|
+
Before using `ConvexStore`, you need to set up the Convex schema and storage handler in your Convex project.
|
|
19
|
+
|
|
20
|
+
### 1. Set up Convex Schema
|
|
21
|
+
|
|
22
|
+
In `convex/schema.ts`:
|
|
23
|
+
|
|
24
|
+
```typescript copy
|
|
25
|
+
import { defineSchema } from 'convex/server';
|
|
26
|
+
import {
|
|
27
|
+
mastraThreadsTable,
|
|
28
|
+
mastraMessagesTable,
|
|
29
|
+
mastraResourcesTable,
|
|
30
|
+
mastraWorkflowSnapshotsTable,
|
|
31
|
+
mastraScoresTable,
|
|
32
|
+
mastraVectorIndexesTable,
|
|
33
|
+
mastraVectorsTable,
|
|
34
|
+
mastraDocumentsTable,
|
|
35
|
+
} from '@mastra/convex/server';
|
|
36
|
+
|
|
37
|
+
export default defineSchema({
|
|
38
|
+
mastra_threads: mastraThreadsTable,
|
|
39
|
+
mastra_messages: mastraMessagesTable,
|
|
40
|
+
mastra_resources: mastraResourcesTable,
|
|
41
|
+
mastra_workflow_snapshots: mastraWorkflowSnapshotsTable,
|
|
42
|
+
mastra_scorers: mastraScoresTable,
|
|
43
|
+
mastra_vector_indexes: mastraVectorIndexesTable,
|
|
44
|
+
mastra_vectors: mastraVectorsTable,
|
|
45
|
+
mastra_documents: mastraDocumentsTable,
|
|
46
|
+
});
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### 2. Create the Storage Handler
|
|
50
|
+
|
|
51
|
+
In `convex/mastra/storage.ts`:
|
|
52
|
+
|
|
53
|
+
```typescript copy
|
|
54
|
+
import { mastraStorage } from '@mastra/convex/server';
|
|
55
|
+
|
|
56
|
+
export const handle = mastraStorage;
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### 3. Deploy to Convex
|
|
60
|
+
|
|
61
|
+
```bash copy
|
|
62
|
+
npx convex dev
|
|
63
|
+
# or for production
|
|
64
|
+
npx convex deploy
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Usage
|
|
68
|
+
|
|
69
|
+
```typescript copy showLineNumbers
|
|
70
|
+
import { ConvexStore } from "@mastra/convex";
|
|
71
|
+
|
|
72
|
+
const storage = new ConvexStore({
|
|
73
|
+
id: 'convex-storage',
|
|
74
|
+
deploymentUrl: process.env.CONVEX_URL!,
|
|
75
|
+
adminAuthToken: process.env.CONVEX_ADMIN_KEY!,
|
|
76
|
+
});
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Parameters
|
|
80
|
+
|
|
81
|
+
<PropertiesTable
|
|
82
|
+
content={[
|
|
83
|
+
{
|
|
84
|
+
name: "deploymentUrl",
|
|
85
|
+
type: "string",
|
|
86
|
+
description:
|
|
87
|
+
"Convex deployment URL (e.g., https://your-project.convex.cloud)",
|
|
88
|
+
isOptional: false,
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: "adminAuthToken",
|
|
92
|
+
type: "string",
|
|
93
|
+
description:
|
|
94
|
+
"Convex admin authentication token for backend access",
|
|
95
|
+
isOptional: false,
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
name: "storageFunction",
|
|
99
|
+
type: "string",
|
|
100
|
+
description:
|
|
101
|
+
"Path to the storage mutation function (default: 'mastra/storage:handle')",
|
|
102
|
+
isOptional: true,
|
|
103
|
+
defaultValue: "mastra/storage:handle",
|
|
104
|
+
},
|
|
105
|
+
]}
|
|
106
|
+
/>
|
|
107
|
+
|
|
108
|
+
## Constructor Examples
|
|
109
|
+
|
|
110
|
+
```ts
|
|
111
|
+
import { ConvexStore } from "@mastra/convex";
|
|
112
|
+
|
|
113
|
+
// Basic configuration
|
|
114
|
+
const store = new ConvexStore({
|
|
115
|
+
id: 'convex-storage',
|
|
116
|
+
deploymentUrl: "https://your-project.convex.cloud",
|
|
117
|
+
adminAuthToken: "your-admin-token",
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
// With custom storage function path
|
|
121
|
+
const storeCustom = new ConvexStore({
|
|
122
|
+
id: 'convex-storage',
|
|
123
|
+
deploymentUrl: "https://your-project.convex.cloud",
|
|
124
|
+
adminAuthToken: "your-admin-token",
|
|
125
|
+
storageFunction: "custom/path:handler",
|
|
126
|
+
});
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Additional Notes
|
|
130
|
+
|
|
131
|
+
### Schema Management
|
|
132
|
+
|
|
133
|
+
The storage implementation uses typed Convex tables for each Mastra domain:
|
|
134
|
+
|
|
135
|
+
| Domain | Convex Table | Purpose |
|
|
136
|
+
| -------------- | --------------------------- | -------------------- |
|
|
137
|
+
| Threads | `mastra_threads` | Conversation threads |
|
|
138
|
+
| Messages | `mastra_messages` | Chat messages |
|
|
139
|
+
| Resources | `mastra_resources` | User working memory |
|
|
140
|
+
| Workflows | `mastra_workflow_snapshots` | Workflow state |
|
|
141
|
+
| Scorers | `mastra_scorers` | Evaluation data |
|
|
142
|
+
| Fallback | `mastra_documents` | Unknown tables |
|
|
143
|
+
|
|
144
|
+
### Architecture
|
|
145
|
+
|
|
146
|
+
All typed tables include:
|
|
147
|
+
|
|
148
|
+
- An `id` field for Mastra's record ID (distinct from Convex's auto-generated `_id`)
|
|
149
|
+
- A `by_record_id` index for efficient lookups by Mastra ID
|
|
150
|
+
|
|
151
|
+
This design ensures compatibility with Mastra's storage contract while leveraging Convex's automatic indexing and real-time capabilities.
|
|
152
|
+
|
|
153
|
+
### Environment Variables
|
|
154
|
+
|
|
155
|
+
Set these environment variables for your deployment:
|
|
156
|
+
|
|
157
|
+
- `CONVEX_URL` – Your Convex deployment URL
|
|
158
|
+
- `CONVEX_ADMIN_KEY` – Admin authentication token (get from Convex dashboard)
|
|
159
|
+
|
|
160
|
+
## Related
|
|
161
|
+
|
|
162
|
+
- [Convex Vector Store](../vectors/convex)
|
|
163
|
+
- [Convex Documentation](https://docs.convex.dev/)
|
|
164
|
+
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Reference: DynamoDB Storage | Storage
|
|
2
|
+
title: "Reference: DynamoDB Storage | Storage"
|
|
3
3
|
description: "Documentation for the DynamoDB storage implementation in Mastra, using a single-table design with ElectroDB."
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -19,11 +19,11 @@ The DynamoDB storage implementation provides a scalable and performant NoSQL dat
|
|
|
19
19
|
## Installation
|
|
20
20
|
|
|
21
21
|
```bash copy
|
|
22
|
-
npm install @mastra/dynamodb@
|
|
22
|
+
npm install @mastra/dynamodb@beta
|
|
23
23
|
# or
|
|
24
|
-
pnpm add @mastra/dynamodb@
|
|
24
|
+
pnpm add @mastra/dynamodb@beta
|
|
25
25
|
# or
|
|
26
|
-
yarn add @mastra/dynamodb@
|
|
26
|
+
yarn add @mastra/dynamodb@beta
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
## Prerequisites
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Reference: LanceDB Storage | Storage
|
|
2
|
+
title: "Reference: LanceDB Storage | Storage"
|
|
3
3
|
description: Documentation for the LanceDB storage implementation in Mastra.
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -10,7 +10,7 @@ The LanceDB storage implementation provides a high-performance storage solution
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
npm install @mastra/lance
|
|
13
|
+
npm install @mastra/lance@beta
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## Usage
|
|
@@ -73,6 +73,39 @@ The LanceStorage implementation automatically handles schema creation and update
|
|
|
73
73
|
- `jsonb`, `json` → Utf8 (serialized)
|
|
74
74
|
- `binary` → Binary
|
|
75
75
|
|
|
76
|
+
### Initialization
|
|
77
|
+
|
|
78
|
+
When you pass storage to the Mastra class, `init()` is called automatically before any storage operation:
|
|
79
|
+
|
|
80
|
+
```typescript copy
|
|
81
|
+
import { Mastra } from "@mastra/core";
|
|
82
|
+
import { LanceStorage } from "@mastra/lance";
|
|
83
|
+
|
|
84
|
+
const storage = await LanceStorage.create("my-storage", "/path/to/db");
|
|
85
|
+
|
|
86
|
+
const mastra = new Mastra({
|
|
87
|
+
storage, // init() is called automatically
|
|
88
|
+
});
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
If you're using storage directly without Mastra, you must call `init()` explicitly to create the tables:
|
|
92
|
+
|
|
93
|
+
```typescript copy
|
|
94
|
+
import { LanceStorage } from "@mastra/lance";
|
|
95
|
+
|
|
96
|
+
const storage = await LanceStorage.create("my-storage", "/path/to/db");
|
|
97
|
+
|
|
98
|
+
// Required when using storage directly
|
|
99
|
+
await storage.init();
|
|
100
|
+
|
|
101
|
+
// Now you can use the storage
|
|
102
|
+
await storage.getThread({ threadId: "..." });
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
:::warning
|
|
106
|
+
If `init()` is not called, tables won't be created and storage operations will fail silently or throw errors.
|
|
107
|
+
:::
|
|
108
|
+
|
|
76
109
|
### Deployment Options
|
|
77
110
|
|
|
78
111
|
LanceDB storage can be configured for different deployment scenarios:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Reference: LibSQL Storage | Storage
|
|
2
|
+
title: "Reference: LibSQL Storage | Storage"
|
|
3
3
|
description: Documentation for the LibSQL storage implementation in Mastra.
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -10,7 +10,7 @@ The LibSQL storage implementation provides a SQLite-compatible storage solution
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
12
12
|
```bash copy
|
|
13
|
-
npm install @mastra/libsql@
|
|
13
|
+
npm install @mastra/libsql@beta
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## Usage
|
|
@@ -74,3 +74,40 @@ The storage implementation handles schema creation and updates automatically. It
|
|
|
74
74
|
- `mastra_traces`: Stores telemetry and tracing data
|
|
75
75
|
- `mastra_scorers`: Stores scoring and evaluation data
|
|
76
76
|
- `mastra_resources`: Stores resource working memory data
|
|
77
|
+
|
|
78
|
+
### Initialization
|
|
79
|
+
|
|
80
|
+
When you pass storage to the Mastra class, `init()` is called automatically before any storage operation:
|
|
81
|
+
|
|
82
|
+
```typescript copy
|
|
83
|
+
import { Mastra } from "@mastra/core";
|
|
84
|
+
import { LibSQLStore } from "@mastra/libsql";
|
|
85
|
+
|
|
86
|
+
const storage = new LibSQLStore({
|
|
87
|
+
url: "file:./storage.db",
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
const mastra = new Mastra({
|
|
91
|
+
storage, // init() is called automatically
|
|
92
|
+
});
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
If you're using storage directly without Mastra, you must call `init()` explicitly to create the tables:
|
|
96
|
+
|
|
97
|
+
```typescript copy
|
|
98
|
+
import { LibSQLStore } from "@mastra/libsql";
|
|
99
|
+
|
|
100
|
+
const storage = new LibSQLStore({
|
|
101
|
+
url: "file:./storage.db",
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
// Required when using storage directly
|
|
105
|
+
await storage.init();
|
|
106
|
+
|
|
107
|
+
// Now you can use the storage
|
|
108
|
+
await storage.getThread({ threadId: "..." });
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
:::warning
|
|
112
|
+
If `init()` is not called, tables won't be created and storage operations will fail silently or throw errors.
|
|
113
|
+
:::
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Reference: MongoDB Storage | Storage
|
|
2
|
+
title: "Reference: MongoDB Storage | Storage"
|
|
3
3
|
description: Documentation for the MongoDB storage implementation in Mastra.
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -10,7 +10,7 @@ The MongoDB storage implementation provides a scalable storage solution using Mo
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
12
12
|
```bash copy
|
|
13
|
-
npm install @mastra/mongodb@
|
|
13
|
+
npm install @mastra/mongodb@beta
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## Usage
|
|
@@ -93,6 +93,45 @@ The storage implementation handles collection creation and management automatica
|
|
|
93
93
|
- `mastra_scorers`: Stores scoring and evaluation data
|
|
94
94
|
- `mastra_resources`: Stores resource working memory data
|
|
95
95
|
|
|
96
|
+
### Initialization
|
|
97
|
+
|
|
98
|
+
When you pass storage to the Mastra class, `init()` is called automatically before any storage operation:
|
|
99
|
+
|
|
100
|
+
```typescript copy
|
|
101
|
+
import { Mastra } from "@mastra/core";
|
|
102
|
+
import { MongoDBStore } from "@mastra/mongodb";
|
|
103
|
+
|
|
104
|
+
const storage = new MongoDBStore({
|
|
105
|
+
url: process.env.MONGODB_URL,
|
|
106
|
+
dbName: process.env.MONGODB_DATABASE,
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
const mastra = new Mastra({
|
|
110
|
+
storage, // init() is called automatically
|
|
111
|
+
});
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
If you're using storage directly without Mastra, you must call `init()` explicitly to create the collections:
|
|
115
|
+
|
|
116
|
+
```typescript copy
|
|
117
|
+
import { MongoDBStore } from "@mastra/mongodb";
|
|
118
|
+
|
|
119
|
+
const storage = new MongoDBStore({
|
|
120
|
+
url: process.env.MONGODB_URL,
|
|
121
|
+
dbName: process.env.MONGODB_DATABASE,
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
// Required when using storage directly
|
|
125
|
+
await storage.init();
|
|
126
|
+
|
|
127
|
+
// Now you can use the storage
|
|
128
|
+
await storage.getThread({ threadId: "..." });
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
:::warning
|
|
132
|
+
If `init()` is not called, collections won't be created and storage operations will fail silently or throw errors.
|
|
133
|
+
:::
|
|
134
|
+
|
|
96
135
|
## Vector Search Capabilities
|
|
97
136
|
|
|
98
137
|
MongoDB storage includes built-in vector search capabilities for AI applications:
|