@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
|
@@ -17,7 +17,7 @@ export const supportAgent = new Agent({
|
|
|
17
17
|
id: 'support-agent',
|
|
18
18
|
name: 'Support Agent',
|
|
19
19
|
instructions: 'You are a helpful support assistant.',
|
|
20
|
-
model: 'openai/gpt-5.
|
|
20
|
+
model: 'openai/gpt-5.6-sol',
|
|
21
21
|
channels: {
|
|
22
22
|
adapters: {
|
|
23
23
|
slack: createSlackAdapter(),
|
|
@@ -70,7 +70,7 @@ const agent = new Agent({
|
|
|
70
70
|
id: 'example',
|
|
71
71
|
name: 'Example',
|
|
72
72
|
instructions: '...',
|
|
73
|
-
model: 'openai/gpt-5.
|
|
73
|
+
model: 'openai/gpt-5.6-sol',
|
|
74
74
|
channels: {
|
|
75
75
|
adapters: {
|
|
76
76
|
discord: {
|
|
@@ -110,7 +110,7 @@ const agent = new Agent({
|
|
|
110
110
|
|
|
111
111
|
`toolDisplay` controls how tool calls render in chat. The default `'cards'` posts a "Running…" card per tool and edits it with the result, matching the behavior in earlier versions. `'text'` is the same lifecycle but without rich Block Kit, useful for platforms that don't render cards well.
|
|
112
112
|
|
|
113
|
-
`'timeline'` and `'grouped'` stream tool state as inline `task_update` chunks alongside the agent's text. These modes require `streaming: true` and rely on the chat adapter to render the chunks. Slack supports both natively; other adapters may render a placeholder until they
|
|
113
|
+
`'timeline'` and `'grouped'` stream tool state as inline `task_update` chunks alongside the agent's text. These modes require `streaming: true` and rely on the chat adapter to render the chunks. Slack supports both natively; other adapters may render a placeholder until they add support. If `streaming` is disabled, the channel logs a one-time warning and falls back to `'cards'`.
|
|
114
114
|
|
|
115
115
|
`'hidden'` executes tools silently. Only the typing status indicates work in progress.
|
|
116
116
|
|
|
@@ -126,7 +126,7 @@ const agent = new Agent({
|
|
|
126
126
|
id: 'streaming-agent',
|
|
127
127
|
name: 'Streaming Agent',
|
|
128
128
|
instructions: '...',
|
|
129
|
-
model: 'openai/gpt-5.
|
|
129
|
+
model: 'openai/gpt-5.6-sol',
|
|
130
130
|
channels: {
|
|
131
131
|
adapters: {
|
|
132
132
|
slack: {
|
|
@@ -154,7 +154,7 @@ const agent = new Agent({
|
|
|
154
154
|
id: 'custom-typing-agent',
|
|
155
155
|
name: 'Custom Typing Agent',
|
|
156
156
|
instructions: '...',
|
|
157
|
-
model: 'openai/gpt-5.
|
|
157
|
+
model: 'openai/gpt-5.6-sol',
|
|
158
158
|
channels: {
|
|
159
159
|
adapters: {
|
|
160
160
|
discord: {
|
|
@@ -187,7 +187,7 @@ const agent = new Agent({
|
|
|
187
187
|
id: 'custom-handler-agent',
|
|
188
188
|
name: 'Custom Handler Agent',
|
|
189
189
|
instructions: '...',
|
|
190
|
-
model: 'openai/gpt-5.
|
|
190
|
+
model: 'openai/gpt-5.6-sol',
|
|
191
191
|
channels: {
|
|
192
192
|
adapters: {
|
|
193
193
|
slack: createSlackAdapter(),
|
|
@@ -216,19 +216,35 @@ type ChannelHandler = (
|
|
|
216
216
|
thread: Thread,
|
|
217
217
|
message: Message,
|
|
218
218
|
defaultHandler: (thread: Thread, message: Message) => Promise<void>,
|
|
219
|
-
ctx
|
|
219
|
+
ctx: ChannelHandlerContext,
|
|
220
220
|
) => Promise<void>
|
|
221
|
+
|
|
222
|
+
type ChannelHandlerContext = {
|
|
223
|
+
mastra?: Mastra
|
|
224
|
+
requestContext: RequestContext
|
|
225
|
+
}
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
`ctx.mastra` is the resolved `mastra` instance, so a handler can reach storage or other registered primitives without being passed an external accessor:
|
|
229
|
+
|
|
230
|
+
```typescript
|
|
231
|
+
onDirectMessage: async (thread, message, defaultHandler, ctx) => {
|
|
232
|
+
const store = await ctx.mastra?.getStorage()?.getStore('memory')
|
|
233
|
+
await defaultHandler(thread, message)
|
|
234
|
+
}
|
|
221
235
|
```
|
|
222
236
|
|
|
223
|
-
`ctx`
|
|
237
|
+
`ctx.requestContext` is the [`RequestContext`](https://mastra.ai/docs/server/request-context) for the run this message is about to start, built fresh for every message. Write to it before calling `defaultHandler` and the value reaches the run, alongside the channel entries Mastra adds afterward:
|
|
224
238
|
|
|
225
239
|
```typescript
|
|
226
240
|
onDirectMessage: async (thread, message, defaultHandler, ctx) => {
|
|
227
|
-
|
|
241
|
+
ctx.requestContext.set('locale', 'en-GB')
|
|
228
242
|
await defaultHandler(thread, message)
|
|
229
243
|
}
|
|
230
244
|
```
|
|
231
245
|
|
|
246
|
+
Anything the run reads from its request context can be decided per message this way, such as which user a platform sender maps to.
|
|
247
|
+
|
|
232
248
|
## Resource ID resolution
|
|
233
249
|
|
|
234
250
|
By default a channel thread's memory `resourceId` is `${platform}:${message.author.userId}`. The sender owns the memory, scoped per platform. For apps with a shared identity, such as single sign-on (SSO), this splits memory: the same user gets `feishu:user_123` in a Feishu DM but `user_123` on the web.
|
|
@@ -243,7 +259,7 @@ const agent = new Agent({
|
|
|
243
259
|
id: 'sso-agent',
|
|
244
260
|
name: 'SSO Agent',
|
|
245
261
|
instructions: '...',
|
|
246
|
-
model: 'openai/gpt-5.
|
|
262
|
+
model: 'openai/gpt-5.6-sol',
|
|
247
263
|
channels: {
|
|
248
264
|
adapters: {
|
|
249
265
|
slack: createSlackAdapter(),
|
|
@@ -272,9 +288,9 @@ The `ResolveResourceIdContext` passed to the function:
|
|
|
272
288
|
|
|
273
289
|
## Thread ID resolution
|
|
274
290
|
|
|
275
|
-
By default a new channel thread gets a random UUID as its internal Mastra thread id. Pass `resolveThreadId` to pick the id yourself
|
|
291
|
+
By default a new channel thread gets a random UUID as its internal Mastra thread id. Pass `resolveThreadId` to pick the id yourself: for example, give the thread the same id as the session it belongs to, matching how your app names threads it creates itself.
|
|
276
292
|
|
|
277
|
-
The hook runs after `resolveResourceId`, so the resolved owner is available on the context. Like `resolveResourceId` it runs only when a new thread is created: reused threads keep their stored id and never call the hook. The returned id must be unique across the memory store
|
|
293
|
+
The hook runs after `resolveResourceId`, so the resolved owner is available on the context. Like `resolveResourceId` it runs only when a new thread is created: reused threads keep their stored id and never call the hook. The returned id must be unique across the memory store. If it already belongs to an existing thread, Mastra logs a warning and uses a generated id instead so the existing thread is never overwritten. Return `ctx.defaultThreadId` to keep the built-in behavior.
|
|
278
294
|
|
|
279
295
|
```typescript
|
|
280
296
|
import { Agent } from '@mastra/core/agent'
|
|
@@ -284,7 +300,7 @@ const agent = new Agent({
|
|
|
284
300
|
id: 'session-agent',
|
|
285
301
|
name: 'Session Agent',
|
|
286
302
|
instructions: '...',
|
|
287
|
-
model: 'openai/gpt-5.
|
|
303
|
+
model: 'openai/gpt-5.6-sol',
|
|
288
304
|
channels: {
|
|
289
305
|
adapters: {
|
|
290
306
|
slack: createSlackAdapter(),
|
|
@@ -17,7 +17,7 @@ const agent = new Agent({
|
|
|
17
17
|
id: 'my-agent',
|
|
18
18
|
name: 'My Agent',
|
|
19
19
|
instructions: 'You are a helpful assistant',
|
|
20
|
-
model: 'openai/gpt-5.
|
|
20
|
+
model: 'openai/gpt-5.6-sol',
|
|
21
21
|
})
|
|
22
22
|
|
|
23
23
|
const durableAgent = createDurableAgent({ agent })
|
|
@@ -39,7 +39,7 @@ cleanup()
|
|
|
39
39
|
|
|
40
40
|
### Using the `durable` config flag
|
|
41
41
|
|
|
42
|
-
Set `durable: true` on `AgentConfig` and the agent is automatically wrapped with `createDurableAgent` when it
|
|
42
|
+
Set `durable: true` on `AgentConfig` and the agent is automatically wrapped with `createDurableAgent` when it's attached to a `Mastra` instance. Use an object to forward advanced options such as `cache`, `pubsub`, `maxSteps`, or `cleanupTimeoutMs`.
|
|
43
43
|
|
|
44
44
|
```typescript
|
|
45
45
|
import { Mastra } from '@mastra/core'
|
|
@@ -49,7 +49,7 @@ const myAgent = new Agent({
|
|
|
49
49
|
id: 'my-agent',
|
|
50
50
|
name: 'My Agent',
|
|
51
51
|
instructions: 'You are a helpful assistant',
|
|
52
|
-
model: 'openai/gpt-5.
|
|
52
|
+
model: 'openai/gpt-5.6-sol',
|
|
53
53
|
durable: true, // or: { maxSteps: 10, cleanupTimeoutMs: 60_000 }
|
|
54
54
|
})
|
|
55
55
|
|
|
@@ -58,7 +58,7 @@ export const mastra = new Mastra({
|
|
|
58
58
|
})
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
`mastra.getAgent('myAgent')` returns the wrapped `DurableAgent`. Standalone agents (constructed but never registered on a `Mastra` instance)
|
|
61
|
+
`mastra.getAgent('myAgent')` returns the wrapped `DurableAgent`. Standalone agents (constructed but never registered on a `Mastra` instance) don't become durable. The wrapping is applied at registration.
|
|
62
62
|
|
|
63
63
|
## `createDurableAgent(options)`
|
|
64
64
|
|
|
@@ -176,7 +176,7 @@ await output.text
|
|
|
176
176
|
|
|
177
177
|
Returns: `Promise<DurableAgentStreamResult>`
|
|
178
178
|
|
|
179
|
-
> **Warning:** The `cleanup()` returned by `observe()` destroys the run's registry entries and cached events. Only call it when you are done with the run. If the run is suspended and you intend to resume later, don't call `cleanup()
|
|
179
|
+
> **Warning:** The `cleanup()` returned by `observe()` destroys the run's registry entries and cached events. Only call it when you are done with the run. If the run is suspended and you intend to resume later, don't call `cleanup()`. Let the auto-cleanup timer handle it after the run finishes or errors. Auto-cleanup doesn't fire on suspended events.
|
|
180
180
|
|
|
181
181
|
#### `prepare(messages, options?)`
|
|
182
182
|
|
|
@@ -204,6 +204,55 @@ interface PrepareResult {
|
|
|
204
204
|
}
|
|
205
205
|
```
|
|
206
206
|
|
|
207
|
+
### Recovery
|
|
208
|
+
|
|
209
|
+
#### `recoverActiveRuns(options?)`
|
|
210
|
+
|
|
211
|
+
Discovers runs stuck in `running` status for this agent and re-drives them from the last persisted snapshot. Recovers up to `options.limit` runs (default: 100). Returns a summary of what was recovered.
|
|
212
|
+
|
|
213
|
+
```typescript
|
|
214
|
+
const result = await durableAgent.recoverActiveRuns()
|
|
215
|
+
// { recovered: [{ runId, status }], succeeded: 2, failed: 0 }
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Pass a `runId` to recover a single known run:
|
|
219
|
+
|
|
220
|
+
```typescript
|
|
221
|
+
await durableAgent.recoverActiveRuns({ runId: 'run-abc-123' })
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
Returns:
|
|
225
|
+
|
|
226
|
+
```typescript
|
|
227
|
+
interface DurableAgentRecoverActiveRunsResult {
|
|
228
|
+
recovered: Array<{ runId: string; status: 'success' | 'failed'; error?: Error }>
|
|
229
|
+
succeeded: number
|
|
230
|
+
failed: number
|
|
231
|
+
}
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
**options.runId** (`string`): Recover a specific run by ID. When set, discovery filters are ignored.
|
|
235
|
+
|
|
236
|
+
**options.limit** (`number`): Maximum number of active runs to discover. Defaults to 100.
|
|
237
|
+
|
|
238
|
+
**options.createdBefore** (`Date`): Only recover runs created before this date.
|
|
239
|
+
|
|
240
|
+
#### `recover(runId, options?)`
|
|
241
|
+
|
|
242
|
+
Recovers a single run by ID. Returns a streamable result with the same shape as `stream()`. Use this when you need to observe the recovery stream in real time.
|
|
243
|
+
|
|
244
|
+
```typescript
|
|
245
|
+
const { output, cleanup } = await durableAgent.recover('run-abc-123', {
|
|
246
|
+
onChunk: chunk => console.log(chunk),
|
|
247
|
+
onError: ({ error }) => console.error(error),
|
|
248
|
+
})
|
|
249
|
+
|
|
250
|
+
await output.text
|
|
251
|
+
cleanup()
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
Returns: [`Promise<DurableAgentStreamResult>`](#durableagentstreamresult)
|
|
255
|
+
|
|
207
256
|
## Stream options
|
|
208
257
|
|
|
209
258
|
`stream()` accepts a `DurableAgentStreamOptions` object. It supports the agent execution options below, plus lifecycle callbacks.
|
|
@@ -387,7 +387,7 @@ const limitedResult = await agent.generate('Write a short poem about coding', {
|
|
|
387
387
|
|
|
388
388
|
### With memory
|
|
389
389
|
|
|
390
|
-
Give your agent access to conversation history and persistence by configuring memory options.
|
|
390
|
+
Give your agent access to conversation history and persistence by configuring memory options. It allows the agent to remember previous interactions and maintain context across messages.
|
|
391
391
|
|
|
392
392
|
```ts
|
|
393
393
|
const memoryResult = await agent.generate('Remember my favorite color is blue', {
|
|
@@ -436,7 +436,7 @@ console.log(response.text)
|
|
|
436
436
|
|
|
437
437
|
### Using `maxSteps`
|
|
438
438
|
|
|
439
|
-
The `maxSteps` parameter controls the maximum number of sequential LLM calls an agent can make. Each step
|
|
439
|
+
The `maxSteps` parameter controls the maximum number of sequential LLM calls an agent can make. Each step generates a response and executes any tool calls before processing the result. Limiting steps helps prevent infinite loops and reduce latency. It also controls token usage for agents that use tools. The default is 5, but can be increased:
|
|
440
440
|
|
|
441
441
|
```typescript
|
|
442
442
|
const response = await agent.generate('Help me organize my day', {
|
|
@@ -462,7 +462,7 @@ const response = await agent.generate('Help me organize my day', {
|
|
|
462
462
|
|
|
463
463
|
### Using `onTitleGenerated`
|
|
464
464
|
|
|
465
|
-
When `generateTitle` is enabled in memory options, title generation runs asynchronously after the response completes. Use `onTitleGenerated` to react when the title is ready
|
|
465
|
+
When `generateTitle` is enabled in memory options, title generation runs asynchronously after the response completes. Use `onTitleGenerated` to react when the title is ready, for example by pushing it to the client via SSE.
|
|
466
466
|
|
|
467
467
|
```typescript
|
|
468
468
|
const response = await agent.generate('What is quantum computing?', {
|
|
@@ -205,7 +205,7 @@ await agent.generateLegacy(
|
|
|
205
205
|
sentiment: z.enum(['positive', 'negative', 'neutral']),
|
|
206
206
|
confidence: z.number(),
|
|
207
207
|
}),
|
|
208
|
-
model: 'openai/gpt-5.
|
|
208
|
+
model: 'openai/gpt-5.6-sol',
|
|
209
209
|
errorStrategy: 'warn',
|
|
210
210
|
},
|
|
211
211
|
// Output processors for response validation
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Agent.getDefaultOptions()
|
|
4
4
|
|
|
5
|
-
Agents can be configured with default options for memory usage
|
|
5
|
+
Agents can be configured with default options for memory usage and output format. Iteration steps can also be configured. The `.getDefaultOptions()` method returns these defaults, resolving them if they're functions. These options apply to all `stream()` and `generate()` calls unless overridden and are useful for inspecting an agent’s unknown defaults.
|
|
6
6
|
|
|
7
7
|
## Usage example
|
|
8
8
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
> **Warning:** **Deprecated**: This method is deprecated and only works with V1 models. For V2 models, use the new [`.getDefaultOptions()`](https://mastra.ai/reference/agents/getDefaultOptions) method instead.
|
|
6
6
|
|
|
7
|
-
Agents can be configured with default streaming options for memory usage
|
|
7
|
+
Agents can be configured with default streaming options for memory usage and output format. Iteration steps can also be configured. The `.getDefaultStreamOptionsLegacy()` method returns these defaults, resolving them if they're functions. These options apply to all `streamLegacy()` calls unless overridden and are useful for inspecting an agent’s unknown defaults.
|
|
8
8
|
|
|
9
9
|
## Usage example
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@ await agent.getLLM()
|
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
14
|
await agent.getLLM({
|
|
15
|
-
model: 'openai/gpt-5.
|
|
15
|
+
model: 'openai/gpt-5.6-sol',
|
|
16
16
|
})
|
|
17
17
|
```
|
|
18
18
|
|
|
@@ -33,7 +33,7 @@ await agent.getLLM({
|
|
|
33
33
|
```typescript
|
|
34
34
|
await agent.getLLM({
|
|
35
35
|
requestContext: new RequestContext(),
|
|
36
|
-
model: 'openai/gpt-5.
|
|
36
|
+
model: 'openai/gpt-5.6-sol',
|
|
37
37
|
})
|
|
38
38
|
```
|
|
39
39
|
|
|
@@ -31,7 +31,7 @@ export const supportAgent = new Agent({
|
|
|
31
31
|
id: 'support-agent',
|
|
32
32
|
name: 'Support Agent',
|
|
33
33
|
instructions: 'You help customers with support requests.',
|
|
34
|
-
model: 'openai/gpt-5.
|
|
34
|
+
model: 'openai/gpt-5.6-sol',
|
|
35
35
|
metadata: { type: 'support' },
|
|
36
36
|
})
|
|
37
37
|
|
|
@@ -47,7 +47,7 @@ export const supportAgent = new Agent({
|
|
|
47
47
|
id: 'support-agent',
|
|
48
48
|
name: 'Support Agent',
|
|
49
49
|
instructions: 'You help customers with support requests.',
|
|
50
|
-
model: 'openai/gpt-5.
|
|
50
|
+
model: 'openai/gpt-5.6-sol',
|
|
51
51
|
metadata: ({ requestContext }) => ({
|
|
52
52
|
type: 'support',
|
|
53
53
|
tenant: requestContext.get('tenant'),
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Agent.listScorers()
|
|
4
4
|
|
|
5
|
-
The `.listScorers()` method retrieves the scoring configuration configured for an agent, resolving it if it's a function.
|
|
5
|
+
The `.listScorers()` method retrieves the scoring configuration configured for an agent, resolving it if it's a function. The method provides access to the scoring system used for evaluating agent responses and performance.
|
|
6
6
|
|
|
7
7
|
## Usage example
|
|
8
8
|
|
|
@@ -46,7 +46,7 @@ interface SkillMetadata {
|
|
|
46
46
|
|
|
47
47
|
## Merging behavior
|
|
48
48
|
|
|
49
|
-
When both agent-level skills and workspace skills are configured, `.listSkills()` returns the merged set. Agent-level skills take precedence on name conflicts
|
|
49
|
+
When both agent-level skills and workspace skills are configured, `.listSkills()` returns the merged set. Agent-level skills take precedence on name conflicts. If both define a skill called `code-review`, only the agent-level version is returned.
|
|
50
50
|
|
|
51
51
|
## Related
|
|
52
52
|
|
|
@@ -12,7 +12,7 @@ The filter contract mirrors the workflow run listing APIs (`listWorkflowRuns`),
|
|
|
12
12
|
|
|
13
13
|
## Usage example
|
|
14
14
|
|
|
15
|
-
Discover the pending run for a conversation and continue it. Check `requiresApproval` to pick the right continuation
|
|
15
|
+
Discover the pending run for a conversation and continue it. Check `requiresApproval` to pick the right continuation: `approveToolCall()` / `declineToolCall()` for approval suspensions, `resumeStream()` with resume data for `suspend()`-based suspensions:
|
|
16
16
|
|
|
17
17
|
```typescript
|
|
18
18
|
const { runs } = await agent.listSuspendedRuns({
|
|
@@ -83,7 +83,7 @@ interface AgentRunToolCall {
|
|
|
83
83
|
|
|
84
84
|
## Discovery scope
|
|
85
85
|
|
|
86
|
-
Results are scoped to runs started by the agent you call `listSuspendedRuns()` on: snapshots persist the owning agent's id, so runs started by other agents on the same Mastra instance aren't returned. In [supervisor setups](https://mastra.ai/docs/agents/agent-approval) the supervisor sees its outer run
|
|
86
|
+
Results are scoped to runs started by the agent you call `listSuspendedRuns()` on: snapshots persist the owning agent's id, so runs started by other agents on the same Mastra instance aren't returned. In [supervisor setups](https://mastra.ai/docs/agents/agent-approval) the supervisor sees its outer run (the one to resume), while a subagent's inner run is only visible from the subagent itself. Filter by `threadId` and `resourceId` to scope results to one conversation.
|
|
87
87
|
|
|
88
88
|
Run snapshots are only persisted while a run is waiting on input and are deleted when it finishes, so suspended runs are the only runs discoverable from storage. Suspended runs only survive restarts when the Mastra instance has a persistent [storage provider](https://mastra.ai/docs/storage/overview) configured. With the default in-memory store, snapshots are lost on restart.
|
|
89
89
|
|
|
@@ -32,7 +32,7 @@ export const mastra = new Mastra({
|
|
|
32
32
|
})
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
You can also use
|
|
35
|
+
You can also use runtime-defined agent routing based on an `agentId`. The URL `/chat/weatherAgent` will resolve to the agent with the ID `weatherAgent`.
|
|
36
36
|
|
|
37
37
|
```typescript
|
|
38
38
|
import { Mastra } from '@mastra/core'
|
|
@@ -30,7 +30,7 @@ export const mastra = new Mastra({
|
|
|
30
30
|
})
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
You can also use
|
|
33
|
+
You can also use runtime-defined agent routing based on an `agentId`. The URL `/network/weatherAgent` will resolve to the agent with the ID `weatherAgent`.
|
|
34
34
|
|
|
35
35
|
```typescript
|
|
36
36
|
import { Mastra } from '@mastra/core'
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# toAISdkMessages()
|
|
4
4
|
|
|
5
|
-
Converts messages from
|
|
5
|
+
Converts messages from input formats to AI SDK UI message format. `toAISdkMessages()` keeps the existing AI SDK v5/default behavior. If your app is typed against AI SDK v6, pass `version: 'v6'`.
|
|
6
6
|
|
|
7
7
|
`version: 'v6'` uses the MessageList AI SDK v6 UI output path. MessageList input detection and ingestion remain unchanged.
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# toAISdkV4Messages()
|
|
4
4
|
|
|
5
|
-
Converts messages from
|
|
5
|
+
Converts messages from input formats to AI SDK V4 UI message format. This function accepts messages in multiple formats (strings, AI SDK V4/V5 messages, Mastra DB messages, etc.) and normalizes them to the AI SDK V4 `UIMessage` format, which is suitable for use with AI SDK UI components like `useChat()`.
|
|
6
6
|
|
|
7
7
|
## Usage example
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# toAISdkV5Messages()
|
|
4
4
|
|
|
5
|
-
Converts messages from
|
|
5
|
+
Converts messages from input formats to AI SDK V5 (and later) UI message format. This function accepts messages in multiple formats (strings, AI SDK V4/V5 messages, Mastra DB messages, etc.) and normalizes them to the AI SDK V5+ `UIMessage` format, which is suitable for use with AI SDK UI components like `useChat()`.
|
|
6
6
|
|
|
7
7
|
## Usage example
|
|
8
8
|
|
|
@@ -32,7 +32,7 @@ export const mastra = new Mastra({
|
|
|
32
32
|
})
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
You can also use
|
|
35
|
+
You can also use runtime-defined workflow routing based on a `workflowId`. The URL `/workflow/weatherWorkflow` will resolve to the workflow with the ID `weatherWorkflow`.
|
|
36
36
|
|
|
37
37
|
```typescript
|
|
38
38
|
import { Mastra } from '@mastra/core'
|
|
@@ -36,10 +36,10 @@ export async function GET(req: Request) {
|
|
|
36
36
|
|
|
37
37
|
## Returns
|
|
38
38
|
|
|
39
|
-
`ReadableStream
|
|
39
|
+
`ReadableStream`: A stream of AI SDK UIMessage data parts containing:
|
|
40
40
|
|
|
41
41
|
- A `start` marker
|
|
42
|
-
- A `WorkflowDataPart` with the
|
|
42
|
+
- A `WorkflowDataPart` with the workflow status and all step summaries
|
|
43
43
|
- A `WorkflowStepDataPart` for each step with its full output
|
|
44
44
|
- A `finish` marker
|
|
45
45
|
|
|
@@ -20,7 +20,7 @@ export const mastra = new Mastra({
|
|
|
20
20
|
})
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
> **Note:** You can omit the constructor parameters if
|
|
23
|
+
> **Note:** You can omit the constructor parameters if the required environment variables (`AUTH0_DOMAIN` and `AUTH0_AUDIENCE`) are set. In that case, use `new MastraAuthAuth0()` without any arguments.
|
|
24
24
|
|
|
25
25
|
## Constructor parameters
|
|
26
26
|
|
|
@@ -61,7 +61,7 @@ Returns: `Promise<T[]>`
|
|
|
61
61
|
|
|
62
62
|
Authorizes a non-user system actor, such as an autonomous or scheduled agent. Optional.
|
|
63
63
|
|
|
64
|
-
System actors skip the user-centric `require()` path, so implement `requireActor` to enforce per-agent least privilege for them. Throw `FGADeniedError` to deny. When a provider doesn't implement `requireActor`, Mastra preserves the trusted-actor bypass (allow after the tenant-scope check), so adding
|
|
64
|
+
System actors skip the user-centric `require()` path, so implement `requireActor` to enforce per-agent least privilege for them. Throw `FGADeniedError` to deny. When a provider doesn't implement `requireActor`, Mastra preserves the trusted-actor bypass (allow after the tenant-scope check), so adding the method remains backward compatible.
|
|
65
65
|
|
|
66
66
|
Treat `actor.permissions` as an untrusted claim. Resolve the agent's authoritative grants from a trusted source keyed by `actor.agentId`, rather than trusting the inline values. See [System actors](https://mastra.ai/docs/server/auth/fga).
|
|
67
67
|
|
|
@@ -110,7 +110,7 @@ The `params` argument passed to `check`, `require`, and `requireActor`.
|
|
|
110
110
|
|
|
111
111
|
## `ActorSignal`
|
|
112
112
|
|
|
113
|
-
Identifies a call made by a trusted non-user actor rather than an authenticated end user. It
|
|
113
|
+
Identifies a call made by a trusted non-user actor rather than an authenticated end user. It's either `true` (the anonymous system shorthand) or an object that names the acting agent and carries the grants a provider can enforce.
|
|
114
114
|
|
|
115
115
|
**actorKind** (`'system'`): Marks the object form of the signal.
|
|
116
116
|
|
|
@@ -24,7 +24,7 @@ export const mastra = new Mastra({
|
|
|
24
24
|
})
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
> **Note:** You can omit the constructor parameters if
|
|
27
|
+
> **Note:** You can omit the constructor parameters if the required environment variables are set. In that case, use `new MastraAuthGoogle()` without any arguments.
|
|
28
28
|
|
|
29
29
|
### Constructor parameters
|
|
30
30
|
|
|
@@ -72,7 +72,7 @@ The following environment variables are automatically used when constructor opti
|
|
|
72
72
|
|
|
73
73
|
`MastraAuthGoogle` authenticates requests in the following order:
|
|
74
74
|
|
|
75
|
-
1. **Session cookie
|
|
75
|
+
1. **Session cookie.** With SSO enabled, the provider reads and decrypts the encrypted session cookie. A valid, unexpired session authenticates the user.
|
|
76
76
|
2. **Google ID token fallback**: If no valid session cookie is present, verifies the `Authorization` header token against Google's JWKS endpoint.
|
|
77
77
|
|
|
78
78
|
After authentication, `authorizeUser` checks that the user has a valid Google user ID, the token-derived expiration hasn't passed, and the user's verified `hd` claim matches `allowedDomains` when domains are configured.
|
|
@@ -24,7 +24,7 @@ export const mastra = new Mastra({
|
|
|
24
24
|
})
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
> **Note:** You can omit the constructor parameters if
|
|
27
|
+
> **Note:** You can omit the constructor parameters if the required environment variables are set. In that case, use `new MastraAuthOkta()` without any arguments.
|
|
28
28
|
|
|
29
29
|
### Constructor parameters
|
|
30
30
|
|
|
@@ -20,7 +20,7 @@ export const mastra = new Mastra({
|
|
|
20
20
|
})
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
> **Note:** You can omit the constructor parameters if
|
|
23
|
+
> **Note:** You can omit the constructor parameters if the required environment variables (`WORKOS_API_KEY` and `WORKOS_CLIENT_ID`) are set. In that case, use `new MastraAuthWorkos()` without any arguments.
|
|
24
24
|
|
|
25
25
|
## Constructor parameters
|
|
26
26
|
|
|
@@ -56,7 +56,7 @@ By default, `MastraAuthWorkos` authorizes any authenticated WorkOS user whose re
|
|
|
56
56
|
2. **User Retrieval**: User information is extracted from the verified token
|
|
57
57
|
3. **Authorization Decision**: Access is granted if the resolved user contains the required identifiers
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
`MastraAuthWorkos` acts as an authentication provider rather than a role gate by default.
|
|
60
60
|
|
|
61
61
|
## FGA membership loading
|
|
62
62
|
|
|
@@ -23,7 +23,7 @@ export const browserAgent = new Agent({
|
|
|
23
23
|
name: 'Browser Agent',
|
|
24
24
|
instructions: `You can browse the web. Use browser_snapshot to see the page structure,
|
|
25
25
|
then interact with elements using their refs (e.g., @e5).`,
|
|
26
|
-
model: 'openai/gpt-5.
|
|
26
|
+
model: 'openai/gpt-5.6-sol',
|
|
27
27
|
browser,
|
|
28
28
|
})
|
|
29
29
|
```
|
|
@@ -107,7 +107,7 @@ Navigate to a URL.
|
|
|
107
107
|
|
|
108
108
|
| Parameter | Type | Description |
|
|
109
109
|
| ----------- | ----------------------------------------------- | ----------------------------------------------- |
|
|
110
|
-
| `url` | `string` | URL to
|
|
110
|
+
| `url` | `string` | URL to open |
|
|
111
111
|
| `waitUntil` | `"load" \| "domcontentloaded" \| "networkidle"` | When to consider navigation complete (optional) |
|
|
112
112
|
| `timeout` | `number` | Navigation timeout in ms (optional) |
|
|
113
113
|
|
|
@@ -358,7 +358,7 @@ Execute JavaScript in the page context. Use as an escape hatch when other tools
|
|
|
358
358
|
|
|
359
359
|
### `browser_screenshot`
|
|
360
360
|
|
|
361
|
-
Capture a screenshot of the current page as PNG (viewport by default
|
|
361
|
+
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 `browser_snapshot` when you only need text or structured data.
|
|
362
362
|
|
|
363
363
|
```text
|
|
364
364
|
// Viewport only (default)
|
|
@@ -26,7 +26,7 @@ const workspace = new Workspace({
|
|
|
26
26
|
|
|
27
27
|
const browserAgent = new Agent({
|
|
28
28
|
id: 'browser-agent',
|
|
29
|
-
model: 'openai/gpt-5.
|
|
29
|
+
model: 'openai/gpt-5.6-sol',
|
|
30
30
|
workspace,
|
|
31
31
|
instructions: 'You are a web automation assistant.',
|
|
32
32
|
memory: new Memory(),
|
|
@@ -227,6 +227,6 @@ browse skills install
|
|
|
227
227
|
|
|
228
228
|
## Related
|
|
229
229
|
|
|
230
|
-
- [BrowserViewer guide](https://mastra.ai/docs/browser/browser-viewer)
|
|
231
|
-
- [MastraBrowser](https://mastra.ai/reference/browser/mastra-browser)
|
|
232
|
-
- [Workspace overview](https://mastra.ai/docs/workspace/overview)
|
|
230
|
+
- [BrowserViewer guide](https://mastra.ai/docs/browser/browser-viewer): Setup and usage walkthrough
|
|
231
|
+
- [MastraBrowser](https://mastra.ai/reference/browser/mastra-browser): Base class API reference
|
|
232
|
+
- [Workspace overview](https://mastra.ai/docs/workspace/overview): Workspace configuration
|
|
@@ -24,7 +24,7 @@ export const browserAgent = new Agent({
|
|
|
24
24
|
name: 'Browser Agent',
|
|
25
25
|
instructions: `You can browse the web. Use browser_snapshot to see the page structure,
|
|
26
26
|
then interact with elements using their refs (e.g., @e5).`,
|
|
27
|
-
model: 'openai/gpt-5.
|
|
27
|
+
model: 'openai/gpt-5.6-sol',
|
|
28
28
|
browser,
|
|
29
29
|
})
|
|
30
30
|
```
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# MastraBrowser class
|
|
4
4
|
|
|
5
|
-
The `MastraBrowser` class is the abstract base class for browser automation providers.
|
|
5
|
+
The `MastraBrowser` class is the abstract base class for browser automation providers. Its common interface covers browser launch and thread isolation, plus screencast streaming and input events.
|
|
6
6
|
|
|
7
7
|
You don't instantiate `MastraBrowser` directly. Instead, use a provider implementation:
|
|
8
8
|
|
|
@@ -26,7 +26,7 @@ export const browserAgent = new Agent({
|
|
|
26
26
|
id: 'browser-agent',
|
|
27
27
|
name: 'Browser Agent',
|
|
28
28
|
instructions: 'You can browse the web to find information.',
|
|
29
|
-
model: 'openai/gpt-5.
|
|
29
|
+
model: 'openai/gpt-5.6-sol',
|
|
30
30
|
browser,
|
|
31
31
|
})
|
|
32
32
|
```
|
|
@@ -135,7 +135,7 @@ const hasSession = browser.hasThreadSession('thread-123')
|
|
|
135
135
|
|
|
136
136
|
#### `closeThreadSession(threadId)`
|
|
137
137
|
|
|
138
|
-
Closes a specific thread's browser session.
|
|
138
|
+
Closes a specific thread's browser session. With 'thread' scope, it closes that thread's browser instance. With 'shared' scope, it clears the thread state.
|
|
139
139
|
|
|
140
140
|
```typescript
|
|
141
141
|
await browser.closeThreadSession('thread-123')
|
|
@@ -145,7 +145,7 @@ await browser.closeThreadSession('thread-123')
|
|
|
145
145
|
|
|
146
146
|
#### `getTools()`
|
|
147
147
|
|
|
148
|
-
Returns the browser tools for use with agents. Each provider returns different tools based on its
|
|
148
|
+
Returns the browser tools for use with agents. Each provider returns different tools based on its model.
|
|
149
149
|
|
|
150
150
|
```typescript
|
|
151
151
|
const tools = browser.getTools()
|