@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
package/.docs/docs/agents/acp.md
CHANGED
|
@@ -11,7 +11,7 @@ ACP is useful for coding agents such as Claude Code, Amp, Codex, or any other ex
|
|
|
11
11
|
- A Mastra agent should delegate code inspection, editing, or repository tasks to an external coding agent.
|
|
12
12
|
- An ACP-compatible agent process should stay alive across calls so it can keep session context.
|
|
13
13
|
- A parent agent needs real-time output from a coding agent while the task runs.
|
|
14
|
-
- An ACP-compatible agent needs permission prompts before it reads files
|
|
14
|
+
- An ACP-compatible agent needs permission prompts before it reads files or writes files, or alternatively runs actions.
|
|
15
15
|
- File access should go through Mastra's workspace abstraction instead of direct process-only file access.
|
|
16
16
|
|
|
17
17
|
## How ACP works
|
|
@@ -25,8 +25,8 @@ The flow is:
|
|
|
25
25
|
3. The client sends ACP `initialize` and `session/new` requests.
|
|
26
26
|
4. Mastra sends the user task to the ACP agent with `session/prompt`.
|
|
27
27
|
5. The ACP agent streams session updates and message chunks back to Mastra.
|
|
28
|
-
6. Mastra returns the buffered output
|
|
29
|
-
7. The ACP connection stops the process after the prompt when `persistSession` is `false
|
|
28
|
+
6. Mastra returns the buffered output or emits streaming chunks, or alternatively handles permission input.
|
|
29
|
+
7. The ACP connection stops the process after the prompt when `persistSession` is `false`. `AcpAgent` can keep a reusable process alive across calls by default.
|
|
30
30
|
|
|
31
31
|
During execution, the ACP client also handles permission requests and file operations. File reads and writes go through Mastra's `Workspace`, so the ACP agent operates inside the workspace you provide.
|
|
32
32
|
|
|
@@ -84,7 +84,7 @@ export const codeSupervisor = new Agent({
|
|
|
84
84
|
id: 'code-supervisor',
|
|
85
85
|
name: 'Code Supervisor',
|
|
86
86
|
instructions: 'Delegate code editing tasks to the code-agent subagent.',
|
|
87
|
-
model: 'openai/gpt-5.
|
|
87
|
+
model: 'openai/gpt-5.6-sol',
|
|
88
88
|
agents: {
|
|
89
89
|
codeAgent,
|
|
90
90
|
},
|
|
@@ -113,7 +113,7 @@ export const codeSupervisor = new Agent({
|
|
|
113
113
|
id: 'code-supervisor',
|
|
114
114
|
name: 'Code Supervisor',
|
|
115
115
|
instructions: 'Use the code-agent tool when a task requires repository inspection or code edits.',
|
|
116
|
-
model: 'openai/gpt-5.
|
|
116
|
+
model: 'openai/gpt-5.6-sol',
|
|
117
117
|
tools: {
|
|
118
118
|
codeAgentTool,
|
|
119
119
|
},
|
|
@@ -6,7 +6,7 @@ Agents sometimes require the same [human-in-the-loop](https://mastra.ai/docs/wor
|
|
|
6
6
|
|
|
7
7
|
## When to use agent approval
|
|
8
8
|
|
|
9
|
-
- **Destructive or irreversible actions** such as deleting records
|
|
9
|
+
- **Destructive or irreversible actions** such as deleting records or sending emails, or alternatively processing payments.
|
|
10
10
|
- **Cost-heavy operations** like calling expensive third-party APIs where you want to verify arguments first.
|
|
11
11
|
- **Conditional confirmation** where a tool starts executing and then discovers it needs the user to confirm or supply extra data before finishing.
|
|
12
12
|
|
|
@@ -60,7 +60,7 @@ Mastra offers two distinct mechanisms for pausing tool calls: **pre-execution ap
|
|
|
60
60
|
|
|
61
61
|
Pre-execution approval pauses a tool call _before_ its `execute` function runs. The LLM still decides which tool to call and provides arguments, but `execute` doesn't run until you explicitly approve.
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
The flags control this, combined with OR logic. If _either_ is `true`, the call pauses:
|
|
64
64
|
|
|
65
65
|
| Flag | Where to set it | Scope |
|
|
66
66
|
| --------------------------- | --------------------------------- | ------------------------------------------- |
|
|
@@ -92,7 +92,7 @@ for await (const chunk of stream.fullStream) {
|
|
|
92
92
|
|
|
93
93
|
#### Conditional approval with a function
|
|
94
94
|
|
|
95
|
-
Instead of a boolean, `requireToolApproval` accepts a function that decides per tool call. It receives the `toolName`, the `args` the model passed, the `requestContext`, and the `workspace`. Return `true` to require approval for that call, or `false` to allow it. This lets you gate approval
|
|
95
|
+
Instead of a boolean, `requireToolApproval` accepts a function that decides per tool call. It receives the `toolName`, the `args` the model passed, the `requestContext`, and the `workspace`. Return `true` to require approval for that call, or `false` to allow it. This lets you gate approval at runtime, for example, only for tools whose name matches a pattern:
|
|
96
96
|
|
|
97
97
|
```typescript
|
|
98
98
|
const stream = await agent.stream('Clean up old records', {
|
|
@@ -100,7 +100,7 @@ const stream = await agent.stream('Clean up old records', {
|
|
|
100
100
|
})
|
|
101
101
|
```
|
|
102
102
|
|
|
103
|
-
A tool's own `requireApproval` setting
|
|
103
|
+
A tool's own `requireApproval` setting takes precedence over the function above. Its rule decides whether that tool needs approval. If the function throws, the call requires approval as a fail-safe.
|
|
104
104
|
|
|
105
105
|
> **Note:** Function-based `requireToolApproval` is only available on regular `stream()` / `generate()` calls. Durable agents and stored agents persist their options, and a function can't be serialized, so they accept only a boolean. If you pass a function in those contexts it falls back to requiring approval for every tool call.
|
|
106
106
|
|
|
@@ -133,7 +133,7 @@ const weatherTool = createTool({
|
|
|
133
133
|
})
|
|
134
134
|
```
|
|
135
135
|
|
|
136
|
-
> **Note:** `suspend()` doesn't throw
|
|
136
|
+
> **Note:** `suspend()` doesn't throw, return immediately after calling it (e.g. `return await suspend({ ... })`). Code after `await suspend(...)` still runs before the tool pauses.
|
|
137
137
|
|
|
138
138
|
## Tool approval with `generate()`
|
|
139
139
|
|
|
@@ -172,11 +172,11 @@ if (output.finishReason === 'suspended') {
|
|
|
172
172
|
| Decline method | `declineToolCall({ runId })` | `declineToolCallGenerate({ runId, toolCallId })` |
|
|
173
173
|
| Result | Stream to iterate | Full output object |
|
|
174
174
|
|
|
175
|
-
> **Note:** `toolCallId` is optional on all four methods. Pass it when multiple tool calls may be pending
|
|
175
|
+
> **Note:** `toolCallId` is optional on all four methods. Pass it when multiple tool calls may be pending (common in supervisor agents). When omitted, the agent resumes the most recent suspended tool call.
|
|
176
176
|
|
|
177
177
|
## Tool-level approval
|
|
178
178
|
|
|
179
|
-
Instead of pausing every tool call at the agent level, you can mark individual tools as requiring approval.
|
|
179
|
+
Instead of pausing every tool call at the agent level, you can mark individual tools as requiring approval. You get fine-grained control: only specific tools pause, while others execute immediately.
|
|
180
180
|
|
|
181
181
|
### Approval using `requireApproval`
|
|
182
182
|
|
|
@@ -303,7 +303,9 @@ const agent = new Agent({
|
|
|
303
303
|
})
|
|
304
304
|
```
|
|
305
305
|
|
|
306
|
-
When enabled, the agent detects suspended tools from message history on the next user message
|
|
306
|
+
When enabled, the agent detects suspended tools from message history on the next user message. It extracts `resumeData` based on the tool's `resumeSchema`, then automatically resumes the tool.
|
|
307
|
+
|
|
308
|
+
The following example shows a complete conversational flow:
|
|
307
309
|
|
|
308
310
|
```typescript
|
|
309
311
|
import { createTool } from '@mastra/core/tools'
|
|
@@ -386,7 +388,7 @@ Both approaches work with the same tool definitions. Automatic resumption trigge
|
|
|
386
388
|
|
|
387
389
|
## Resuming after a restart
|
|
388
390
|
|
|
389
|
-
The examples above hold on to `stream.runId` between suspension and approval. That works while the process stays alive, but in production the approval often arrives later
|
|
391
|
+
The examples above hold on to `stream.runId` between suspension and approval. That works while the process stays alive, but in production the approval often arrives later, after a page refresh, a server restart, or on a different server instance behind a load balancer.
|
|
390
392
|
|
|
391
393
|
Use [`listSuspendedRuns()`](https://mastra.ai/reference/agents/listSuspendedRuns) to rediscover the pending run for a conversation from storage:
|
|
392
394
|
|
|
@@ -414,7 +416,7 @@ if (run && toolCall) {
|
|
|
414
416
|
}
|
|
415
417
|
```
|
|
416
418
|
|
|
417
|
-
Each returned run includes the suspended tool calls (`toolCallId`, `toolName`, `args`, and `requiresApproval`). Approval suspensions (`requiresApproval: true`) are answered with `approveToolCall()` / `declineToolCall()`, while `suspend()`-based suspensions carry their `suspendPayload` and expect `resumeStream()` with resume data
|
|
419
|
+
Each returned run includes the suspended tool calls (`toolCallId`, `toolName`, `args`, and `requiresApproval`). Approval suspensions (`requiresApproval: true`) are answered with `approveToolCall()` / `declineToolCall()`, while `suspend()`-based suspensions carry their `suspendPayload` and expect `resumeStream()` with resume data, so you can rebuild the right UI for either flow without keeping any state in memory.
|
|
418
420
|
|
|
419
421
|
`sendToolApproval()` uses the same storage-backed discovery automatically: when no active run is found in memory for the thread, it looks up the suspended run in storage before failing. If several suspended runs match the thread, pass a `toolCallId` to disambiguate.
|
|
420
422
|
|
|
@@ -477,7 +479,7 @@ const supervisorAgent = new Agent({
|
|
|
477
479
|
name: 'Supervisor Agent',
|
|
478
480
|
instructions: `You coordinate data retrieval tasks.
|
|
479
481
|
Delegate to data-agent for user lookups.`,
|
|
480
|
-
model: 'openai/gpt-5.
|
|
482
|
+
model: 'openai/gpt-5.6-sol',
|
|
481
483
|
agents: { dataAgent },
|
|
482
484
|
memory: new Memory(),
|
|
483
485
|
})
|
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
> **Beta:** This feature is in beta. Breaking changes may occur without a major version bump until the API is stable.
|
|
8
8
|
|
|
9
|
-
Code mode lets an agent run multi-tool computations in an isolated sandbox and return the result as a single, more accurate response.
|
|
9
|
+
Code mode lets an agent run multi-tool computations in an isolated sandbox and return the result as a single, more accurate response.
|
|
10
|
+
|
|
11
|
+
Instead of calling tools one turn at a time, the model writes a tailored function for the user query. The function orchestrates your existing tools as `external_*` functions and reduces or aggregates their results into one structured answer.
|
|
10
12
|
|
|
11
13
|
[`createCodeMode()`](https://mastra.ai/reference/tools/create-code-mode) returns this tool with the default `id` of `execute_typescript`. The `id` is configurable, so an agent can have several code mode tools at once, each scoped to a different set of tools (see [Scoping tools across multiple code tools](#scoping-tools-across-multiple-code-tools)).
|
|
12
14
|
|
|
@@ -21,15 +23,19 @@ Use code mode when an agent touches multiple tools to answer a user query or per
|
|
|
21
23
|
|
|
22
24
|
## How it works
|
|
23
25
|
|
|
24
|
-
Without code mode, multi-tool queries can run the agentic loop several times
|
|
26
|
+
Without code mode, multi-tool queries can run the agentic loop several times. The model chooses a tool and reads the result. It repeats the process as needed.
|
|
27
|
+
|
|
28
|
+
Each turn adds the full tool response to the agent's context window which can lead to poorer reasoning and increased token usage.
|
|
25
29
|
|
|
26
30
|
With code mode, your tools keep running on the host with full validation, request context, and tracing. Only the model's orchestration code runs in the sandbox. Each `external_*` call is bridged back to the real tool on the host, and the function can reduce or aggregate results before returning one response to the agent.
|
|
27
31
|
|
|
28
32
|
The function runs in a [Workspace sandbox](https://mastra.ai/docs/workspace/overview). A sandbox is required, because code mode runs model-authored code and the execution boundary must be chosen deliberately. Pass one via `sandbox`, or run the agent in a workspace that provides one. To execute on the host machine, pass `new LocalSandbox()` explicitly. This runs the function as a host `node` process with host privileges, so only use it for trusted or local development.
|
|
29
33
|
|
|
34
|
+
Transports that bring their own execution boundary are the exception: with [`IsolatedVmCodeModeTransport`](https://mastra.ai/reference/tools/isolated-vm-transport) the program runs in an in-process V8 isolate and no sandbox is needed (see [In-process isolation](#in-process-isolation)).
|
|
35
|
+
|
|
30
36
|
## Quickstart
|
|
31
37
|
|
|
32
|
-
`createCodeMode()` returns the tool plus generated instructions. With no `id`, the tool
|
|
38
|
+
`createCodeMode()` returns the tool plus generated instructions. With no `id`, the tool uses the name `execute_typescript`. Add both to your agent:
|
|
33
39
|
|
|
34
40
|
```typescript
|
|
35
41
|
import { Agent } from '@mastra/core/agent'
|
|
@@ -64,7 +70,7 @@ const agent = new Agent({
|
|
|
64
70
|
id: 'shop-assistant',
|
|
65
71
|
name: 'shop-assistant',
|
|
66
72
|
instructions: ['You are a helpful shopping assistant.', instructions],
|
|
67
|
-
model: 'openai/gpt-5.
|
|
73
|
+
model: 'openai/gpt-5.6-sol',
|
|
68
74
|
tools: { execute_typescript: tool },
|
|
69
75
|
})
|
|
70
76
|
```
|
|
@@ -119,7 +125,7 @@ const agent = new Agent({
|
|
|
119
125
|
id: 'ops-assistant',
|
|
120
126
|
name: 'ops-assistant',
|
|
121
127
|
instructions: ['You are an ops assistant.', sales.instructions, inventory.instructions],
|
|
122
|
-
model: 'openai/gpt-5.
|
|
128
|
+
model: 'openai/gpt-5.6-sol',
|
|
123
129
|
tools: { sales_code: sales.tool, inventory_code: inventory.tool },
|
|
124
130
|
})
|
|
125
131
|
```
|
|
@@ -130,7 +136,7 @@ The generated code for `sales_code` can't call an inventory tool, and the revers
|
|
|
130
136
|
|
|
131
137
|
By default, code mode uses a transport that writes the program to the host filesystem and runs `node` against it. That works for `LocalSandbox`, which shares the host, but not for remote sandboxes that run in their own micro-VM (such as [E2B](https://mastra.ai/reference/workspace/e2b-sandbox)), where the host paths don't exist.
|
|
132
138
|
|
|
133
|
-
Remote sandboxes need a transport that writes the program into the sandbox filesystem. For E2B, pass the
|
|
139
|
+
Remote sandboxes need a transport that writes the program into the sandbox filesystem. For E2B, pass the included `E2BCodeModeTransport` as the second argument to `createCodeMode`:
|
|
134
140
|
|
|
135
141
|
```typescript
|
|
136
142
|
import { createCodeMode } from '@mastra/core/tools'
|
|
@@ -142,8 +148,25 @@ const { tool, instructions } = createCodeMode(
|
|
|
142
148
|
)
|
|
143
149
|
```
|
|
144
150
|
|
|
151
|
+
## In-process isolation
|
|
152
|
+
|
|
153
|
+
To get a secure boundary without spawning processes or running a remote sandbox, use [`IsolatedVmCodeModeTransport`](https://mastra.ai/reference/tools/isolated-vm-transport) from `@mastra/isolated-vm`. It runs the program in an in-process V8 isolate, so no sandbox is required: the isolate has no filesystem, network, or process access, and its only capabilities are the `external_*` functions bridged back to your tools on the host.
|
|
154
|
+
|
|
155
|
+
```typescript
|
|
156
|
+
import { createCodeMode } from '@mastra/core/tools'
|
|
157
|
+
import { IsolatedVmCodeModeTransport } from '@mastra/isolated-vm'
|
|
158
|
+
|
|
159
|
+
const { tool, instructions } = createCodeMode(
|
|
160
|
+
{ tools }, // no sandbox needed
|
|
161
|
+
new IsolatedVmCodeModeTransport({ memoryLimitMb: 128 }),
|
|
162
|
+
)
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
`isolated-vm` is a native addon, and on Node.js 20 and later the host process must be started with the `--no-node-snapshot` flag. See the [IsolatedVmCodeModeTransport reference](https://mastra.ai/reference/tools/isolated-vm-transport) for setup details.
|
|
166
|
+
|
|
145
167
|
## Related
|
|
146
168
|
|
|
147
169
|
- [createCodeMode() reference](https://mastra.ai/reference/tools/create-code-mode)
|
|
170
|
+
- [IsolatedVmCodeModeTransport reference](https://mastra.ai/reference/tools/isolated-vm-transport)
|
|
148
171
|
- [Tools](https://mastra.ai/docs/agents/using-tools)
|
|
149
172
|
- [Workspace overview](https://mastra.ai/docs/workspace/overview)
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Mastra provides built-in processors that add security and safety controls to your agent. These processors detect, transform, or block harmful content before it reaches the language model or the user.
|
|
6
6
|
|
|
7
|
-
For an introduction to
|
|
7
|
+
For an introduction to processor behavior and custom processors, including how to add them to an agent, see [Processors](https://mastra.ai/docs/agents/processors).
|
|
8
8
|
|
|
9
9
|
## Input processors
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@ Input processors run before user messages reach the language model. They handle
|
|
|
12
12
|
|
|
13
13
|
### Normalize user messages
|
|
14
14
|
|
|
15
|
-
The `UnicodeNormalizer()` cleans and normalizes user input by unifying Unicode characters
|
|
15
|
+
The `UnicodeNormalizer()` cleans and normalizes user input by unifying Unicode characters and standardizing whitespace. It also removes problematic symbols.
|
|
16
16
|
|
|
17
17
|
```typescript
|
|
18
18
|
import { UnicodeNormalizer } from '@mastra/core/processors'
|
|
@@ -188,7 +188,7 @@ Visit [`PIIDetector()`](https://mastra.ai/reference/processors/pii-detector) ref
|
|
|
188
188
|
|
|
189
189
|
### Enforce cost limits
|
|
190
190
|
|
|
191
|
-
The `CostGuardProcessor()` monitors cumulative estimated cost across the agentic loop, blocking or warning when a monetary limit is exceeded. It queries cost data from observability storage before each LLM call. Cost checks are approximate
|
|
191
|
+
The `CostGuardProcessor()` monitors cumulative estimated cost across the agentic loop, blocking or warning when a monetary limit is exceeded. It queries cost data from observability storage before each LLM call. Cost checks are approximate, metrics are persisted asynchronously, so fast-running agents may briefly exceed the configured limit before the guard triggers.
|
|
192
192
|
|
|
193
193
|
```typescript
|
|
194
194
|
import { CostGuardProcessor } from '@mastra/core/processors'
|
|
@@ -257,7 +257,7 @@ moderation.onViolation = ({ processorId, message, detail }) => {
|
|
|
257
257
|
}
|
|
258
258
|
```
|
|
259
259
|
|
|
260
|
-
The `onViolation` property is part of the base [`Processor` interface](https://mastra.ai/reference/processors/processor-interface), so any processor
|
|
260
|
+
The `onViolation` property is part of the base [`Processor` interface](https://mastra.ai/reference/processors/processor-interface), so any processor, including custom ones, can use it. The runner automatically invokes `onViolation` when any processor calls `abort()`. For processors using a `warn` strategy (like `CostGuardProcessor`), the callback also fires on warnings without blocking the request.
|
|
261
261
|
|
|
262
262
|
Errors thrown by the callback are silently caught to prevent interfering with the processor's main logic.
|
|
263
263
|
|
|
@@ -297,11 +297,11 @@ for await (const chunk of stream.fullStream) {
|
|
|
297
297
|
|
|
298
298
|
## Speed up guardrails
|
|
299
299
|
|
|
300
|
-
Guardrail processors that use an LLM (moderation, PII detection, prompt injection) add latency to every request.
|
|
300
|
+
Guardrail processors that use an LLM (moderation, PII detection, prompt injection) add latency to every request. These techniques reduce this overhead.
|
|
301
301
|
|
|
302
302
|
### Run guardrails in parallel
|
|
303
303
|
|
|
304
|
-
By default, processors run sequentially. Guardrails that only `block` (and never mutate messages) are independent and can run
|
|
304
|
+
By default, processors run sequentially. Guardrails that only `block` (and never mutate messages) are independent and can run using a [workflow processor](https://mastra.ai/docs/agents/processors).
|
|
305
305
|
|
|
306
306
|
You can also mix `block` and `redact` strategies in a single parallel step. Map to the `redact` branch so its transformed messages carry forward.
|
|
307
307
|
|
|
@@ -384,7 +384,7 @@ outputProcessors: [
|
|
|
384
384
|
|
|
385
385
|
## Related
|
|
386
386
|
|
|
387
|
-
- [Processors](https://mastra.ai/docs/agents/processors):
|
|
387
|
+
- [Processors](https://mastra.ai/docs/agents/processors): Processor behavior and execution order. Also covers custom processors and retry behavior
|
|
388
388
|
- [`Processor` Interface](https://mastra.ai/reference/processors/processor-interface): API reference for the `Processor` interface
|
|
389
|
-
- [Memory Processors](https://mastra.ai/docs/memory/memory-processors): Processors for message history
|
|
389
|
+
- [Memory Processors](https://mastra.ai/docs/memory/memory-processors): Processors for message history plus semantic recall and working memory
|
|
390
390
|
- 📹 [Mastra processors and guardrails workshop](https://www.youtube.com/watch?v=4Vpp7xQYvl0)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Agent networks
|
|
4
4
|
|
|
5
|
-
> **Deprecated
|
|
5
|
+
> **Deprecated:** Agent networks are deprecated and will be removed in a future major release. [Supervisor agents](https://mastra.ai/docs/agents/supervisor-agents) using `agent.stream()` or `agent.generate()` are now the recommended approach. It provides the same multi-agent coordination with better control, a simpler API, and easier debugging.
|
|
6
6
|
>
|
|
7
7
|
> See the [migration guide](https://mastra.ai/guides/migrations/network-to-supervisor) to upgrade.
|
|
8
8
|
|
|
@@ -29,7 +29,7 @@ export const routingAgent = new Agent({
|
|
|
29
29
|
name: 'Routing Agent',
|
|
30
30
|
instructions: `
|
|
31
31
|
You are a network of writers and researchers. The user will ask you to research a topic. Always respond with a complete report—no bullet points. Write in full paragraphs, like a blog post. Do not answer with incomplete or uncertain information.`,
|
|
32
|
-
model: 'openai/gpt-5.
|
|
32
|
+
model: 'openai/gpt-5.6-sol',
|
|
33
33
|
agents: {
|
|
34
34
|
researchAgent,
|
|
35
35
|
writingAgent,
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
# Agents overview
|
|
4
4
|
|
|
5
|
-
Agents use LLMs and tools to solve open-ended tasks. They reason about goals
|
|
5
|
+
Agents use LLMs and tools to solve open-ended tasks. They reason about goals and decide which tools to use. They retain conversation memory and continue iterating until the model emits a final answer or an optional stop condition is met.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Agents produce structured responses you can render in your UI or process programmatically. Use agents directly or compose them into workflows or multi-agent systems.
|
|
8
|
+
|
|
9
|
+
**For AI agents:** If you're tasked to build a Mastra project from scratch, follow the condensed instructions until the next heading. Adjust the example code for the agent & tool to your needs. Important for later: Define `model` as a string in `provider/model` format, for example `openai/gpt-5.6-sol`. For OpenAI, use `openai/<model>`, not `openai:<model>`, and don't import or pass a provider object.
|
|
8
10
|
|
|
9
11
|
Create a `package.json` file with `{ "type": "module" }`. Install the required dependencies: `npm install @mastra/core@latest zod@latest typescript@latest @types/node@latest mastra@latest`
|
|
10
12
|
|
|
@@ -60,11 +62,11 @@ export const weatherTool = createTool({
|
|
|
60
62
|
|
|
61
63
|
If you need to create an agent, create a new file and use `import { Agent } from "@mastra/core/agent"`. The constructor takes `{ id, name, instructions, model }`. The `model` property is a string in Mastra's model router format. No provider import is needed for this format. Don't install any AI SDK package unless Mastra's documentation says otherwise.
|
|
62
64
|
|
|
63
|
-
By defining the model using `provider/model` format Mastra automatically looks for environment variables for the
|
|
65
|
+
By defining the model using `provider/model` format Mastra automatically looks for environment variables for the provider. The defined model requires an environment variable to be set for the provider. OpenAI: `OPENAI_API_KEY`. Anthropic: `ANTHROPIC_API_KEY`. Google: `GOOGLE_API_KEY`. Example: Any `openai/<model>` requires the `OPENAI_API_KEY` environment variable. Go to <https://mastra.ai/models/environment-variables> for a full list of supported providers and their environment variable names.
|
|
64
66
|
|
|
65
67
|
Short list of known model IDs are:
|
|
66
68
|
|
|
67
|
-
- `openai/gpt-5.
|
|
69
|
+
- `openai/gpt-5.6-sol`, `openai/gpt-5-mini`
|
|
68
70
|
- `anthropic/claude-sonnet-4-6`, `anthropic/claude-opus-4-7`, `anthropic/claude-haiku-4-5`
|
|
69
71
|
- `google/gemini-2.5-flash`
|
|
70
72
|
|
|
@@ -92,7 +94,7 @@ export const weatherAgent = new Agent({
|
|
|
92
94
|
Use the weatherTool to fetch current weather data.
|
|
93
95
|
`,
|
|
94
96
|
// Use a string in provider/model format, not provider:model or a provider object.
|
|
95
|
-
model: 'openai/gpt-5.
|
|
97
|
+
model: 'openai/gpt-5.6-sol',
|
|
96
98
|
tools: { weatherTool },
|
|
97
99
|
})
|
|
98
100
|
```
|
|
@@ -136,7 +138,7 @@ export const testAgent = new Agent({
|
|
|
136
138
|
id: 'test-agent',
|
|
137
139
|
name: 'Test Agent',
|
|
138
140
|
instructions: 'You are a helpful assistant.',
|
|
139
|
-
model: 'openai/gpt-5.
|
|
141
|
+
model: 'openai/gpt-5.6-sol',
|
|
140
142
|
})
|
|
141
143
|
```
|
|
142
144
|
|
|
@@ -157,7 +159,7 @@ Once registered, it can be called from workflows, tools, or other agents, and ha
|
|
|
157
159
|
|
|
158
160
|
Visit the [agent reference](https://mastra.ai/reference/agents/agent) for more information on available properties and configurations.
|
|
159
161
|
|
|
160
|
-
> **Tip:** Use [Studio](https://mastra.ai/docs/studio/overview) to test your agent with different messages
|
|
162
|
+
> **Tip:** Use [Studio](https://mastra.ai/docs/studio/overview) to test your agent with different messages and inspect tool calls and responses, plus debug agent behavior.
|
|
161
163
|
|
|
162
164
|
## Use your agent
|
|
163
165
|
|
|
@@ -84,7 +84,7 @@ Memory loads message history first, then your processors run.
|
|
|
84
84
|
|
|
85
85
|
Your processors run first, then memory persists messages.
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
With this ordering, an output guardrail that calls `abort()` skips memory processors and prevents messages from being saved. See [Memory Processors](https://mastra.ai/docs/memory/memory-processors) for details.
|
|
88
88
|
|
|
89
89
|
## Attach processors to an agent
|
|
90
90
|
|
|
@@ -177,7 +177,7 @@ See the [`Processor` reference](https://mastra.ai/reference/processors/processor
|
|
|
177
177
|
|
|
178
178
|
### Control each step
|
|
179
179
|
|
|
180
|
-
While `processInput()` runs once at the start of agent execution, `processInputStep()` runs at **each step** of the agentic loop (including tool call continuations).
|
|
180
|
+
While `processInput()` runs once at the start of agent execution, `processInputStep()` runs at **each step** of the agentic loop (including tool call continuations). It enables per-step configuration changes like runtime model switching or tool choice modifications.
|
|
181
181
|
|
|
182
182
|
```typescript
|
|
183
183
|
import type {
|
|
@@ -235,7 +235,7 @@ See the [`Processor` reference](https://mastra.ai/reference/processors/processor
|
|
|
235
235
|
|
|
236
236
|
Use `processLLMResponse()` to act on the completed LLM response after the step finishes and stream chunks have been collected. This hook pairs with `processLLMRequest()`: stash state (such as a cache key) in the request hook, then read it back in the response hook to perform side effects like writing to a cache.
|
|
237
237
|
|
|
238
|
-
The `state` object is the same instance passed to `processLLMRequest()` for the same step. When `fromCache` is `true`, the response was replayed from a cache rather than produced by a live model call
|
|
238
|
+
The `state` object is the same instance passed to `processLLMRequest()` for the same step. When `fromCache` is `true`, the response was replayed from a cache rather than produced by a live model call, processors that write to a cache should skip writes in this case.
|
|
239
239
|
|
|
240
240
|
The method receives `chunks`, `model`, `stepNumber`, `steps`, `state`, `fromCache`, and the shared processor context.
|
|
241
241
|
|
|
@@ -274,7 +274,7 @@ export class CustomOutputProcessor implements Processor {
|
|
|
274
274
|
}
|
|
275
275
|
```
|
|
276
276
|
|
|
277
|
-
The method also receives a `result` object with the full generation data
|
|
277
|
+
The method also receives a `result` object with the full generation data, `text`, `usage` (token counts), `finishReason`, and `steps` (each containing `toolCalls`, `toolResults`, etc.). Use it to track usage or inspect tool calls:
|
|
278
278
|
|
|
279
279
|
```typescript
|
|
280
280
|
import type { Processor } from '@mastra/core/processors'
|
|
@@ -316,7 +316,7 @@ export class StreamFilter implements Processor {
|
|
|
316
316
|
Return values:
|
|
317
317
|
|
|
318
318
|
- A `ChunkType` emits that chunk. Return the original `part` to pass it through unchanged.
|
|
319
|
-
- `null` or `undefined` drops the chunk. Both behave the same way, so a method that
|
|
319
|
+
- `null` or `undefined` drops the chunk. Both behave the same way, so a method that returns nothing also drops the chunk.
|
|
320
320
|
- Dropping only affects one chunk. To stop the stream entirely, call `abort()`.
|
|
321
321
|
|
|
322
322
|
To also receive custom `data-*` chunks emitted by tools via `writer.custom()`, set `processDataParts = true` on your processor. This lets you inspect, modify, or block tool-emitted data chunks before they reach the client.
|
|
@@ -387,7 +387,7 @@ import { TokenLimiter } from '@mastra/core/processors'
|
|
|
387
387
|
const agent = new Agent({
|
|
388
388
|
id: 'my-agent',
|
|
389
389
|
name: 'my-agent',
|
|
390
|
-
model: 'openai/gpt-5.
|
|
390
|
+
model: 'openai/gpt-5.6-sol',
|
|
391
391
|
inputProcessors: [new TokenLimiter(127000)],
|
|
392
392
|
})
|
|
393
393
|
```
|
|
@@ -418,7 +418,7 @@ See the [`ToolCallFilter` reference](https://mastra.ai/reference/processors/tool
|
|
|
418
418
|
|
|
419
419
|
### `ToolSearchProcessor`
|
|
420
420
|
|
|
421
|
-
Enables
|
|
421
|
+
Enables runtime tool discovery for agents with large tool libraries. Instead of providing all tools upfront, the processor gives the agent `search_tools` and `load_tool` meta-tools to find and load tools by keyword on demand, reducing context token usage.
|
|
422
422
|
|
|
423
423
|
See the [`ToolSearchProcessor` reference](https://mastra.ai/reference/processors/tool-search-processor) for configuration options and usage examples.
|
|
424
424
|
|
|
@@ -436,7 +436,7 @@ See the [`ProviderHistoryCompat` reference](https://mastra.ai/reference/processo
|
|
|
436
436
|
|
|
437
437
|
Response caching skips the LLM call and replays a previously cached response when an agent receives an identical request. Use it to reduce latency and avoid paying for repeated calls.
|
|
438
438
|
|
|
439
|
-
Caching is implemented as the [`ResponseCache`](https://mastra.ai/reference/processors/response-cache) input processor. Mastra doesn't provide an agent-level option. To enable caching, register the processor explicitly. This keeps the API surface small while Mastra collects feedback
|
|
439
|
+
Caching is implemented as the [`ResponseCache`](https://mastra.ai/reference/processors/response-cache) input processor. Mastra doesn't provide an agent-level option. To enable caching, register the processor explicitly. This keeps the API surface small while Mastra collects feedback. Per-call overrides flow through `RequestContext`.
|
|
440
440
|
|
|
441
441
|
### When to use response caching
|
|
442
442
|
|
|
@@ -484,7 +484,7 @@ ResponseCache.applyContext(ctx, { bust: true })
|
|
|
484
484
|
await agent.stream('hello', { requestContext: ctx })
|
|
485
485
|
```
|
|
486
486
|
|
|
487
|
-
|
|
487
|
+
These fields are overridable per call:
|
|
488
488
|
|
|
489
489
|
- `key`: String or function. Overrides the auto-derived cache key for this request only.
|
|
490
490
|
- `scope`: String or `null`. Overrides the tenant/user scope for this request only. `null` opts out of scoping.
|
|
@@ -494,7 +494,7 @@ Three fields are overridable per call:
|
|
|
494
494
|
|
|
495
495
|
### Tenant scoping
|
|
496
496
|
|
|
497
|
-
By default, `ResponseCache` looks up `MASTRA_RESOURCE_ID_KEY` on the request context and uses it as the cache scope. This means an agent that already populates the resource id (e.g. via memory) gets per-user isolation automatically.
|
|
497
|
+
By default, `ResponseCache` looks up `MASTRA_RESOURCE_ID_KEY` on the request context and uses it as the cache scope. This means an agent that already populates the resource id (e.g. via memory) gets per-user isolation automatically. Users never see each other's cached responses.
|
|
498
498
|
|
|
499
499
|
Override explicitly when you need a different scope:
|
|
500
500
|
|
|
@@ -803,7 +803,7 @@ const moderationWorkflow = createWorkflow({
|
|
|
803
803
|
const agent = new Agent({
|
|
804
804
|
id: 'moderated-agent',
|
|
805
805
|
name: 'Moderated Agent',
|
|
806
|
-
model: 'openai/gpt-5.
|
|
806
|
+
model: 'openai/gpt-5.6-sol',
|
|
807
807
|
inputProcessors: [moderationWorkflow],
|
|
808
808
|
})
|
|
809
809
|
```
|
|
@@ -842,7 +842,7 @@ export class QualityChecker implements Processor {
|
|
|
842
842
|
const agent = new Agent({
|
|
843
843
|
id: 'quality-agent',
|
|
844
844
|
name: 'Quality Agent',
|
|
845
|
-
model: 'openai/gpt-5.
|
|
845
|
+
model: 'openai/gpt-5.6-sol',
|
|
846
846
|
outputProcessors: [new QualityChecker()],
|
|
847
847
|
maxProcessorRetries: 3, // Maximum retry attempts. If unset, retries are disabled (unless errorProcessors are configured, in which case it defaults to 10).
|
|
848
848
|
})
|
|
@@ -863,7 +863,7 @@ For `StreamErrorRetryProcessor`, also set its `maxRetries` to the same value. It
|
|
|
863
863
|
|
|
864
864
|
### Violation callbacks
|
|
865
865
|
|
|
866
|
-
All processors expose an `onViolation` property that fires whenever a policy violation is detected
|
|
866
|
+
All processors expose an `onViolation` property that fires whenever a policy violation is detected, both when `abort()` is called (block strategy) and when a processor issues a warning (warn strategy). Use it for alerting, logging, or side effects without affecting the processor's main logic:
|
|
867
867
|
|
|
868
868
|
```typescript
|
|
869
869
|
import { ModerationProcessor, CostGuardProcessor } from '@mastra/core/processors'
|
|
@@ -919,7 +919,7 @@ For `agent.generate()`, the result exposes the same information as `result.tripw
|
|
|
919
919
|
|
|
920
920
|
## API error handling
|
|
921
921
|
|
|
922
|
-
The `processAPIError` method handles LLM API rejections
|
|
922
|
+
The `processAPIError` method handles LLM API rejections, errors where the API rejects the request (such as 400 or 422 status codes) rather than network or server failures. This lets you modify the request and retry when the API rejects the message format.
|
|
923
923
|
|
|
924
924
|
```typescript
|
|
925
925
|
import { APICallError } from '@ai-sdk/provider'
|
|
@@ -953,4 +953,4 @@ Mastra includes a built-in [`PrefillErrorHandler`](https://mastra.ai/reference/p
|
|
|
953
953
|
- [Guardrails](https://mastra.ai/docs/agents/guardrails): Security and validation processors
|
|
954
954
|
- [Memory Processors](https://mastra.ai/docs/memory/memory-processors): Memory-specific processors and automatic integration
|
|
955
955
|
- [Processor Interface](https://mastra.ai/reference/processors/processor-interface): Full API reference for processors
|
|
956
|
-
- [ToolSearchProcessor Reference](https://mastra.ai/reference/processors/tool-search-processor): API reference for
|
|
956
|
+
- [ToolSearchProcessor Reference](https://mastra.ai/reference/processors/tool-search-processor): API reference for runtime tool search
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Skills are reusable instructions that teach agents how to perform specific tasks. They follow the [Agent Skills specification](https://agentskills.io).
|
|
6
6
|
|
|
7
|
-
You can attach skills directly to an agent through its `skills` config, or configure them on a [workspace](https://mastra.ai/docs/workspace/overview). Attach them to the agent when the skills belong to that specific agent and you want to define them in code with no workspace required
|
|
7
|
+
You can attach skills directly to an agent through its `skills` config, or configure them on a [workspace](https://mastra.ai/docs/workspace/overview). Attach them to the agent when the skills belong to that specific agent and you want to define them in code with no workspace required. Use a workspace when you want skills discovered from the filesystem and shared across every agent that uses it. This page covers the agent-level approach, defining skills in code and loading them from files, plus resolving them per request.
|
|
8
8
|
|
|
9
9
|
## When to use agent-level skills
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@ Use agent-level skills when:
|
|
|
12
12
|
|
|
13
13
|
- You want self-contained agents that don't depend on a workspace
|
|
14
14
|
- Skills are defined in code and don't need filesystem discovery
|
|
15
|
-
- You're building packages or libraries that
|
|
15
|
+
- You're building packages or libraries that contain agent capabilities
|
|
16
16
|
- You need per-request skill resolution based on context
|
|
17
17
|
|
|
18
18
|
For filesystem-based skill discovery across a project, use [workspace skills](https://mastra.ai/docs/workspace/skills) instead.
|
|
@@ -38,7 +38,7 @@ const codeReview = createSkill({
|
|
|
38
38
|
|
|
39
39
|
export const reviewer = new Agent({
|
|
40
40
|
id: 'reviewer',
|
|
41
|
-
model: 'openai/gpt-5.
|
|
41
|
+
model: 'openai/gpt-5.6-sol',
|
|
42
42
|
instructions: 'You are a code review assistant.',
|
|
43
43
|
skills: [codeReview],
|
|
44
44
|
})
|
|
@@ -81,7 +81,7 @@ import { createSkill } from '@mastra/core/skills'
|
|
|
81
81
|
|
|
82
82
|
export const agent = new Agent({
|
|
83
83
|
id: 'my-agent',
|
|
84
|
-
model: 'openai/gpt-5.
|
|
84
|
+
model: 'openai/gpt-5.6-sol',
|
|
85
85
|
skills: [
|
|
86
86
|
'./skills/code-review', // path to a SKILL.md directory
|
|
87
87
|
'./skills/testing', // another filesystem skill
|
|
@@ -114,7 +114,7 @@ const supportSkill = createSkill({
|
|
|
114
114
|
|
|
115
115
|
export const agent = new Agent({
|
|
116
116
|
id: 'dynamic-agent',
|
|
117
|
-
model: 'openai/gpt-5.
|
|
117
|
+
model: 'openai/gpt-5.6-sol',
|
|
118
118
|
skills: ({ requestContext }) => {
|
|
119
119
|
const role = requestContext.get('userRole')
|
|
120
120
|
if (role === 'developer') return [devSkill]
|
|
@@ -149,7 +149,7 @@ const customReview = createSkill({
|
|
|
149
149
|
|
|
150
150
|
export const reviewer = new Agent({
|
|
151
151
|
id: 'reviewer',
|
|
152
|
-
model: 'openai/gpt-5.
|
|
152
|
+
model: 'openai/gpt-5.6-sol',
|
|
153
153
|
workspace,
|
|
154
154
|
skills: [customReview], // agent-level "code-review" wins
|
|
155
155
|
})
|
|
@@ -180,7 +180,7 @@ const response = await testAgent.generate('Analyze the TypeScript programming la
|
|
|
180
180
|
differentiators: z.array(z.string()),
|
|
181
181
|
}),
|
|
182
182
|
}),
|
|
183
|
-
model: 'openai/gpt-5.
|
|
183
|
+
model: 'openai/gpt-5.6-sol',
|
|
184
184
|
},
|
|
185
185
|
})
|
|
186
186
|
|
|
@@ -251,13 +251,13 @@ Use an explicit mode when you need to override the capability-based choice:
|
|
|
251
251
|
|
|
252
252
|
When `model` is provided to the `structuredOutput` property, Mastra uses a separate internal agent to handle the structured output. The main agent will handle all of the steps (including tool calling) and the structured output model will handle only the generation of structured output.
|
|
253
253
|
|
|
254
|
-
**For AI agents:** The `model` property is a string in Mastra's model router format: `provider/model`, for example `openai/gpt-5.
|
|
254
|
+
**For AI agents:** The `model` property is a string in Mastra's model router format: `provider/model`, for example `openai/gpt-5.6-sol`, `openai/gpt-5-mini`, `anthropic/claude-sonnet-4-6` or `google/gemini-2.5-pro`. Use `/` and not `:` as a separator. Example: `openai/<model>`, not `openai:<model>`, and don't pass a provider object. No provider import is needed for this format. Don't install any AI SDK package unless Mastra's documentation says otherwise. By defining the model using `provider/model` format Mastra automatically looks for environment variables for the given provider. The defined model requires an environment variable to be set for the provider. OpenAI: `OPENAI_API_KEY`. Anthropic: `ANTHROPIC_API_KEY`. Google: `GOOGLE_API_KEY`.
|
|
255
255
|
|
|
256
256
|
```typescript
|
|
257
257
|
const response = await testAgent.generate('Tell me about TypeScript.', {
|
|
258
258
|
structuredOutput: {
|
|
259
259
|
schema: yourSchema,
|
|
260
|
-
model: 'openai/gpt-5.
|
|
260
|
+
model: 'openai/gpt-5.6-sol',
|
|
261
261
|
},
|
|
262
262
|
})
|
|
263
263
|
```
|
|
@@ -276,7 +276,7 @@ const response = await testAgent.generate('Return my profile as structured data.
|
|
|
276
276
|
hometown: z.string(),
|
|
277
277
|
petName: z.string(),
|
|
278
278
|
}),
|
|
279
|
-
model: 'openai/gpt-5.
|
|
279
|
+
model: 'openai/gpt-5.6-sol',
|
|
280
280
|
useAgent: true,
|
|
281
281
|
},
|
|
282
282
|
})
|
|
@@ -293,7 +293,7 @@ const result = await agent.stream('weather in vancouver?', {
|
|
|
293
293
|
prepareStep: async ({ stepNumber }) => {
|
|
294
294
|
if (stepNumber === 0) {
|
|
295
295
|
return {
|
|
296
|
-
model: 'openai/gpt-5.
|
|
296
|
+
model: 'openai/gpt-5.6-sol',
|
|
297
297
|
tools: {
|
|
298
298
|
weatherTool,
|
|
299
299
|
},
|
|
@@ -301,7 +301,7 @@ const result = await agent.stream('weather in vancouver?', {
|
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
303
|
return {
|
|
304
|
-
model: 'openai/gpt-5.
|
|
304
|
+
model: 'openai/gpt-5.6-sol',
|
|
305
305
|
tools: undefined,
|
|
306
306
|
structuredOutput: {
|
|
307
307
|
schema: z.object({
|