@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
|
@@ -8,7 +8,7 @@ A supervisor agent coordinates multiple subagents using [`Agent.stream()`](https
|
|
|
8
8
|
|
|
9
9
|
## When to use supervisor agents
|
|
10
10
|
|
|
11
|
-
Use supervisor agents when a task requires multiple agents with different specializations to work together. The supervisor handles delegation decisions
|
|
11
|
+
Use supervisor agents when a task requires multiple agents with different specializations to work together. The supervisor handles delegation decisions and context passing, plus result synthesis.
|
|
12
12
|
|
|
13
13
|
Common use cases:
|
|
14
14
|
|
|
@@ -43,7 +43,7 @@ const supervisor = new Agent({
|
|
|
43
43
|
id: 'supervisor',
|
|
44
44
|
instructions: `You coordinate research and writing using specialized agents.
|
|
45
45
|
Delegate to research-agent for facts, then writing-agent for content.`,
|
|
46
|
-
model: 'openai/gpt-5.
|
|
46
|
+
model: 'openai/gpt-5.6-sol',
|
|
47
47
|
agents: { researchAgent, writingAgent },
|
|
48
48
|
memory: new Memory({
|
|
49
49
|
storage: new LibSQLStore({ id: 'storage', url: 'file:mastra.db' }),
|
|
@@ -112,7 +112,7 @@ The `context` object includes:
|
|
|
112
112
|
|
|
113
113
|
### `onDelegationComplete`
|
|
114
114
|
|
|
115
|
-
Called after a delegation finishes. Use it to inspect results
|
|
115
|
+
Called after a delegation finishes. Use it to inspect results or provide feedback, or alternatively stop execution:
|
|
116
116
|
|
|
117
117
|
- `context.bail()`: Stop the supervisor loop immediately
|
|
118
118
|
- Return `{ feedback: '...' }`: Add feedback that gets saved to the supervisor's memory and is visible to subsequent iterations
|
|
@@ -147,7 +147,7 @@ The `context` object includes:
|
|
|
147
147
|
|
|
148
148
|
## Message filtering
|
|
149
149
|
|
|
150
|
-
By default, subagents receive the full conversation context from the supervisor. Use `messageFilter` to control what messages are shared
|
|
150
|
+
By default, subagents receive the full conversation context from the supervisor. Use `messageFilter` to control what messages are shared, for example, to remove sensitive data or limit context size.
|
|
151
151
|
|
|
152
152
|
```typescript
|
|
153
153
|
const stream = await supervisor.stream('Research AI trends', {
|
|
@@ -173,7 +173,9 @@ The callback receives `messages` (the full conversation history), `primitiveId`
|
|
|
173
173
|
|
|
174
174
|
When a subagent completes, the supervisor model receives the subagent's text response in later iterations. Nested tool calls and subagent metadata, such as thread and resource IDs, aren't added to the supervisor model context.
|
|
175
175
|
|
|
176
|
-
Application code and UI integrations can still inspect
|
|
176
|
+
Application code and UI integrations can still inspect `subAgentToolResults` and the rest of the raw delegation result in the tool result payload.
|
|
177
|
+
|
|
178
|
+
This keeps debugging and display data available without sending nested tool arguments or outputs back into the supervisor's next model call.
|
|
177
179
|
|
|
178
180
|
Set `includeSubAgentToolResultsInModelContext` to include the full subagent result, including nested tool results and subagent metadata, in the supervisor model context.
|
|
179
181
|
|
|
@@ -187,7 +189,7 @@ await supervisor.generate('Research AI trends', {
|
|
|
187
189
|
|
|
188
190
|
## Iteration monitoring
|
|
189
191
|
|
|
190
|
-
`onIterationComplete` is called after each iteration of the supervisor loop. Use it to log progress
|
|
192
|
+
`onIterationComplete` is called after each iteration of the supervisor loop. Use it to log progress or inject feedback, or alternatively stop execution early.
|
|
191
193
|
|
|
192
194
|
```typescript
|
|
193
195
|
const stream = await supervisor.stream('Research AI trends', {
|
|
@@ -214,7 +216,7 @@ const stream = await supervisor.stream('Research AI trends', {
|
|
|
214
216
|
})
|
|
215
217
|
```
|
|
216
218
|
|
|
217
|
-
Return `{ continue: true }` to keep iterating, or `{ continue: false }` to stop. Include optional `feedback` to inject guidance into the conversation. When `feedback` is combined with `continue: false`, the model may get one final turn to produce a text response incorporating the feedback, but only if the current iteration is still active (e.g., after tool calls)
|
|
219
|
+
Return `{ continue: true }` to keep iterating, or `{ continue: false }` to stop. Include optional `feedback` to inject guidance into the conversation. When `feedback` is combined with `continue: false`, the model may get one final turn to produce a text response incorporating the feedback, but only if the current iteration is still active (e.g., after tool calls), otherwise no extra turn is granted.
|
|
218
220
|
|
|
219
221
|
## Memory isolation
|
|
220
222
|
|
|
@@ -226,7 +228,7 @@ How it works:
|
|
|
226
228
|
2. **Scoped memory saves**: Only the delegation prompt and the subagent's response are saved to the subagent's memory
|
|
227
229
|
3. **Fresh thread per invocation**: Each delegation uses a unique thread ID, ensuring clean separation
|
|
228
230
|
|
|
229
|
-
|
|
231
|
+
As a result, subagents have the context they need without cluttering their memory with the entire supervisor conversation. Visit [memory in multi-agent systems](https://mastra.ai/docs/memory/overview) for more details.
|
|
230
232
|
|
|
231
233
|
## Tool approval propagation
|
|
232
234
|
|
|
@@ -309,7 +311,7 @@ const stream = await supervisor.stream('Research AI in education', {
|
|
|
309
311
|
|
|
310
312
|
The built-in rubric scorer lets you define what "correct" looks like as a checklist and have the agent self-evaluate and iterate until every criterion is satisfied or `maxSteps` is reached.
|
|
311
313
|
|
|
312
|
-
It works as an **LLM-as-judge** scorer
|
|
314
|
+
It works as an **LLM-as-judge** scorer. After each iteration, a separate grader model reviews the agent's output against the rubric. The loop ends when every required criterion passes. A failed criterion adds its feedback to the conversation so the agent can try again.
|
|
313
315
|
|
|
314
316
|
This is most effective for tasks with clear, verifiable success criteria. You can use it like so:
|
|
315
317
|
|
|
@@ -320,7 +322,7 @@ import { createRubricScorer } from '@mastra/evals/scorers/prebuilt'
|
|
|
320
322
|
const supervisor = new Agent({
|
|
321
323
|
id: 'supervisor',
|
|
322
324
|
instructions: 'You coordinate research and writing using specialized agents.',
|
|
323
|
-
model: 'openai/gpt-5.
|
|
325
|
+
model: 'openai/gpt-5.6-sol',
|
|
324
326
|
agents: { researchAgent, writingAgent },
|
|
325
327
|
})
|
|
326
328
|
|
|
@@ -345,9 +347,13 @@ For full API details, see the [rubric scorer reference](https://mastra.ai/refere
|
|
|
345
347
|
|
|
346
348
|
## Writing effective instructions
|
|
347
349
|
|
|
348
|
-
Clear instructions are essential for effective delegation.
|
|
350
|
+
Clear instructions are essential for effective delegation.
|
|
351
|
+
|
|
352
|
+
Your supervisor's `instructions` should specify the available resources and when to use each one. They should also define coordination behavior and success criteria.
|
|
353
|
+
|
|
354
|
+
Each subagent should have a clear `description` that explains its purpose and return format, including when the supervisor should use it.
|
|
349
355
|
|
|
350
|
-
|
|
356
|
+
The supervisor uses these descriptions to make delegation decisions.
|
|
351
357
|
|
|
352
358
|
```typescript
|
|
353
359
|
const supervisor = new Agent({
|
|
@@ -380,7 +386,7 @@ Enable the [backgroundTasks manager](https://mastra.ai/reference/configuration)
|
|
|
380
386
|
const supervisor = new Agent({
|
|
381
387
|
id: 'supervisor',
|
|
382
388
|
instructions: 'Coordinate research and writing using the available agents.',
|
|
383
|
-
model: 'openai/gpt-5.
|
|
389
|
+
model: 'openai/gpt-5.6-sol',
|
|
384
390
|
agents: { researchAgent, writingAgent },
|
|
385
391
|
backgroundTasks: {
|
|
386
392
|
tools: {
|
|
@@ -60,11 +60,36 @@ export const weatherAgent = new Agent({
|
|
|
60
60
|
instructions: `
|
|
61
61
|
You are a helpful weather assistant.
|
|
62
62
|
Use the weatherTool to fetch current weather data.`,
|
|
63
|
-
model: 'openai/gpt-5.
|
|
63
|
+
model: 'openai/gpt-5.6-sol',
|
|
64
64
|
tools: { weatherTool },
|
|
65
65
|
})
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
+
## Use provider web search
|
|
69
|
+
|
|
70
|
+
Import `webSearchTool` from `@mastra/core/tools` when you want the model provider to run its native web search tool. The tool has no local `execute` function. Mastra resolves it at run time from the active model, then passes the provider-managed tool to the model.
|
|
71
|
+
|
|
72
|
+
```typescript
|
|
73
|
+
import { Agent } from '@mastra/core/agent'
|
|
74
|
+
import { webSearchTool } from '@mastra/core/tools'
|
|
75
|
+
|
|
76
|
+
export const researchAgent = new Agent({
|
|
77
|
+
id: 'research-agent',
|
|
78
|
+
name: 'Research Agent',
|
|
79
|
+
instructions: `
|
|
80
|
+
You are a helpful research assistant.
|
|
81
|
+
Use web search when you need current information.`,
|
|
82
|
+
model: 'openai/gpt-5.6-sol',
|
|
83
|
+
tools: {
|
|
84
|
+
webSearch: webSearchTool,
|
|
85
|
+
},
|
|
86
|
+
})
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
`webSearchTool` supports OpenAI, Anthropic, Google Gemini, and xAI models. If Mastra can't infer one of those providers from the active model, the agent run fails with a `MastraError`.
|
|
90
|
+
|
|
91
|
+
Only the `webSearchTool` value triggers provider web search. Custom tools with the names `webSearch` or `web_search` stay unchanged.
|
|
92
|
+
|
|
68
93
|
## Define schemas
|
|
69
94
|
|
|
70
95
|
You can define the tool's `inputSchema` and `outputSchema` with any library that supports [Standard JSON Schema](https://standardschema.dev/json-schema). This includes libraries like [Zod](https://zod.dev/), [Valibot](https://valibot.dev/), and [ArkType](https://arktype.io/).
|
|
@@ -145,7 +170,7 @@ export const weatherTool = createTool({
|
|
|
145
170
|
|
|
146
171
|
## Multiple tools
|
|
147
172
|
|
|
148
|
-
An agent can use multiple tools to handle more complex tasks by delegating specific parts to individual tools. The agent decides which tools to use based on the user's message
|
|
173
|
+
An agent can use multiple tools to handle more complex tasks by delegating specific parts to individual tools. The agent decides which tools to use based on the user's message and the agent's instructions, plus the tool descriptions and schemas.
|
|
149
174
|
|
|
150
175
|
```typescript
|
|
151
176
|
import { Agent } from '@mastra/core/agent'
|
|
@@ -159,14 +184,14 @@ export const weatherAgent = new Agent({
|
|
|
159
184
|
You are a helpful weather assistant.
|
|
160
185
|
Use the weatherTool to fetch current weather data.
|
|
161
186
|
Use the hazardsTool to provide information about potential weather hazards.`,
|
|
162
|
-
model: 'openai/gpt-5.
|
|
187
|
+
model: 'openai/gpt-5.6-sol',
|
|
163
188
|
tools: { weatherTool, hazardsTool },
|
|
164
189
|
})
|
|
165
190
|
```
|
|
166
191
|
|
|
167
192
|
## Agents as tools
|
|
168
193
|
|
|
169
|
-
Add subagents through the `agents` configuration to create a [supervisor](https://mastra.ai/docs/agents/supervisor-agents). Mastra converts each subagent to
|
|
194
|
+
Add subagents through the `agents` configuration to create a [supervisor](https://mastra.ai/docs/agents/supervisor-agents). Mastra converts each subagent to an `agent-<key>` tool. Include a `description` on each subagent so the supervisor knows when to delegate.
|
|
170
195
|
|
|
171
196
|
```typescript
|
|
172
197
|
import { Agent } from '@mastra/core/agent'
|
|
@@ -176,21 +201,21 @@ const writer = new Agent({
|
|
|
176
201
|
name: 'Writer',
|
|
177
202
|
description: 'Drafts and edits written content',
|
|
178
203
|
instructions: 'You are a skilled writer.',
|
|
179
|
-
model: 'openai/gpt-5.
|
|
204
|
+
model: 'openai/gpt-5.6-sol',
|
|
180
205
|
})
|
|
181
206
|
|
|
182
207
|
export const supervisor = new Agent({
|
|
183
208
|
id: 'supervisor',
|
|
184
209
|
name: 'Supervisor',
|
|
185
210
|
instructions: 'Coordinate the writer to produce content.',
|
|
186
|
-
model: 'openai/gpt-5.
|
|
211
|
+
model: 'openai/gpt-5.6-sol',
|
|
187
212
|
agents: { writer },
|
|
188
213
|
})
|
|
189
214
|
```
|
|
190
215
|
|
|
191
216
|
## Workflows as tools
|
|
192
217
|
|
|
193
|
-
Add workflows through the `workflows` configuration. Mastra converts each workflow to a
|
|
218
|
+
Add workflows through the `workflows` configuration. Mastra converts each workflow to a `workflow-<key>` tool that uses the workflow's `inputSchema` and `outputSchema`. Include a `description` on the workflow so the agent knows when to trigger it.
|
|
194
219
|
|
|
195
220
|
```typescript
|
|
196
221
|
import { Agent } from '@mastra/core/agent'
|
|
@@ -200,7 +225,7 @@ export const researchAgent = new Agent({
|
|
|
200
225
|
id: 'research-agent',
|
|
201
226
|
name: 'Research Agent',
|
|
202
227
|
instructions: 'You are a research assistant.',
|
|
203
|
-
model: 'openai/gpt-5.
|
|
228
|
+
model: 'openai/gpt-5.6-sol',
|
|
204
229
|
workflows: { researchWorkflow },
|
|
205
230
|
})
|
|
206
231
|
```
|
|
@@ -226,7 +251,7 @@ export const weatherAgent = new Agent({
|
|
|
226
251
|
id: 'weather-agent',
|
|
227
252
|
name: 'Weather Agent',
|
|
228
253
|
instructions: 'Answer questions about current weather.',
|
|
229
|
-
model: 'openai/gpt-5.
|
|
254
|
+
model: 'openai/gpt-5.6-sol',
|
|
230
255
|
tools: { weatherTool },
|
|
231
256
|
})
|
|
232
257
|
```
|
|
@@ -239,7 +264,7 @@ export const travelAgent = new Agent({
|
|
|
239
264
|
id: 'travel-agent',
|
|
240
265
|
name: 'Travel Agent',
|
|
241
266
|
instructions: 'Help users plan trips.',
|
|
242
|
-
model: 'openai/gpt-5.
|
|
267
|
+
model: 'openai/gpt-5.6-sol',
|
|
243
268
|
tools: { weatherTool },
|
|
244
269
|
})
|
|
245
270
|
```
|
|
@@ -300,7 +325,7 @@ export const supportAgent = new Agent({
|
|
|
300
325
|
id: 'support-agent',
|
|
301
326
|
name: 'support-agent',
|
|
302
327
|
instructions: 'Help users with their questions.',
|
|
303
|
-
model: 'openai/gpt-5.
|
|
328
|
+
model: 'openai/gpt-5.6-sol',
|
|
304
329
|
hooks: {
|
|
305
330
|
beforeToolCall: ({ toolName, input }) => {
|
|
306
331
|
console.log(`Running ${toolName}`, input)
|
|
@@ -312,14 +337,14 @@ export const supportAgent = new Agent({
|
|
|
312
337
|
})
|
|
313
338
|
```
|
|
314
339
|
|
|
315
|
-
`beforeToolCall` runs before the tool executes and receives the tool name, input, and execution context. Return `{ proceed: false, output }` to skip the tool call entirely
|
|
340
|
+
`beforeToolCall` runs before the tool executes and receives the tool name, input, and execution context. Return `{ proceed: false, output }` to skip the tool call entirely, the agent receives `output` as the tool result:
|
|
316
341
|
|
|
317
342
|
```typescript
|
|
318
343
|
const guardedAgent = new Agent({
|
|
319
344
|
id: 'guarded-agent',
|
|
320
345
|
name: 'guarded-agent',
|
|
321
346
|
instructions: 'Run shell commands for the user.',
|
|
322
|
-
model: 'openai/gpt-5.
|
|
347
|
+
model: 'openai/gpt-5.6-sol',
|
|
323
348
|
hooks: {
|
|
324
349
|
beforeToolCall: ({ toolName, input }) => {
|
|
325
350
|
const command = (input as { command?: string }).command ?? ''
|
|
@@ -398,9 +423,9 @@ export const weatherTool = createTool({
|
|
|
398
423
|
|
|
399
424
|
### Streaming tool input in UIs
|
|
400
425
|
|
|
401
|
-
When a model generates a tool call, the arguments arrive incrementally as `tool-call-delta` stream chunks before the final `tool-call` chunk. UIs can listen for the corresponding `tool_input_start`, `tool_input_delta`, and `tool_input_end` events to render tool arguments as they stream in
|
|
426
|
+
When a model generates a tool call, the arguments arrive incrementally as `tool-call-delta` stream chunks before the final `tool-call` chunk. UIs can listen for the corresponding `tool_input_start`, `tool_input_delta`, and `tool_input_end` events to render tool arguments as they stream in, for example, showing a file path or command immediately rather than waiting for the complete tool call.
|
|
402
427
|
|
|
403
|
-
Using a partial JSON parser on the accumulated `argsTextDelta` fragments lets you extract usable argument values before the JSON is complete.
|
|
428
|
+
Using a partial JSON parser on the accumulated `argsTextDelta` fragments lets you extract usable argument values before the JSON is complete. It enables features like live diff previews for edit tools, streaming file content for write tools, and instant display of search patterns or file paths.
|
|
404
429
|
|
|
405
430
|
## Control tool selection
|
|
406
431
|
|
|
@@ -462,12 +487,12 @@ const orchestrator = new Agent({
|
|
|
462
487
|
|
|
463
488
|
Note that for subagents, you'll see two different identifiers in stream responses:
|
|
464
489
|
|
|
465
|
-
- `toolName: "agent-weather"` in tool call events
|
|
466
|
-
- `id: "weather-agent"` in `data-tool-agent` chunks
|
|
490
|
+
- `toolName: "agent-weather"` in tool call events: the generated tool wrapper name
|
|
491
|
+
- `id: "weather-agent"` in `data-tool-agent` chunks: the subagent's actual `id` property
|
|
467
492
|
|
|
468
493
|
## Built-in tools
|
|
469
494
|
|
|
470
|
-
Mastra
|
|
495
|
+
Mastra includes agent-agnostic built-in tools in `@mastra/core/tools` that add interactive and organizational capabilities to any agent.
|
|
471
496
|
|
|
472
497
|
| Tool | Purpose |
|
|
473
498
|
| --------------- | ------------------------------------------------- |
|
|
@@ -480,7 +505,9 @@ Mastra ships agent-agnostic built-in tools in `@mastra/core/tools` that add inte
|
|
|
480
505
|
|
|
481
506
|
### Ask the user a question
|
|
482
507
|
|
|
483
|
-
Import [`askUserTool`](https://mastra.ai/reference/tools/ask-user-tool) and add it to the agent's toolset.
|
|
508
|
+
Import [`askUserTool`](https://mastra.ai/reference/tools/ask-user-tool) and add it to the agent's toolset.
|
|
509
|
+
|
|
510
|
+
The tool suspends the run and emits a `tool-call-suspended` event with the question. It resumes when you call `resumeStream()` with the user's answer.
|
|
484
511
|
|
|
485
512
|
```typescript
|
|
486
513
|
import { Agent } from '@mastra/core/agent'
|
|
@@ -530,7 +557,7 @@ for await (const chunk of stream.fullStream) {
|
|
|
530
557
|
|
|
531
558
|
### Task tracking
|
|
532
559
|
|
|
533
|
-
The
|
|
560
|
+
The task tools manage a structured, durable task list for an agent run. They require [Memory](https://mastra.ai/docs/memory/overview) so the list is persisted in a thread-scoped store.
|
|
534
561
|
|
|
535
562
|
Add task tracking through [`TaskSignalProvider`](https://mastra.ai/reference/signals/task-signal-provider), which bundles all four tools and the `TaskStateProcessor` in a single registration:
|
|
536
563
|
|
|
@@ -551,7 +578,7 @@ const agent = new Agent({
|
|
|
551
578
|
|
|
552
579
|
Only one task can be `in_progress` at a time. The list is stored in the thread-scoped `threadState` storage domain and projected onto the agent's [state-signal](https://mastra.ai/docs/long-running-agents/signals) lane, so it survives observational-memory truncation. See the [Task tools reference](https://mastra.ai/reference/tools/task-tools) for full schemas.
|
|
553
580
|
|
|
554
|
-
The [AgentController](https://mastra.ai/docs/agent-controller/overview) automatically includes all built-in tools in every mode
|
|
581
|
+
The [AgentController](https://mastra.ai/docs/agent-controller/overview) automatically includes all built-in tools in every mode, you don't need to add them manually. See [Tool approvals](https://mastra.ai/docs/agent-controller/tool-approvals) for AgentController-specific behavior.
|
|
555
582
|
|
|
556
583
|
## Related
|
|
557
584
|
|
|
@@ -10,7 +10,7 @@ Use AgentBrowser when you need:
|
|
|
10
10
|
|
|
11
11
|
- Reliable element targeting through accessibility refs
|
|
12
12
|
- Fine-grained control over browser actions
|
|
13
|
-
- Playwright's
|
|
13
|
+
- Playwright's reliable automation capabilities
|
|
14
14
|
- Support for keyboard shortcuts and complex interactions
|
|
15
15
|
|
|
16
16
|
## Quickstart
|
|
@@ -54,7 +54,7 @@ const browser = new AgentBrowser({
|
|
|
54
54
|
export const browserAgent = new Agent({
|
|
55
55
|
id: 'browser-agent',
|
|
56
56
|
name: 'Browser Agent',
|
|
57
|
-
model: 'openai/gpt-5.
|
|
57
|
+
model: 'openai/gpt-5.6-sol',
|
|
58
58
|
browser,
|
|
59
59
|
instructions: `You are a web automation assistant.
|
|
60
60
|
|
|
@@ -65,13 +65,13 @@ When interacting with pages:
|
|
|
65
65
|
})
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
> **Note:** For local launches (the default), AgentBrowser requires a Chromium binary installed via Playwright. This is normally downloaded automatically when you install `@mastra/agent-browser`. If launching the browser fails with `"browser executable is missing"`, run `npx playwright install chromium`. If you connect to a remote browser using the [`cdpUrl`](https://mastra.ai/reference/browser/agent-browser) option,
|
|
68
|
+
> **Note:** For local launches (the default), AgentBrowser requires a Chromium binary installed via Playwright. This is normally downloaded automatically when you install `@mastra/agent-browser`. If launching the browser fails with `"browser executable is missing"`, run `npx playwright install chromium`. If you connect to a remote browser using the [`cdpUrl`](https://mastra.ai/reference/browser/agent-browser) option, the remote browser provides Chromium.
|
|
69
69
|
|
|
70
70
|
## Screenshots
|
|
71
71
|
|
|
72
72
|
When the agent uses the `browser_screenshot` tool, it captures a PNG image of the current page and returns it as image content that vision-capable models can interpret directly.
|
|
73
73
|
|
|
74
|
-
Use screenshots when you need to visually inspect the page
|
|
74
|
+
Use screenshots when you need to visually inspect the page, for example, evaluating images, layout, or colors. For text or structured data, use `browser_snapshot` instead.
|
|
75
75
|
|
|
76
76
|
To disable the screenshot tool for models that don't support vision, use `excludeTools`:
|
|
77
77
|
|
|
@@ -77,7 +77,7 @@ const workspace = new Workspace({
|
|
|
77
77
|
|
|
78
78
|
const browserAgent = new Agent({
|
|
79
79
|
id: 'browser-agent',
|
|
80
|
-
model: 'openai/gpt-5.
|
|
80
|
+
model: 'openai/gpt-5.6-sol',
|
|
81
81
|
workspace,
|
|
82
82
|
instructions: `You are a web automation assistant.
|
|
83
83
|
Use browser-use commands to navigate and interact with websites.`,
|
|
@@ -93,7 +93,7 @@ export const mastra = new Mastra({
|
|
|
93
93
|
})
|
|
94
94
|
```
|
|
95
95
|
|
|
96
|
-
When the agent runs a CLI command like `browser-use open https://example.com`, Mastra automatically launches Chrome
|
|
96
|
+
When the agent runs a CLI command like `browser-use open https://example.com`, Mastra automatically launches Chrome and injects the CDP connection, plus starts streaming the screencast to Studio.
|
|
97
97
|
|
|
98
98
|
## How it works
|
|
99
99
|
|
|
@@ -62,7 +62,7 @@ const browser = new FirecrawlBrowser({
|
|
|
62
62
|
export const firecrawlAgent = new Agent({
|
|
63
63
|
id: 'firecrawl-agent',
|
|
64
64
|
name: 'Firecrawl Agent',
|
|
65
|
-
model: 'openai/gpt-5.
|
|
65
|
+
model: 'openai/gpt-5.6-sol',
|
|
66
66
|
browser,
|
|
67
67
|
instructions: `You are a web automation assistant.
|
|
68
68
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Browser overview
|
|
4
4
|
|
|
5
|
-
Browser support enables agents to
|
|
5
|
+
Browser support enables agents to move through websites, interact with page elements, fill forms, and extract data. Mastra provides browser capabilities through SDK providers that wrap browser automation libraries and a CLI provider for agents that drive browsers through command-line tools.
|
|
6
6
|
|
|
7
7
|
Mastra supports three SDK providers and one CLI provider:
|
|
8
8
|
|
|
@@ -76,7 +76,7 @@ export const webAgent = new Agent({
|
|
|
76
76
|
id: 'web-agent',
|
|
77
77
|
name: 'Web Agent',
|
|
78
78
|
description: 'A web automation assistant that can navigate websites and complete tasks.',
|
|
79
|
-
model: 'openai/gpt-5.
|
|
79
|
+
model: 'openai/gpt-5.6-sol',
|
|
80
80
|
browser,
|
|
81
81
|
instructions:
|
|
82
82
|
'You are a web automation assistant. Use browser tools to navigate websites and complete tasks.',
|
|
@@ -87,7 +87,7 @@ import { browser } from '../browsers'
|
|
|
87
87
|
export const browserAgent = new Agent({
|
|
88
88
|
id: 'browser-agent',
|
|
89
89
|
name: 'Browser Agent',
|
|
90
|
-
model: 'openai/gpt-5.
|
|
90
|
+
model: 'openai/gpt-5.6-sol',
|
|
91
91
|
browser,
|
|
92
92
|
instructions: `Use browser tools to complete the requested task.
|
|
93
93
|
|
|
@@ -49,13 +49,13 @@ import { StagehandBrowser } from '@mastra/stagehand'
|
|
|
49
49
|
|
|
50
50
|
const browser = new StagehandBrowser({
|
|
51
51
|
headless: false,
|
|
52
|
-
model: 'openai/gpt-5.
|
|
52
|
+
model: 'openai/gpt-5.6-sol',
|
|
53
53
|
})
|
|
54
54
|
|
|
55
55
|
export const stagehandAgent = new Agent({
|
|
56
56
|
id: 'stagehand-agent',
|
|
57
57
|
name: 'Stagehand Agent',
|
|
58
|
-
model: 'openai/gpt-5.
|
|
58
|
+
model: 'openai/gpt-5.6-sol',
|
|
59
59
|
browser,
|
|
60
60
|
instructions: `You are a web automation assistant.
|
|
61
61
|
|
|
@@ -114,12 +114,12 @@ Returns a list of available actions:
|
|
|
114
114
|
|
|
115
115
|
When the agent uses the `stagehand_screenshot` tool, it captures a PNG image of the current page and returns it as image content that vision-capable models can interpret directly.
|
|
116
116
|
|
|
117
|
-
Use screenshots when you need to visually inspect the page
|
|
117
|
+
Use screenshots when you need to visually inspect the page, for example, evaluating images, layout, or colors. For text or structured data, use `stagehand_extract` or `stagehand_observe` instead.
|
|
118
118
|
|
|
119
119
|
```typescript
|
|
120
120
|
const browser = new StagehandBrowser({
|
|
121
121
|
headless: false,
|
|
122
|
-
model: 'openai/gpt-5.
|
|
122
|
+
model: 'openai/gpt-5.6-sol',
|
|
123
123
|
})
|
|
124
124
|
```
|
|
125
125
|
|
|
@@ -128,7 +128,7 @@ To disable the screenshot tool for models that don't support vision, use `exclud
|
|
|
128
128
|
```typescript
|
|
129
129
|
const browser = new StagehandBrowser({
|
|
130
130
|
headless: false,
|
|
131
|
-
model: 'openai/gpt-5.
|
|
131
|
+
model: 'openai/gpt-5.6-sol',
|
|
132
132
|
excludeTools: ['stagehand_screenshot'],
|
|
133
133
|
})
|
|
134
134
|
```
|
|
@@ -142,7 +142,7 @@ const browser = new StagehandBrowser({
|
|
|
142
142
|
env: 'BROWSERBASE',
|
|
143
143
|
apiKey: process.env.BROWSERBASE_API_KEY,
|
|
144
144
|
projectId: process.env.BROWSERBASE_PROJECT_ID,
|
|
145
|
-
model: 'openai/gpt-5.
|
|
145
|
+
model: 'openai/gpt-5.6-sol',
|
|
146
146
|
})
|
|
147
147
|
```
|
|
148
148
|
|
|
@@ -155,7 +155,7 @@ Stagehand can opt into alpha browser recording tools:
|
|
|
155
155
|
```typescript
|
|
156
156
|
const browser = new StagehandBrowser({
|
|
157
157
|
headless: false,
|
|
158
|
-
model: 'openai/gpt-5.
|
|
158
|
+
model: 'openai/gpt-5.6-sol',
|
|
159
159
|
recording: {
|
|
160
160
|
outputDir: './browser-recordings',
|
|
161
161
|
},
|
|
@@ -44,7 +44,7 @@ export const discordAgent = new Agent({
|
|
|
44
44
|
id: 'discord-agent',
|
|
45
45
|
name: 'Discord Agent',
|
|
46
46
|
instructions: 'Answer questions and help with tasks in Discord.',
|
|
47
|
-
model: 'openai/gpt-5.
|
|
47
|
+
model: 'openai/gpt-5.6-sol',
|
|
48
48
|
channels: {
|
|
49
49
|
adapters: {
|
|
50
50
|
discord: createDiscordAdapter(),
|
|
@@ -41,7 +41,7 @@ Check the adapter's docs for its package name, credential variables, webhook req
|
|
|
41
41
|
|
|
42
42
|
## Use the same Mastra wiring
|
|
43
43
|
|
|
44
|
-
The Mastra side of each Chat SDK adapter
|
|
44
|
+
The Mastra side of each Chat SDK adapter follows the same setup. Install the adapter package and add its factory to `channels.adapters`. Then configure the platform credentials and point its webhook to the generated Mastra route.
|
|
45
45
|
|
|
46
46
|
Use one of the platform pages in this section as a reference for the Mastra wiring:
|
|
47
47
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
**Added in:** `@mastra/core@1.22.0`
|
|
6
6
|
|
|
7
|
-
Channels connect agents to messaging and collaboration platforms like Slack, Microsoft Teams, Discord, Telegram, WhatsApp, GitHub, and Linear. When a user sends a message or comment on a platform, the agent receives it
|
|
7
|
+
Channels connect agents to messaging and collaboration platforms like Slack, Microsoft Teams, Discord, Telegram, WhatsApp, GitHub, and Linear. When a user sends a message or comment on a platform, the agent receives it and processes it through the normal agent pipeline, plus streams the response back to the conversation. Mastra uses [Chat SDK](https://chat-sdk.dev/) for this channel layer.
|
|
8
8
|
|
|
9
9
|
Start with the page for your platform:
|
|
10
10
|
|
|
@@ -37,7 +37,7 @@ export const yourAgent = new Agent({
|
|
|
37
37
|
id: 'your-agent',
|
|
38
38
|
name: 'Your Agent',
|
|
39
39
|
instructions: 'You are a helpful assistant.',
|
|
40
|
-
model: 'openai/gpt-5.
|
|
40
|
+
model: 'openai/gpt-5.6-sol',
|
|
41
41
|
channels: {
|
|
42
42
|
adapters: {
|
|
43
43
|
slack: createSlackAdapter(),
|
|
@@ -66,7 +66,7 @@ export const mastra = new Mastra({
|
|
|
66
66
|
|
|
67
67
|
## Webhook routes
|
|
68
68
|
|
|
69
|
-
Platforms send channel activity to Mastra through webhooks. A webhook is an HTTP endpoint that the platform calls when something happens, such as a new message, a mention, or a user selecting "Approve" on an interactive tool approval card. This is how your agent receives a new message
|
|
69
|
+
Platforms send channel activity to Mastra through webhooks. A webhook is an HTTP endpoint that the platform calls when something happens, such as a new message, a mention, or a user selecting "Approve" on an interactive tool approval card. This is how your agent receives a new message and starts processing it, plus responds in the same channel.
|
|
70
70
|
|
|
71
71
|
Mastra registers a webhook route for each configured adapter and handles the request for you:
|
|
72
72
|
|
|
@@ -216,7 +216,7 @@ export const yourAgent = new Agent({
|
|
|
216
216
|
id: 'your-agent',
|
|
217
217
|
name: 'Your Agent',
|
|
218
218
|
instructions: 'You are a helpful assistant.',
|
|
219
|
-
model: 'openai/gpt-5.
|
|
219
|
+
model: 'openai/gpt-5.6-sol',
|
|
220
220
|
channels: {
|
|
221
221
|
adapters: {
|
|
222
222
|
slack: createSlackAdapter(),
|
|
@@ -230,7 +230,11 @@ Vercel and AWS Lambda require `waitUntil`, since they freeze the function as soo
|
|
|
230
230
|
|
|
231
231
|
### Coordinate instances with a shared pub/sub
|
|
232
232
|
|
|
233
|
-
Channels route messages through the agent's [signal pipeline](https://mastra.ai/docs/long-running-agents/signals), and each run acquires a lease on its thread so one run owns the conversation at a time.
|
|
233
|
+
Channels route messages through the agent's [signal pipeline](https://mastra.ai/docs/long-running-agents/signals), and each run acquires a lease on its thread so one run owns the conversation at a time.
|
|
234
|
+
|
|
235
|
+
The default in-memory pub/sub can't cross instance boundaries, so on serverless a follow-up message can be routed to a different instance than the one running the agent.
|
|
236
|
+
|
|
237
|
+
Without a shared pub/sub, that instance can't reach the active run and starts its own, leaving the original run untouched and the thread processed twice.
|
|
234
238
|
|
|
235
239
|
Configure a shared pub/sub backed by Redis Streams on the `Mastra` instance so leases and signals coordinate across instances:
|
|
236
240
|
|
|
@@ -158,10 +158,10 @@ settings:
|
|
|
158
158
|
|
|
159
159
|
This manifest configures:
|
|
160
160
|
|
|
161
|
-
- `display_information.name` and `features.bot_user.display_name`: Set your agent's name in Slack. You can update it at any time
|
|
161
|
+
- `display_information.name` and `features.bot_user.display_name`: Set your agent's name in Slack. You can update it at any time. Remember to reinstall the app after changing names or permissions.
|
|
162
162
|
- `app_home.messages_tab_enabled` and `app_home.messages_tab_read_only_enabled`: Enable direct messages from the Slack app's **Messages** tab.
|
|
163
163
|
- `always_online`: Shows the Slack bot user as always available.
|
|
164
|
-
- `oauth_config.scopes.bot`: Grants
|
|
164
|
+
- `oauth_config.scopes.bot`: Grants permission to post and read messages in channels where the bot is present. It also covers mentions and direct messages, together with user lookup.
|
|
165
165
|
- `event_subscriptions`: Tells Slack which message events to send to the webhook.
|
|
166
166
|
- `interactivity`: Enables interactive cards and tells Slack where to send card actions.
|
|
167
167
|
|
|
@@ -44,7 +44,7 @@ export const teamsAgent = new Agent({
|
|
|
44
44
|
id: 'teams-agent',
|
|
45
45
|
name: 'Teams Agent',
|
|
46
46
|
instructions: 'Answer questions and help with tasks in Microsoft Teams.',
|
|
47
|
-
model: 'openai/gpt-5.
|
|
47
|
+
model: 'openai/gpt-5.6-sol',
|
|
48
48
|
channels: {
|
|
49
49
|
adapters: {
|
|
50
50
|
teams: createTeamsAdapter({
|
|
@@ -44,7 +44,7 @@ export const telegramAgent = new Agent({
|
|
|
44
44
|
id: 'telegram-agent',
|
|
45
45
|
name: 'Telegram Agent',
|
|
46
46
|
instructions: 'Answer questions and help with tasks in Telegram.',
|
|
47
|
-
model: 'openai/gpt-5.
|
|
47
|
+
model: 'openai/gpt-5.6-sol',
|
|
48
48
|
channels: {
|
|
49
49
|
adapters: {
|
|
50
50
|
telegram: createTelegramAdapter(),
|
|
@@ -44,7 +44,7 @@ export const whatsappAgent = new Agent({
|
|
|
44
44
|
id: 'whatsapp-agent',
|
|
45
45
|
name: 'WhatsApp Agent',
|
|
46
46
|
instructions: 'Answer customer questions and help with tasks in WhatsApp.',
|
|
47
|
-
model: 'openai/gpt-5.
|
|
47
|
+
model: 'openai/gpt-5.6-sol',
|
|
48
48
|
channels: {
|
|
49
49
|
adapters: {
|
|
50
50
|
whatsapp: createWhatsAppAdapter(),
|
|
@@ -80,7 +80,7 @@ export const mastra = new Mastra({
|
|
|
80
80
|
})
|
|
81
81
|
```
|
|
82
82
|
|
|
83
|
-
The value of each option can come from a variable, import, or function call. The option itself must remain a direct property.
|
|
83
|
+
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:
|
|
84
84
|
|
|
85
85
|
```typescript
|
|
86
86
|
const options = {
|
|
@@ -32,7 +32,7 @@ Read about [monorepo deployment](https://mastra.ai/docs/deployment/monorepo).
|
|
|
32
32
|
The [Mastra platform](https://mastra.ai/docs/mastra-platform/overview) provides three products for deploying, monitoring, and managing AI applications built with the Mastra framework:
|
|
33
33
|
|
|
34
34
|
- [**Observability**](https://mastra.ai/docs/mastra-platform/observability): A standalone hosted product for searchable traces, logs, and metrics across Mastra projects and deploys
|
|
35
|
-
- [**Studio**](https://mastra.ai/docs/mastra-platform/studio): A hosted visual environment for testing agents
|
|
35
|
+
- [**Studio**](https://mastra.ai/docs/mastra-platform/studio): A hosted visual environment for testing agents and running workflows, plus inspecting traces
|
|
36
36
|
- [**Server**](https://mastra.ai/docs/mastra-platform/server): A production deployment target that runs your Mastra application as an API server
|
|
37
37
|
|
|
38
38
|
Learn more in the [Mastra platform overview](https://mastra.ai/docs/mastra-platform/overview).
|
|
@@ -72,4 +72,8 @@ Use these guides when adding Mastra to an existing Next.js or Astro application.
|
|
|
72
72
|
|
|
73
73
|
Mastra workflows run using the built-in execution engine by default. For production workloads requiring managed infrastructure, workflows can also be deployed to specialized platforms like [Inngest](https://www.inngest.com) that provide step memoization, automatic retries, and real-time monitoring.
|
|
74
74
|
|
|
75
|
-
Visit the [Workflow Runners guide](https://mastra.ai/docs/deployment/workflow-runners) for execution options and the [Inngest deployment guide](https://mastra.ai/guides/deployment/inngest) for setup instructions.
|
|
75
|
+
Visit the [Workflow Runners guide](https://mastra.ai/docs/deployment/workflow-runners) for execution options and the [Inngest deployment guide](https://mastra.ai/guides/deployment/inngest) for setup instructions.
|
|
76
|
+
|
|
77
|
+
## Workers
|
|
78
|
+
|
|
79
|
+
For production deployments, Mastra can run workflow orchestration, cron scheduling, and background tool execution in dedicated worker processes separate from the API server. This lets you scale each concern independently and isolate failures. See [Workers](https://mastra.ai/docs/deployment/workers) for details.
|
|
@@ -82,7 +82,9 @@ API: https://<sandbox-id>-4111.vercel.run/api
|
|
|
82
82
|
Studio: https://<sandbox-id>-4111.vercel.run
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
-
The manifest includes `expiresAt` when the sandbox provider reports an expiration time.
|
|
85
|
+
The manifest includes `expiresAt` when the sandbox provider reports an expiration time.
|
|
86
|
+
|
|
87
|
+
Redeploys to the same sandbox skip the dependency install when its inputs are unchanged. These inputs are `package.json`, the bundled lockfiles, and the install command.
|
|
86
88
|
|
|
87
89
|
### Using E2B
|
|
88
90
|
|