@mastra/mcp-docs-server 1.1.8 → 1.1.9-alpha.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/docs/agents/adding-voice.md +4 -4
- package/.docs/docs/agents/agent-approval.md +3 -3
- package/.docs/docs/agents/agent-memory.md +3 -3
- package/.docs/docs/agents/guardrails.md +3 -3
- package/.docs/docs/agents/network-approval.md +5 -2
- package/.docs/docs/agents/networks.md +2 -2
- package/.docs/docs/agents/overview.md +2 -2
- package/.docs/docs/agents/processors.md +42 -24
- package/.docs/docs/agents/structured-output.md +2 -2
- package/.docs/docs/agents/supervisor-agents.md +3 -3
- package/.docs/docs/agents/using-tools.md +3 -3
- package/.docs/docs/build-with-ai/mcp-docs-server.md +5 -5
- package/.docs/docs/build-with-ai/skills.md +2 -2
- package/.docs/docs/community/contributing-templates.md +1 -1
- package/.docs/docs/community/discord.md +3 -3
- package/.docs/docs/community/licensing.md +2 -2
- package/.docs/docs/deployment/cloud-providers.md +2 -2
- package/.docs/docs/deployment/mastra-server.md +2 -2
- package/.docs/docs/deployment/monorepo.md +1 -1
- package/.docs/docs/deployment/overview.md +3 -3
- package/.docs/docs/deployment/studio.md +3 -3
- package/.docs/docs/deployment/web-framework.md +2 -2
- package/.docs/docs/deployment/workflow-runners.md +1 -1
- package/.docs/docs/evals/built-in-scorers.md +1 -1
- package/.docs/docs/evals/custom-scorers.md +6 -6
- package/.docs/docs/evals/overview.md +2 -2
- package/.docs/docs/evals/running-in-ci.md +6 -6
- package/.docs/docs/getting-started/build-with-ai.md +3 -3
- package/.docs/docs/getting-started/manual-install.md +1 -1
- package/.docs/docs/getting-started/project-structure.md +2 -2
- package/.docs/docs/index.md +63 -17
- package/.docs/docs/mastra-cloud/deployment.md +1 -1
- package/.docs/docs/mastra-cloud/studio.md +1 -1
- package/.docs/docs/mcp/overview.md +1 -1
- package/.docs/docs/mcp/publishing-mcp-server.md +4 -4
- package/.docs/docs/memory/memory-processors.md +9 -9
- package/.docs/docs/memory/message-history.md +4 -4
- package/.docs/docs/memory/observational-memory.md +11 -7
- package/.docs/docs/memory/semantic-recall.md +9 -9
- package/.docs/docs/memory/storage.md +1 -1
- package/.docs/docs/memory/working-memory.md +20 -20
- package/.docs/docs/observability/datasets/overview.md +1 -1
- package/.docs/docs/observability/datasets/running-experiments.md +1 -1
- package/.docs/docs/observability/logging.md +1 -1
- package/.docs/docs/observability/overview.md +5 -5
- package/.docs/docs/observability/tracing/bridges/otel.md +9 -9
- package/.docs/docs/observability/tracing/exporters/arize.md +3 -3
- package/.docs/docs/observability/tracing/exporters/braintrust.md +1 -1
- package/.docs/docs/observability/tracing/exporters/cloud.md +2 -2
- package/.docs/docs/observability/tracing/exporters/datadog.md +3 -3
- package/.docs/docs/observability/tracing/exporters/default.md +8 -8
- package/.docs/docs/observability/tracing/exporters/laminar.md +1 -1
- package/.docs/docs/observability/tracing/exporters/langfuse.md +3 -3
- package/.docs/docs/observability/tracing/exporters/langsmith.md +4 -4
- package/.docs/docs/observability/tracing/exporters/otel.md +8 -8
- package/.docs/docs/observability/tracing/exporters/posthog.md +2 -2
- package/.docs/docs/observability/tracing/exporters/sentry.md +4 -4
- package/.docs/docs/observability/tracing/overview.md +24 -24
- package/.docs/docs/observability/tracing/processors/sensitive-data-filter.md +13 -13
- package/.docs/docs/rag/chunking-and-embedding.md +5 -5
- package/.docs/docs/rag/overview.md +2 -2
- package/.docs/docs/rag/retrieval.md +4 -4
- package/.docs/docs/rag/vector-databases.md +13 -13
- package/.docs/docs/server/auth/auth0.md +2 -2
- package/.docs/docs/server/auth/clerk.md +1 -1
- package/.docs/docs/server/auth/composite-auth.md +9 -9
- package/.docs/docs/server/auth/custom-auth-provider.md +12 -12
- package/.docs/docs/server/auth/firebase.md +3 -3
- package/.docs/docs/server/auth/jwt.md +1 -1
- package/.docs/docs/server/auth/simple-auth.md +9 -9
- package/.docs/docs/server/auth/supabase.md +1 -1
- package/.docs/docs/server/auth/workos.md +1 -1
- package/.docs/docs/server/auth.md +2 -2
- package/.docs/docs/server/custom-adapters.md +7 -7
- package/.docs/docs/server/custom-api-routes.md +2 -2
- package/.docs/docs/server/mastra-client.md +2 -2
- package/.docs/docs/server/mastra-server.md +2 -2
- package/.docs/docs/server/request-context.md +2 -2
- package/.docs/docs/server/server-adapters.md +3 -3
- package/.docs/docs/streaming/events.md +2 -2
- package/.docs/docs/streaming/overview.md +2 -2
- package/.docs/docs/streaming/tool-streaming.md +46 -32
- package/.docs/docs/streaming/workflow-streaming.md +1 -1
- package/.docs/docs/voice/overview.md +3 -3
- package/.docs/docs/voice/speech-to-speech.md +1 -1
- package/.docs/docs/voice/speech-to-text.md +2 -2
- package/.docs/docs/voice/text-to-speech.md +2 -2
- package/.docs/docs/workflows/agents-and-tools.md +1 -1
- package/.docs/docs/workflows/control-flow.md +45 -3
- package/.docs/docs/workflows/error-handling.md +4 -4
- package/.docs/docs/workflows/overview.md +3 -3
- package/.docs/docs/workflows/snapshots.md +1 -1
- package/.docs/docs/workflows/suspend-and-resume.md +1 -1
- package/.docs/docs/workflows/time-travel.md +3 -3
- package/.docs/docs/workflows/workflow-state.md +1 -1
- package/.docs/docs/workspace/filesystem.md +3 -3
- package/.docs/docs/workspace/overview.md +53 -8
- package/.docs/docs/workspace/sandbox.md +72 -13
- package/.docs/docs/workspace/search.md +1 -1
- package/.docs/docs/workspace/skills.md +4 -4
- package/.docs/guides/build-your-ui/ai-sdk-ui.md +2 -2
- package/.docs/guides/build-your-ui/assistant-ui.md +1 -1
- package/.docs/guides/build-your-ui/copilotkit.md +2 -2
- package/.docs/guides/deployment/digital-ocean.md +1 -1
- package/.docs/guides/deployment/inngest.md +4 -4
- package/.docs/guides/getting-started/astro.md +1 -1
- package/.docs/guides/getting-started/electron.md +1 -1
- package/.docs/guides/getting-started/next-js.md +1 -1
- package/.docs/guides/getting-started/vite-react.md +1 -1
- package/.docs/guides/guide/ai-recruiter.md +4 -4
- package/.docs/guides/guide/chef-michel.md +4 -4
- package/.docs/guides/guide/code-review-bot.md +3 -3
- package/.docs/guides/guide/dev-assistant.md +5 -5
- package/.docs/guides/guide/docs-manager.md +3 -3
- package/.docs/guides/guide/github-actions-pr-description.md +4 -4
- package/.docs/guides/guide/notes-mcp-server.md +4 -4
- package/.docs/guides/guide/research-assistant.md +4 -4
- package/.docs/guides/guide/research-coordinator.md +1 -1
- package/.docs/guides/guide/stock-agent.md +6 -6
- package/.docs/guides/guide/web-search.md +2 -2
- package/.docs/guides/guide/whatsapp-chat-bot.md +1 -1
- package/.docs/guides/migrations/agentnetwork.md +1 -1
- package/.docs/guides/migrations/ai-sdk-v4-to-v5.md +3 -3
- package/.docs/guides/migrations/network-to-supervisor.md +1 -1
- package/.docs/guides/migrations/upgrade-to-v1/agent.md +1 -1
- package/.docs/guides/migrations/upgrade-to-v1/client.md +2 -2
- package/.docs/guides/migrations/upgrade-to-v1/deployment.md +2 -2
- package/.docs/guides/migrations/upgrade-to-v1/evals.md +1 -1
- package/.docs/guides/migrations/upgrade-to-v1/mastra.md +1 -1
- package/.docs/guides/migrations/upgrade-to-v1/memory.md +2 -2
- package/.docs/guides/migrations/upgrade-to-v1/overview.md +3 -3
- package/.docs/guides/migrations/upgrade-to-v1/storage.md +4 -4
- package/.docs/guides/migrations/upgrade-to-v1/tools.md +2 -2
- package/.docs/guides/migrations/upgrade-to-v1/tracing.md +2 -2
- package/.docs/guides/migrations/upgrade-to-v1/vectors.md +3 -3
- package/.docs/guides/migrations/upgrade-to-v1/voice.md +1 -1
- package/.docs/guides/migrations/upgrade-to-v1/workflows.md +6 -6
- package/.docs/guides/migrations/vnext-to-standard-apis.md +3 -3
- package/.docs/models/embeddings.md +4 -4
- package/.docs/models/gateways/custom-gateways.md +4 -4
- package/.docs/models/gateways/netlify.md +2 -3
- package/.docs/models/gateways/openrouter.md +9 -2
- package/.docs/models/gateways/vercel.md +11 -2
- package/.docs/models/gateways.md +2 -2
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/302ai.md +3 -3
- package/.docs/models/providers/abacus.md +24 -14
- package/.docs/models/providers/aihubmix.md +10 -5
- package/.docs/models/providers/alibaba-cn.md +83 -74
- package/.docs/models/providers/alibaba-coding-plan-cn.md +78 -0
- package/.docs/models/providers/alibaba-coding-plan.md +78 -0
- package/.docs/models/providers/alibaba.md +3 -3
- package/.docs/models/providers/anthropic.md +4 -4
- package/.docs/models/providers/bailing.md +3 -3
- package/.docs/models/providers/baseten.md +3 -3
- package/.docs/models/providers/berget.md +3 -3
- package/.docs/models/providers/cerebras.md +4 -4
- package/.docs/models/providers/chutes.md +7 -6
- package/.docs/models/providers/clarifai.md +81 -0
- package/.docs/models/providers/cloudferro-sherlock.md +8 -7
- package/.docs/models/providers/cloudflare-workers-ai.md +6 -5
- package/.docs/models/providers/cortecs.md +10 -8
- package/.docs/models/providers/deepinfra.md +11 -6
- package/.docs/models/providers/deepseek.md +4 -4
- package/.docs/models/providers/drun.md +73 -0
- package/.docs/models/providers/evroc.md +3 -3
- package/.docs/models/providers/fastrouter.md +3 -3
- package/.docs/models/providers/fireworks-ai.md +3 -3
- package/.docs/models/providers/firmware.md +31 -23
- package/.docs/models/providers/friendli.md +3 -3
- package/.docs/models/providers/github-models.md +3 -3
- package/.docs/models/providers/google.md +7 -5
- package/.docs/models/providers/groq.md +4 -4
- package/.docs/models/providers/helicone.md +3 -3
- package/.docs/models/providers/huggingface.md +3 -3
- package/.docs/models/providers/iflowcn.md +3 -3
- package/.docs/models/providers/inception.md +7 -5
- package/.docs/models/providers/inference.md +3 -3
- package/.docs/models/providers/io-net.md +3 -3
- package/.docs/models/providers/jiekou.md +3 -3
- package/.docs/models/providers/kilo.md +6 -4
- package/.docs/models/providers/kimi-for-coding.md +4 -4
- package/.docs/models/providers/kuae-cloud-coding-plan.md +3 -3
- package/.docs/models/providers/llama.md +3 -3
- package/.docs/models/providers/lmstudio.md +3 -3
- package/.docs/models/providers/lucidquery.md +3 -3
- package/.docs/models/providers/meganova.md +3 -3
- package/.docs/models/providers/minimax-cn-coding-plan.md +4 -4
- package/.docs/models/providers/minimax-cn.md +4 -4
- package/.docs/models/providers/minimax-coding-plan.md +4 -4
- package/.docs/models/providers/minimax.md +4 -4
- package/.docs/models/providers/mistral.md +4 -4
- package/.docs/models/providers/moark.md +3 -3
- package/.docs/models/providers/modelscope.md +3 -3
- package/.docs/models/providers/moonshotai-cn.md +3 -3
- package/.docs/models/providers/moonshotai.md +3 -3
- package/.docs/models/providers/morph.md +3 -3
- package/.docs/models/providers/nano-gpt.md +523 -42
- package/.docs/models/providers/nebius.md +37 -37
- package/.docs/models/providers/nova.md +3 -3
- package/.docs/models/providers/novita-ai.md +3 -3
- package/.docs/models/providers/nvidia.md +7 -5
- package/.docs/models/providers/ollama-cloud.md +4 -5
- package/.docs/models/providers/openai.md +7 -5
- package/.docs/models/providers/opencode-go.md +3 -3
- package/.docs/models/providers/opencode.md +39 -36
- package/.docs/models/providers/ovhcloud.md +3 -3
- package/.docs/models/providers/perplexity-agent.md +4 -4
- package/.docs/models/providers/perplexity.md +4 -4
- package/.docs/models/providers/poe.md +11 -5
- package/.docs/models/providers/privatemode-ai.md +3 -3
- package/.docs/models/providers/qihang-ai.md +3 -3
- package/.docs/models/providers/qiniu-ai.md +23 -8
- package/.docs/models/providers/requesty.md +20 -4
- package/.docs/models/providers/scaleway.md +3 -3
- package/.docs/models/providers/siliconflow-cn.md +10 -4
- package/.docs/models/providers/siliconflow.md +3 -3
- package/.docs/models/providers/stackit.md +3 -3
- package/.docs/models/providers/stepfun.md +3 -3
- package/.docs/models/providers/submodel.md +3 -3
- package/.docs/models/providers/synthetic.md +3 -3
- package/.docs/models/providers/togetherai.md +5 -7
- package/.docs/models/providers/upstage.md +3 -3
- package/.docs/models/providers/vivgrid.md +4 -4
- package/.docs/models/providers/vultr.md +3 -3
- package/.docs/models/providers/wandb.md +3 -3
- package/.docs/models/providers/xai.md +34 -31
- package/.docs/models/providers/xiaomi.md +4 -4
- package/.docs/models/providers/zai-coding-plan.md +3 -3
- package/.docs/models/providers/zai.md +3 -3
- package/.docs/models/providers/zenmux.md +7 -5
- package/.docs/models/providers/zhipuai-coding-plan.md +3 -3
- package/.docs/models/providers/zhipuai.md +3 -3
- package/.docs/models/providers.md +4 -0
- package/.docs/reference/agents/agent.md +3 -3
- package/.docs/reference/agents/generateLegacy.md +1 -1
- package/.docs/reference/agents/getDefaultGenerateOptions.md +1 -1
- package/.docs/reference/agents/getDefaultOptions.md +1 -1
- package/.docs/reference/agents/getDefaultStreamOptions.md +1 -1
- package/.docs/reference/agents/getDescription.md +1 -1
- package/.docs/reference/agents/network.md +5 -3
- package/.docs/reference/ai-sdk/handle-chat-stream.md +2 -0
- package/.docs/reference/ai-sdk/handle-network-stream.md +2 -0
- package/.docs/reference/ai-sdk/network-route.md +2 -0
- package/.docs/reference/ai-sdk/to-ai-sdk-stream.md +1 -1
- package/.docs/reference/ai-sdk/to-ai-sdk-v4-messages.md +1 -1
- package/.docs/reference/ai-sdk/to-ai-sdk-v5-messages.md +1 -1
- package/.docs/reference/auth/auth0.md +7 -7
- package/.docs/reference/auth/better-auth.md +2 -2
- package/.docs/reference/auth/clerk.md +1 -1
- package/.docs/reference/auth/firebase.md +5 -5
- package/.docs/reference/auth/jwt.md +1 -1
- package/.docs/reference/auth/supabase.md +1 -1
- package/.docs/reference/auth/workos.md +6 -6
- package/.docs/reference/cli/mastra.md +5 -5
- package/.docs/reference/client-js/agents.md +22 -22
- package/.docs/reference/client-js/error-handling.md +2 -2
- package/.docs/reference/client-js/logs.md +2 -2
- package/.docs/reference/client-js/mastra-client.md +2 -2
- package/.docs/reference/client-js/memory.md +6 -6
- package/.docs/reference/client-js/observability.md +4 -4
- package/.docs/reference/client-js/telemetry.md +1 -1
- package/.docs/reference/client-js/tools.md +3 -3
- package/.docs/reference/client-js/vectors.md +2 -2
- package/.docs/reference/client-js/workflows.md +12 -12
- package/.docs/reference/configuration.md +62 -6
- package/.docs/reference/core/getDeployer.md +1 -1
- package/.docs/reference/core/getGatewayById.md +1 -1
- package/.docs/reference/core/getLogger.md +1 -1
- package/.docs/reference/core/getMCPServer.md +2 -2
- package/.docs/reference/core/getMCPServerById.md +2 -2
- package/.docs/reference/core/getMemory.md +1 -1
- package/.docs/reference/core/getScorer.md +4 -4
- package/.docs/reference/core/getScorerById.md +2 -2
- package/.docs/reference/core/getServer.md +1 -1
- package/.docs/reference/core/getStorage.md +1 -1
- package/.docs/reference/core/getStoredAgentById.md +3 -3
- package/.docs/reference/core/getTelemetry.md +1 -1
- package/.docs/reference/core/getWorkflow.md +1 -1
- package/.docs/reference/core/listAgents.md +1 -1
- package/.docs/reference/core/listMCPServers.md +3 -3
- package/.docs/reference/core/listMemory.md +1 -1
- package/.docs/reference/core/listScorers.md +1 -1
- package/.docs/reference/core/listStoredAgents.md +3 -3
- package/.docs/reference/core/listVectors.md +1 -1
- package/.docs/reference/core/mastra-class.md +2 -2
- package/.docs/reference/core/mastra-model-gateway.md +11 -11
- package/.docs/reference/core/setLogger.md +1 -1
- package/.docs/reference/core/setStorage.md +1 -1
- package/.docs/reference/datasets/dataset.md +2 -2
- package/.docs/reference/datasets/datasets-manager.md +1 -1
- package/.docs/reference/datasets/get.md +2 -2
- package/.docs/reference/datasets/getDetails.md +1 -1
- package/.docs/reference/datasets/listItems.md +1 -1
- package/.docs/reference/deployer/vercel.md +1 -1
- package/.docs/reference/deployer.md +4 -4
- package/.docs/reference/evals/answer-relevancy.md +4 -4
- package/.docs/reference/evals/answer-similarity.md +3 -3
- package/.docs/reference/evals/bias.md +4 -4
- package/.docs/reference/evals/completeness.md +6 -6
- package/.docs/reference/evals/content-similarity.md +3 -3
- package/.docs/reference/evals/context-precision.md +9 -9
- package/.docs/reference/evals/context-relevance.md +7 -7
- package/.docs/reference/evals/create-scorer.md +7 -7
- package/.docs/reference/evals/faithfulness.md +3 -3
- package/.docs/reference/evals/hallucination.md +8 -14
- package/.docs/reference/evals/keyword-coverage.md +4 -4
- package/.docs/reference/evals/mastra-scorer.md +7 -7
- package/.docs/reference/evals/noise-sensitivity.md +11 -11
- package/.docs/reference/evals/prompt-alignment.md +5 -5
- package/.docs/reference/evals/run-evals.md +5 -5
- package/.docs/reference/evals/scorer-utils.md +17 -17
- package/.docs/reference/evals/textual-difference.md +4 -4
- package/.docs/reference/evals/tone-consistency.md +5 -5
- package/.docs/reference/evals/tool-call-accuracy.md +10 -10
- package/.docs/reference/evals/toxicity.md +3 -3
- package/.docs/reference/harness/harness-class.md +5 -3
- package/.docs/reference/index.md +2 -0
- package/.docs/reference/memory/clone-utilities.md +7 -7
- package/.docs/reference/memory/cloneThread.md +5 -5
- package/.docs/reference/memory/createThread.md +1 -1
- package/.docs/reference/memory/deleteMessages.md +1 -1
- package/.docs/reference/memory/getThreadById.md +1 -1
- package/.docs/reference/memory/listThreads.md +3 -3
- package/.docs/reference/memory/memory-class.md +1 -1
- package/.docs/reference/memory/observational-memory.md +8 -6
- package/.docs/reference/memory/recall.md +1 -1
- package/.docs/reference/observability/tracing/bridges/otel.md +6 -6
- package/.docs/reference/observability/tracing/configuration.md +17 -17
- package/.docs/reference/observability/tracing/exporters/arize.md +4 -4
- package/.docs/reference/observability/tracing/exporters/braintrust.md +3 -3
- package/.docs/reference/observability/tracing/exporters/cloud-exporter.md +6 -6
- package/.docs/reference/observability/tracing/exporters/console-exporter.md +4 -4
- package/.docs/reference/observability/tracing/exporters/datadog.md +4 -4
- package/.docs/reference/observability/tracing/exporters/default-exporter.md +6 -6
- package/.docs/reference/observability/tracing/exporters/laminar.md +2 -2
- package/.docs/reference/observability/tracing/exporters/langfuse.md +4 -4
- package/.docs/reference/observability/tracing/exporters/langsmith.md +6 -6
- package/.docs/reference/observability/tracing/exporters/otel.md +12 -12
- package/.docs/reference/observability/tracing/exporters/posthog.md +3 -3
- package/.docs/reference/observability/tracing/exporters/sentry.md +5 -5
- package/.docs/reference/observability/tracing/instances.md +9 -9
- package/.docs/reference/observability/tracing/interfaces.md +39 -39
- package/.docs/reference/observability/tracing/processors/sensitive-data-filter.md +6 -6
- package/.docs/reference/observability/tracing/spans.md +15 -13
- package/.docs/reference/processors/message-history-processor.md +1 -1
- package/.docs/reference/processors/processor-interface.md +21 -17
- package/.docs/reference/processors/token-limiter-processor.md +2 -2
- package/.docs/reference/rag/chunk.md +2 -2
- package/.docs/reference/rag/database-config.md +8 -8
- package/.docs/reference/rag/document.md +11 -11
- package/.docs/reference/rag/embeddings.md +5 -5
- package/.docs/reference/rag/extract-params.md +8 -8
- package/.docs/reference/rag/graph-rag.md +4 -4
- package/.docs/reference/rag/metadata-filters.md +15 -15
- package/.docs/reference/rag/rerank.md +2 -2
- package/.docs/reference/rag/rerankWithScorer.md +2 -2
- package/.docs/reference/server/create-route.md +2 -0
- package/.docs/reference/server/express-adapter.md +1 -1
- package/.docs/reference/server/fastify-adapter.md +1 -1
- package/.docs/reference/server/hono-adapter.md +1 -1
- package/.docs/reference/server/koa-adapter.md +2 -2
- package/.docs/reference/server/mastra-server.md +16 -16
- package/.docs/reference/server/register-api-route.md +7 -7
- package/.docs/reference/server/routes.md +1 -1
- package/.docs/reference/storage/cloudflare-d1.md +5 -5
- package/.docs/reference/storage/cloudflare.md +3 -3
- package/.docs/reference/storage/composite.md +1 -1
- package/.docs/reference/storage/convex.md +6 -6
- package/.docs/reference/storage/dynamodb.md +7 -7
- package/.docs/reference/storage/lance.md +5 -5
- package/.docs/reference/storage/libsql.md +1 -1
- package/.docs/reference/storage/mongodb.md +6 -6
- package/.docs/reference/storage/mssql.md +4 -4
- package/.docs/reference/storage/overview.md +2 -2
- package/.docs/reference/storage/postgresql.md +7 -7
- package/.docs/reference/storage/upstash.md +4 -4
- package/.docs/reference/streaming/ChunkType.md +13 -13
- package/.docs/reference/streaming/agents/MastraModelOutput.md +6 -6
- package/.docs/reference/streaming/agents/stream.md +2 -2
- package/.docs/reference/streaming/agents/streamLegacy.md +1 -1
- package/.docs/reference/streaming/workflows/observeStream.md +2 -2
- package/.docs/reference/streaming/workflows/resumeStream.md +1 -1
- package/.docs/reference/streaming/workflows/stream.md +1 -1
- package/.docs/reference/templates/overview.md +4 -4
- package/.docs/reference/tools/create-tool.md +10 -10
- package/.docs/reference/tools/document-chunker-tool.md +4 -4
- package/.docs/reference/tools/graph-rag-tool.md +7 -7
- package/.docs/reference/tools/mcp-client.md +13 -13
- package/.docs/reference/tools/mcp-server.md +27 -27
- package/.docs/reference/tools/vector-query-tool.md +12 -12
- package/.docs/reference/vectors/astra.md +13 -13
- package/.docs/reference/vectors/chroma.md +18 -18
- package/.docs/reference/vectors/convex.md +15 -15
- package/.docs/reference/vectors/couchbase.md +21 -21
- package/.docs/reference/vectors/duckdb.md +17 -17
- package/.docs/reference/vectors/elasticsearch.md +14 -14
- package/.docs/reference/vectors/lance.md +22 -22
- package/.docs/reference/vectors/libsql.md +15 -15
- package/.docs/reference/vectors/mongodb.md +18 -18
- package/.docs/reference/vectors/opensearch.md +11 -11
- package/.docs/reference/vectors/pg.md +23 -21
- package/.docs/reference/vectors/pinecone.md +15 -15
- package/.docs/reference/vectors/qdrant.md +15 -15
- package/.docs/reference/vectors/s3vectors.md +22 -22
- package/.docs/reference/vectors/turbopuffer.md +14 -14
- package/.docs/reference/vectors/upstash.md +15 -15
- package/.docs/reference/vectors/vectorize.md +16 -16
- package/.docs/reference/voice/azure.md +12 -10
- package/.docs/reference/voice/cloudflare.md +9 -7
- package/.docs/reference/voice/composite-voice.md +5 -5
- package/.docs/reference/voice/deepgram.md +5 -5
- package/.docs/reference/voice/elevenlabs.md +7 -7
- package/.docs/reference/voice/google-gemini-live.md +22 -22
- package/.docs/reference/voice/google.md +12 -12
- package/.docs/reference/voice/mastra-voice.md +18 -18
- package/.docs/reference/voice/murf.md +8 -8
- package/.docs/reference/voice/openai-realtime.md +19 -17
- package/.docs/reference/voice/openai.md +12 -8
- package/.docs/reference/voice/playai.md +9 -7
- package/.docs/reference/voice/sarvam.md +8 -6
- package/.docs/reference/voice/speechify.md +11 -9
- package/.docs/reference/voice/voice.addInstructions.md +4 -4
- package/.docs/reference/voice/voice.addTools.md +3 -3
- package/.docs/reference/voice/voice.answer.md +2 -2
- package/.docs/reference/voice/voice.close.md +4 -4
- package/.docs/reference/voice/voice.connect.md +9 -7
- package/.docs/reference/voice/voice.events.md +4 -4
- package/.docs/reference/voice/voice.getSpeakers.md +4 -4
- package/.docs/reference/voice/voice.listen.md +17 -11
- package/.docs/reference/voice/voice.off.md +4 -4
- package/.docs/reference/voice/voice.on.md +5 -5
- package/.docs/reference/voice/voice.send.md +2 -2
- package/.docs/reference/voice/voice.speak.md +19 -9
- package/.docs/reference/voice/voice.updateConfig.md +4 -4
- package/.docs/reference/workflows/run-methods/startAsync.md +1 -1
- package/.docs/reference/workflows/run-methods/timeTravel.md +1 -1
- package/.docs/reference/workflows/run.md +3 -3
- package/.docs/reference/workflows/step.md +2 -2
- package/.docs/reference/workflows/workflow-methods/create-run.md +1 -1
- package/.docs/reference/workflows/workflow.md +1 -1
- package/.docs/reference/workspace/blaxel-sandbox.md +164 -0
- package/.docs/reference/workspace/daytona-sandbox.md +50 -141
- package/.docs/reference/workspace/e2b-sandbox.md +41 -77
- package/.docs/reference/workspace/filesystem.md +25 -11
- package/.docs/reference/workspace/gcs-filesystem.md +21 -1
- package/.docs/reference/workspace/local-filesystem.md +24 -10
- package/.docs/reference/workspace/local-sandbox.md +27 -102
- package/.docs/reference/workspace/process-manager.md +296 -0
- package/.docs/reference/workspace/s3-filesystem.md +21 -1
- package/.docs/reference/workspace/sandbox.md +9 -1
- package/.docs/reference/workspace/workspace-class.md +95 -27
- package/CHANGELOG.md +15 -0
- package/dist/tools/course.d.ts +7 -27
- package/dist/tools/course.d.ts.map +1 -1
- package/dist/tools/docs.d.ts +6 -18
- package/dist/tools/docs.d.ts.map +1 -1
- package/dist/tools/embedded-docs.d.ts +12 -112
- package/dist/tools/embedded-docs.d.ts.map +1 -1
- package/dist/tools/migration.d.ts +6 -26
- package/dist/tools/migration.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Metadata
|
|
1
|
+
# Metadata filters
|
|
2
2
|
|
|
3
3
|
Mastra provides a unified metadata filtering syntax across all vector stores, based on MongoDB/Sift query syntax. Each vector store translates these filters into their native format.
|
|
4
4
|
|
|
5
|
-
## Basic
|
|
5
|
+
## Basic example
|
|
6
6
|
|
|
7
7
|
```typescript
|
|
8
8
|
import { PgVector } from '@mastra/pg'
|
|
@@ -24,7 +24,7 @@ const results = await store.query({
|
|
|
24
24
|
})
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
## Supported
|
|
27
|
+
## Supported operators
|
|
28
28
|
|
|
29
29
|
### Basic Comparison
|
|
30
30
|
|
|
@@ -46,9 +46,9 @@ const results = await store.query({
|
|
|
46
46
|
|
|
47
47
|
`$contains`Text contains substring{ description: { $contains: "sale" } }Supported by: Upstash, libSQL, PgVector`$regex`Regular expression match{ name: { $regex: "^test" } }Supported by: Qdrant, PgVector, Upstash, MongoDB`$size`Array length check{ tags: { $size: { $gt: 2 } } }Supported by: Astra, libSQL, PgVector, MongoDB`$geo`Geospatial query{ location: { $geo: { type: "radius", ... } } }Supported by: Qdrant`$datetime`Datetime range query{ created: { $datetime: { range: { gt: "2024-01-01" } } } }Supported by: Qdrant`$hasId`Vector ID existence check{ $hasId: \["id1", "id2"] }Supported by: Qdrant`$hasVector`Vector existence check{ $hasVector: true }Supported by: Qdrant
|
|
48
48
|
|
|
49
|
-
## Common
|
|
49
|
+
## Common rules and restrictions
|
|
50
50
|
|
|
51
|
-
1. Field names
|
|
51
|
+
1. Field names can't:
|
|
52
52
|
|
|
53
53
|
- Contain dots (.) unless referring to nested fields
|
|
54
54
|
- Start with $ or contain null characters
|
|
@@ -63,11 +63,11 @@ const results = await store.query({
|
|
|
63
63
|
3. Logical operators:
|
|
64
64
|
|
|
65
65
|
- Must contain valid conditions
|
|
66
|
-
-
|
|
66
|
+
- Can't be empty
|
|
67
67
|
- Must be properly nested
|
|
68
68
|
- Can only be used at top level or nested within other logical operators
|
|
69
|
-
-
|
|
70
|
-
-
|
|
69
|
+
- Can't be used at field level or nested inside a field
|
|
70
|
+
- Can't be used inside an operator
|
|
71
71
|
- Valid: `{ "$and": [{ "field": { "$gt": 100 } }] }`
|
|
72
72
|
- Valid: `{ "$or": [{ "$and": [{ "field": { "$gt": 100 } }] }] }`
|
|
73
73
|
- Invalid: `{ "field": { "$and": [{ "$gt": 100 }] } }`
|
|
@@ -76,7 +76,7 @@ const results = await store.query({
|
|
|
76
76
|
4. $not operator:
|
|
77
77
|
|
|
78
78
|
- Must be an object
|
|
79
|
-
-
|
|
79
|
+
- Can't be empty
|
|
80
80
|
- Can be used at field level or top level
|
|
81
81
|
- Valid: `{ "$not": { "field": "value" } }`
|
|
82
82
|
- Valid: `{ "field": { "$not": { "$eq": "value" } } }`
|
|
@@ -87,7 +87,7 @@ const results = await store.query({
|
|
|
87
87
|
- Valid: `{ "$and": [{ "field": { "$gt": 100 } }] }`
|
|
88
88
|
- Invalid: `{ "$and": [{ "$gt": 100 }] }`
|
|
89
89
|
|
|
90
|
-
## Store-
|
|
90
|
+
## Store-specific notes
|
|
91
91
|
|
|
92
92
|
### Astra
|
|
93
93
|
|
|
@@ -98,7 +98,7 @@ const results = await store.query({
|
|
|
98
98
|
### ChromaDB
|
|
99
99
|
|
|
100
100
|
- Where filters only return results where the filtered field exists in metadata
|
|
101
|
-
- Empty metadata fields
|
|
101
|
+
- Empty metadata fields aren't included in filter results
|
|
102
102
|
- Metadata fields must be present for negative matches (e.g., $ne won't match documents missing the field)
|
|
103
103
|
|
|
104
104
|
### Cloudflare Vectorize
|
|
@@ -109,7 +109,7 @@ const results = await store.query({
|
|
|
109
109
|
- String values are indexed up to first 64 bytes (truncated on UTF-8 boundaries)
|
|
110
110
|
- Number values use float64 precision
|
|
111
111
|
- Filter JSON must be under 2048 bytes
|
|
112
|
-
- Field names
|
|
112
|
+
- Field names can't contain dots (.) or start with $
|
|
113
113
|
- Field names limited to 512 characters
|
|
114
114
|
- Vectors must be re-upserted after creating new metadata indexes to be included in filtered results
|
|
115
115
|
- Range queries may have reduced accuracy with very large datasets (\~10M+ vectors)
|
|
@@ -186,12 +186,12 @@ const results = await store.query({
|
|
|
186
186
|
|
|
187
187
|
### Couchbase
|
|
188
188
|
|
|
189
|
-
- Currently
|
|
189
|
+
- Currently doesn't have support for metadata filters. Filtering must be done client-side after retrieving results or by using the Couchbase SDK's Search capabilities directly for more complex queries.
|
|
190
190
|
|
|
191
191
|
### Amazon S3 Vectors
|
|
192
192
|
|
|
193
|
-
- Equality values must be primitives (string/number/boolean). `null`/`undefined`, arrays, objects, and Date
|
|
194
|
-
- `$in`/`$nin` require **non-empty arrays of primitives**; Date elements are allowed and normalized to epoch ms. **Array equality**
|
|
193
|
+
- Equality values must be primitives (string/number/boolean). `null`/`undefined`, arrays, objects, and Date aren't allowed for equality. Range operators accept numbers or Date (Dates are normalized to epoch ms).
|
|
194
|
+
- `$in`/`$nin` require **non-empty arrays of primitives**; Date elements are allowed and normalized to epoch ms. **Array equality** isn't supported.
|
|
195
195
|
- Implicit AND is canonicalized (`{a:1,b:2}` → `{$and:[{a:1},{b:2}]}`). Logical operators must contain field conditions, use non-empty arrays, and appear only at the root or within other logical operators (not inside field values).
|
|
196
196
|
- Keys listed in `nonFilterableMetadataKeys` at index creation are stored but not filterable; this setting is immutable.
|
|
197
197
|
- $exists requires a boolean value.
|
|
@@ -11,7 +11,7 @@ function rerank(
|
|
|
11
11
|
): Promise<RerankResult[]>
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
## Usage
|
|
14
|
+
## Usage example
|
|
15
15
|
|
|
16
16
|
```typescript
|
|
17
17
|
import { rerank } from '@mastra/rag'
|
|
@@ -64,7 +64,7 @@ The function returns an array of `RerankResult` objects:
|
|
|
64
64
|
|
|
65
65
|
**details** (`ScoringDetails`): Detailed scoring information
|
|
66
66
|
|
|
67
|
-
### ScoringDetails
|
|
67
|
+
### `ScoringDetails`
|
|
68
68
|
|
|
69
69
|
**semantic** (`number`): Semantic relevance score (0-1)
|
|
70
70
|
|
|
@@ -11,7 +11,7 @@ function rerankWithScorer({
|
|
|
11
11
|
}): Promise<RerankResult[]>;
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
## Usage
|
|
14
|
+
## Usage example
|
|
15
15
|
|
|
16
16
|
```typescript
|
|
17
17
|
import { rerankWithScorer as rerank, CohereRelevanceScorer } from '@mastra/rag'
|
|
@@ -69,7 +69,7 @@ The function returns an array of `RerankResult` objects:
|
|
|
69
69
|
|
|
70
70
|
**details** (`ScoringDetails`): Detailed scoring information
|
|
71
71
|
|
|
72
|
-
### ScoringDetails
|
|
72
|
+
### `ScoringDetails`
|
|
73
73
|
|
|
74
74
|
**semantic** (`number`): Semantic relevance score (0-1)
|
|
75
75
|
|
|
@@ -46,6 +46,8 @@ function createRoute<TPath, TQuery, TBody, TResponse, TResponseType>(
|
|
|
46
46
|
|
|
47
47
|
**deprecated** (`boolean`): Mark route as deprecated
|
|
48
48
|
|
|
49
|
+
**onValidationError** (`(error: ZodError, context: 'query' | 'body' | 'path') => { status: number; body: unknown } | undefined`): Custom validation error handler for this route. Overrides the server-level \`onValidationError\` hook. Return \`{ status, body }\` to customize the response, or \`undefined\` to use the default.
|
|
50
|
+
|
|
49
51
|
## Handler parameters
|
|
50
52
|
|
|
51
53
|
The handler receives validated parameters plus runtime context:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Koa
|
|
1
|
+
# Koa adapter
|
|
2
2
|
|
|
3
3
|
The `@mastra/koa` package provides a server adapter for running Mastra with [Koa](https://koajs.com).
|
|
4
4
|
|
|
@@ -97,7 +97,7 @@ const server = new MastraServer({ app, mastra })
|
|
|
97
97
|
await server.init()
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
-
The [`server.onError`](https://mastra.ai/reference/configuration) hook is also supported. When configured, it
|
|
100
|
+
The [`server.onError`](https://mastra.ai/reference/configuration) hook is also supported. When configured, it's called before the error propagates to middleware, and its response is used directly:
|
|
101
101
|
|
|
102
102
|
```typescript
|
|
103
103
|
const mastra = new Mastra({
|
|
@@ -52,7 +52,7 @@ constructor(options: MastraServerOptions<TApp>)
|
|
|
52
52
|
|
|
53
53
|
These methods must be implemented by adapters:
|
|
54
54
|
|
|
55
|
-
### registerContextMiddleware()
|
|
55
|
+
### `registerContextMiddleware()`
|
|
56
56
|
|
|
57
57
|
Attach Mastra context to every request.
|
|
58
58
|
|
|
@@ -67,7 +67,7 @@ abstract registerContextMiddleware(): void
|
|
|
67
67
|
- `tools` - Available tools
|
|
68
68
|
- `abortSignal` - Request cancellation signal
|
|
69
69
|
|
|
70
|
-
### registerAuthMiddleware()
|
|
70
|
+
### `registerAuthMiddleware()`
|
|
71
71
|
|
|
72
72
|
Register authentication and authorization middleware.
|
|
73
73
|
|
|
@@ -75,7 +75,7 @@ Register authentication and authorization middleware.
|
|
|
75
75
|
abstract registerAuthMiddleware(): void
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
### registerRoute()
|
|
78
|
+
### `registerRoute()`
|
|
79
79
|
|
|
80
80
|
Register a single route with the framework.
|
|
81
81
|
|
|
@@ -87,7 +87,7 @@ abstract registerRoute(
|
|
|
87
87
|
): Promise<void>
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
-
### getParams()
|
|
90
|
+
### `getParams()`
|
|
91
91
|
|
|
92
92
|
Extract parameters from the request.
|
|
93
93
|
|
|
@@ -102,7 +102,7 @@ abstract getParams(
|
|
|
102
102
|
}>
|
|
103
103
|
```
|
|
104
104
|
|
|
105
|
-
### sendResponse()
|
|
105
|
+
### `sendResponse()`
|
|
106
106
|
|
|
107
107
|
Send response based on route type.
|
|
108
108
|
|
|
@@ -114,7 +114,7 @@ abstract sendResponse(
|
|
|
114
114
|
): Promise<unknown>
|
|
115
115
|
```
|
|
116
116
|
|
|
117
|
-
### stream()
|
|
117
|
+
### `stream()`
|
|
118
118
|
|
|
119
119
|
Handle streaming responses.
|
|
120
120
|
|
|
@@ -128,7 +128,7 @@ abstract stream(
|
|
|
128
128
|
|
|
129
129
|
## Instance methods
|
|
130
130
|
|
|
131
|
-
### init()
|
|
131
|
+
### `init()`
|
|
132
132
|
|
|
133
133
|
Initialize the server by registering all middleware and routes.
|
|
134
134
|
|
|
@@ -142,7 +142,7 @@ Calls in order:
|
|
|
142
142
|
2. `registerAuthMiddleware()`
|
|
143
143
|
3. `registerRoutes()`
|
|
144
144
|
|
|
145
|
-
### registerRoutes()
|
|
145
|
+
### `registerRoutes()`
|
|
146
146
|
|
|
147
147
|
Register all Mastra routes.
|
|
148
148
|
|
|
@@ -150,7 +150,7 @@ Register all Mastra routes.
|
|
|
150
150
|
async registerRoutes(): Promise<void>
|
|
151
151
|
```
|
|
152
152
|
|
|
153
|
-
### getApp()
|
|
153
|
+
### `getApp()`
|
|
154
154
|
|
|
155
155
|
Get the framework app instance.
|
|
156
156
|
|
|
@@ -158,7 +158,7 @@ Get the framework app instance.
|
|
|
158
158
|
getApp<T = TApp>(): T
|
|
159
159
|
```
|
|
160
160
|
|
|
161
|
-
### parsePathParams()
|
|
161
|
+
### `parsePathParams()`
|
|
162
162
|
|
|
163
163
|
Validate path parameters with the route's Zod schema.
|
|
164
164
|
|
|
@@ -169,7 +169,7 @@ async parsePathParams(
|
|
|
169
169
|
): Promise<Record<string, unknown>>
|
|
170
170
|
```
|
|
171
171
|
|
|
172
|
-
### parseQueryParams()
|
|
172
|
+
### `parseQueryParams()`
|
|
173
173
|
|
|
174
174
|
Validate query parameters with the route's Zod schema.
|
|
175
175
|
|
|
@@ -180,7 +180,7 @@ async parseQueryParams(
|
|
|
180
180
|
): Promise<Record<string, unknown>>
|
|
181
181
|
```
|
|
182
182
|
|
|
183
|
-
### parseBody()
|
|
183
|
+
### `parseBody()`
|
|
184
184
|
|
|
185
185
|
Validate request body with the route's Zod schema.
|
|
186
186
|
|
|
@@ -191,7 +191,7 @@ async parseBody(
|
|
|
191
191
|
): Promise<unknown>
|
|
192
192
|
```
|
|
193
193
|
|
|
194
|
-
### registerOpenAPIRoute()
|
|
194
|
+
### `registerOpenAPIRoute()`
|
|
195
195
|
|
|
196
196
|
Register an endpoint that serves the OpenAPI specification.
|
|
197
197
|
|
|
@@ -205,7 +205,7 @@ async registerOpenAPIRoute(
|
|
|
205
205
|
|
|
206
206
|
## Protected methods
|
|
207
207
|
|
|
208
|
-
### mergeRequestContext()
|
|
208
|
+
### `mergeRequestContext()`
|
|
209
209
|
|
|
210
210
|
Merge request context from multiple sources (query params and body).
|
|
211
211
|
|
|
@@ -218,7 +218,7 @@ protected mergeRequestContext(options: {
|
|
|
218
218
|
|
|
219
219
|
## Types
|
|
220
220
|
|
|
221
|
-
### BodyLimitOptions
|
|
221
|
+
### `BodyLimitOptions`
|
|
222
222
|
|
|
223
223
|
```typescript
|
|
224
224
|
interface BodyLimitOptions {
|
|
@@ -227,7 +227,7 @@ interface BodyLimitOptions {
|
|
|
227
227
|
}
|
|
228
228
|
```
|
|
229
229
|
|
|
230
|
-
### StreamOptions
|
|
230
|
+
### `StreamOptions`
|
|
231
231
|
|
|
232
232
|
```typescript
|
|
233
233
|
interface StreamOptions {
|
|
@@ -18,7 +18,7 @@ The URL path for the route. Supports path parameters using `:param` syntax.
|
|
|
18
18
|
registerApiRoute("/items/:itemId", { ... })
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
**Note:** Paths
|
|
21
|
+
**Note:** Paths can't start with `/api/` as this prefix is reserved for Mastra server routes.
|
|
22
22
|
|
|
23
23
|
### options
|
|
24
24
|
|
|
@@ -32,9 +32,9 @@ registerApiRoute("/items/:itemId", { ... })
|
|
|
32
32
|
|
|
33
33
|
**openapi** (`DescribeRouteOptions`): OpenAPI metadata for Swagger UI documentation
|
|
34
34
|
|
|
35
|
-
## OpenAPI
|
|
35
|
+
## OpenAPI options
|
|
36
36
|
|
|
37
|
-
The `openapi` property accepts standard OpenAPI 3.1 operation fields from [hono-openapi](https://github.com/honojs/middleware/tree/main/packages/openapi). Routes without an `openapi` property
|
|
37
|
+
The `openapi` property accepts standard OpenAPI 3.1 operation fields from [hono-openapi](https://github.com/honojs/middleware/tree/main/packages/openapi). Routes without an `openapi` property aren't included in Swagger UI.
|
|
38
38
|
|
|
39
39
|
**summary** (`string`): Short summary of the operation
|
|
40
40
|
|
|
@@ -52,11 +52,11 @@ The `openapi` property accepts standard OpenAPI 3.1 operation fields from [hono-
|
|
|
52
52
|
|
|
53
53
|
**security** (`SecurityRequirementObject[]`): Security requirements for the operation
|
|
54
54
|
|
|
55
|
-
## Return
|
|
55
|
+
## Return value
|
|
56
56
|
|
|
57
57
|
Returns an `ApiRoute` object to be passed to `server.apiRoutes` in the Mastra configuration.
|
|
58
58
|
|
|
59
|
-
## Handler
|
|
59
|
+
## Handler context
|
|
60
60
|
|
|
61
61
|
The handler receives a Hono `Context` object with access to:
|
|
62
62
|
|
|
@@ -201,7 +201,7 @@ registerApiRoute('/items/:itemId', {
|
|
|
201
201
|
})
|
|
202
202
|
```
|
|
203
203
|
|
|
204
|
-
### Using createHandler
|
|
204
|
+
### Using `createHandler()`
|
|
205
205
|
|
|
206
206
|
For routes that need async initialization:
|
|
207
207
|
|
|
@@ -219,7 +219,7 @@ registerApiRoute('/dynamic', {
|
|
|
219
219
|
})
|
|
220
220
|
```
|
|
221
221
|
|
|
222
|
-
## Error
|
|
222
|
+
## Error handling
|
|
223
223
|
|
|
224
224
|
Throw errors with status codes using Hono's `HTTPException`:
|
|
225
225
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Cloudflare D1
|
|
1
|
+
# Cloudflare D1 storage
|
|
2
2
|
|
|
3
3
|
The Cloudflare D1 storage implementation provides a serverless SQL database solution using Cloudflare D1, supporting relational operations and transactional consistency.
|
|
4
4
|
|
|
5
|
-
> **Observability Not Supported:** Cloudflare D1 storage **
|
|
5
|
+
> **Observability Not Supported:** Cloudflare D1 storage **doesn't support the observability domain**. Traces from the `DefaultExporter` can't be persisted to D1, and Mastra Studio's observability features won't work with D1 as your only storage provider. To enable observability, use [composite storage](https://mastra.ai/reference/storage/composite) to route observability data to a supported provider like ClickHouse or PostgreSQL.
|
|
6
6
|
|
|
7
7
|
> **Row Size Limit:** Cloudflare D1 enforces a **1 MiB maximum row size**. This limit can be exceeded when storing messages with base64-encoded attachments such as images. See [Handling large attachments](https://mastra.ai/docs/memory/storage) for workarounds including uploading attachments to external storage.
|
|
8
8
|
|
|
@@ -85,7 +85,7 @@ export default {
|
|
|
85
85
|
> - The **property name** (`D1Database`) must match the `binding` name in your `wrangler.toml`
|
|
86
86
|
> - The **type** (`: D1Database`) is from `@cloudflare/workers-types` for TypeScript type checking
|
|
87
87
|
>
|
|
88
|
-
> At runtime, Cloudflare Workers provides the actual D1 database instance via `env.D1Database`. You
|
|
88
|
+
> At runtime, Cloudflare Workers provides the actual D1 database instance via `env.D1Database`. You can't use `D1Database` directly outside of the worker's context.
|
|
89
89
|
|
|
90
90
|
### Using with REST API
|
|
91
91
|
|
|
@@ -139,7 +139,7 @@ Or in `wrangler.jsonc`:
|
|
|
139
139
|
|
|
140
140
|
**tablePrefix** (`string`): Optional prefix for all table names (useful for environment isolation)
|
|
141
141
|
|
|
142
|
-
## Additional
|
|
142
|
+
## Additional notes
|
|
143
143
|
|
|
144
144
|
### Schema Management
|
|
145
145
|
|
|
@@ -207,7 +207,7 @@ export default {
|
|
|
207
207
|
}
|
|
208
208
|
```
|
|
209
209
|
|
|
210
|
-
> **Warning:** If `init()`
|
|
210
|
+
> **Warning:** If `init()` isn't called, tables won't be created and storage operations will fail silently or throw errors.
|
|
211
211
|
|
|
212
212
|
### Transactions & Consistency
|
|
213
213
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Cloudflare
|
|
1
|
+
# Cloudflare storage
|
|
2
2
|
|
|
3
3
|
The Cloudflare KV storage implementation provides a globally distributed, serverless key-value store solution using Cloudflare Workers KV.
|
|
4
4
|
|
|
5
|
-
> **Observability Not Supported:** Cloudflare KV storage **
|
|
5
|
+
> **Observability Not Supported:** Cloudflare KV storage **doesn't support the observability domain**. Traces from the `DefaultExporter` can't be persisted to KV, and Mastra Studio's observability features won't work with Cloudflare KV as your only storage provider. To enable observability, use [composite storage](https://mastra.ai/reference/storage/composite) to route observability data to a supported provider like ClickHouse or PostgreSQL.
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
@@ -69,7 +69,7 @@ const storageRest = new CloudflareStore({
|
|
|
69
69
|
|
|
70
70
|
**keyPrefix** (`string`): Optional prefix for all keys (useful for environment isolation)
|
|
71
71
|
|
|
72
|
-
### Additional
|
|
72
|
+
### Additional notes
|
|
73
73
|
|
|
74
74
|
### Schema Management
|
|
75
75
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Convex
|
|
1
|
+
# Convex storage
|
|
2
2
|
|
|
3
3
|
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.
|
|
4
4
|
|
|
5
|
-
> **Observability Not Supported:** Convex storage **
|
|
5
|
+
> **Observability Not Supported:** Convex storage **doesn't support the observability domain**. Traces from the `DefaultExporter` can't be persisted to Convex, and Mastra Studio's observability features won't work with Convex as your only storage provider. To enable observability, use [composite storage](https://mastra.ai/reference/storage/composite) to route observability data to a supported provider like ClickHouse or PostgreSQL.
|
|
6
6
|
|
|
7
7
|
> **Record Size Limit:** Convex enforces a **1 MiB maximum record size**. This limit can be exceeded when storing messages with base64-encoded attachments such as images. See [Handling large attachments](https://mastra.ai/docs/memory/storage) for workarounds including uploading attachments to external storage like S3, Cloudflare R2, or [Convex file storage](https://docs.convex.dev/file-storage).
|
|
8
8
|
|
|
@@ -32,7 +32,7 @@ yarn add @mastra/convex@latest
|
|
|
32
32
|
bun add @mastra/convex@latest
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
## Convex
|
|
35
|
+
## Convex setup
|
|
36
36
|
|
|
37
37
|
Before using `ConvexStore`, you need to set up the Convex schema and storage handler in your Convex project.
|
|
38
38
|
|
|
@@ -103,7 +103,7 @@ const storage = new ConvexStore({
|
|
|
103
103
|
|
|
104
104
|
**storageFunction** (`string`): Path to the storage mutation function (default: 'mastra/storage:handle') (Default: `mastra/storage:handle`)
|
|
105
105
|
|
|
106
|
-
## Constructor
|
|
106
|
+
## Constructor examples
|
|
107
107
|
|
|
108
108
|
```ts
|
|
109
109
|
import { ConvexStore } from '@mastra/convex'
|
|
@@ -124,7 +124,7 @@ const storeCustom = new ConvexStore({
|
|
|
124
124
|
})
|
|
125
125
|
```
|
|
126
126
|
|
|
127
|
-
## Additional
|
|
127
|
+
## Additional notes
|
|
128
128
|
|
|
129
129
|
### Schema Management
|
|
130
130
|
|
|
@@ -148,7 +148,7 @@ All typed tables include:
|
|
|
148
148
|
|
|
149
149
|
This design ensures compatibility with Mastra's storage contract while leveraging Convex's automatic indexing and real-time capabilities.
|
|
150
150
|
|
|
151
|
-
### Environment
|
|
151
|
+
### Environment variables
|
|
152
152
|
|
|
153
153
|
Set these environment variables for your deployment:
|
|
154
154
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# DynamoDB
|
|
1
|
+
# DynamoDB storage
|
|
2
2
|
|
|
3
3
|
The DynamoDB storage implementation provides a scalable and performant NoSQL database solution for Mastra, leveraging a single-table design pattern with [ElectroDB](https://electrodb.dev/).
|
|
4
4
|
|
|
5
|
-
> **Observability Not Supported:** DynamoDB storage **
|
|
5
|
+
> **Observability Not Supported:** DynamoDB storage **doesn't support the observability domain**. Traces from the `DefaultExporter` can't be persisted to DynamoDB, and Mastra Studio's observability features won't work with DynamoDB as your only storage provider. To enable observability, use [composite storage](https://mastra.ai/reference/storage/composite) to route observability data to a supported provider like ClickHouse or PostgreSQL.
|
|
6
6
|
|
|
7
7
|
> **Item Size Limit:** DynamoDB enforces a **400 KB maximum item size**. This limit can be exceeded when storing messages with base64-encoded attachments such as images. See [Handling large attachments](https://mastra.ai/docs/memory/storage) for workarounds including uploading attachments to external storage.
|
|
8
8
|
|
|
@@ -120,7 +120,7 @@ For local development, you can use [DynamoDB Local](https://docs.aws.amazon.com/
|
|
|
120
120
|
|
|
121
121
|
**config.ttl** (`object`): TTL (Time To Live) configuration for automatic data expiration. Configure per entity type: thread, message, trace, eval, workflow\_snapshot, resource, score. Each entity config includes: enabled (boolean), attributeName (string, default: 'ttl'), defaultTtlSeconds (number).
|
|
122
122
|
|
|
123
|
-
## TTL (
|
|
123
|
+
## TTL (time to live) configuration
|
|
124
124
|
|
|
125
125
|
DynamoDB TTL allows you to automatically delete items after a specified time period. This is useful for:
|
|
126
126
|
|
|
@@ -211,12 +211,12 @@ aws dynamodb update-time-to-live \
|
|
|
211
211
|
1. Go to the DynamoDB console
|
|
212
212
|
2. Select your table
|
|
213
213
|
3. Go to "Additional settings" tab
|
|
214
|
-
4. Under "Time to Live (TTL)",
|
|
214
|
+
4. Under "Time to Live (TTL)", select "Manage TTL"
|
|
215
215
|
5. Enable TTL and specify the attribute name (default: `ttl`)
|
|
216
216
|
|
|
217
217
|
> **Note:** DynamoDB deletes expired items within 48 hours after expiration. Items remain queryable until actually deleted.
|
|
218
218
|
|
|
219
|
-
## AWS IAM
|
|
219
|
+
## AWS IAM permissions
|
|
220
220
|
|
|
221
221
|
The IAM role or user executing the code needs appropriate permissions to interact with the specified DynamoDB table and its indexes. Below is a sample policy. Replace `${YOUR_TABLE_NAME}` with your actual table name and `${YOUR_AWS_REGION}` and `${YOUR_AWS_ACCOUNT_ID}` with appropriate values.
|
|
222
222
|
|
|
@@ -246,7 +246,7 @@ The IAM role or user executing the code needs appropriate permissions to interac
|
|
|
246
246
|
}
|
|
247
247
|
```
|
|
248
248
|
|
|
249
|
-
## Key
|
|
249
|
+
## Key considerations
|
|
250
250
|
|
|
251
251
|
Before diving into the architectural details, keep these key points in mind when working with the DynamoDB storage adapter:
|
|
252
252
|
|
|
@@ -255,7 +255,7 @@ Before diving into the architectural details, keep these key points in mind when
|
|
|
255
255
|
- **Understanding GSIs:** Familiarity with how the GSIs are structured (as per `TABLE_SETUP.md`) is important for understanding data retrieval and potential query patterns.
|
|
256
256
|
- **ElectroDB:** The adapter uses ElectroDB to manage interactions with DynamoDB, providing a layer of abstraction and type safety over raw DynamoDB operations.
|
|
257
257
|
|
|
258
|
-
## Architectural
|
|
258
|
+
## Architectural approach
|
|
259
259
|
|
|
260
260
|
This storage adapter utilizes a **single-table design pattern** leveraging [ElectroDB](https://electrodb.dev/), a common and recommended approach for DynamoDB. This differs architecturally from relational database adapters (like `@mastra/pg` or `@mastra/libsql`) that typically use multiple tables, each dedicated to a specific entity (threads, messages, etc.).
|
|
261
261
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# LanceDB
|
|
1
|
+
# LanceDB storage
|
|
2
2
|
|
|
3
3
|
The LanceDB storage implementation provides a high-performance storage solution using the LanceDB database system, which excels at handling both traditional data storage and vector operations.
|
|
4
4
|
|
|
5
|
-
> **Observability Not Supported:** LanceDB storage **
|
|
5
|
+
> **Observability Not Supported:** LanceDB storage **doesn't support the observability domain**. Traces from the `DefaultExporter` can't be persisted to LanceDB, and Mastra Studio's observability features won't work with LanceDB as your only storage provider. To enable observability, use [composite storage](https://mastra.ai/reference/storage/composite) to route observability data to a supported provider like ClickHouse or PostgreSQL.
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
@@ -51,7 +51,7 @@ const storage = await LanceStorage.create('my-storage', 's3://bucket/db', {
|
|
|
51
51
|
|
|
52
52
|
## Parameters
|
|
53
53
|
|
|
54
|
-
### LanceStorage.create()
|
|
54
|
+
### `LanceStorage.create()`
|
|
55
55
|
|
|
56
56
|
**name** (`string`): Name identifier for the storage instance
|
|
57
57
|
|
|
@@ -59,7 +59,7 @@ const storage = await LanceStorage.create('my-storage', 's3://bucket/db', {
|
|
|
59
59
|
|
|
60
60
|
**options** (`ConnectionOptions`): Connection options for LanceDB, such as timeout settings, authentication, etc.
|
|
61
61
|
|
|
62
|
-
## Additional
|
|
62
|
+
## Additional notes
|
|
63
63
|
|
|
64
64
|
### Schema Management
|
|
65
65
|
|
|
@@ -101,7 +101,7 @@ const memoryStore = await storage.getStore('memory')
|
|
|
101
101
|
const thread = await memoryStore?.getThreadById({ threadId: '...' })
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
-
> **Warning:** If `init()`
|
|
104
|
+
> **Warning:** If `init()` isn't called, tables won't be created and storage operations will fail silently or throw errors.
|
|
105
105
|
|
|
106
106
|
### Deployment Options
|
|
107
107
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# MongoDB
|
|
1
|
+
# MongoDB storage
|
|
2
2
|
|
|
3
3
|
The MongoDB storage implementation provides a scalable storage solution using MongoDB databases with support for both document storage and vector operations.
|
|
4
4
|
|
|
@@ -56,7 +56,7 @@ const storage = new MongoDBStore({
|
|
|
56
56
|
|
|
57
57
|
> **Deprecation Notice:** The `url` parameter is deprecated but still supported for backward compatibility. Please use `uri` instead in all new code.
|
|
58
58
|
|
|
59
|
-
## Constructor
|
|
59
|
+
## Constructor examples
|
|
60
60
|
|
|
61
61
|
You can instantiate `MongoDBStore` in the following ways:
|
|
62
62
|
|
|
@@ -84,7 +84,7 @@ const store2 = new MongoDBStore({
|
|
|
84
84
|
})
|
|
85
85
|
```
|
|
86
86
|
|
|
87
|
-
## Additional
|
|
87
|
+
## Additional notes
|
|
88
88
|
|
|
89
89
|
### Collection Management
|
|
90
90
|
|
|
@@ -136,9 +136,9 @@ const memoryStore = await storage.getStore('memory')
|
|
|
136
136
|
const thread = await memoryStore?.getThreadById({ threadId: '...' })
|
|
137
137
|
```
|
|
138
138
|
|
|
139
|
-
> **Warning:** If `init()`
|
|
139
|
+
> **Warning:** If `init()` isn't called, collections won't be created and storage operations will fail silently or throw errors.
|
|
140
140
|
|
|
141
|
-
## Vector
|
|
141
|
+
## Vector search capabilities
|
|
142
142
|
|
|
143
143
|
MongoDB storage includes built-in vector search capabilities for AI applications:
|
|
144
144
|
|
|
@@ -190,7 +190,7 @@ const results = await vectorStore.query({
|
|
|
190
190
|
});
|
|
191
191
|
```
|
|
192
192
|
|
|
193
|
-
## Usage
|
|
193
|
+
## Usage example
|
|
194
194
|
|
|
195
195
|
### Adding memory to an agent
|
|
196
196
|
|