@mastra/mcp-docs-server 1.3.10-alpha.0 → 1.3.10-alpha.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/docs/agents/guardrails.md +8 -0
- package/.docs/docs/agents/human-in-the-loop.md +9 -0
- package/.docs/docs/agents/processors.md +3 -0
- package/.docs/docs/agents/tools.md +5 -0
- package/.docs/docs/channels.md +15 -0
- package/.docs/docs/deployment/mastra-server.md +2 -0
- package/.docs/docs/deployment/monorepo.md +2 -0
- package/.docs/docs/evals/overview.md +2 -0
- package/.docs/docs/harness/background-tasks.md +4 -0
- package/.docs/docs/harness/durable-agents.md +6 -1
- package/.docs/docs/harness/goals.md +2 -0
- package/.docs/docs/harness/schedules.md +5 -0
- package/.docs/docs/mastra-platform/connect/providers.md +27 -26
- package/.docs/docs/mastra-platform/deploy.md +2 -0
- package/.docs/docs/mastra-platform/server.md +10 -6
- package/.docs/docs/mastra-platform/studio.md +1 -1
- package/.docs/docs/mastra-platform/system-environment-variables.md +3 -0
- package/.docs/docs/mastra-platform/workspaces.md +1 -1
- package/.docs/docs/memory/message-history.md +3 -0
- package/.docs/docs/memory/observational-memory.md +10 -0
- package/.docs/docs/memory/overview.md +6 -0
- package/.docs/docs/memory/semantic-recall.md +5 -1
- package/.docs/docs/observability/integrations/exporters/mastra-storage.md +2 -1
- package/.docs/docs/observability/logging.md +3 -0
- package/.docs/docs/observability/tracing/overview.md +16 -0
- package/.docs/docs/sandbox/search.md +11 -0
- package/.docs/docs/server/custom-adapters.md +53 -1
- package/.docs/docs/server/custom-api-routes.md +2 -0
- package/.docs/docs/server/request-context.md +6 -0
- package/.docs/docs/signals/thread-streams.md +34 -3
- package/.docs/docs/studio/overview.md +2 -0
- package/.docs/docs/subagents.md +7 -1
- package/.docs/docs/workflows/agents-and-tools.md +16 -1
- package/.docs/docs/workflows/control-flow.md +57 -0
- package/.docs/docs/workflows/human-in-the-loop.md +3 -0
- package/.docs/docs/workflows/overview.md +9 -1
- package/.docs/docs/workflows/scheduled-workflows.md +10 -2
- package/.docs/docs/workflows/suspend-and-resume.md +6 -0
- package/.docs/docs/workflows/workflow-state.md +12 -0
- package/.docs/integrations/agentic-ui/copilotkit.md +2 -0
- package/.docs/integrations/auth/better-auth.md +2 -0
- package/.docs/integrations/auth/google.md +2 -0
- package/.docs/integrations/auth/okta.md +2 -0
- package/.docs/integrations/databases/aurora-dsql.md +2 -2
- package/.docs/integrations/databases/dynamodb.md +4 -4
- package/.docs/integrations/databases/postgresql.md +4 -4
- package/.docs/integrations/deploy/inngest.md +1 -0
- package/.docs/integrations/file-storage/archil.md +3 -3
- package/.docs/integrations/file-storage/mesa.md +1 -1
- package/.docs/integrations/observability/datadog.md +5 -0
- package/.docs/integrations/observability/langsmith.md +33 -0
- package/.docs/integrations/observability/opentelemetry.md +27 -4
- package/.docs/integrations/observability/sentry.md +22 -22
- package/.docs/integrations/sandboxes/cloudflare-sandbox.md +1 -1
- package/.docs/integrations/sandboxes/daytona.md +3 -3
- package/.docs/integrations/sandboxes/docker.md +1 -1
- package/.docs/integrations/sandboxes/e2b.md +5 -5
- package/.docs/integrations/sandboxes/modal.md +3 -3
- package/.docs/integrations/sandboxes/railway.md +3 -3
- package/.docs/integrations/sandboxes/vercel.md +4 -4
- package/.docs/integrations/tools/brightdata.md +1 -1
- package/.docs/integrations/tools/parallel.md +3 -3
- package/.docs/integrations/tools/perplexity.md +1 -1
- package/.docs/integrations/tools/tavily.md +1 -1
- package/.docs/integrations/voice/azure.md +4 -4
- package/.docs/integrations/voice/cloudflare.md +3 -3
- package/.docs/integrations/voice/deepgram.md +2 -2
- package/.docs/integrations/voice/elevenlabs.md +4 -4
- package/.docs/integrations/voice/gladia.md +10 -10
- package/.docs/integrations/voice/google.md +11 -11
- package/.docs/integrations/voice/inworld.md +23 -23
- package/.docs/integrations/voice/livekit.md +9 -6
- package/.docs/integrations/voice/mistral.md +2 -2
- package/.docs/integrations/voice/modelslab.md +1 -1
- package/.docs/integrations/voice/murf.md +1 -1
- package/.docs/integrations/voice/openai.md +5 -5
- package/.docs/integrations/voice/sarvam.md +6 -6
- package/.docs/integrations/voice/speechify.md +25 -12
- package/.docs/integrations/voice/xai.md +3 -3
- package/.docs/models/environment-variables.md +2 -0
- package/.docs/models/gateways/merge-gateway.md +3 -1
- package/.docs/models/gateways/neon.md +2 -1
- package/.docs/models/gateways/netlify.md +2 -5
- package/.docs/models/gateways/openrouter.md +5 -6
- package/.docs/models/gateways/vercel.md +5 -6
- package/.docs/models/index.md +9 -1
- package/.docs/models/providers/302ai.md +4 -0
- package/.docs/models/providers/abacus.md +4 -0
- package/.docs/models/providers/abliteration-ai.md +4 -0
- package/.docs/models/providers/above.md +4 -0
- package/.docs/models/providers/agentrouter.md +4 -0
- package/.docs/models/providers/agnes.md +4 -0
- package/.docs/models/providers/ai-router.md +4 -0
- package/.docs/models/providers/ai21.md +4 -0
- package/.docs/models/providers/aiand.md +8 -7
- package/.docs/models/providers/aimlapi.md +9 -10
- package/.docs/models/providers/ainetcafe.md +4 -0
- package/.docs/models/providers/aixy.md +4 -0
- package/.docs/models/providers/aki-io.md +4 -0
- package/.docs/models/providers/alibaba-cn.md +4 -0
- package/.docs/models/providers/alibaba-coding-plan-cn.md +4 -0
- package/.docs/models/providers/alibaba-coding-plan.md +4 -0
- package/.docs/models/providers/alibaba-token-plan-cn.md +4 -0
- package/.docs/models/providers/alibaba-token-plan.md +4 -0
- package/.docs/models/providers/alibaba.md +4 -0
- package/.docs/models/providers/ambient.md +5 -1
- package/.docs/models/providers/amd.md +4 -0
- package/.docs/models/providers/anthropic.md +4 -0
- package/.docs/models/providers/anyapi.md +4 -0
- package/.docs/models/providers/arcee.md +4 -0
- package/.docs/models/providers/atomic-chat.md +4 -0
- package/.docs/models/providers/auriko.md +4 -0
- package/.docs/models/providers/bailing.md +4 -0
- package/.docs/models/providers/baseten.md +4 -0
- package/.docs/models/providers/bee.md +4 -0
- package/.docs/models/providers/berget.md +4 -0
- package/.docs/models/providers/blueclaw.md +4 -0
- package/.docs/models/providers/bothub.md +4 -0
- package/.docs/models/providers/boundless.md +4 -0
- package/.docs/models/providers/cerebras.md +4 -0
- package/.docs/models/providers/chutes.md +18 -11
- package/.docs/models/providers/clarifai.md +4 -0
- package/.docs/models/providers/claudinio.md +4 -0
- package/.docs/models/providers/cline-pass.md +6 -0
- package/.docs/models/providers/cloudferro-sherlock.md +4 -0
- package/.docs/models/providers/cloudflare-workers-ai.md +4 -0
- package/.docs/models/providers/commandcode.md +6 -1
- package/.docs/models/providers/coralbricks.md +4 -0
- package/.docs/models/providers/cortecs.md +8 -3
- package/.docs/models/providers/crof.md +4 -0
- package/.docs/models/providers/crossmodel.md +4 -0
- package/.docs/models/providers/crusoe.md +4 -0
- package/.docs/models/providers/daoxe.md +4 -0
- package/.docs/models/providers/databricks.md +4 -0
- package/.docs/models/providers/deepinfra.md +4 -0
- package/.docs/models/providers/deepseek.md +4 -0
- package/.docs/models/providers/digitalocean.md +6 -1
- package/.docs/models/providers/dinference.md +4 -0
- package/.docs/models/providers/drun.md +4 -0
- package/.docs/models/providers/ebcloud.md +4 -0
- package/.docs/models/providers/echo.md +4 -0
- package/.docs/models/providers/edenai.md +22 -8
- package/.docs/models/providers/empiriolabs.md +8 -4
- package/.docs/models/providers/engy.md +4 -0
- package/.docs/models/providers/evroc.md +4 -0
- package/.docs/models/providers/fastrouter.md +4 -0
- package/.docs/models/providers/firepass.md +4 -0
- package/.docs/models/providers/fireworks-ai.md +4 -0
- package/.docs/models/providers/firmware.md +4 -0
- package/.docs/models/providers/freemodel.md +4 -0
- package/.docs/models/providers/friendli.md +15 -12
- package/.docs/models/providers/frogbot.md +4 -0
- package/.docs/models/providers/github-models.md +4 -0
- package/.docs/models/providers/gmicloud.md +4 -0
- package/.docs/models/providers/google.md +4 -0
- package/.docs/models/providers/greenpt.md +4 -0
- package/.docs/models/providers/groq.md +4 -0
- package/.docs/models/providers/helicone.md +4 -0
- package/.docs/models/providers/hetzner.md +4 -0
- package/.docs/models/providers/hpc-ai.md +4 -0
- package/.docs/models/providers/huggingface.md +6 -1
- package/.docs/models/providers/hyper.md +4 -0
- package/.docs/models/providers/iflowcn.md +4 -0
- package/.docs/models/providers/impossibl.md +4 -0
- package/.docs/models/providers/inception.md +4 -0
- package/.docs/models/providers/inceptron.md +10 -6
- package/.docs/models/providers/inco.md +4 -0
- package/.docs/models/providers/infer.md +4 -0
- package/.docs/models/providers/inference.md +4 -0
- package/.docs/models/providers/inferx.md +4 -0
- package/.docs/models/providers/infomaniak.md +4 -0
- package/.docs/models/providers/io-net.md +4 -0
- package/.docs/models/providers/iteracompute.md +4 -0
- package/.docs/models/providers/jalapeno.md +4 -0
- package/.docs/models/providers/jiekou.md +4 -0
- package/.docs/models/providers/kenari.md +4 -0
- package/.docs/models/providers/kilo.md +27 -24
- package/.docs/models/providers/kimi-code-plan-cn.md +7 -1
- package/.docs/models/providers/kimi-code-plan-global.md +7 -1
- package/.docs/models/providers/kimi-for-coding.md +4 -0
- package/.docs/models/providers/kiro.md +4 -0
- package/.docs/models/providers/klokintegration.md +4 -0
- package/.docs/models/providers/kosmik.md +4 -0
- package/.docs/models/providers/kuae-cloud-coding-plan.md +4 -0
- package/.docs/models/providers/lilac.md +4 -0
- package/.docs/models/providers/liquid.md +4 -0
- package/.docs/models/providers/llama.md +4 -0
- package/.docs/models/providers/llmgateway-providers.md +19 -9
- package/.docs/models/providers/llmgateway.md +12 -6
- package/.docs/models/providers/llmtech.md +4 -0
- package/.docs/models/providers/llmtr.md +4 -0
- package/.docs/models/providers/lmstudio.md +4 -0
- package/.docs/models/providers/longcat.md +4 -0
- package/.docs/models/providers/lowrouter.md +6 -1
- package/.docs/models/providers/lucidquery.md +4 -0
- package/.docs/models/providers/lynkr.md +4 -0
- package/.docs/models/providers/meganova.md +4 -0
- package/.docs/models/providers/melious.md +4 -0
- package/.docs/models/providers/meta.md +4 -0
- package/.docs/models/providers/minimax-cn-coding-plan.md +4 -0
- package/.docs/models/providers/minimax-cn.md +4 -0
- package/.docs/models/providers/minimax-coding-plan.md +4 -0
- package/.docs/models/providers/minimax.md +4 -0
- package/.docs/models/providers/mistral.md +4 -0
- package/.docs/models/providers/mixlayer.md +4 -0
- package/.docs/models/providers/moark.md +4 -0
- package/.docs/models/providers/modal.md +4 -0
- package/.docs/models/providers/model-oracle-ai.md +4 -0
- package/.docs/models/providers/modelis.md +4 -0
- package/.docs/models/providers/modelscope.md +4 -0
- package/.docs/models/providers/moonshotai-cn.md +8 -2
- package/.docs/models/providers/moonshotai.md +8 -2
- package/.docs/models/providers/morph.md +18 -6
- package/.docs/models/providers/munito-eu.md +84 -0
- package/.docs/models/providers/munito.md +85 -0
- package/.docs/models/providers/nan.md +4 -0
- package/.docs/models/providers/nano-gpt.md +651 -619
- package/.docs/models/providers/nearai.md +5 -1
- package/.docs/models/providers/nebius.md +33 -27
- package/.docs/models/providers/neosmith.md +4 -0
- package/.docs/models/providers/neuralwatt.md +4 -0
- package/.docs/models/providers/nova.md +4 -0
- package/.docs/models/providers/novita-ai.md +7 -1
- package/.docs/models/providers/nvidia.md +4 -0
- package/.docs/models/providers/oci.md +4 -0
- package/.docs/models/providers/ofox.md +4 -0
- package/.docs/models/providers/ollama-cloud.md +4 -0
- package/.docs/models/providers/openai.md +6 -1
- package/.docs/models/providers/opencode-go.md +8 -2
- package/.docs/models/providers/opencode.md +4 -1
- package/.docs/models/providers/openreason.md +4 -0
- package/.docs/models/providers/opper.md +4 -0
- package/.docs/models/providers/orcarouter.md +4 -0
- package/.docs/models/providers/ovhcloud.md +4 -0
- package/.docs/models/providers/pareto.md +4 -0
- package/.docs/models/providers/pendra.md +4 -0
- package/.docs/models/providers/perplexity-agent.md +4 -0
- package/.docs/models/providers/perplexity.md +4 -0
- package/.docs/models/providers/pioneer.md +4 -0
- package/.docs/models/providers/poe.md +4 -0
- package/.docs/models/providers/poolside.md +4 -0
- package/.docs/models/providers/prime.md +7 -2
- package/.docs/models/providers/privatemode-ai.md +4 -0
- package/.docs/models/providers/qihang-ai.md +4 -0
- package/.docs/models/providers/qiniu-ai.md +4 -0
- package/.docs/models/providers/reflection.md +4 -0
- package/.docs/models/providers/regolo-ai.md +4 -0
- package/.docs/models/providers/requesty.md +10 -1
- package/.docs/models/providers/routing-run.md +4 -0
- package/.docs/models/providers/runinfra.md +4 -0
- package/.docs/models/providers/sakana.md +4 -0
- package/.docs/models/providers/sambanova.md +4 -0
- package/.docs/models/providers/sarvam.md +4 -0
- package/.docs/models/providers/scaleway.md +4 -0
- package/.docs/models/providers/scnet-token-plan.md +4 -0
- package/.docs/models/providers/scx-ai.md +4 -0
- package/.docs/models/providers/scx.md +4 -0
- package/.docs/models/providers/sensenova.md +4 -0
- package/.docs/models/providers/siliconflow-cn.md +4 -0
- package/.docs/models/providers/siliconflow.md +4 -0
- package/.docs/models/providers/snowflake-cortex.md +4 -0
- package/.docs/models/providers/stackit.md +4 -0
- package/.docs/models/providers/standardcompute.md +4 -0
- package/.docs/models/providers/stepfun-ai-step-plan.md +4 -0
- package/.docs/models/providers/stepfun-ai.md +4 -0
- package/.docs/models/providers/stepfun-step-plan.md +4 -0
- package/.docs/models/providers/stepfun.md +4 -0
- package/.docs/models/providers/subconscious.md +4 -0
- package/.docs/models/providers/submodel.md +4 -0
- package/.docs/models/providers/synthetic.md +4 -0
- package/.docs/models/providers/tempr.md +4 -0
- package/.docs/models/providers/tencent-coding-plan.md +4 -0
- package/.docs/models/providers/tencent-token-plan.md +4 -0
- package/.docs/models/providers/tencent-tokenhub.md +4 -0
- package/.docs/models/providers/tensorx.md +4 -0
- package/.docs/models/providers/the-grid-ai.md +4 -0
- package/.docs/models/providers/thinkingmachines.md +4 -0
- package/.docs/models/providers/tinfoil.md +4 -0
- package/.docs/models/providers/togetherai.md +4 -0
- package/.docs/models/providers/tokengo.md +4 -0
- package/.docs/models/providers/tokenrouter.md +4 -0
- package/.docs/models/providers/trustedrouter.md +4 -0
- package/.docs/models/providers/umans-ai-coding-plan.md +4 -0
- package/.docs/models/providers/umans-ai.md +4 -0
- package/.docs/models/providers/unorouter.md +4 -0
- package/.docs/models/providers/upstage.md +4 -0
- package/.docs/models/providers/vancine.md +4 -0
- package/.docs/models/providers/vispark.md +4 -0
- package/.docs/models/providers/vivgrid.md +30 -39
- package/.docs/models/providers/volcengine-coding-plan.md +4 -0
- package/.docs/models/providers/volcengine.md +4 -0
- package/.docs/models/providers/vultr.md +4 -0
- package/.docs/models/providers/wafer.ai.md +4 -0
- package/.docs/models/providers/wallaby.md +4 -0
- package/.docs/models/providers/wandb.md +9 -5
- package/.docs/models/providers/xai.md +4 -0
- package/.docs/models/providers/xiaomi-token-plan-ams.md +4 -0
- package/.docs/models/providers/xiaomi-token-plan-cn.md +4 -0
- package/.docs/models/providers/xiaomi-token-plan-sgp.md +4 -0
- package/.docs/models/providers/xiaomi.md +4 -0
- package/.docs/models/providers/xpersona.md +4 -0
- package/.docs/models/providers/zai-coding-plan.md +4 -0
- package/.docs/models/providers/zai.md +4 -0
- package/.docs/models/providers/zeldoc.md +4 -0
- package/.docs/models/providers/zenifra.md +4 -0
- package/.docs/models/providers/zenmux.md +4 -0
- package/.docs/models/providers/zhipuai-coding-plan.md +4 -0
- package/.docs/models/providers/zhipuai.md +4 -0
- package/.docs/models/providers.md +2 -0
- package/.docs/reference/acp/acp-agent.md +1 -1
- package/.docs/reference/acp/create-acp-tool.md +1 -1
- package/.docs/reference/agent-controller/agent-controller-class.md +2 -2
- package/.docs/reference/agent-controller/session.md +5 -5
- package/.docs/reference/agents/agent.md +8 -4
- package/.docs/reference/agents/channels.md +26 -7
- package/.docs/reference/agents/createSkill.md +1 -1
- package/.docs/reference/agents/durable-agent.md +29 -21
- package/.docs/reference/agents/generate.md +4 -1
- package/.docs/reference/agents/generateLegacy.md +2 -2
- package/.docs/reference/agents/inngest-agent.md +2 -0
- package/.docs/reference/ai-sdk/to-ai-sdk-v4-messages.md +1 -1
- package/.docs/reference/auth/auth0.md +2 -2
- package/.docs/reference/auth/better-auth.md +7 -3
- package/.docs/reference/auth/clerk.md +1 -1
- package/.docs/reference/auth/firebase.md +4 -4
- package/.docs/reference/auth/google.md +6 -6
- package/.docs/reference/auth/jwt.md +1 -1
- package/.docs/reference/auth/neon.md +6 -6
- package/.docs/reference/auth/okta.md +9 -8
- package/.docs/reference/auth/workos.md +3 -3
- package/.docs/reference/browser/agent-browser.md +1 -1
- package/.docs/reference/browser/firecrawl-browser.md +1 -1
- package/.docs/reference/browser/stagehand-browser.md +1 -1
- package/.docs/reference/channels/slack-provider.md +4 -2
- package/.docs/reference/channels/teams-provider.md +2 -2
- package/.docs/reference/channels/telegram-provider.md +2 -2
- package/.docs/reference/client-js/agent-controller.md +4 -1
- package/.docs/reference/client-js/agents.md +21 -1
- package/.docs/reference/client-js/conversations.md +3 -3
- package/.docs/reference/client-js/datasets.md +1 -1
- package/.docs/reference/client-js/observability.md +13 -14
- package/.docs/reference/client-js/responses.md +4 -4
- package/.docs/reference/client-js/workflows.md +2 -0
- package/.docs/reference/code-sdk/mount-agent-controller.md +2 -2
- package/.docs/reference/coding-agent/create-coding-agent.md +1 -1
- package/.docs/reference/configuration.md +1 -1
- package/.docs/reference/connect/channels.md +2 -2
- package/.docs/reference/connect/providers.md +166 -112
- package/.docs/reference/connect/tools.md +16 -16
- package/.docs/reference/core/mastra-class.md +7 -5
- package/.docs/reference/core/mastra-model-gateway.md +6 -1
- package/.docs/reference/datasets/startExperiment.md +17 -2
- package/.docs/reference/deployer.md +6 -3
- package/.docs/reference/editor/blob-store-provider.md +2 -2
- package/.docs/reference/editor/tool-provider.md +1 -1
- package/.docs/reference/evals/answer-relevancy.md +2 -2
- package/.docs/reference/evals/answer-similarity.md +4 -2
- package/.docs/reference/evals/bias.md +2 -2
- package/.docs/reference/evals/content-similarity.md +2 -2
- package/.docs/reference/evals/hallucination.md +3 -3
- package/.docs/reference/evals/noise-sensitivity.md +1 -1
- package/.docs/reference/evals/prompt-alignment.md +10 -9
- package/.docs/reference/evals/rubric.md +1 -1
- package/.docs/reference/evals/run-evals.md +1 -1
- package/.docs/reference/evals/scorer-utils.md +6 -4
- package/.docs/reference/evals/tone-consistency.md +5 -5
- package/.docs/reference/evals/tool-call-accuracy.md +4 -4
- package/.docs/reference/evals/trajectory-accuracy.md +1 -1
- package/.docs/reference/file-based-agents/schedules.md +1 -1
- package/.docs/reference/logging/pino-logger.md +1 -1
- package/.docs/reference/memory/memory-class.md +2 -2
- package/.docs/reference/memory/observational-memory.md +10 -10
- package/.docs/reference/memory/summarizeConversation.md +1 -1
- package/.docs/reference/memory/summarizeThread.md +1 -1
- package/.docs/reference/migrations/upgrade-to-v1/storage.md +1 -1
- package/.docs/reference/migrations/upgrade-to-v1/tools.md +7 -1
- package/.docs/reference/migrations/vnext-to-standard-apis.md +1 -1
- package/.docs/reference/observability/metrics/automatic-metrics.md +10 -8
- package/.docs/reference/observability/tracing/bridges/otel.md +1 -1
- package/.docs/reference/observability/tracing/exporters/confident-ai.md +2 -2
- package/.docs/reference/observability/tracing/exporters/console-exporter.md +3 -3
- package/.docs/reference/observability/tracing/exporters/default-exporter.md +1 -1
- package/.docs/reference/observability/tracing/exporters/langsmith.md +8 -0
- package/.docs/reference/observability/tracing/exporters/mastra-platform-exporter.md +4 -0
- package/.docs/reference/observability/tracing/exporters/mastra-storage-exporter.md +5 -1
- package/.docs/reference/observability/tracing/exporters/sentry.md +5 -5
- package/.docs/reference/observability/tracing/interfaces.md +21 -1
- package/.docs/reference/processors/batch-parts-processor.md +1 -1
- package/.docs/reference/processors/classifier-processor.md +1 -1
- package/.docs/reference/processors/file-upload-processor.md +8 -8
- package/.docs/reference/processors/moderation-processor.md +1 -1
- package/.docs/reference/processors/processor-interface.md +5 -5
- package/.docs/reference/processors/provider-history-compat.md +13 -12
- package/.docs/reference/processors/response-cache.md +1 -1
- package/.docs/reference/processors/stream-error-retry-processor.md +9 -5
- package/.docs/reference/processors/system-prompt-scrubber.md +1 -1
- package/.docs/reference/processors/token-limiter-processor.md +1 -1
- package/.docs/reference/processors/tool-call-filter.md +1 -1
- package/.docs/reference/processors/tool-search-processor.md +3 -3
- package/.docs/reference/processors/unicode-normalizer.md +1 -1
- package/.docs/reference/pubsub/redis-streams.md +10 -0
- package/.docs/reference/pubsub/unix-socket-pubsub.md +1 -1
- package/.docs/reference/rag/chunking-and-embedding.md +1 -1
- package/.docs/reference/rag/database-config.md +20 -15
- package/.docs/reference/rag/extract-params.md +2 -2
- package/.docs/reference/rag/retrieval.md +11 -0
- package/.docs/reference/schedules/overview.md +17 -1
- package/.docs/reference/server/koa-adapter.md +2 -0
- package/.docs/reference/signals/notifications.md +2 -2
- package/.docs/reference/storage/overview.md +30 -13
- package/.docs/reference/storage/retention.md +1 -1
- package/.docs/reference/streaming/ChunkType.md +20 -2
- package/.docs/reference/streaming/agents/MastraModelOutput.md +3 -3
- package/.docs/reference/streaming/agents/stream.md +4 -4
- package/.docs/reference/streaming/agents/streamLegacy.md +2 -2
- package/.docs/reference/streaming/workflows/resumeStream.md +1 -1
- package/.docs/reference/tools/ask-user-tool.md +1 -1
- package/.docs/reference/tools/bedrock-kb-tool.md +2 -2
- package/.docs/reference/tools/create-code-mode.md +1 -1
- package/.docs/reference/tools/create-tool.md +2 -2
- package/.docs/reference/tools/document-chunker-tool.md +1 -1
- package/.docs/reference/tools/mcp-client.md +6 -6
- package/.docs/reference/tools/mcp-server.md +4 -4
- package/.docs/reference/tools/task-tools.md +3 -1
- package/.docs/reference/tools/vector-query-tool.md +1 -0
- package/.docs/reference/vectors/astra.md +3 -1
- package/.docs/reference/vectors/azure-ai-search.md +2 -2
- package/.docs/reference/vectors/chroma.md +2 -2
- package/.docs/reference/vectors/convex.md +1 -1
- package/.docs/reference/vectors/couchbase.md +12 -5
- package/.docs/reference/vectors/duckdb.md +5 -5
- package/.docs/reference/vectors/mongodb.md +6 -6
- package/.docs/reference/vectors/pg.md +1 -1
- package/.docs/reference/vectors/pinecone.md +1 -1
- package/.docs/reference/vectors/qdrant.md +1 -1
- package/.docs/reference/vectors/s3vectors.md +3 -0
- package/.docs/reference/vectors/turbopuffer.md +1 -1
- package/.docs/reference/vectors/upstash.md +8 -4
- package/.docs/reference/vectors/vectorize.md +4 -2
- package/.docs/reference/vectors/weaviate.md +1 -1
- package/.docs/reference/voice/voice.send.md +1 -1
- package/.docs/reference/voice/voice.speak.md +1 -1
- package/.docs/reference/voice/voice.updateConfig.md +1 -1
- package/.docs/reference/workflows/run-methods/restart.md +1 -1
- package/.docs/reference/workflows/run-methods/resume.md +1 -1
- package/.docs/reference/workflows/run-methods/start.md +1 -1
- package/.docs/reference/workflows/run-methods/timeTravel.md +1 -1
- package/.docs/reference/workflows/run.md +2 -2
- package/.docs/reference/workflows/step.md +4 -0
- package/.docs/reference/workflows/workflow-methods/agent.md +2 -0
- package/.docs/reference/workflows/workflow-methods/classifier.md +5 -0
- package/.docs/reference/workflows/workflow-methods/dountil.md +1 -1
- package/.docs/reference/workflows/workflow-methods/map.md +2 -0
- package/.docs/reference/workflows/workflow.md +2 -2
- package/.docs/reference/workspace/factory-sandbox.md +11 -2
- package/.docs/reference/workspace/filesystem.md +2 -2
- package/.docs/reference/workspace/local-sandbox.md +3 -3
- package/.docs/reference/workspace/platform-filesystem.md +3 -3
- package/.docs/reference/workspace/platform-sandbox.md +10 -8
- package/.docs/reference/workspace/sandbox.md +1 -1
- package/.docs/reference/workspace/workspace-class.md +13 -13
- package/dist/index.js +1 -1
- package/dist/{src-DnH_jHt9.js → src-Cv7bX2-6.js} +10 -19
- package/dist/{src-DnH_jHt9.js.map → src-Cv7bX2-6.js.map} +1 -1
- package/dist/stdio.js +2 -3
- package/package.json +14 -14
|
@@ -18,6 +18,7 @@ The `UnicodeNormalizer()` cleans and normalizes user input by unifying Unicode c
|
|
|
18
18
|
|
|
19
19
|
```typescript
|
|
20
20
|
import { UnicodeNormalizer } from '@mastra/core/processors'
|
|
21
|
+
import { Agent } from '@mastra/core/agent'
|
|
21
22
|
|
|
22
23
|
export const normalizedAgent = new Agent({
|
|
23
24
|
id: 'normalized-agent',
|
|
@@ -39,6 +40,7 @@ The `PromptInjectionDetector()` scans user messages for prompt injection, jailbr
|
|
|
39
40
|
|
|
40
41
|
```typescript
|
|
41
42
|
import { PromptInjectionDetector } from '@mastra/core/processors'
|
|
43
|
+
import { Agent } from '@mastra/core/agent'
|
|
42
44
|
|
|
43
45
|
export const secureAgent = new Agent({
|
|
44
46
|
id: 'secure-agent',
|
|
@@ -65,6 +67,7 @@ The `LanguageDetector()` detects and translates user messages into a target lang
|
|
|
65
67
|
|
|
66
68
|
```typescript
|
|
67
69
|
import { LanguageDetector } from '@mastra/core/processors'
|
|
70
|
+
import { Agent } from '@mastra/core/agent'
|
|
68
71
|
|
|
69
72
|
export const multilingualAgent = new Agent({
|
|
70
73
|
id: 'multilingual-agent',
|
|
@@ -92,6 +95,7 @@ The `BatchPartsProcessor()` combines multiple stream parts before emitting them
|
|
|
92
95
|
|
|
93
96
|
```typescript
|
|
94
97
|
import { BatchPartsProcessor } from '@mastra/core/processors'
|
|
98
|
+
import { Agent } from '@mastra/core/agent'
|
|
95
99
|
|
|
96
100
|
export const batchedAgent = new Agent({
|
|
97
101
|
id: 'batched-agent',
|
|
@@ -114,6 +118,7 @@ The `SystemPromptScrubber()` detects and redacts system prompts or internal inst
|
|
|
114
118
|
|
|
115
119
|
```typescript
|
|
116
120
|
import { SystemPromptScrubber } from '@mastra/core/processors'
|
|
121
|
+
import { Agent } from '@mastra/core/agent'
|
|
117
122
|
|
|
118
123
|
const scrubbedAgent = new Agent({
|
|
119
124
|
id: 'scrubbed-agent',
|
|
@@ -147,6 +152,7 @@ The `ModerationProcessor()` detects inappropriate or harmful content across cate
|
|
|
147
152
|
|
|
148
153
|
```typescript
|
|
149
154
|
import { ModerationProcessor } from '@mastra/core/processors'
|
|
155
|
+
import { Agent } from '@mastra/core/agent'
|
|
150
156
|
|
|
151
157
|
export const moderatedAgent = new Agent({
|
|
152
158
|
id: 'moderated-agent',
|
|
@@ -171,6 +177,7 @@ The `PIIDetector()` detects and removes personally identifiable information such
|
|
|
171
177
|
|
|
172
178
|
```typescript
|
|
173
179
|
import { PIIDetector } from '@mastra/core/processors'
|
|
180
|
+
import { Agent } from '@mastra/core/agent'
|
|
174
181
|
|
|
175
182
|
export const privateAgent = new Agent({
|
|
176
183
|
id: 'private-agent',
|
|
@@ -197,6 +204,7 @@ The `TokenCostControl()` monitors cumulative estimated cost across the agentic l
|
|
|
197
204
|
|
|
198
205
|
```typescript
|
|
199
206
|
import { TokenCostControl } from '@mastra/core/processors'
|
|
207
|
+
import { Agent } from '@mastra/core/agent'
|
|
200
208
|
|
|
201
209
|
export const budgetedAgent = new Agent({
|
|
202
210
|
id: 'budgeted-agent',
|
|
@@ -311,6 +311,9 @@ Instead of pausing every tool call at the agent level, you can mark individual t
|
|
|
311
311
|
Set `requireApproval: true` on a tool definition. The tool pauses before execution regardless of whether `requireToolApproval` is set on the agent:
|
|
312
312
|
|
|
313
313
|
```typescript
|
|
314
|
+
import { createTool } from '@mastra/core/tools'
|
|
315
|
+
import { z } from 'zod'
|
|
316
|
+
|
|
314
317
|
export const testTool = createTool({
|
|
315
318
|
id: 'test-tool',
|
|
316
319
|
description: 'Fetches weather for a location',
|
|
@@ -359,6 +362,9 @@ const handleApproval = async () => {
|
|
|
359
362
|
With this approach, neither the agent nor the tool uses `requireApproval`. Instead, the tool's `execute` function calls `suspend()` to pause at a specific point and return context or confirmation prompts to the user. This is useful when approval depends on runtime conditions rather than being unconditional.
|
|
360
363
|
|
|
361
364
|
```typescript
|
|
365
|
+
import { createTool } from '@mastra/core/tools'
|
|
366
|
+
import { z } from 'zod'
|
|
367
|
+
|
|
362
368
|
export const testToolB = createTool({
|
|
363
369
|
id: 'test-tool-b',
|
|
364
370
|
description: 'Fetches weather for a location',
|
|
@@ -662,6 +668,9 @@ for await (const chunk of stream.fullStream) {
|
|
|
662
668
|
Tools can also use [`suspend()`](#approval-using-suspend) to pause execution and return context to the user. This approach works through the supervisor delegation chain the same way `requireApproval` does: the suspension surfaces at the supervisor level:
|
|
663
669
|
|
|
664
670
|
```typescript
|
|
671
|
+
import { createTool } from '@mastra/core/tools'
|
|
672
|
+
import { z } from 'zod'
|
|
673
|
+
|
|
665
674
|
const conditionalTool = createTool({
|
|
666
675
|
id: 'conditional-operation',
|
|
667
676
|
description: 'Performs an operation that may require confirmation',
|
|
@@ -562,6 +562,8 @@ By default, `ResponseCache` looks up `MASTRA_RESOURCE_ID_KEY` on the request con
|
|
|
562
562
|
Override explicitly when you need a different scope:
|
|
563
563
|
|
|
564
564
|
```typescript
|
|
565
|
+
import { Agent } from '@mastra/core/agent'
|
|
566
|
+
|
|
565
567
|
new Agent({
|
|
566
568
|
id: 'processors-agent',
|
|
567
569
|
inputProcessors: [
|
|
@@ -962,6 +964,7 @@ Processors can request that the LLM retry its response with feedback. This is us
|
|
|
962
964
|
|
|
963
965
|
```typescript
|
|
964
966
|
import type { Processor } from '@mastra/core/processors'
|
|
967
|
+
import { Agent } from '@mastra/core/agent'
|
|
965
968
|
|
|
966
969
|
export class QualityChecker implements Processor {
|
|
967
970
|
id = 'quality-checker'
|
|
@@ -150,6 +150,9 @@ export const weatherTool = createTool({
|
|
|
150
150
|
When a result doesn't match `outputSchema`, Mastra logs a warning and returns a validation error object instead of the result. The model then treats the call as failed and may retry it. For tools whose side effects have already happened by the time the result is produced, set `outputValidation: 'warn'`. Mastra still logs the mismatch, but it returns the real result unchanged, which keeps the model from retrying an order that was already placed.
|
|
151
151
|
|
|
152
152
|
```typescript
|
|
153
|
+
import { createTool } from '@mastra/core/tools'
|
|
154
|
+
import { z } from 'zod'
|
|
155
|
+
|
|
153
156
|
export const placeOrderTool = createTool({
|
|
154
157
|
id: 'place-order',
|
|
155
158
|
description: 'Places an order and returns its id and total',
|
|
@@ -270,6 +273,8 @@ If you need to access tools from the Mastra instance, see [`Mastra.getTool()`](h
|
|
|
270
273
|
Use `toModelOutput` when your tool returns rich structured data for your application, but you want the model to receive a smaller or multimodal representation. This keeps model context focused while preserving the full tool result in your app.
|
|
271
274
|
|
|
272
275
|
```typescript
|
|
276
|
+
import { createTool } from '@mastra/core/tools'
|
|
277
|
+
|
|
273
278
|
export const weatherTool = createTool({
|
|
274
279
|
execute: async ({ location }) => {
|
|
275
280
|
const response = await fetch(`https://wttr.in/${location}?format=j1`)
|
package/.docs/docs/channels.md
CHANGED
|
@@ -162,6 +162,21 @@ export const deleteFile = createTool({
|
|
|
162
162
|
|
|
163
163
|
When the agent calls this tool, users see a card with the tool name, arguments, and Approve and Deny actions. The tool only executes after approval.
|
|
164
164
|
|
|
165
|
+
By default, only the user who requested a tool call can approve or deny it. For a shared channel where another member should be able to respond, set `toolApprovers: 'anyone'` on that adapter:
|
|
166
|
+
|
|
167
|
+
```typescript
|
|
168
|
+
channels: {
|
|
169
|
+
adapters: {
|
|
170
|
+
slack: {
|
|
171
|
+
adapter: createSlackAdapter(),
|
|
172
|
+
toolApprovers: 'anyone',
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
This bypasses only the requester check: actions still need a pending tool approval and a mapped thread. The default isn't a strict identity guarantee when a run has no recorded requester (for example, a scheduled run); in that case, another channel member may be able to respond. If stored messages identify multiple possible requesters after a restart, requester-only mode instead rejects their clicks.
|
|
179
|
+
|
|
165
180
|
Set `toolDisplay: 'text'` on an adapter to render tool calls as plain text instead of interactive cards. In `'hidden'` mode, `autoResumeSuspendedTools` can resume data-bearing `suspend()` flows when a later user message arrives on the same thread. This requires memory. Hidden mode only suppresses approval buttons. It doesn't turn a message into consent. Tools that require approval remain suspended until an explicit approval or decline is submitted through a UI or API action.
|
|
166
181
|
|
|
167
182
|
### Custom action handling
|
|
@@ -85,6 +85,8 @@ export const mastra = new Mastra({
|
|
|
85
85
|
The value of each option can come from a variable, import, or function call. The option itself must remain a direct property. Don't hide build-time options behind a factory call or an object spread:
|
|
86
86
|
|
|
87
87
|
```typescript
|
|
88
|
+
import { Mastra } from '@mastra/core/mastra'
|
|
89
|
+
|
|
88
90
|
const options = {
|
|
89
91
|
bundler: {
|
|
90
92
|
externals: ['sharp'],
|
|
@@ -92,6 +92,8 @@ When your Mastra application imports from other workspace packages, Mastra handl
|
|
|
92
92
|
For most setups, this works without configuration. If you encounter issues with workspace package imports, add the package to [`transpilePackages`](https://mastra.ai/reference/configuration):
|
|
93
93
|
|
|
94
94
|
```typescript
|
|
95
|
+
import { Mastra } from '@mastra/core'
|
|
96
|
+
|
|
95
97
|
export const mastra = new Mastra({
|
|
96
98
|
bundler: {
|
|
97
99
|
transpilePackages: ['@my-org/utils'],
|
|
@@ -134,6 +134,8 @@ When a run has no trace (observability not configured), the decision is derived
|
|
|
134
134
|
**Eligibility filters**: The optional `filter` parameter uses a declarative predicate over the run context to restrict scorer eligibility. Because filtering occurs before sampling, `sampling.rate` applies only to matching runs:
|
|
135
135
|
|
|
136
136
|
```typescript
|
|
137
|
+
import { Agent } from '@mastra/core/agent'
|
|
138
|
+
|
|
137
139
|
export const myAgent = new Agent({
|
|
138
140
|
// ...
|
|
139
141
|
scorers: {
|
|
@@ -224,6 +224,8 @@ If a subagent isn't listed under the supervisor's `backgroundTasks.tools` but ha
|
|
|
224
224
|
The background config used for the inherited dispatch (for example `waitTimeoutMs`) is derived from the subagent's own `backgroundTasks` config.
|
|
225
225
|
|
|
226
226
|
```typescript
|
|
227
|
+
import { Agent } from '@mastra/core/agent'
|
|
228
|
+
|
|
227
229
|
const researchAgent = new Agent({
|
|
228
230
|
id: 'research-agent',
|
|
229
231
|
description: 'Gathers factual information.',
|
|
@@ -311,6 +313,8 @@ Each layer can register terminal-state callbacks. They don't replace one another
|
|
|
311
313
|
- Manager-level `onTaskComplete` / `onTaskFailed`: scoped globally.
|
|
312
314
|
|
|
313
315
|
```typescript
|
|
316
|
+
import { Mastra } from '@mastra/core'
|
|
317
|
+
|
|
314
318
|
export const mastra = new Mastra({
|
|
315
319
|
storage,
|
|
316
320
|
backgroundTasks: {
|
|
@@ -172,7 +172,7 @@ for await (const chunk of output.fullStream) {
|
|
|
172
172
|
|
|
173
173
|
Calling `observe(runId)` without an offset is the supported general reconnect flow. It replays all available cached events before delivering live events. For a completed run, observation replays the retained events and closes. If the run is unknown or its history has been cleared and no live run remains, observation closes without events. The HTTP observe endpoint returns an empty, closed stream in this case rather than waiting for its idle timeout.
|
|
174
174
|
|
|
175
|
-
The optional `offset` is an inclusive, zero-based PubSub event index, not a chunk number, and the public stream doesn't expose it. If an offset skips earlier text deltas, aggregated text is partial and structured output may be invalid. On transports with numeric offset support, an offset beyond the highest retained index also skips live events with lower indexes. A live run waits for the published index to reach the requested offset. A completed run with a retained terminal event closes even when the offset skips every event. See [`observe(runId, options?)`](https://mastra.ai/reference/agents/durable-agent) for the full offset and transport behavior.
|
|
175
|
+
The optional `offset` is an inclusive, zero-based PubSub event index, not a chunk number, and the public stream doesn't expose it. If an offset skips earlier text deltas, aggregated text is partial and structured output may be invalid. On transports with numeric offset support, an offset beyond the highest retained index also skips live events with lower indexes. A live run waits for the published index to reach the requested offset. A completed run with a retained terminal event closes even when the offset skips every event. Evented agents on a cross-process PubSub, such as Redis Streams, need a server cache shared by every process, such as `RedisServerCache`, for offsets to skip earlier events. See [`observe(runId, options?)`](https://mastra.ai/reference/agents/durable-agent) for the full offset and transport behavior.
|
|
176
176
|
|
|
177
177
|
Replay isn't a permanent execution archive. Events remain available only until [cleanup](#cleanup) clears them or the cache removes them. A workflow snapshot can't reconstruct cleared stream events, and disabling caching prevents historical replay.
|
|
178
178
|
|
|
@@ -286,6 +286,8 @@ Durable agent runs are excluded from the generic boot-time restart of active wor
|
|
|
286
286
|
|
|
287
287
|
> **Warning:** Automatic and manual recovery re-run the agentic loop from the last persisted snapshot, which can reissue LLM calls (with real cost) and re-execute tool calls. A sub-agent delegation is one generated `agent-<name>` tool call, and recovery doesn't checkpoint the LLM or tool calls inside that delegation independently. If recovery replays the delegation step, the entire sub-agent run starts again and can repeat inner LLM calls and already-completed tool side effects. Make tools, including tools used by sub-agents, idempotent, or deduplicate their external side effects.
|
|
288
288
|
|
|
289
|
+
Delegation hooks passed per call are closures and can't be restored in a new process. A resumed run falls back to default delegation behavior. Hooks configured on the supervisor's `defaultOptions.delegation` are merged back in when recovery rebuilds the delegation tools. Put hooks that must survive a restart there instead of passing them to `stream()` or `generate()`.
|
|
290
|
+
|
|
289
291
|
### Snapshot persistence
|
|
290
292
|
|
|
291
293
|
The `shouldPersistSnapshot` option on `createDurableAgent()` (also accepted in the agent-level `durable` config) controls which workflow snapshots a durable agent writes. The default policy:
|
|
@@ -315,6 +317,9 @@ Evented agents always persist the full snapshot set: the evented engine coordina
|
|
|
315
317
|
Set `recovery.durableAgents` to `'auto'` in the Mastra config. The deployer calls `recoverAllDurableAgents()` on boot, alongside the workflow run restarts (the two run concurrently):
|
|
316
318
|
|
|
317
319
|
```typescript
|
|
320
|
+
import { Mastra } from '@mastra/core'
|
|
321
|
+
import { PostgresStore } from '@mastra/pg'
|
|
322
|
+
|
|
318
323
|
export const mastra = new Mastra({
|
|
319
324
|
agents: { myAgent: durableAgent },
|
|
320
325
|
storage: new PostgresStore({ connectionString: process.env.DATABASE_URL! }),
|
|
@@ -87,6 +87,8 @@ Pass `goal.scorer` to replace the pipeline with your own [scorer](https://mastra
|
|
|
87
87
|
Configure the default scorer with `judge`, `maxRuns`, and `prompt`:
|
|
88
88
|
|
|
89
89
|
```typescript
|
|
90
|
+
import { Agent } from '@mastra/core/agent'
|
|
91
|
+
|
|
90
92
|
const worker = new Agent({
|
|
91
93
|
id: 'worker',
|
|
92
94
|
name: 'worker',
|
|
@@ -12,6 +12,8 @@ Schedules are persisted, so they survive restarts and redeploys. Manage them at
|
|
|
12
12
|
|
|
13
13
|
> **Note:** Schedules require a [storage](https://mastra.ai/docs/storage) adapter that implements the schedules domain. See the [`mastra.schedules` reference](https://mastra.ai/reference/schedules/overview) for supported adapters and API behavior.
|
|
14
14
|
|
|
15
|
+
Persisting a schedule doesn't guarantee delivery of each occurrence. Publication is best-effort: the scheduler makes up to three publication attempts, but exhausted attempts or a publisher crash can skip an occurrence. Skipped occurrences aren't replayed, while later recurring fires can continue. See [Schedule delivery guarantees](https://mastra.ai/reference/schedules/overview) for failure reporting and manual rerun precautions.
|
|
16
|
+
|
|
15
17
|
## Quickstart
|
|
16
18
|
|
|
17
19
|
The following schedule runs the `pinger` agent every hour. It has no thread, so each fire is an isolated `agent.generate()` run.
|
|
@@ -162,6 +164,9 @@ The same operations are available from `@mastra/client-js` over the `/api/schedu
|
|
|
162
164
|
Hooks let you run code at key points in an agent schedule's lifecycle, for example to compute fire-time parameters or react to the outcome. Configure them on the `Mastra` constructor under `schedules`. The hooks are a single flat bundle that runs for every agent's schedules; each hook context carries the firing `agentId`, so branch on it when you need per-agent behavior. Hooks live at the `Mastra` level so they apply to both code-defined and stored agents.
|
|
163
165
|
|
|
164
166
|
```typescript
|
|
167
|
+
import { Mastra } from '@mastra/core'
|
|
168
|
+
import { LibSQLStore } from '@mastra/libsql'
|
|
169
|
+
|
|
165
170
|
const mastra = new Mastra({
|
|
166
171
|
agents: { pinger },
|
|
167
172
|
storage: new LibSQLStore({ id: 'mastra-storage', url: 'file:./mastra.db' }),
|
|
@@ -10,32 +10,33 @@ A provider is a service you can connect to your project, identified by a provide
|
|
|
10
10
|
|
|
11
11
|
This directory covers the generated toolsets and channel setup documented here, rather than every provider in the platform catalog. Run [`mastra connect list`](https://mastra.ai/reference/cli/mastra) to see providers available to your project and their connection status.
|
|
12
12
|
|
|
13
|
-
| Provider ID
|
|
14
|
-
|
|
|
15
|
-
| `clerk`
|
|
16
|
-
| `discord`
|
|
17
|
-
| `fireflies`
|
|
18
|
-
| `github`
|
|
19
|
-
| `google-calendar`
|
|
20
|
-
| `google-docs`
|
|
21
|
-
| `google-drive`
|
|
22
|
-
| `google-mail`
|
|
23
|
-
| `google-sheet`
|
|
24
|
-
| `hubspot`
|
|
25
|
-
| `incident-io`
|
|
26
|
-
| `jira`
|
|
27
|
-
| `linear`
|
|
28
|
-
| `microsoft-
|
|
29
|
-
| `
|
|
30
|
-
| `
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
33
|
-
| `
|
|
34
|
-
| `slack
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
37
|
-
| `
|
|
38
|
-
| `
|
|
13
|
+
| Provider ID | Provider | Gives you |
|
|
14
|
+
| ---------------------- | ---------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
|
|
15
|
+
| `clerk` |  Clerk | [Tools](https://mastra.ai/reference/connect/providers) |
|
|
16
|
+
| `discord` |  Discord | [Tools](https://mastra.ai/reference/connect/providers), [Channels](https://mastra.ai/docs/mastra-platform/connect/channels) |
|
|
17
|
+
| `fireflies` |  Fireflies.ai | [Tools](https://mastra.ai/reference/connect/providers) |
|
|
18
|
+
| `github` |  GitHub | [Tools](https://mastra.ai/reference/connect/providers) |
|
|
19
|
+
| `google-calendar` |  Google Calendar | [Tools](https://mastra.ai/reference/connect/providers) |
|
|
20
|
+
| `google-docs` |  Google Docs | [Tools](https://mastra.ai/reference/connect/providers) |
|
|
21
|
+
| `google-drive` |  Google Drive | [Tools](https://mastra.ai/reference/connect/providers) |
|
|
22
|
+
| `google-mail` |  Gmail | [Tools](https://mastra.ai/reference/connect/providers) |
|
|
23
|
+
| `google-sheet` |  Google Sheets | [Tools](https://mastra.ai/reference/connect/providers) |
|
|
24
|
+
| `hubspot` |  HubSpot | [Tools](https://mastra.ai/reference/connect/providers) |
|
|
25
|
+
| `incident-io` |  incident.io | [Tools](https://mastra.ai/reference/connect/providers) |
|
|
26
|
+
| `jira` |  Jira | [Tools](https://mastra.ai/reference/connect/providers) |
|
|
27
|
+
| `linear` |  Linear | [Tools](https://mastra.ai/reference/connect/providers) |
|
|
28
|
+
| `microsoft-powerpoint` |  Microsoft PowerPoint | [Tools](https://mastra.ai/reference/connect/providers) |
|
|
29
|
+
| `microsoft-teams` |  Microsoft Teams | [Tools](https://mastra.ai/reference/connect/providers), [Channels](https://mastra.ai/docs/mastra-platform/connect/channels) |
|
|
30
|
+
| `notion` |  Notion | [Tools](https://mastra.ai/reference/connect/providers) |
|
|
31
|
+
| `openai` |  OpenAI | [Tools](https://mastra.ai/reference/connect/providers) |
|
|
32
|
+
| `posthog` |  PostHog | [Tools](https://mastra.ai/reference/connect/providers) |
|
|
33
|
+
| `resend` |  Resend | [Tools](https://mastra.ai/reference/connect/providers) |
|
|
34
|
+
| `slack` |  Slack | [Tools](https://mastra.ai/reference/connect/providers) |
|
|
35
|
+
| `slack-channels` |  Slack channels | [Channels](https://mastra.ai/docs/mastra-platform/connect/channels) |
|
|
36
|
+
| `snowflake` |  Snowflake | [Tools](https://mastra.ai/reference/connect/providers) |
|
|
37
|
+
| `supabase` |  Supabase | [Tools](https://mastra.ai/reference/connect/providers) |
|
|
38
|
+
| `telegram` |  Telegram | [Channels](https://mastra.ai/docs/mastra-platform/connect/channels) |
|
|
39
|
+
| `workos` |  WorkOS | [Tools](https://mastra.ai/reference/connect/providers) |
|
|
39
40
|
|
|
40
41
|
Generated toolsets are included in `@mastra/connect`. Upgrading the package gives you toolsets added in newer releases, but provider availability depends on the platform catalog. The [provider toolsets reference](https://mastra.ai/reference/connect/providers) lists the generated tools.
|
|
41
42
|
|
|
@@ -55,6 +55,8 @@ A local `.env` file is optional. Environment variables stored on the platform ar
|
|
|
55
55
|
> **Note:** If preflight reports a hard-coded local path instead (`Build contains a host-local storage URL`), it can't offer the inline fix. Guard the path with an environment variable first so the file is only used during local development:
|
|
56
56
|
>
|
|
57
57
|
> ```ts
|
|
58
|
+
> import { LibSQLStore } from '@mastra/libsql'
|
|
59
|
+
>
|
|
58
60
|
> new LibSQLStore({
|
|
59
61
|
> id: 'mastra-storage',
|
|
60
62
|
> // Uses the hosted database when deployed, a local file during development
|
|
@@ -50,7 +50,7 @@ You get a stable API endpoint with environment variable management and custom do
|
|
|
50
50
|
|
|
51
51
|
The command runs `mastra build` and uploads its artifact, then builds and deploys a Docker image. On first deploy, the CLI creates a `.mastra-project.json` file linking your local project to the platform. Commit this file so subsequent deploys and CI/CD target the same project.
|
|
52
52
|
|
|
53
|
-
> **Note:**
|
|
53
|
+
> **Note:** The CLI uploads environment variables from one env file. It uses `.env.<environment>` if it exists (for example `.env.production` for the default `production` environment), otherwise the only `.env` or `.env.*` file. If there are several and none matches, it asks which one to use; in non-interactive runs (`--yes` or CI), pass `--env-file <file>` instead. Pass `--env-file` to override the choice. Every deploy merges the file's vars into the environment's stored env vars: values from the file win, except that an empty value doesn't clear a stored one. The CLI lists the keys it will overwrite and asks you to confirm (skipped with `--yes` or in CI). To manage a var only in the dashboard, remove it from the env file. If no env file exists, nothing is uploaded and the environment keeps its stored env vars. Review and sanitize the selected file before deploying to avoid uploading development-only or personal secrets.
|
|
54
54
|
|
|
55
55
|
See the [CLI reference](https://mastra.ai/reference/cli/mastra) for the full list of flags.
|
|
56
56
|
|
|
@@ -134,7 +134,7 @@ With the **Persistent Server add-on** enabled, the service stays awake even with
|
|
|
134
134
|
|
|
135
135
|
## CI/CD
|
|
136
136
|
|
|
137
|
-
Automate deployments from GitHub Actions, GitLab CI, or any CI provider. After your first interactive deploy, CI/CD needs
|
|
137
|
+
Automate deployments from GitHub Actions, GitLab CI, or any CI provider. After your first interactive deploy, CI/CD needs an API token, your organization and project IDs, and the `.mastra-project.json` file committed to your repository.
|
|
138
138
|
|
|
139
139
|
> **Tip:** If your code lives on GitHub, the [GitHub integration](https://mastra.ai/docs/mastra-platform/github) gives you push-to-deploy without writing a workflow file. Use the CLI-based CI/CD flow below when you need GitLab, another CI provider, or custom build steps before deploy.
|
|
140
140
|
|
|
@@ -150,7 +150,9 @@ Automate deployments from GitHub Actions, GitLab CI, or any CI provider. After y
|
|
|
150
150
|
|
|
151
151
|
2. Add the token as a secret in your CI provider. In GitHub Actions, go to **Settings → Secrets and variables → Actions** and create the `MASTRA_API_TOKEN` secret.
|
|
152
152
|
|
|
153
|
-
3. Ensure your `.mastra-project.json` file is committed to the repository.
|
|
153
|
+
3. Ensure your `.mastra-project.json` file is committed to the repository.
|
|
154
|
+
|
|
155
|
+
4. Add `MASTRA_ORG_ID` and `MASTRA_PROJECT_ID` to your CI provider, using the `organizationId` and `projectId` values from `.mastra-project.json`. When `MASTRA_API_TOKEN` is set, `mastra deploy` runs headless and fails if either variable is missing.
|
|
154
156
|
|
|
155
157
|
### The `--yes` flag
|
|
156
158
|
|
|
@@ -187,6 +189,8 @@ jobs:
|
|
|
187
189
|
run: npx mastra deploy --yes
|
|
188
190
|
env:
|
|
189
191
|
MASTRA_API_TOKEN: ${{ secrets.MASTRA_API_TOKEN }}
|
|
192
|
+
MASTRA_ORG_ID: ${{ secrets.MASTRA_ORG_ID }}
|
|
193
|
+
MASTRA_PROJECT_ID: ${{ secrets.MASTRA_PROJECT_ID }}
|
|
190
194
|
```
|
|
191
195
|
|
|
192
196
|
Adjust the `paths` filter and `working-directory` if your Mastra project is in a subdirectory (e.g. a monorepo).
|
|
@@ -207,14 +211,14 @@ deploy:
|
|
|
207
211
|
- npx mastra deploy --yes
|
|
208
212
|
```
|
|
209
213
|
|
|
210
|
-
Add `MASTRA_API_TOKEN` as
|
|
214
|
+
Add `MASTRA_API_TOKEN`, `MASTRA_ORG_ID`, and `MASTRA_PROJECT_ID` as CI/CD variables in **Settings → CI/CD → Variables**.
|
|
211
215
|
|
|
212
216
|
### Other CI providers
|
|
213
217
|
|
|
214
218
|
Any CI system that runs Node.js and shell commands works with Mastra:
|
|
215
219
|
|
|
216
220
|
1. Install dependencies.
|
|
217
|
-
2. Set `MASTRA_API_TOKEN` as
|
|
221
|
+
2. Set `MASTRA_API_TOKEN`, `MASTRA_ORG_ID`, and `MASTRA_PROJECT_ID` as environment variables.
|
|
218
222
|
3. Run `mastra deploy --yes`.
|
|
219
223
|
|
|
220
224
|
### Verify the deploy
|
|
@@ -242,7 +246,7 @@ The following example adds a verification step to a GitHub Actions workflow:
|
|
|
242
246
|
|
|
243
247
|
### Override project config with environment variables
|
|
244
248
|
|
|
245
|
-
|
|
249
|
+
For interactive deploys, the CLI reads `organizationId` and `projectId` from `.mastra-project.json` by default. When `MASTRA_API_TOKEN` is set, both variables below are required. To override these values (e.g. deploying to a different project from the same repository), set the following environment variables:
|
|
246
250
|
|
|
247
251
|
| Variable | Description |
|
|
248
252
|
| ------------------- | ---------------------------------------------------------- |
|
|
@@ -52,7 +52,7 @@ On your first deploy, the CLI prompts you to create a new project or select an e
|
|
|
52
52
|
|
|
53
53
|
The `mastra deploy` command builds your project and compiles `src/mastra/` into `.mastra/output`. It packages that output as an artifact ZIP, then uploads and deploys it to a cloud sandbox.
|
|
54
54
|
|
|
55
|
-
A deploy transitions through **queued → uploading → starting → deploying → running** or **failed** if something goes wrong. If a sandbox is already running for your project, the platform updates it in place with no downtime. Otherwise, it creates a fresh sandbox. Your instance URL is assigned per
|
|
55
|
+
A deploy transitions through **queued → uploading → starting → deploying → running** or **failed** if something goes wrong. If a sandbox is already running for your project, the platform updates it in place with no downtime. Otherwise, it creates a fresh sandbox. Your instance URL is assigned per environment and remains stable across deploys to that environment.
|
|
56
56
|
|
|
57
57
|
See the [`mastra deploy` CLI reference](https://mastra.ai/reference/cli/mastra) for the full list of flags and CI/CD usage.
|
|
58
58
|
|
|
@@ -38,6 +38,9 @@ Attaching a hosted database adds its connection variables to the environments th
|
|
|
38
38
|
| Turso | `TURSO_DATABASE_URL`, `TURSO_AUTH_TOKEN` |
|
|
39
39
|
| Neon | `DATABASE_URL` |
|
|
40
40
|
| Postgres | `DATABASE_URL` |
|
|
41
|
+
| Redis | `REDIS_URL` |
|
|
42
|
+
|
|
43
|
+
Managed Redis isn't enabled for every organization yet. When it's off for your organization, Redis doesn't appear as a database option and attaching it fails.
|
|
41
44
|
|
|
42
45
|
Values are resolved at deploy time and never stored in your project. An environment-scoped database replaces the values of a project-scoped database of the same provider for that environment.
|
|
43
46
|
|
|
@@ -82,7 +82,7 @@ export const mastra = new Mastra({
|
|
|
82
82
|
|
|
83
83
|
- `start()` provisions a fresh sandbox (or reattaches when you passed `sandboxId`).
|
|
84
84
|
- `executeCommand()` runs commands against it.
|
|
85
|
-
- `stop()` releases this process's lease without touching the remote sandbox. The VM keeps running under the environment's idle policy, and a later `start()` with the same `id`
|
|
85
|
+
- `stop()` releases this process's lease without touching the remote sandbox. The VM keeps running under the environment's idle policy, and a later `start()` with the saved `sandboxId` reattaches to it. Reusing only the same `id` provisions a new sandbox, seeded from that `id`'s recovery checkpoint when one exists.
|
|
86
86
|
- `destroy()` releases the VM. On Railway, it also deletes the recovery checkpoint associated with a caller-supplied recovery `id`. On E2B, it only kills the VM, and any snapshot you captured remains yours to manage.
|
|
87
87
|
|
|
88
88
|
A statically configured `PlatformSandbox` is shared across every request and agent using that configuration rather than creating separate sandboxes for requests or memory threads. `PlatformFilesystem` is also a separate provider: configuring both providers doesn't mount the environment bucket inside the sandbox.
|
|
@@ -138,6 +138,9 @@ If you assemble the request input yourself and need it processed exactly as sent
|
|
|
138
138
|
Message count is a poor proxy for context size: a tool result can be a few tokens or thousands. Use `messageHistory` to keep recent history within a token budget instead:
|
|
139
139
|
|
|
140
140
|
```typescript
|
|
141
|
+
import { Agent } from '@mastra/core/agent'
|
|
142
|
+
import { Memory } from '@mastra/memory'
|
|
143
|
+
|
|
141
144
|
export const agent = new Agent({
|
|
142
145
|
id: 'test-agent',
|
|
143
146
|
memory: new Memory({
|
|
@@ -149,6 +149,8 @@ OM can activate buffered observations before the token threshold is reached. Thi
|
|
|
149
149
|
Top-level early activation settings apply to observations by default:
|
|
150
150
|
|
|
151
151
|
```typescript
|
|
152
|
+
import { Memory } from '@mastra/memory'
|
|
153
|
+
|
|
152
154
|
const memory = new Memory({
|
|
153
155
|
options: {
|
|
154
156
|
observationalMemory: {
|
|
@@ -163,6 +165,8 @@ const memory = new Memory({
|
|
|
163
165
|
Use nested `observation` and `reflection` settings for per-phase control. Reflection early activation is opt-in, so top-level settings affect only observations.
|
|
164
166
|
|
|
165
167
|
```typescript
|
|
168
|
+
import { Memory } from '@mastra/memory'
|
|
169
|
+
|
|
166
170
|
const memory = new Memory({
|
|
167
171
|
options: {
|
|
168
172
|
observationalMemory: {
|
|
@@ -187,6 +191,8 @@ In this example, the top-level idle setting is disabled for observations, while
|
|
|
187
191
|
Set `observation.bufferOnIdle` to `true` to run background observation buffering when an agent turn ends and the agent becomes idle. This is useful for apps that want short turns to be observed without waiting for the next turn or the `messageTokens` threshold.
|
|
188
192
|
|
|
189
193
|
```typescript
|
|
194
|
+
import { Memory } from '@mastra/memory'
|
|
195
|
+
|
|
190
196
|
const memory = new Memory({
|
|
191
197
|
options: {
|
|
192
198
|
observationalMemory: {
|
|
@@ -209,6 +215,8 @@ Observer and Reflector model calls are retried on transient provider errors. By
|
|
|
209
215
|
- `failurePolicy`: what happens once retries are exhausted, either `'abort'` (default) or `'continue'`.
|
|
210
216
|
|
|
211
217
|
```typescript
|
|
218
|
+
import { Memory } from '@mastra/memory'
|
|
219
|
+
|
|
212
220
|
const memory = new Memory({
|
|
213
221
|
options: {
|
|
214
222
|
observationalMemory: {
|
|
@@ -391,6 +399,8 @@ This setting adds `WorkingMemoryExtractor`, defaults `workingMemory.agentManaged
|
|
|
391
399
|
Use `onExtracted` to normalize or react to custom extracted values before they're persisted:
|
|
392
400
|
|
|
393
401
|
```typescript
|
|
402
|
+
import { z } from 'zod'
|
|
403
|
+
|
|
394
404
|
new Extractor({
|
|
395
405
|
name: 'Project status',
|
|
396
406
|
instructions: 'Extract the current project status.',
|
|
@@ -164,6 +164,9 @@ const response = await memoryAgent.generate('Remember my favorite color is blue.
|
|
|
164
164
|
Scopes can also come from the agent and from the request context. Mastra combines all three sources:
|
|
165
165
|
|
|
166
166
|
```typescript
|
|
167
|
+
import { Agent } from '@mastra/core/agent'
|
|
168
|
+
import { Memory } from '@mastra/memory'
|
|
169
|
+
|
|
167
170
|
export const memoryAgent = new Agent({
|
|
168
171
|
id: 'memory-agent',
|
|
169
172
|
name: 'Memory Agent',
|
|
@@ -271,6 +274,9 @@ Open [Studio](https://mastra.ai/docs/studio/overview) and select the **Observabi
|
|
|
271
274
|
Use [`RequestContext`](https://mastra.ai/docs/server/request-context) to access request-specific values. This lets you conditionally select different memory or storage configurations based on the context of the request.
|
|
272
275
|
|
|
273
276
|
```typescript
|
|
277
|
+
import { Agent } from '@mastra/core/agent'
|
|
278
|
+
import { Memory } from '@mastra/memory'
|
|
279
|
+
|
|
274
280
|
export type UserTier = {
|
|
275
281
|
'user-tier': 'enterprise' | 'pro'
|
|
276
282
|
}
|
|
@@ -4,7 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
# Semantic recall
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Semantic recall is a built-in form of Retrieval-Augmented Generation (RAG) for agent memory. When a user sends a message, Mastra searches earlier messages for ones with a similar meaning and adds the most relevant ones to the agent's context.
|
|
8
|
+
|
|
9
|
+
Matching on meaning matters because people often remember the idea behind something, not the exact words they used. A user might ask "What did we decide about the refund?" after originally writing "Let's give them their money back." A keyword search misses that connection, but semantic recall finds it.
|
|
10
|
+
|
|
11
|
+
Use semantic recall when your agent needs details from earlier in a long conversation, or from a user's other conversations, that are no longer in [recent message history](https://mastra.ai/docs/memory/message-history).
|
|
8
12
|
|
|
9
13
|
> **📹 Watch:** Watch [Mastra semantic recall](https://www.youtube.com/watch?v=UVZtK8cK8xQ\&pp=ygUVbWFzdHJhIHdvcmtpbmcgbWVtb3J5) to see how agents retrieve relevant messages from past conversations.
|
|
10
14
|
|
|
@@ -190,10 +190,11 @@ The MastraStorageExporter includes reliable error handling for production use:
|
|
|
190
190
|
|
|
191
191
|
`DefaultExporter` emits structured drop events when it can't persist observability data. Register an exporter or bridge with `onDroppedEvent` to forward these drops to alerting or monitoring.
|
|
192
192
|
|
|
193
|
-
|
|
193
|
+
Events are dropped for these reasons:
|
|
194
194
|
|
|
195
195
|
- `unsupported-storage`: The storage provider doesn't implement the signal type.
|
|
196
196
|
- `retry-exhausted`: The exporter retried a batch up to `maxRetries` times and then dropped it.
|
|
197
|
+
- `span-not-updatable`: Under `realtime` or `batch-with-updates`, a span update or end reached storage but didn't apply, because the span was never stored or had already ended. Ended spans don't change.
|
|
197
198
|
|
|
198
199
|
The following example demonstrates forwarding drop details to a monitoring endpoint:
|
|
199
200
|
|
|
@@ -41,6 +41,9 @@ When a log call happens inside a traced operation (an agent run, workflow step,
|
|
|
41
41
|
To get machine-parseable JSON on stdout, configure `PinoLogger` with `prettyPrint: false`, pretty printing is enabled by default and produces human-readable text instead of JSON:
|
|
42
42
|
|
|
43
43
|
```typescript
|
|
44
|
+
import { Mastra } from '@mastra/core/mastra'
|
|
45
|
+
import { PinoLogger } from '@mastra/loggers'
|
|
46
|
+
|
|
44
47
|
export const mastra = new Mastra({
|
|
45
48
|
logger: new PinoLogger({ name: 'Mastra', level: 'info', prettyPrint: false }),
|
|
46
49
|
})
|