@mastra/mcp-docs-server 1.2.11 → 1.2.12-alpha.3
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/agent-builder/access-control.md +3 -3
- package/.docs/docs/agent-builder/browser.md +1 -1
- package/.docs/docs/agent-builder/channels.md +1 -1
- package/.docs/docs/agent-builder/configuration.md +3 -3
- package/.docs/docs/agent-builder/deploying.md +2 -2
- package/.docs/docs/agent-builder/integrations.md +8 -8
- package/.docs/docs/agent-builder/memory.md +2 -2
- package/.docs/docs/agent-builder/overview.md +1 -1
- package/.docs/docs/agent-controller/channels.md +8 -6
- package/.docs/docs/agent-controller/modes.md +6 -6
- package/.docs/docs/agent-controller/overview.md +13 -9
- package/.docs/docs/agent-controller/session.md +27 -9
- package/.docs/docs/agent-controller/subagents.md +9 -6
- package/.docs/docs/agent-controller/threads-and-state.md +12 -8
- package/.docs/docs/agent-controller/tool-approvals.md +7 -3
- package/.docs/docs/agents/a2a.md +4 -2
- package/.docs/docs/agents/acp.md +5 -5
- package/.docs/docs/agents/agent-approval.md +13 -11
- package/.docs/docs/agents/code-mode.md +29 -6
- package/.docs/docs/agents/guardrails.md +8 -8
- package/.docs/docs/agents/networks.md +2 -2
- package/.docs/docs/agents/overview.md +9 -7
- package/.docs/docs/agents/processors.md +15 -15
- package/.docs/docs/agents/skills.md +6 -6
- package/.docs/docs/agents/structured-output.md +6 -6
- package/.docs/docs/agents/supervisor-agents.md +19 -13
- package/.docs/docs/agents/using-tools.md +48 -21
- package/.docs/docs/browser/agent-browser.md +4 -4
- package/.docs/docs/browser/browser-viewer.md +2 -2
- package/.docs/docs/browser/firecrawl.md +1 -1
- package/.docs/docs/browser/overview.md +2 -2
- package/.docs/docs/browser/recording.md +1 -1
- package/.docs/docs/browser/stagehand.md +7 -7
- package/.docs/docs/capabilities/channels/discord.md +1 -1
- package/.docs/docs/capabilities/channels/other-adapters.md +1 -1
- package/.docs/docs/capabilities/channels/overview.md +9 -5
- package/.docs/docs/capabilities/channels/slack.md +2 -2
- package/.docs/docs/capabilities/channels/teams.md +1 -1
- package/.docs/docs/capabilities/channels/telegram.md +1 -1
- package/.docs/docs/capabilities/channels/whatsapp.md +1 -1
- package/.docs/docs/deployment/mastra-server.md +1 -1
- package/.docs/docs/deployment/overview.md +6 -2
- package/.docs/docs/deployment/sandbox.md +3 -1
- package/.docs/docs/deployment/workers.md +137 -0
- package/.docs/docs/editor/overview.md +37 -31
- package/.docs/docs/editor/prompts.md +8 -4
- package/.docs/docs/editor/tools.md +3 -3
- package/.docs/docs/evals/built-in-scorers.md +4 -4
- package/.docs/docs/evals/custom-scorers.md +5 -5
- package/.docs/docs/evals/datasets/running-experiments.md +7 -7
- package/.docs/docs/evals/evals-with-memory.md +4 -4
- package/.docs/docs/evals/gates-and-verdicts.md +4 -4
- package/.docs/docs/evals/multi-turn.md +12 -12
- package/.docs/docs/evals/overview.md +6 -4
- package/.docs/docs/evals/quick-checks.md +2 -2
- package/.docs/docs/getting-started/build-with-ai.md +6 -4
- package/.docs/docs/getting-started/file-based-agents.md +6 -4
- package/.docs/docs/getting-started/manual-install.md +1 -1
- package/.docs/docs/index.md +9 -90
- package/.docs/docs/long-running-agents/background-tasks.md +10 -10
- package/.docs/docs/long-running-agents/durable-agents.md +46 -5
- package/.docs/docs/long-running-agents/goals.md +15 -11
- package/.docs/docs/long-running-agents/schedules.md +3 -3
- package/.docs/docs/long-running-agents/signal-providers.md +8 -6
- package/.docs/docs/long-running-agents/signals.md +9 -5
- package/.docs/docs/mastra-platform/configuration.md +3 -3
- package/.docs/docs/mastra-platform/database.md +8 -8
- package/.docs/docs/mastra-platform/deploy.md +8 -4
- package/.docs/docs/mastra-platform/environments.md +8 -4
- package/.docs/docs/mastra-platform/github.md +3 -1
- package/.docs/docs/mastra-platform/server.md +1 -1
- package/.docs/docs/mastra-platform/studio.md +2 -2
- package/.docs/docs/mastra-platform/workspace.md +6 -6
- package/.docs/docs/mcp/mcp-apps.md +1 -1
- package/.docs/docs/mcp/overview.md +9 -9
- package/.docs/docs/memory/memory-processors.md +10 -10
- package/.docs/docs/memory/message-history.md +11 -5
- package/.docs/docs/memory/multi-user-threads.md +6 -6
- package/.docs/docs/memory/observational-memory.md +27 -25
- package/.docs/docs/memory/overview.md +10 -10
- package/.docs/docs/memory/semantic-recall.md +3 -3
- package/.docs/docs/memory/working-memory.md +8 -8
- package/.docs/docs/observability/integrations/bridges/datadog.md +6 -6
- package/.docs/docs/observability/integrations/bridges/otel.md +5 -5
- package/.docs/docs/observability/integrations/exporters/datadog.md +1 -1
- package/.docs/docs/observability/integrations/exporters/laminar.md +1 -1
- package/.docs/docs/observability/integrations/exporters/langfuse.md +3 -3
- package/.docs/docs/observability/integrations/exporters/langsmith.md +4 -4
- package/.docs/docs/observability/integrations/exporters/mastra-platform.md +1 -1
- package/.docs/docs/observability/integrations/exporters/mastra-storage.md +1 -1
- package/.docs/docs/observability/integrations/exporters/otel.md +26 -4
- package/.docs/docs/observability/integrations/exporters/sentry.md +1 -1
- package/.docs/docs/observability/integrations/overview.md +1 -1
- package/.docs/docs/observability/integrations/processors/sensitive-data-filter.md +1 -1
- package/.docs/docs/observability/logging.md +1 -1
- package/.docs/docs/observability/metrics/overview.md +1 -1
- package/.docs/docs/observability/metrics/querying.md +8 -8
- package/.docs/docs/observability/overview.md +4 -4
- package/.docs/docs/observability/tracing/overview.md +18 -12
- package/.docs/docs/rag/chunking-and-embedding.md +1 -1
- package/.docs/docs/rag/graph-rag.md +7 -7
- package/.docs/docs/rag/overview.md +2 -2
- package/.docs/docs/rag/retrieval.md +18 -18
- package/.docs/docs/rag/vector-databases.md +2 -2
- package/.docs/docs/server/auth/composite-auth.md +2 -2
- package/.docs/docs/server/auth/fga.md +6 -6
- package/.docs/docs/server/auth/firebase.md +2 -2
- package/.docs/docs/server/auth/simple-auth.md +1 -1
- package/.docs/docs/server/auth/workers.md +133 -0
- package/.docs/docs/server/custom-adapters.md +4 -4
- package/.docs/docs/server/mastra-client.md +3 -3
- package/.docs/docs/server/mastra-server.md +2 -2
- package/.docs/docs/server/middleware.md +1 -1
- package/.docs/docs/server/pubsub.md +7 -4
- package/.docs/docs/server/request-context.md +11 -11
- package/.docs/docs/server/server-adapters.md +2 -2
- package/.docs/docs/storage/overview.md +2 -2
- package/.docs/docs/studio/auth.md +5 -5
- package/.docs/docs/studio/deployment.md +1 -1
- package/.docs/docs/studio/observability.md +2 -2
- package/.docs/docs/studio/overview.md +11 -9
- package/.docs/docs/voice/overview.md +26 -26
- package/.docs/docs/voice/realtime-voice.md +8 -8
- package/.docs/docs/voice/speech-to-speech.md +9 -9
- package/.docs/docs/voice/speech-to-text.md +3 -3
- package/.docs/docs/voice/text-to-speech.md +6 -6
- package/.docs/docs/what-is-mastra.md +161 -0
- package/.docs/docs/workflows/agents-and-tools.md +3 -3
- package/.docs/docs/workflows/control-flow.md +10 -8
- package/.docs/docs/workflows/error-handling.md +2 -2
- package/.docs/docs/workflows/overview.md +7 -6
- package/.docs/docs/workflows/scheduled-workflows.md +12 -12
- package/.docs/docs/workflows/snapshots.md +3 -3
- package/.docs/docs/workflows/suspend-and-resume.md +1 -1
- package/.docs/docs/workflows/time-travel.md +3 -1
- package/.docs/docs/workflows/workflow-state.md +1 -1
- package/.docs/docs/workspace/filesystem.md +10 -10
- package/.docs/docs/workspace/lsp.md +1 -1
- package/.docs/docs/workspace/overview.md +12 -12
- package/.docs/docs/workspace/sandbox.md +9 -7
- package/.docs/docs/workspace/search.md +3 -3
- package/.docs/docs/workspace/skills.md +7 -7
- package/.docs/guides/build-your-ui/ai-sdk-ui.md +6 -6
- package/.docs/guides/build-your-ui/copilotkit/generative-ui.md +9 -9
- package/.docs/guides/build-your-ui/copilotkit/overview.md +2 -2
- package/.docs/guides/build-your-ui/openui.md +2 -2
- package/.docs/guides/concepts/multi-agent-systems.md +5 -5
- package/.docs/guides/concepts/streaming.md +10 -10
- package/.docs/guides/deployment/amazon-ec2.md +1 -1
- package/.docs/guides/deployment/aws-lambda.md +1 -1
- package/.docs/guides/deployment/azure-app-services.md +1 -1
- package/.docs/guides/deployment/cloudflare.md +1 -1
- package/.docs/guides/deployment/inngest.md +6 -6
- package/.docs/guides/deployment/kubernetes.md +1 -1
- package/.docs/guides/deployment/mastra-workers.md +232 -0
- package/.docs/guides/deployment/temporal.md +1 -1
- package/.docs/guides/deployment/vercel.md +1 -1
- package/.docs/guides/getting-started/astro.md +1 -1
- package/.docs/guides/getting-started/electron.md +1 -1
- package/.docs/guides/getting-started/nestjs.md +5 -5
- package/.docs/guides/getting-started/vite-react.md +1 -1
- package/.docs/guides/guide/ai-recruiter.md +1 -1
- package/.docs/guides/guide/chef-michel.md +2 -2
- package/.docs/guides/guide/code-review-bot.md +2 -2
- package/.docs/guides/guide/coding-agent.md +5 -5
- package/.docs/guides/guide/dev-assistant.md +2 -2
- package/.docs/guides/guide/docs-manager.md +4 -4
- package/.docs/guides/guide/firecrawl.md +1 -1
- package/.docs/guides/guide/github-actions-pr-description.md +5 -5
- package/.docs/guides/guide/research-assistant.md +4 -4
- package/.docs/guides/guide/research-coordinator.md +5 -5
- package/.docs/guides/guide/signal-provider.md +1 -1
- package/.docs/guides/guide/slack-assistant.md +1 -1
- package/.docs/guides/guide/stock-agent.md +3 -3
- package/.docs/guides/guide/web-search.md +4 -4
- package/.docs/guides/guide/whatsapp-chat-bot.md +2 -2
- package/.docs/guides/index.md +1 -1
- package/.docs/guides/migrations/agentnetwork.md +4 -4
- package/.docs/guides/migrations/ai-sdk-v4-to-v5.md +1 -1
- package/.docs/guides/migrations/mastra-cloud.md +6 -6
- package/.docs/guides/migrations/network-to-supervisor.md +9 -9
- package/.docs/guides/migrations/upgrade-to-v1/agent.md +6 -6
- package/.docs/guides/migrations/upgrade-to-v1/cli.md +1 -1
- package/.docs/guides/migrations/upgrade-to-v1/client.md +3 -3
- package/.docs/guides/migrations/upgrade-to-v1/evals.md +2 -2
- package/.docs/guides/migrations/upgrade-to-v1/memory.md +1 -1
- package/.docs/guides/migrations/upgrade-to-v1/overview.md +3 -3
- package/.docs/guides/migrations/upgrade-to-v1/processors.md +1 -1
- package/.docs/guides/migrations/upgrade-to-v1/storage.md +11 -11
- package/.docs/guides/migrations/upgrade-to-v1/tools.md +3 -3
- package/.docs/guides/migrations/upgrade-to-v1/tracing.md +2 -2
- package/.docs/guides/migrations/upgrade-to-v1/voice.md +1 -1
- package/.docs/guides/migrations/upgrade-to-v1/workflows.md +1 -1
- package/.docs/guides/migrations/vnext-to-standard-apis.md +2 -2
- package/.docs/models/environment-variables.md +1 -0
- package/.docs/models/gateways/custom-gateways.md +3 -3
- package/.docs/models/gateways/openrouter.md +1 -3
- package/.docs/models/gateways/vercel.md +2 -1
- package/.docs/models/index.md +6 -6
- package/.docs/models/providers/baseten.md +1 -1
- package/.docs/models/providers/chutes.md +2 -1
- package/.docs/models/providers/crossmodel.md +2 -2
- package/.docs/models/providers/deepinfra.md +1 -1
- package/.docs/models/providers/hyper.md +3 -3
- package/.docs/models/providers/llmgateway.md +4 -3
- package/.docs/models/providers/modal.md +73 -0
- package/.docs/models/providers/wandb.md +2 -1
- package/.docs/models/providers.md +1 -0
- package/.docs/reference/acp/acp-agent.md +4 -4
- package/.docs/reference/acp/create-acp-tool.md +3 -3
- package/.docs/reference/agent-controller/agent-controller-class.md +36 -36
- package/.docs/reference/agent-controller/session.md +6 -6
- package/.docs/reference/agents/agent.md +14 -14
- package/.docs/reference/agents/channels.md +29 -13
- package/.docs/reference/agents/durable-agent.md +54 -5
- package/.docs/reference/agents/generate.md +3 -3
- package/.docs/reference/agents/generateLegacy.md +1 -1
- package/.docs/reference/agents/getDefaultOptions.md +1 -1
- package/.docs/reference/agents/getDefaultStreamOptions.md +1 -1
- package/.docs/reference/agents/getLLM.md +2 -2
- package/.docs/reference/agents/getMetadata.md +2 -2
- package/.docs/reference/agents/inngest-agent.md +1 -1
- package/.docs/reference/agents/listScorers.md +1 -1
- package/.docs/reference/agents/listSkills.md +1 -1
- package/.docs/reference/agents/listSuspendedRuns.md +2 -2
- package/.docs/reference/agents/network.md +1 -1
- package/.docs/reference/ai-sdk/chat-route.md +1 -1
- package/.docs/reference/ai-sdk/network-route.md +1 -1
- package/.docs/reference/ai-sdk/to-ai-sdk-messages.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/ai-sdk/workflow-route.md +1 -1
- package/.docs/reference/ai-sdk/workflow-snapshot-to-stream.md +2 -2
- package/.docs/reference/auth/auth0.md +1 -1
- package/.docs/reference/auth/fga.md +2 -2
- package/.docs/reference/auth/google.md +2 -2
- package/.docs/reference/auth/okta.md +1 -1
- package/.docs/reference/auth/workos.md +2 -2
- package/.docs/reference/browser/agent-browser.md +3 -3
- package/.docs/reference/browser/browser-viewer.md +4 -4
- package/.docs/reference/browser/firecrawl-browser.md +1 -1
- package/.docs/reference/browser/mastra-browser.md +4 -4
- package/.docs/reference/browser/stagehand-browser.md +8 -8
- package/.docs/reference/channels/slack-provider.md +2 -2
- package/.docs/reference/cli/create-mastra.md +1 -1
- package/.docs/reference/cli/mastra.md +155 -24
- package/.docs/reference/client-js/agents.md +26 -9
- package/.docs/reference/client-js/memory.md +2 -2
- package/.docs/reference/client-js/workflows.md +1 -1
- package/.docs/reference/coding-agent/build-base-prompt.md +2 -2
- package/.docs/reference/coding-agent/create-coding-agent.md +2 -2
- package/.docs/reference/configuration.md +7 -7
- package/.docs/reference/core/getAgentById.md +1 -1
- package/.docs/reference/core/getMCPServer.md +1 -1
- package/.docs/reference/core/getScorer.md +1 -1
- package/.docs/reference/core/mastra-class.md +48 -1
- package/.docs/reference/core/mastra-model-gateway.md +1 -1
- package/.docs/reference/datasets/addItem.md +1 -1
- package/.docs/reference/datasets/listItems.md +1 -1
- package/.docs/reference/deployer/netlify.md +4 -4
- package/.docs/reference/deployer/vercel.md +7 -7
- package/.docs/reference/editor/agent-builder/agent-builder-options.md +4 -4
- package/.docs/reference/editor/agent-builder/builder-agent-defaults.md +6 -6
- package/.docs/reference/editor/agent-builder/builder-models.md +3 -3
- package/.docs/reference/editor/blob-store-provider.md +1 -1
- package/.docs/reference/editor/browser-provider.md +3 -3
- package/.docs/reference/editor/filesystem-provider.md +4 -4
- package/.docs/reference/editor/mastra-editor.md +5 -5
- package/.docs/reference/editor/processor-provider.md +3 -3
- package/.docs/reference/editor/sandbox-provider.md +4 -4
- package/.docs/reference/editor/storage-browser-ref.md +6 -6
- package/.docs/reference/editor/storage-workspace-ref.md +4 -4
- package/.docs/reference/editor/tool-provider.md +1 -1
- package/.docs/reference/evals/answer-relevancy.md +5 -5
- package/.docs/reference/evals/answer-similarity.md +1 -1
- package/.docs/reference/evals/bias.md +4 -4
- package/.docs/reference/evals/checks.md +3 -3
- package/.docs/reference/evals/completeness.md +5 -5
- package/.docs/reference/evals/content-similarity.md +5 -5
- package/.docs/reference/evals/context-precision.md +5 -5
- package/.docs/reference/evals/context-recall.md +11 -11
- package/.docs/reference/evals/context-relevance.md +15 -15
- package/.docs/reference/evals/create-scorer.md +1 -1
- package/.docs/reference/evals/faithfulness.md +4 -4
- package/.docs/reference/evals/filter-run.md +2 -2
- package/.docs/reference/evals/hallucination.md +11 -11
- package/.docs/reference/evals/keyword-coverage.md +6 -6
- package/.docs/reference/evals/mastra-scorer.md +2 -2
- package/.docs/reference/evals/noise-sensitivity.md +15 -15
- package/.docs/reference/evals/prompt-alignment.md +20 -20
- package/.docs/reference/evals/rubric.md +2 -2
- package/.docs/reference/evals/run-evals.md +3 -3
- package/.docs/reference/evals/scorer-utils.md +4 -4
- package/.docs/reference/evals/textual-difference.md +4 -4
- package/.docs/reference/evals/tool-call-accuracy.md +4 -4
- package/.docs/reference/evals/toxicity.md +5 -5
- package/.docs/reference/evals/trajectory-accuracy.md +10 -10
- package/.docs/reference/file-based-agents/config.md +3 -3
- package/.docs/reference/file-based-agents/instructions.md +3 -3
- package/.docs/reference/file-based-agents/logger.md +1 -1
- package/.docs/reference/file-based-agents/observability.md +1 -1
- package/.docs/reference/file-based-agents/processors.md +1 -1
- package/.docs/reference/file-based-agents/skills.md +1 -1
- package/.docs/reference/file-based-agents/storage.md +1 -1
- package/.docs/reference/file-based-agents/studio.md +1 -1
- package/.docs/reference/file-based-agents/subagents.md +4 -4
- package/.docs/reference/file-based-agents/tools.md +1 -1
- package/.docs/reference/file-based-agents/workspace.md +1 -1
- package/.docs/reference/index.md +2 -0
- package/.docs/reference/logging/pino-logger.md +3 -3
- package/.docs/reference/memory/clone-utilities.md +1 -1
- package/.docs/reference/memory/cloneThread.md +3 -3
- package/.docs/reference/memory/listThreads.md +1 -1
- package/.docs/reference/memory/memory-class.md +4 -4
- package/.docs/reference/memory/observational-memory.md +15 -15
- package/.docs/reference/memory/recall.md +2 -2
- package/.docs/reference/memory/serialized-memory-config.md +4 -4
- package/.docs/reference/memory/summarizeConversation.md +3 -3
- package/.docs/reference/memory/summarizeThread.md +3 -3
- package/.docs/reference/observability/feedback.md +1 -1
- package/.docs/reference/observability/metrics/automatic-metrics.md +7 -7
- package/.docs/reference/observability/tracing/bridges/datadog.md +2 -2
- package/.docs/reference/observability/tracing/exporters/cloud-exporter.md +3 -3
- package/.docs/reference/observability/tracing/exporters/default-exporter.md +1 -1
- package/.docs/reference/observability/tracing/exporters/langfuse.md +1 -1
- package/.docs/reference/observability/tracing/exporters/mastra-platform-exporter.md +4 -4
- package/.docs/reference/observability/tracing/exporters/mastra-storage-exporter.md +1 -1
- package/.docs/reference/observability/tracing/interfaces.md +1 -1
- package/.docs/reference/observability/tracing/processors/sensitive-data-filter.md +1 -1
- package/.docs/reference/observability/tracing/span-filtering.md +1 -1
- package/.docs/reference/processors/batch-parts-processor.md +1 -1
- package/.docs/reference/processors/cost-guard-processor.md +1 -1
- package/.docs/reference/processors/language-detector.md +1 -1
- package/.docs/reference/processors/message-history-processor.md +1 -1
- package/.docs/reference/processors/moderation-processor.md +2 -2
- package/.docs/reference/processors/pii-detector.md +3 -3
- package/.docs/reference/processors/processor-interface.md +13 -13
- package/.docs/reference/processors/prompt-injection-detector.md +2 -2
- package/.docs/reference/processors/provider-history-compat.md +1 -1
- package/.docs/reference/processors/regex-filter-processor.md +1 -1
- package/.docs/reference/processors/response-cache.md +8 -8
- package/.docs/reference/processors/semantic-recall-processor.md +1 -1
- package/.docs/reference/processors/skill-search-processor.md +1 -1
- package/.docs/reference/processors/system-prompt-scrubber.md +2 -2
- package/.docs/reference/processors/token-limiter-processor.md +4 -4
- package/.docs/reference/processors/tool-call-filter.md +2 -2
- package/.docs/reference/processors/tool-search-processor.md +9 -9
- package/.docs/reference/processors/unicode-normalizer.md +2 -2
- package/.docs/reference/processors/working-memory-processor.md +1 -1
- package/.docs/reference/project-structure.md +1 -1
- package/.docs/reference/pubsub/base.md +4 -4
- package/.docs/reference/pubsub/google-cloud-pubsub.md +2 -2
- package/.docs/reference/pubsub/lease-provider.md +4 -4
- package/.docs/reference/pubsub/redis-streams.md +1 -1
- package/.docs/reference/pubsub/unix-socket-pubsub.md +1 -1
- package/.docs/reference/rag/chunk.md +5 -5
- package/.docs/reference/rag/database-config.md +2 -2
- package/.docs/reference/rag/metadata-filters.md +2 -2
- package/.docs/reference/rag/rerank.md +1 -1
- package/.docs/reference/schedules/overview.md +1 -1
- package/.docs/reference/server/register-api-route.md +1 -1
- package/.docs/reference/server/routes.md +7 -7
- package/.docs/reference/signals/create-notification-inbox-tool.md +1 -1
- package/.docs/reference/signals/signal-provider.md +8 -8
- package/.docs/reference/storage/clickhouse.md +4 -4
- package/.docs/reference/storage/cloudflare-d1.md +4 -4
- package/.docs/reference/storage/convex.md +4 -4
- package/.docs/reference/storage/dsql.md +3 -3
- package/.docs/reference/storage/dynamodb.md +7 -7
- package/.docs/reference/storage/lance.md +1 -1
- package/.docs/reference/storage/mongodb.md +2 -2
- package/.docs/reference/storage/mssql.md +1 -1
- package/.docs/reference/storage/postgresql.md +2 -2
- package/.docs/reference/storage/redis.md +1 -1
- package/.docs/reference/storage/retention.md +33 -33
- package/.docs/reference/storage/spanner.md +8 -8
- package/.docs/reference/storage/upstash.md +1 -1
- package/.docs/reference/streaming/ChunkType.md +2 -2
- package/.docs/reference/streaming/agents/MastraModelOutput.md +1 -1
- package/.docs/reference/streaming/agents/stream.md +2 -2
- package/.docs/reference/streaming/agents/streamUntilIdle.md +2 -2
- package/.docs/reference/streaming/workflows/observeStream.md +1 -1
- package/.docs/reference/streaming/workflows/resumeStream.md +1 -1
- package/.docs/reference/streaming/workflows/stream.md +1 -1
- package/.docs/reference/streaming/workflows/timeTravelStream.md +2 -2
- package/.docs/reference/templates/overview.md +1 -1
- package/.docs/reference/tools/brightdata.md +1 -1
- package/.docs/reference/tools/create-code-mode.md +3 -3
- package/.docs/reference/tools/create-tool.md +1 -1
- package/.docs/reference/tools/graph-rag-tool.md +1 -1
- package/.docs/reference/tools/isolated-vm-transport.md +74 -0
- package/.docs/reference/tools/mcp-client.md +15 -15
- package/.docs/reference/tools/mcp-server.md +21 -21
- package/.docs/reference/tools/submit-plan-tool.md +1 -1
- package/.docs/reference/tools/tavily.md +1 -1
- package/.docs/reference/tools/vector-query-tool.md +5 -5
- package/.docs/reference/vectors/astra.md +1 -1
- package/.docs/reference/vectors/chroma.md +2 -2
- package/.docs/reference/vectors/convex.md +2 -2
- package/.docs/reference/vectors/couchbase.md +4 -4
- package/.docs/reference/vectors/libsql.md +2 -2
- package/.docs/reference/vectors/mongodb.md +3 -3
- package/.docs/reference/vectors/pg.md +5 -5
- package/.docs/reference/vectors/qdrant.md +2 -2
- package/.docs/reference/vectors/s3vectors.md +4 -4
- package/.docs/reference/vectors/turbopuffer.md +1 -1
- package/.docs/reference/vectors/upstash.md +1 -1
- package/.docs/reference/voice/aws-nova-sonic.md +1 -1
- package/.docs/reference/voice/azure.md +1 -1
- package/.docs/reference/voice/google-gemini-live.md +4 -4
- package/.docs/reference/voice/inworld-realtime.md +7 -7
- package/.docs/reference/voice/livekit.md +13 -13
- package/.docs/reference/voice/mistral.md +1 -1
- package/.docs/reference/voice/openai-realtime.md +1 -1
- package/.docs/reference/voice/sarvam.md +1 -1
- package/.docs/reference/voice/voice.addInstructions.md +1 -1
- package/.docs/reference/voice/voice.addTools.md +1 -1
- package/.docs/reference/voice/voice.events.md +1 -1
- package/.docs/reference/voice/voice.getSpeakers.md +2 -2
- package/.docs/reference/voice/voice.on.md +2 -2
- package/.docs/reference/voice/xai-realtime.md +2 -2
- package/.docs/reference/workers/overview.md +85 -0
- package/.docs/reference/workflows/run-methods/cancel.md +1 -1
- package/.docs/reference/workflows/run-methods/startAsync.md +1 -1
- package/.docs/reference/workflows/run-methods/timeTravel.md +1 -1
- package/.docs/reference/workflows/workflow-methods/foreach.md +1 -1
- package/.docs/reference/workflows/workflow-methods/sleep.md +1 -1
- package/.docs/reference/workflows/workflow-state-reader.md +2 -2
- package/.docs/reference/workspace/agentfs-filesystem.md +1 -1
- package/.docs/reference/workspace/apple-container-sandbox.md +2 -2
- package/.docs/reference/workspace/daytona-sandbox.md +3 -3
- package/.docs/reference/workspace/docker-sandbox.md +2 -2
- package/.docs/reference/workspace/e2b-sandbox.md +2 -2
- package/.docs/reference/workspace/files-sdk-filesystem.md +3 -3
- package/.docs/reference/workspace/google-drive-filesystem.md +4 -4
- package/.docs/reference/workspace/local-filesystem.md +3 -3
- package/.docs/reference/workspace/local-sandbox.md +3 -3
- package/.docs/reference/workspace/modal-sandbox.md +1 -1
- package/.docs/reference/workspace/platform-filesystem.md +3 -3
- package/.docs/reference/workspace/platform-sandbox.md +2 -2
- package/.docs/reference/workspace/process-manager.md +1 -1
- package/.docs/reference/workspace/railway-sandbox.md +4 -4
- package/.docs/reference/workspace/s3-filesystem.md +1 -1
- package/.docs/reference/workspace/sandbox.md +1 -1
- package/.docs/reference/workspace/vercel-sandbox.md +1 -1
- package/.docs/reference/workspace/workspace-class.md +10 -10
- package/CHANGELOG.md +21 -0
- package/package.json +3 -3
|
@@ -14,7 +14,7 @@ import { StagehandBrowser } from '@mastra/stagehand'
|
|
|
14
14
|
|
|
15
15
|
const browser = new StagehandBrowser({
|
|
16
16
|
headless: true,
|
|
17
|
-
model: 'openai/gpt-5.
|
|
17
|
+
model: 'openai/gpt-5.6-sol',
|
|
18
18
|
selfHeal: true,
|
|
19
19
|
})
|
|
20
20
|
|
|
@@ -24,7 +24,7 @@ export const browserAgent = new Agent({
|
|
|
24
24
|
instructions: `You can browse the web using natural language.
|
|
25
25
|
Use stagehand_act to perform actions like "click the login button".
|
|
26
26
|
Use stagehand_extract to get data from pages.`,
|
|
27
|
-
model: 'openai/gpt-5.
|
|
27
|
+
model: 'openai/gpt-5.6-sol',
|
|
28
28
|
browser,
|
|
29
29
|
})
|
|
30
30
|
```
|
|
@@ -79,7 +79,7 @@ Core tools:
|
|
|
79
79
|
| ---------------------- | ------------------------------------------------------------------------------------- |
|
|
80
80
|
| `stagehand_act` | Perform actions using natural language instructions |
|
|
81
81
|
| `stagehand_extract` | Extract structured data from pages |
|
|
82
|
-
| `stagehand_observe` | Discover
|
|
82
|
+
| `stagehand_observe` | Discover useful elements on a page |
|
|
83
83
|
| `stagehand_navigate` | Navigate to a URL |
|
|
84
84
|
| `stagehand_tabs` | Manage browser tabs |
|
|
85
85
|
| `stagehand_screenshot` | Capture a screenshot as PNG (viewport by default; set `fullPage: true` for full page) |
|
|
@@ -171,7 +171,7 @@ interface ExtractResult<T = unknown> {
|
|
|
171
171
|
|
|
172
172
|
### `stagehand_observe`
|
|
173
173
|
|
|
174
|
-
Discover
|
|
174
|
+
Discover useful elements on a page. Returns a list of elements with their selectors and descriptions.
|
|
175
175
|
|
|
176
176
|
```text
|
|
177
177
|
// Find specific elements
|
|
@@ -222,7 +222,7 @@ Navigate to a URL.
|
|
|
222
222
|
|
|
223
223
|
| Parameter | Type | Description |
|
|
224
224
|
| ----------- | ----------------------------------------------- | ----------------------------------------------- |
|
|
225
|
-
| `url` | `string` | URL to
|
|
225
|
+
| `url` | `string` | URL to open (required) |
|
|
226
226
|
| `waitUntil` | `"load" \| "domcontentloaded" \| "networkidle"` | When to consider navigation complete (optional) |
|
|
227
227
|
|
|
228
228
|
### `stagehand_tabs`
|
|
@@ -245,7 +245,7 @@ Manage browser tabs.
|
|
|
245
245
|
|
|
246
246
|
### `stagehand_screenshot`
|
|
247
247
|
|
|
248
|
-
Capture a screenshot of the current page as PNG (viewport by default
|
|
248
|
+
Capture a screenshot of the current page as PNG (viewport by default. Set `fullPage: true` for full-page capture). Returns image content that vision-capable models can interpret directly. Use `stagehand_observe` or `stagehand_extract` when you only need text or structured data.
|
|
249
249
|
|
|
250
250
|
```text
|
|
251
251
|
// Viewport only (default)
|
|
@@ -276,7 +276,7 @@ const browser = new StagehandBrowser({
|
|
|
276
276
|
env: 'BROWSERBASE',
|
|
277
277
|
apiKey: process.env.BROWSERBASE_API_KEY,
|
|
278
278
|
projectId: process.env.BROWSERBASE_PROJECT_ID,
|
|
279
|
-
model: 'openai/gpt-5.
|
|
279
|
+
model: 'openai/gpt-5.6-sol',
|
|
280
280
|
})
|
|
281
281
|
```
|
|
282
282
|
|
|
@@ -287,7 +287,7 @@ Configure the AI model for Stagehand operations:
|
|
|
287
287
|
```typescript
|
|
288
288
|
// String format: "provider/model"
|
|
289
289
|
const browser = new StagehandBrowser({
|
|
290
|
-
model: 'openai/gpt-5.
|
|
290
|
+
model: 'openai/gpt-5.6-sol',
|
|
291
291
|
})
|
|
292
292
|
|
|
293
293
|
// Object format for custom configuration
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
## Usage example
|
|
8
8
|
|
|
9
|
-
Register the provider on the `Mastra` constructor. The refresh token is single-use and rotates on startup
|
|
9
|
+
Register the provider on the `Mastra` constructor. The refresh token is single-use and rotates on startup. The resulting access tokens are persisted to `Mastra.storage`.
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
12
|
import { Mastra } from '@mastra/core/mastra'
|
|
@@ -171,7 +171,7 @@ slack.setBaseUrl('https://abc123.trycloudflare.com')
|
|
|
171
171
|
|
|
172
172
|
#### `initialize()`
|
|
173
173
|
|
|
174
|
-
Recreates a `SlackAdapter` for each active installation in storage and injects `AgentChannels` into the corresponding agent so it receives Slack events on startup. Doesn't auto-provision new apps
|
|
174
|
+
Recreates a `SlackAdapter` for each active installation in storage and injects `AgentChannels` into the corresponding agent so it receives Slack events on startup. Doesn't auto-provision new apps. Use `connect()` to create one. Mastra calls this automatically, so you rarely call it directly.
|
|
175
175
|
|
|
176
176
|
```typescript
|
|
177
177
|
await slack.initialize()
|
|
@@ -60,7 +60,7 @@ yarn dlx create-mastra@latest my-mastra-project --llm anthropic
|
|
|
60
60
|
bun x create-mastra@latest my-mastra-project --llm anthropic
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
Omit `--llm` to select the provider and optionally enter its API key interactively. The interactive setup also offers to connect your project to the Mastra platform. If enabled, the command opens the browser authentication flow
|
|
63
|
+
Omit `--llm` to select the provider and optionally enter its API key interactively. The interactive setup also offers to connect your project to the Mastra platform. If enabled, the command opens the browser authentication flow and creates a platform project with the same name as the local project. It then writes `MASTRA_PLATFORM_ACCESS_TOKEN` and `MASTRA_PROJECT_ID` to `.env`.
|
|
64
64
|
|
|
65
65
|
### Template
|
|
66
66
|
|
|
@@ -32,7 +32,7 @@ Comma-separated list of custom arguments to pass to the Node.js process, e.g. `-
|
|
|
32
32
|
|
|
33
33
|
#### `--request-context-presets`
|
|
34
34
|
|
|
35
|
-
Path to a JSON file containing
|
|
35
|
+
Path to a JSON file containing [request context](https://mastra.ai/docs/server/request-context) presets. When provided, a dropdown displays in Studio's request context editor, letting you quickly switch between preset configurations.
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
38
|
mastra dev --request-context-presets ./presets.json
|
|
@@ -49,7 +49,7 @@ The file must be a JSON object where each key is a preset name and each value is
|
|
|
49
49
|
|
|
50
50
|
### Configs
|
|
51
51
|
|
|
52
|
-
You can set
|
|
52
|
+
You can set environment variables to modify the behavior of `mastra dev`.
|
|
53
53
|
|
|
54
54
|
#### Skip peer dependency check
|
|
55
55
|
|
|
@@ -121,7 +121,7 @@ Under the hood Mastra's Rollup server locates your Mastra entry file and bundles
|
|
|
121
121
|
|
|
122
122
|
The output in `.mastra` can be deployed to any cloud server using [`mastra start`](#mastra-start).
|
|
123
123
|
|
|
124
|
-
If you're deploying to a [serverless platform](https://mastra.ai/docs/deployment/cloud-providers) you need to install the correct deployer
|
|
124
|
+
If you're deploying to a [serverless platform](https://mastra.ai/docs/deployment/cloud-providers) you need to install the correct deployer to receive the correct output in `.mastra`.
|
|
125
125
|
|
|
126
126
|
It accepts [common flags](#common-flags).
|
|
127
127
|
|
|
@@ -133,7 +133,7 @@ Bundle the Studio UI with the build.
|
|
|
133
133
|
|
|
134
134
|
### Configs
|
|
135
135
|
|
|
136
|
-
You can set
|
|
136
|
+
You can set environment variables to modify the behavior of `mastra build`.
|
|
137
137
|
|
|
138
138
|
#### Skip peer dependency check
|
|
139
139
|
|
|
@@ -169,6 +169,55 @@ The path to your built Mastra output directory. Defaults to `.mastra/output`.
|
|
|
169
169
|
|
|
170
170
|
Comma-separated list of custom arguments to pass to the Node.js process, e.g. `--require=newrelic` or `--experimental-transform-types`.
|
|
171
171
|
|
|
172
|
+
## `mastra worker build`
|
|
173
|
+
|
|
174
|
+
Bundles your Mastra application for worker deployment. Produces the same output as `mastra build` — a self-contained `.mastra/output/` directory.
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
mastra worker build [options]
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Flags
|
|
181
|
+
|
|
182
|
+
| Flag | Description |
|
|
183
|
+
| --------------------- | ------------------------------------------------------------ |
|
|
184
|
+
| `--dir <path>` | Path to your Mastra source directory (default: `src/mastra`) |
|
|
185
|
+
| `--root <path>` | Project root directory (default: current directory) |
|
|
186
|
+
| `--tools <paths>` | Comma-separated tool paths to include |
|
|
187
|
+
| `--output-dir <path>` | Custom output directory (default: `.mastra/output`) |
|
|
188
|
+
| `--debug` | Enable debug logging |
|
|
189
|
+
|
|
190
|
+
## `mastra worker start`
|
|
191
|
+
|
|
192
|
+
> **Info:** You need to run `mastra worker build` or `mastra build` before using `mastra worker start`.
|
|
193
|
+
|
|
194
|
+
Starts a worker process from a previously built bundle.
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
mastra worker start [name] [options]
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
| Argument/Flag | Description |
|
|
201
|
+
| -------------- | ------------------------------------------------------------------- |
|
|
202
|
+
| `name` | Worker name to start. Sets `MASTRA_WORKERS` in the spawned process. |
|
|
203
|
+
| `--dir <path>` | Path to the build output (default: `.mastra/output`) |
|
|
204
|
+
| `--env <path>` | Path to environment file (default: `.env.production`, then `.env`) |
|
|
205
|
+
|
|
206
|
+
### Examples
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
# Start only the orchestration worker
|
|
210
|
+
mastra worker start orchestration
|
|
211
|
+
|
|
212
|
+
# Start only the scheduler
|
|
213
|
+
mastra worker start scheduler
|
|
214
|
+
|
|
215
|
+
# Start from a custom build directory
|
|
216
|
+
mastra worker start orchestration --dir ./dist
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
See [Workers](https://mastra.ai/docs/deployment/workers) for deployment topologies and configuration.
|
|
220
|
+
|
|
172
221
|
## `mastra studio`
|
|
173
222
|
|
|
174
223
|
Starts [Studio](https://mastra.ai/docs/studio/overview) as a static server. After starting, you can enter your Mastra instance URL (e.g. `http://localhost:4111`) to connect Studio to your Mastra backend. Looks for `.env` and `.env.production` files in the current working directory for configuration.
|
|
@@ -199,7 +248,7 @@ The API route prefix of the Mastra API server. Defaults to `/api`.
|
|
|
199
248
|
|
|
200
249
|
#### `--request-context-presets`
|
|
201
250
|
|
|
202
|
-
Path to a JSON file containing
|
|
251
|
+
Path to a JSON file containing [request context](https://mastra.ai/docs/server/request-context) presets. Works the same as the [`mastra dev` flag](#--request-context-presets).
|
|
203
252
|
|
|
204
253
|
```bash
|
|
205
254
|
mastra studio --request-context-presets ./presets.json
|
|
@@ -207,7 +256,7 @@ mastra studio --request-context-presets ./presets.json
|
|
|
207
256
|
|
|
208
257
|
## `mastra deploy`
|
|
209
258
|
|
|
210
|
-
Builds and deploys your project to
|
|
259
|
+
Builds and deploys your project to the Mastra platform environment selected by `--env`. This is the recommended command for all new deploys and replaces both [`mastra studio deploy`](#mastra-studio-deploy) and [`mastra server deploy`](#mastra-server-deploy), which continue to work but should no longer be used for new setups.
|
|
211
260
|
|
|
212
261
|
Requires authentication via [`mastra auth login`](#mastra-auth-login) or a `MASTRA_API_TOKEN` environment variable.
|
|
213
262
|
|
|
@@ -217,7 +266,7 @@ mastra deploy --env staging
|
|
|
217
266
|
mastra deploy --env production --region eu
|
|
218
267
|
```
|
|
219
268
|
|
|
220
|
-
The command runs `mastra build
|
|
269
|
+
The command runs `mastra build` and zips the output before uploading it to the selected environment. It then polls the deploy status while streaming build logs until the deploy reaches a terminal state.
|
|
221
270
|
|
|
222
271
|
Organization, project, and environment are resolved in order from: environment variable (`MASTRA_ORG_ID`, `MASTRA_PROJECT_ID`), CLI flag (`--org`, `--project`, `--env`), `.mastra-project.json` config file, current org from credentials, and lastly interactive prompt. On first deploy, the CLI saves the resolved org and project IDs to `.mastra-project.json` so subsequent deploys skip the prompts.
|
|
223
272
|
|
|
@@ -294,9 +343,9 @@ mastra deploy --env staging --yes
|
|
|
294
343
|
|
|
295
344
|
## `mastra env`
|
|
296
345
|
|
|
297
|
-
Manages environments on Mastra platform. Environments are
|
|
346
|
+
Manages environments on Mastra platform. Environments are deploy targets (for example `production`, `staging`, `preview-42`) that belong to a project. The current organization is resolved from stored credentials.
|
|
298
347
|
|
|
299
|
-
Every subcommand resolves its project
|
|
348
|
+
Every subcommand resolves its project in a fixed order. It first checks the `MASTRA_PROJECT_ID` environment variable and the `--project <name|slug|id>` flag. It then reads the `.mastra-project.json` file written by [`mastra deploy`](#mastra-deploy) in the current directory. Run from your project directory and you never need to name the project.
|
|
300
349
|
|
|
301
350
|
### `mastra env list`
|
|
302
351
|
|
|
@@ -356,7 +405,7 @@ mastra env restart <env>
|
|
|
356
405
|
|
|
357
406
|
### `mastra env vars pull`
|
|
358
407
|
|
|
359
|
-
Pulls an environment's env vars into a local env file (default: `.env`). The file contains the merged set a deploy
|
|
408
|
+
Pulls an environment's env vars into a local env file (default: `.env`). The file contains the merged set used by a deploy. It combines vars stored on the environment (for example, added in the dashboard's environment editor) with project-level vars. Project values win on conflict. Managed vars injected by attached databases are listed as comments (names only) since their values are platform-managed secrets.
|
|
360
409
|
|
|
361
410
|
```bash
|
|
362
411
|
mastra env vars pull
|
|
@@ -373,7 +422,7 @@ File to write. Defaults to `.env`.
|
|
|
373
422
|
|
|
374
423
|
Manages databases attached to a project on Mastra platform. Databases are provisioned from a managed provider (for example Turso or Neon) and inject their connection env vars into deploys automatically.
|
|
375
424
|
|
|
376
|
-
A database is either **environment-scoped** (its env vars only go to one environment) or **shared** (project-scoped: its env vars go to all environments). Environment-scoped is the default for `mastra env db create
|
|
425
|
+
A database is either **environment-scoped** (its env vars only go to one environment) or **shared** (project-scoped: its env vars go to all environments). Environment-scoped is the default for `mastra env db create`: pass an environment argument, or let the CLI pick or prompt for one. Pass `--shared` on create to attach a shared database instead. For other subcommands (`list`, `delete`, `keys`), pass the environment argument to work with environment-scoped databases and omit it for shared databases.
|
|
377
426
|
|
|
378
427
|
Creating and deleting databases requires the `admin` role in the organization.
|
|
379
428
|
|
|
@@ -392,7 +441,7 @@ Emit machine-readable JSON.
|
|
|
392
441
|
|
|
393
442
|
### `mastra env db create`
|
|
394
443
|
|
|
395
|
-
Provisions a managed database,
|
|
444
|
+
Provisions and attaches a managed database, then polls until it's ready. Provisioning errors are printed with the provider's error detail.
|
|
396
445
|
|
|
397
446
|
By default the database is scoped to a single environment: pass an environment argument to pick it, or omit the argument to have the CLI pick for you. When the project has one environment, that environment is used. When it has several, the CLI prompts you to select one interactively; in non-interactive contexts (CI, `--json`) an environment argument is required. Pass `--shared` to attach a project-scoped database that's shared by every environment instead.
|
|
398
447
|
|
|
@@ -419,7 +468,7 @@ Provider region ID for shared databases. Ignored for environment-scoped database
|
|
|
419
468
|
|
|
420
469
|
#### `--shared`
|
|
421
470
|
|
|
422
|
-
Attach as a project-scoped database that's shared by every environment.
|
|
471
|
+
Attach as a project-scoped database that's shared by every environment. Can't be combined with an environment argument.
|
|
423
472
|
|
|
424
473
|
#### `--no-wait`
|
|
425
474
|
|
|
@@ -475,7 +524,7 @@ Emit machine-readable JSON.
|
|
|
475
524
|
|
|
476
525
|
## `mastra studio deploy`
|
|
477
526
|
|
|
478
|
-
> **Info:** `mastra studio deploy` continues to work but is superseded by [`mastra deploy`](#mastra-deploy), which supports
|
|
527
|
+
> **Info:** `mastra studio deploy` continues to work but is superseded by [`mastra deploy`](#mastra-deploy), which supports environments (`--env staging`, `--env production`) on a single project. New setups should use `mastra deploy`.
|
|
479
528
|
|
|
480
529
|
Builds and deploys your project to Mastra platform. Requires authentication via [`mastra auth login`](#mastra-auth-login) or a `MASTRA_API_TOKEN` environment variable.
|
|
481
530
|
|
|
@@ -483,11 +532,11 @@ Builds and deploys your project to Mastra platform. Requires authentication via
|
|
|
483
532
|
mastra studio deploy
|
|
484
533
|
```
|
|
485
534
|
|
|
486
|
-
The command runs `mastra build
|
|
535
|
+
The command runs `mastra build` and zips the output. It reads an env file from the project directory before uploading everything to the platform. After uploading, it polls the deploy status and streams build logs until the deploy reaches a terminal state.
|
|
487
536
|
|
|
488
537
|
The deploy command auto-loads the project's `.env` file. If `MASTRA_PROJECT_ID` points to a project that was provisioned for Observability, the deploy links to that project instead of creating a new one. Deploying Studio to an observability-only project converts it into a Studio project on the platform side.
|
|
489
538
|
|
|
490
|
-
The CLI requires at least one `.env` or `.env.*` file (excluding `.env.example`) in the project directory and fails with `Error: No env file found for deploy.` if none exists. When multiple env files are present, the CLI prompts you to pick one (defaulting to `.env.production`)
|
|
539
|
+
The CLI requires at least one `.env` or `.env.*` file (excluding `.env.example`) in the project directory and fails with `Error: No env file found for deploy.` if none exists. When multiple env files are present, the CLI prompts you to pick one (defaulting to `.env.production`). Pass `--env-file` to choose explicitly. With `--yes` and multiple env files, you must pass `--env-file` or the deploy errors.
|
|
491
540
|
|
|
492
541
|
Organization and project are resolved in order from: Environment variable flag, `.mastra-project.json` config file, current org from credentials, and lastly interactive prompt. On first deploy, the CLI saves the resolved IDs to `.mastra-project.json` so subsequent deploys skip the prompts.
|
|
493
542
|
|
|
@@ -581,7 +630,7 @@ Shows diagnosis results and suggested fixes for a failed Studio deploy.
|
|
|
581
630
|
mastra studio deploy suggestions [deploy-id]
|
|
582
631
|
```
|
|
583
632
|
|
|
584
|
-
If you omit `deploy-id`, the command uses the latest deploy for the linked project. If a diagnosis doesn't exist yet, the command starts one and polls until results are ready.
|
|
633
|
+
If you omit `deploy-id`, the command uses the latest deploy for the linked project. If a diagnosis doesn't exist yet, the command starts one and polls until results are ready. Suggestions appear only when the diagnosis finds a problem.
|
|
585
634
|
|
|
586
635
|
### `mastra studio projects`
|
|
587
636
|
|
|
@@ -593,7 +642,7 @@ Creates a new project through an interactive prompt. This command doesn't accept
|
|
|
593
642
|
|
|
594
643
|
## `mastra server deploy`
|
|
595
644
|
|
|
596
|
-
> **Info:** `mastra server deploy` continues to work but is superseded by [`mastra deploy`](#mastra-deploy), which deploys a single project to multiple
|
|
645
|
+
> **Info:** `mastra server deploy` continues to work but is superseded by [`mastra deploy`](#mastra-deploy), which deploys a single project to multiple environments instead of separate Studio and Server commands. New setups should use `mastra deploy`.
|
|
597
646
|
|
|
598
647
|
Builds and deploys your project to Server on Mastra platform. Works the same as [`mastra studio deploy`](#mastra-studio-deploy) with the same flags, arguments, and resolution logic.
|
|
599
648
|
|
|
@@ -611,7 +660,7 @@ Shows diagnosis results and suggested fixes for a failed Server deploy.
|
|
|
611
660
|
mastra server deploy suggestions [deploy-id]
|
|
612
661
|
```
|
|
613
662
|
|
|
614
|
-
If you omit `deploy-id`, the command uses the latest deploy for the linked project. If a diagnosis doesn't exist yet, the command starts one and polls until results are ready.
|
|
663
|
+
If you omit `deploy-id`, the command uses the latest deploy for the linked project. If a diagnosis doesn't exist yet, the command starts one and polls until results are ready. Suggestions appear only when the diagnosis finds a problem.
|
|
615
664
|
|
|
616
665
|
## `mastra server pause`
|
|
617
666
|
|
|
@@ -649,7 +698,7 @@ Same flags as [`mastra server pause`](#mastra-server-pause): **`--org`**, **`--p
|
|
|
649
698
|
mastra server restart
|
|
650
699
|
```
|
|
651
700
|
|
|
652
|
-
Fails if a deployment is still active for this project (running, building, deploying, etc.)
|
|
701
|
+
Fails if a deployment is still active for this project (running, building, deploying, etc.). That's a platform restriction so you can't restart while another deploy is in progress.
|
|
653
702
|
|
|
654
703
|
## `mastra server env`
|
|
655
704
|
|
|
@@ -892,7 +941,7 @@ Configure your code editor with Mastra's MCP server. Choose from: `"cursor" | "c
|
|
|
892
941
|
|
|
893
942
|
#### `--observability`
|
|
894
943
|
|
|
895
|
-
Enable Observability on the Mastra platform. The CLI prompts you to select an existing platform project or create a new one
|
|
944
|
+
Enable Observability on the Mastra platform. The CLI prompts you to select an existing platform project or create a new one. It then writes the required environment variables and configures the observability exporters.
|
|
896
945
|
|
|
897
946
|
#### `--no-observability`
|
|
898
947
|
|
|
@@ -906,7 +955,7 @@ Set the platform project name to use when Mastra Observability is enabled.
|
|
|
906
955
|
|
|
907
956
|
Runs database migrations to update your storage schema. This command is useful when upgrading Mastra versions that include storage schema changes.
|
|
908
957
|
|
|
909
|
-
The command bundles your project
|
|
958
|
+
The command bundles your project and connects to your configured storage backend. It then executes any pending migrations. Currently supports:
|
|
910
959
|
|
|
911
960
|
- **Duplicate spans migration**: Removes duplicate `(traceId, spanId)` entries and adds a unique constraint to ensure data integrity.
|
|
912
961
|
- **ClickHouse legacy-to-vNext span migration**: Copies historical spans from the legacy `mastra_ai_spans` table to the vNext `mastra_span_events` schema. Runs in batches to stay within memory limits. See the [ClickHouse storage reference](https://mastra.ai/reference/storage/clickhouse) for details.
|
|
@@ -968,13 +1017,15 @@ For runtime commands, the command resolves the target server in this order:
|
|
|
968
1017
|
|
|
969
1018
|
Automatic platform auth is only used when the CLI resolves a Mastra platform target from `.mastra-project.json`. Localhost targets and explicit `--url` targets don't receive automatic credentials. Headers passed with `--header` are sent to any target, including localhost.
|
|
970
1019
|
|
|
971
|
-
For observability commands (`trace`, `log`, `score`, and `metric`), the CLI targets `https://observability.mastra.ai` by default instead of a project deployment URL.
|
|
1020
|
+
For observability commands (`trace`, `log`, `score`, and `metric`), the CLI targets `https://observability.mastra.ai` by default instead of a project deployment URL. Trace Intelligence commands (`learning`) work the same way but target `https://output.signals.mastra.ai`. Both resolve credentials in this order:
|
|
972
1021
|
|
|
973
1022
|
1. Explicit `Authorization` and `X-Mastra-Project-Id` headers passed with `--header`.
|
|
974
1023
|
2. `MASTRA_PLATFORM_ACCESS_TOKEN` and `MASTRA_PROJECT_ID` from your environment.
|
|
975
1024
|
3. Project metadata from `.mastra-project.json` for the project ID.
|
|
976
1025
|
4. Your Mastra CLI login token as an auth fallback.
|
|
977
1026
|
|
|
1027
|
+
Learning commands also send `X-Mastra-Organization-Id`, resolved from an explicit `--header`, `MASTRA_ORGANIZATION_ID` in your environment, or `.mastra-project.json`, in that order.
|
|
1028
|
+
|
|
978
1029
|
Use `--url` and `--header` when you need to override the default hosted observability target or credentials.
|
|
979
1030
|
|
|
980
1031
|
### Flags
|
|
@@ -1417,7 +1468,7 @@ curl -sS "https://observability.mastra.ai/api/observability/traces/<trace-id>/sp
|
|
|
1417
1468
|
|
|
1418
1469
|
#### `mastra api score create`
|
|
1419
1470
|
|
|
1420
|
-
Creates an observability score. The input uses the server score body shape
|
|
1471
|
+
Creates an observability score. The input uses the server score body shape. Inspect it with `--schema`.
|
|
1421
1472
|
|
|
1422
1473
|
```bash
|
|
1423
1474
|
mastra api score create <input>
|
|
@@ -1503,6 +1554,86 @@ Lists results for an experiment. Pass optional JSON input for route-supported fi
|
|
|
1503
1554
|
mastra api experiment results <datasetId> <experimentId> [input]
|
|
1504
1555
|
```
|
|
1505
1556
|
|
|
1557
|
+
#### `mastra api learning entities`
|
|
1558
|
+
|
|
1559
|
+
Lists entities (agents) with Trace Intelligence output, including which trace signals are available per entity. Requires enrollment in the Trace Intelligence private beta.
|
|
1560
|
+
|
|
1561
|
+
```bash
|
|
1562
|
+
mastra api learning entities '{"entityType":"agent"}'
|
|
1563
|
+
```
|
|
1564
|
+
|
|
1565
|
+
#### `mastra api learning snapshots`
|
|
1566
|
+
|
|
1567
|
+
Lists analysis snapshots for an entity and an ordered, comma-separated list of trace signals. Later commands need a `snapshotId` from this list.
|
|
1568
|
+
|
|
1569
|
+
```bash
|
|
1570
|
+
mastra api learning snapshots <entityId> '{"entityType":"agent","signalNames":"goal,outcome,behavior,sentiment","limit":10}'
|
|
1571
|
+
```
|
|
1572
|
+
|
|
1573
|
+
#### `mastra api learning flow`
|
|
1574
|
+
|
|
1575
|
+
Gets the cross-signal theme flow for one snapshot: stages and links for a Sankey-style view where counts are distinct traces.
|
|
1576
|
+
|
|
1577
|
+
```bash
|
|
1578
|
+
mastra api learning flow <entityId> '{"entityType":"agent","signalNames":"goal,outcome","snapshotId":"<snapshotId>"}'
|
|
1579
|
+
```
|
|
1580
|
+
|
|
1581
|
+
#### `mastra api learning paths`
|
|
1582
|
+
|
|
1583
|
+
Gets per-trace theme assignments across the ordered trace signals in one snapshot. Paginate with `limit` and `offset`.
|
|
1584
|
+
|
|
1585
|
+
```bash
|
|
1586
|
+
mastra api learning paths <entityId> '{"entityType":"agent","signalNames":"goal,outcome","snapshotId":"<snapshotId>","limit":100}'
|
|
1587
|
+
```
|
|
1588
|
+
|
|
1589
|
+
#### `mastra api learning theme list`
|
|
1590
|
+
|
|
1591
|
+
Lists themes for one trace signal in one snapshot.
|
|
1592
|
+
|
|
1593
|
+
```bash
|
|
1594
|
+
mastra api learning theme list <entityId> '{"entityType":"agent","signalName":"goal","snapshotId":"<snapshotId>"}'
|
|
1595
|
+
```
|
|
1596
|
+
|
|
1597
|
+
#### `mastra api learning theme get`
|
|
1598
|
+
|
|
1599
|
+
Gets one theme in one snapshot by its numeric theme ID.
|
|
1600
|
+
|
|
1601
|
+
```bash
|
|
1602
|
+
mastra api learning theme get <entityId> <themeId> '{"entityType":"agent","signalName":"goal","snapshotId":"<snapshotId>"}'
|
|
1603
|
+
```
|
|
1604
|
+
|
|
1605
|
+
#### `mastra api learning theme examples`
|
|
1606
|
+
|
|
1607
|
+
Lists trace examples for one theme in one snapshot. Paginate with `limit` and `offset`.
|
|
1608
|
+
|
|
1609
|
+
```bash
|
|
1610
|
+
mastra api learning theme examples <entityId> <themeId> '{"entityType":"agent","signalName":"goal","snapshotId":"<snapshotId>","limit":10}'
|
|
1611
|
+
```
|
|
1612
|
+
|
|
1613
|
+
#### `mastra api learning theme history`
|
|
1614
|
+
|
|
1615
|
+
Gets the lifecycle history for one durable theme across snapshots, including split and merge relationships. Takes no `snapshotId`.
|
|
1616
|
+
|
|
1617
|
+
```bash
|
|
1618
|
+
mastra api learning theme history <entityId> <themeId> '{"entityType":"agent","signalName":"goal"}'
|
|
1619
|
+
```
|
|
1620
|
+
|
|
1621
|
+
#### `mastra api learning noise get`
|
|
1622
|
+
|
|
1623
|
+
Gets the unclustered (noise) bucket for one trace signal in one snapshot.
|
|
1624
|
+
|
|
1625
|
+
```bash
|
|
1626
|
+
mastra api learning noise get <entityId> '{"entityType":"agent","signalName":"goal","snapshotId":"<snapshotId>"}'
|
|
1627
|
+
```
|
|
1628
|
+
|
|
1629
|
+
#### `mastra api learning noise examples`
|
|
1630
|
+
|
|
1631
|
+
Lists trace examples for the noise bucket in one snapshot. Paginate with `limit` and `offset`.
|
|
1632
|
+
|
|
1633
|
+
```bash
|
|
1634
|
+
mastra api learning noise examples <entityId> '{"entityType":"agent","signalName":"goal","snapshotId":"<snapshotId>","limit":10}'
|
|
1635
|
+
```
|
|
1636
|
+
|
|
1506
1637
|
## Common flags
|
|
1507
1638
|
|
|
1508
1639
|
### `--dir`
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Agents API
|
|
4
4
|
|
|
5
|
-
The Agents API provides methods to interact with Mastra AI agents, including generating responses
|
|
5
|
+
The Agents API provides methods to interact with Mastra AI agents, including generating responses and streaming interactions. It also provides methods for managing agent tools.
|
|
6
6
|
|
|
7
7
|
## Getting all agents
|
|
8
8
|
|
|
@@ -155,7 +155,7 @@ for await (const part of uiMessageStream) {
|
|
|
155
155
|
|
|
156
156
|
### `sendMessage()`
|
|
157
157
|
|
|
158
|
-
Send user-authored input to an active agent run or idle memory thread. Use this with `subscribeToThread()` so the client can render the stream that wakes from, or receives
|
|
158
|
+
Send user-authored input to an active agent run or idle memory thread. Use this with `subscribeToThread()` so the client can render the stream that wakes from, or receives the message.
|
|
159
159
|
|
|
160
160
|
```typescript
|
|
161
161
|
const agent = mastraClient.getAgent('support-agent')
|
|
@@ -285,7 +285,7 @@ await subscription.processDataStream({
|
|
|
285
285
|
|
|
286
286
|
### `streamUntilIdle()`
|
|
287
287
|
|
|
288
|
-
Stream a response and keep the stream open until every [background task](https://mastra.ai/docs/long-running-agents/background-tasks) dispatched during the run completes. The server re-enters the agentic loop on each task completion so the LLM can react to results in the same call. Requires background tasks to be [enabled on the Mastra instance](https://mastra.ai/reference/configuration) and a memory thread; otherwise the call
|
|
288
|
+
Stream a response and keep the stream open until every [background task](https://mastra.ai/docs/long-running-agents/background-tasks) dispatched during the run completes. The server re-enters the agentic loop on each task completion so the LLM can react to results in the same call. Requires background tasks to be [enabled on the Mastra instance](https://mastra.ai/reference/configuration) and a memory thread; otherwise the call uses a plain `stream()`.
|
|
289
289
|
|
|
290
290
|
```typescript
|
|
291
291
|
const response = await agent.streamUntilIdle('Research solana for me', {
|
|
@@ -307,7 +307,7 @@ response.processDataStream({
|
|
|
307
307
|
|
|
308
308
|
### `resumeStreamUntilIdle()`
|
|
309
309
|
|
|
310
|
-
Resume a suspended agent stream with custom data and keep the stream open until every [background task](https://mastra.ai/docs/long-running-agents/background-tasks) dispatched during the run completes. Use this to continue execution after a suspension point, such as a workflow suspend within an agent. Requires background tasks to be [enabled on the Mastra instance](https://mastra.ai/reference/configuration) and a memory thread; otherwise the call
|
|
310
|
+
Resume a suspended agent stream with custom data and keep the stream open until every [background task](https://mastra.ai/docs/long-running-agents/background-tasks) dispatched during the run completes. Use this to continue execution after a suspension point, such as a workflow suspend within an agent. Requires background tasks to be [enabled on the Mastra instance](https://mastra.ai/reference/configuration) and a memory thread; otherwise the call uses a plain `resumeStream()`:
|
|
311
311
|
|
|
312
312
|
```typescript
|
|
313
313
|
const response = await agent.resumeStreamUntilIdle(
|
|
@@ -366,7 +366,7 @@ response.processDataStream({
|
|
|
366
366
|
|
|
367
367
|
### `listSuspendedRuns()`
|
|
368
368
|
|
|
369
|
-
List suspended runs for the agent from storage
|
|
369
|
+
List suspended runs for the agent from storage: runs waiting on a tool-call approval or on a tool that suspended. Discovery is backed by storage, so it works after a server restart and across server instances. Pass the returned `runId` to `approveToolCall()`, `declineToolCall()`, or `resumeStream()`.
|
|
370
370
|
|
|
371
371
|
```typescript
|
|
372
372
|
const { runs, total } = await agent.listSuspendedRuns({
|
|
@@ -655,9 +655,9 @@ const screenshotTool = createTool({
|
|
|
655
655
|
|
|
656
656
|
### Tracing client tools
|
|
657
657
|
|
|
658
|
-
When `@mastra/observability` is installed and configured on the server, a client-side tool records a `CLIENT_TOOL_CALL` span as a child of the current `AGENT_RUN` span. The server creates that span when the model emits the client tool call
|
|
658
|
+
When `@mastra/observability` is installed and configured on the server, a client-side tool records a `CLIENT_TOOL_CALL` span as a child of the current `AGENT_RUN` span. The server creates that span when the model emits the client tool call and injects a W3C trace carrier into the outgoing tool-call chunk. It ends the span once the tool arguments are available. Without server-side observability configured, client tool tracing is a no-op.
|
|
659
659
|
|
|
660
|
-
The client SDK also measures the wall-clock duration of each client tool's `execute` function and
|
|
660
|
+
The client SDK also measures the wall-clock duration of each client tool's `execute` function and sends it back to the server, where it's emitted as a `mastra_tool_duration_ms` metric with `toolType: "client"`.
|
|
661
661
|
|
|
662
662
|
For richer telemetry from inside your tool's `execute` function, use the `observe` helper on the execution context to add child spans and structured logs:
|
|
663
663
|
|
|
@@ -680,9 +680,9 @@ const fetchUserTool = createTool({
|
|
|
680
680
|
})
|
|
681
681
|
```
|
|
682
682
|
|
|
683
|
-
`observe` is always available
|
|
683
|
+
`observe` is always available: when no tracing context is active (e.g. running outside a traced agent), `span` runs the function directly and `log` is a no-op. No null-checking needed.
|
|
684
684
|
|
|
685
|
-
The SDK serializes everything the collector buffered as OTLP/JSON and
|
|
685
|
+
The SDK serializes everything the collector buffered as OTLP/JSON and sends it back in the next request body. The server's `@mastra/observability` package validates that the spans belong to the correct trace (preventing cross-trace injection) and forwards each span/log into the same observability bus that server-side telemetry uses. Your existing exporters pick them up automatically after observability is configured.
|
|
686
686
|
|
|
687
687
|
## Stored agents
|
|
688
688
|
|
|
@@ -727,6 +727,23 @@ const agent = await mastraClient.createStoredAgent({
|
|
|
727
727
|
})
|
|
728
728
|
```
|
|
729
729
|
|
|
730
|
+
By default, `createStoredAgent()` publishes the initial version immediately. Set `autoPublish` to `false` to create an unpublished draft that you can review before calling [`activateVersion()`](#activateversion):
|
|
731
|
+
|
|
732
|
+
```typescript
|
|
733
|
+
const draft = await mastraClient.createStoredAgent({
|
|
734
|
+
id: 'draft-agent',
|
|
735
|
+
name: 'Draft Assistant',
|
|
736
|
+
instructions: 'You are a helpful assistant.',
|
|
737
|
+
model: {
|
|
738
|
+
provider: 'openai',
|
|
739
|
+
name: 'gpt-5',
|
|
740
|
+
},
|
|
741
|
+
autoPublish: false,
|
|
742
|
+
})
|
|
743
|
+
```
|
|
744
|
+
|
|
745
|
+
Editors configured with the `code` source always publish the initial version because saving writes the agent configuration to the file system.
|
|
746
|
+
|
|
730
747
|
With all options:
|
|
731
748
|
|
|
732
749
|
```typescript
|
|
@@ -168,7 +168,7 @@ const result = await thread.listMessages({
|
|
|
168
168
|
})
|
|
169
169
|
```
|
|
170
170
|
|
|
171
|
-
Metadata filters match shallow scalar values only: `string`, finite `number`, `boolean`, and `null`. Every key-value pair must match with AND semantics. `null` matches
|
|
171
|
+
Metadata filters match shallow scalar values only: `string`, finite `number`, `boolean`, and `null`. Every key-value pair must match with AND semantics. `null` matches only keys explicitly set to `null`. Metadata keys must start with a letter or underscore and contain only alphanumeric or underscore characters. The limit is 128 characters. Reserved prototype keys such as `__proto__`, `constructor`, and `prototype` aren't allowed. Performance depends on the server storage backend, and arbitrary metadata filters may scan candidate messages.
|
|
172
172
|
|
|
173
173
|
### Delete Messages
|
|
174
174
|
|
|
@@ -226,7 +226,7 @@ await mastraClient.updateWorkingMemory({
|
|
|
226
226
|
// Returns: { success: true }
|
|
227
227
|
```
|
|
228
228
|
|
|
229
|
-
|
|
229
|
+
For resource-scoped working memory, you must provide the `resourceId` parameter. It allows the memory to persist across all conversation threads for that user.
|
|
230
230
|
|
|
231
231
|
### Get Memory Status
|
|
232
232
|
|
|
@@ -142,7 +142,7 @@ await run.resume({
|
|
|
142
142
|
})
|
|
143
143
|
```
|
|
144
144
|
|
|
145
|
-
When a [`.foreach()`](https://mastra.ai/reference/workflows/workflow-methods/foreach) step suspends across multiple iterations, pass `forEachIndex` (zero-based
|
|
145
|
+
When a [`.foreach()`](https://mastra.ai/reference/workflows/workflow-methods/foreach) step suspends across multiple iterations, pass `forEachIndex` (zero-based. `0` targets the first iteration) to resume one iteration at a time. Iterations you don't target remain suspended.
|
|
146
146
|
|
|
147
147
|
```typescript
|
|
148
148
|
await run.resume({
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
# buildBasePrompt()
|
|
4
4
|
|
|
5
|
-
`buildBasePrompt()` builds the shared base system prompt for a coding agent
|
|
5
|
+
`buildBasePrompt()` builds the shared base system prompt for a coding agent: the behavioral instructions that make the agent a good coding assistant. It takes a `PromptContext` describing the current environment (project, platform, git branch, mode, model) and returns the prompt as a string.
|
|
6
6
|
|
|
7
7
|
Product-specific strings are parameterized through `productName`, `coAuthorName`, and `coAuthorEmail`, so you can rebrand the prompt and commit trailer without forking it. They default to `"Mastra Code"` / `"noreply@mastra.ai"`, so existing callers keep identical output.
|
|
8
8
|
|
|
9
|
-
Use this with [`createCodingAgent()`](https://mastra.ai/reference/coding-agent/create-coding-agent) when you build
|
|
9
|
+
Use this with [`createCodingAgent()`](https://mastra.ai/reference/coding-agent/create-coding-agent) when you build runtime-defined instructions for the agent.
|
|
10
10
|
|
|
11
11
|
## Usage example
|
|
12
12
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
`createCodingAgent()` builds a coding [`Agent`](https://mastra.ai/reference/agents/agent) with portable defaults for the pieces a coding agent always needs: a local workspace, the task-list signal provider, network-retry error processors, and the goal judge prompt. Supply only `model`, `instructions`, and `tools` to get a working agent, or override any default.
|
|
6
6
|
|
|
7
|
-
The returned value is a standard `Agent`, so it works anywhere an `Agent` does
|
|
7
|
+
The returned value is a standard `Agent`, so it works anywhere an `Agent` does: including as the agent passed to an [`AgentController`](https://mastra.ai/reference/agent-controller/agent-controller-class).
|
|
8
8
|
|
|
9
9
|
## Usage example
|
|
10
10
|
|
|
@@ -70,7 +70,7 @@ new Workspace({
|
|
|
70
70
|
})
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
-
To opt out
|
|
73
|
+
To opt out (for example, when the workspace is injected at the [`AgentController`](https://mastra.ai/reference/agent-controller/agent-controller-class) level), pass `workspace: undefined` explicitly:
|
|
74
74
|
|
|
75
75
|
```typescript
|
|
76
76
|
const agent = createCodingAgent({
|