@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
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
3
|
+
# Workers
|
|
4
|
+
|
|
5
|
+
> **Beta:** This feature is in beta. The API is stable enough for production use, but some details may change. See [known limitations](#known-limitations) for current gaps.
|
|
6
|
+
|
|
7
|
+
Workers handle background processing outside the request-response cycle. Workflow step execution, cron-based scheduling, and long-running tool calls all run in workers, keeping the API responsive.
|
|
8
|
+
|
|
9
|
+
By default, workers run in the same process as the API. For production workloads, you can split them into separate processes or containers and scale each one independently.
|
|
10
|
+
|
|
11
|
+
## When to use workers
|
|
12
|
+
|
|
13
|
+
Workers matter when any of these apply:
|
|
14
|
+
|
|
15
|
+
- Workflow steps take more than a few seconds and shouldn't block API responses
|
|
16
|
+
- You need event durability so in-flight work survives process restarts
|
|
17
|
+
- Different parts of the system need to scale independently (e.g., more orchestration capacity without more API instances)
|
|
18
|
+
- Background tool calls should run on dedicated compute
|
|
19
|
+
|
|
20
|
+
If your application handles light traffic and workflows complete quickly, the default in-process setup works fine. Skip the worker infrastructure until you need it.
|
|
21
|
+
|
|
22
|
+
## Worker types
|
|
23
|
+
|
|
24
|
+
Mastra has three built-in worker types. Each handles a specific kind of background processing.
|
|
25
|
+
|
|
26
|
+
### Orchestration worker
|
|
27
|
+
|
|
28
|
+
Subscribes to workflow events on the [PubSub](https://mastra.ai/docs/server/pubsub) bus and executes workflow steps. Every `workflow.start`, step transition, and lifecycle event flows through this worker.
|
|
29
|
+
|
|
30
|
+
In a split deployment, the orchestration worker pulls events from a distributed PubSub backend and delegates step execution back to the API over HTTP. In-process, it runs steps directly.
|
|
31
|
+
|
|
32
|
+
The orchestration worker requires a PubSub backend that supports pull mode (e.g., [`RedisStreamsPubSub`](https://mastra.ai/reference/pubsub/redis-streams) or [`GoogleCloudPubSub`](https://mastra.ai/reference/pubsub/google-cloud-pubsub)).
|
|
33
|
+
|
|
34
|
+
### Scheduler worker
|
|
35
|
+
|
|
36
|
+
Polls storage for due cron schedules and publishes `workflow.start` events. It is a producer only, meaning it creates work for the orchestration worker to pick up.
|
|
37
|
+
|
|
38
|
+
The scheduler reads declarative `schedule` fields from your workflow definitions automatically. See [Scheduled workflows](https://mastra.ai/docs/workflows/scheduled-workflows) for how to declare schedules.
|
|
39
|
+
|
|
40
|
+
**Do not run more than one scheduler instance.** Multiple schedulers polling the same storage would fire duplicate events for the same schedule.
|
|
41
|
+
|
|
42
|
+
### Background task worker
|
|
43
|
+
|
|
44
|
+
Executes agent tool calls marked with `background: { enabled: true }`. When an agent invokes a background tool, the API dispatches the task to this worker instead of blocking the response stream.
|
|
45
|
+
|
|
46
|
+
The background task worker manages concurrency limits, task lifecycle, and result delivery through the PubSub bus.
|
|
47
|
+
|
|
48
|
+
## How workers run
|
|
49
|
+
|
|
50
|
+
### In-process (default)
|
|
51
|
+
|
|
52
|
+
With no configuration, Mastra creates and starts workers inside the API process. Events flow through an in-memory PubSub, and everything shares a single Node.js runtime.
|
|
53
|
+
|
|
54
|
+
```typescript
|
|
55
|
+
import { Mastra } from '@mastra/core/mastra'
|
|
56
|
+
|
|
57
|
+
export const mastra = new Mastra({
|
|
58
|
+
// Workers run in-process by default.
|
|
59
|
+
// No pubsub or worker config needed.
|
|
60
|
+
})
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
This setup needs no external infrastructure beyond your storage adapter. It doesn't survive process crashes, and you can't scale individual components.
|
|
64
|
+
|
|
65
|
+
### Split processes
|
|
66
|
+
|
|
67
|
+
To run workers separately, configure a distributed [PubSub](https://mastra.ai/docs/server/pubsub) backend and use the `MASTRA_WORKERS` environment variable to control which workers start in each process.
|
|
68
|
+
|
|
69
|
+
**Redis Streams + PostgreSQL**:
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
import { Mastra } from '@mastra/core/mastra'
|
|
73
|
+
import { RedisStreamsPubSub } from '@mastra/redis-streams'
|
|
74
|
+
import { PostgresStore } from '@mastra/pg'
|
|
75
|
+
|
|
76
|
+
export const mastra = new Mastra({
|
|
77
|
+
storage: new PostgresStore({
|
|
78
|
+
connectionString: process.env.DATABASE_URL!,
|
|
79
|
+
}),
|
|
80
|
+
pubsub: new RedisStreamsPubSub({
|
|
81
|
+
url: process.env.REDIS_URL!,
|
|
82
|
+
}),
|
|
83
|
+
})
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**Google Cloud Pub/Sub + LibSQL**:
|
|
87
|
+
|
|
88
|
+
```typescript
|
|
89
|
+
import { Mastra } from '@mastra/core/mastra'
|
|
90
|
+
import { GoogleCloudPubSub } from '@mastra/google-cloud-pubsub'
|
|
91
|
+
import { LibSQLStore } from '@mastra/libsql'
|
|
92
|
+
|
|
93
|
+
export const mastra = new Mastra({
|
|
94
|
+
storage: new LibSQLStore({
|
|
95
|
+
url: process.env.DATABASE_URL!,
|
|
96
|
+
}),
|
|
97
|
+
pubsub: new GoogleCloudPubSub({
|
|
98
|
+
projectId: process.env.GCP_PROJECT_ID!,
|
|
99
|
+
}),
|
|
100
|
+
})
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Any [supported storage backend](https://mastra.ai/reference/workers/overview) works — swap the storage adapter for your preferred database.
|
|
104
|
+
|
|
105
|
+
Run the same build artifact in multiple containers, each with a different [`MASTRA_WORKERS`](https://mastra.ai/reference/workers/overview) value to control which worker starts in each process.
|
|
106
|
+
|
|
107
|
+
Split deployments require a distributed PubSub backend ([`RedisStreamsPubSub`](https://mastra.ai/reference/pubsub/redis-streams) or [`GoogleCloudPubSub`](https://mastra.ai/reference/pubsub/google-cloud-pubsub)), a shared [storage backend](https://mastra.ai/reference/workers/overview), and network connectivity between the orchestration worker and the API.
|
|
108
|
+
|
|
109
|
+
The [worker deployment guide](https://mastra.ai/guides/deployment/mastra-workers) walks through this setup with a Docker Compose example.
|
|
110
|
+
|
|
111
|
+
## Network architecture
|
|
112
|
+
|
|
113
|
+
Workers are internal infrastructure. They are not exposed to end users and do not need their own subdomain, public URL, or inbound HTTP route.
|
|
114
|
+
|
|
115
|
+
In a split deployment:
|
|
116
|
+
|
|
117
|
+
- **The API server is the only public-facing process.** It serves all client HTTP requests — REST endpoints, agent interactions, workflow triggers, and any custom routes.
|
|
118
|
+
- **Workers connect outbound only.** They pull events from the distributed PubSub backend and read/write to the shared storage database. They do not accept inbound traffic from clients.
|
|
119
|
+
- **The orchestration worker calls the API internally.** It sends step execution requests to the API over the container network using `MASTRA_STEP_EXECUTION_URL`. This is internal service-to-service communication, not a public endpoint.
|
|
120
|
+
|
|
121
|
+
All three worker types (orchestration, scheduler, background task) sit behind the API on a private network. They share access to the PubSub backend and storage database but never receive traffic directly from clients. If a worker-related feature needs an HTTP route (for example, token minting for a voice integration), that route runs on the API server, not on the worker process.
|
|
122
|
+
|
|
123
|
+
## Known limitations
|
|
124
|
+
|
|
125
|
+
- **No dead-letter queue**: Failed events are nacked and retried, but there is no DLQ for events that repeatedly fail.
|
|
126
|
+
- **No built-in health endpoint**: Workers don't expose an HTTP health check. Use container-level liveness probes or process monitoring.
|
|
127
|
+
- **Scheduler is single-instance**: Running multiple scheduler processes causes duplicate schedule fires.
|
|
128
|
+
- **Runs stuck in "running" after API crash**: If the API process crashes while executing a workflow step, the run remains in `running` status with no automatic retry. For [durable agents](https://mastra.ai/docs/long-running-agents/durable-agents), set `recovery.durableAgents` to `'auto'` in the Mastra config to automatically re-drive orphaned runs on server restart. See [Crash recovery](https://mastra.ai/docs/long-running-agents/durable-agents) for details.
|
|
129
|
+
|
|
130
|
+
## Related
|
|
131
|
+
|
|
132
|
+
- [Worker deployment guide](https://mastra.ai/guides/deployment/mastra-workers): Docker Compose example and topology options
|
|
133
|
+
- [Worker authentication](https://mastra.ai/docs/server/auth/workers): Secure worker-to-API communication
|
|
134
|
+
- [Workers reference](https://mastra.ai/reference/workers/overview): Environment variables, worker types, and storage backends
|
|
135
|
+
- [CLI reference](https://mastra.ai/reference/cli/mastra): `mastra worker build` and `mastra worker start`
|
|
136
|
+
- [PubSub](https://mastra.ai/docs/server/pubsub): Event delivery backends
|
|
137
|
+
- [Scheduled workflows](https://mastra.ai/docs/workflows/scheduled-workflows): Declare cron schedules on workflows
|
|
@@ -14,9 +14,9 @@ The editor manages two types of resources alongside agents:
|
|
|
14
14
|
Use the editor when you want to:
|
|
15
15
|
|
|
16
16
|
- **Let non-developers iterate**: Give subject-matter experts and prompt engineers a way to tune agent behavior without touching code or waiting for deploys.
|
|
17
|
-
- **Version everything**: Every save creates a snapshot so you can compare changes
|
|
18
|
-
- **Run experiments**: Route different users or requests to different agent versions for A/B testing
|
|
19
|
-
- **Target specific versions**: Pin a version per request
|
|
17
|
+
- **Version everything**: Every save creates a snapshot so you can compare changes and roll back instantly, plus audit what changed and when.
|
|
18
|
+
- **Run experiments**: Route different users or requests to different agent versions for A/B testing or canary rollouts, or alternatively prompt experimentation.
|
|
19
|
+
- **Target specific versions**: Pin a version per request or per user, or alternatively per environment so production stays stable while new versions are tested.
|
|
20
20
|
- **Manage tools at runtime**: Add integration tools from Composio or Arcade, or connect MCP servers, without updating code.
|
|
21
21
|
- **Override code agents**: Change the instructions, tools, or variables of a code-defined agent while keeping the original code as the baseline.
|
|
22
22
|
|
|
@@ -95,7 +95,7 @@ When `source` is `'code'`, the editor writes each override to a deterministic JS
|
|
|
95
95
|
|
|
96
96
|
The code source uses the Git history of each per-agent JSON file as its version history. Each commit that changes a file is shown as a read-only version in Studio, labeled with the commit message. Saving in Studio updates the working file in place rather than creating a database draft, so the version dropdown reflects your actual commit history.
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
As a result, versions and rollbacks are managed through Git rather than through draft and publish actions.
|
|
99
99
|
|
|
100
100
|
## Studio
|
|
101
101
|
|
|
@@ -105,7 +105,7 @@ Modify the system prompt and save a new draft version. Afterwards, publish the d
|
|
|
105
105
|
|
|
106
106
|
## Programmatic control
|
|
107
107
|
|
|
108
|
-
Everything you can do in Studio is also available programmatically through [`mastra.getEditor()`](https://mastra.ai/reference/core/getEditor). This is useful for scripting bulk updates
|
|
108
|
+
Everything you can do in Studio is also available programmatically through [`mastra.getEditor()`](https://mastra.ai/reference/core/getEditor). This is useful for scripting bulk updates or seeding stored configurations from code, or alternatively building automation that tunes agents based on evaluation results.
|
|
109
109
|
|
|
110
110
|
Call `mastra.getEditor()` from anywhere you have access to the `Mastra` instance. It returns the `MastraEditor` instance you registered, with namespaces for each resource type:
|
|
111
111
|
|
|
@@ -167,7 +167,7 @@ Because stored agents are data, you can build automation loops that tune agents
|
|
|
167
167
|
- Re-run the experiment against the draft and compare scores to the baseline.
|
|
168
168
|
- Promote the draft to the published version when the scores improve.
|
|
169
169
|
|
|
170
|
-
This turns agent tuning into a closed feedback loop. One agent owns the production configuration
|
|
170
|
+
This turns agent tuning into a closed feedback loop. One agent owns the production configuration and another agent iterates on it, plus every change is versioned so you can roll back if a round of automated edits makes things worse. Combine this with [version targeting](#version-targeting-and-experimentation) to keep production traffic on the published version while the draft is being tested. See the [MastraEditor reference](https://mastra.ai/reference/editor/mastra-editor) for the full namespace API.
|
|
171
171
|
|
|
172
172
|
## What can be overridden
|
|
173
173
|
|
|
@@ -190,7 +190,7 @@ import { Agent } from '@mastra/core/agent'
|
|
|
190
190
|
export const supportAgent = new Agent({
|
|
191
191
|
id: 'support-agent',
|
|
192
192
|
name: 'support-agent',
|
|
193
|
-
model: 'openai/gpt-5.
|
|
193
|
+
model: 'openai/gpt-5.6-sol',
|
|
194
194
|
editor: { instructions: true, tools: { description: true } },
|
|
195
195
|
})
|
|
196
196
|
```
|
|
@@ -209,50 +209,56 @@ When a field is owned by code, Studio shows it as read-only and the server strip
|
|
|
209
209
|
|
|
210
210
|
## Versioning
|
|
211
211
|
|
|
212
|
-
Every time you save changes to an agent or prompt block, a new version snapshot is created. Versions give you a full history of your agent's configuration. You can roll back to any previous state
|
|
212
|
+
Every time you save changes to an agent or prompt block, a new version snapshot is created. Versions give you a full history of your agent's configuration. You can roll back to any previous state and compare what changed between two snapshots, plus target specific versions per request for A/B testing or gradual rollouts.
|
|
213
213
|
|
|
214
214
|
Version management is available through the server Studio, REST API, the Client SDK, and the React SDK. See the [Client SDK agents reference](https://mastra.ai/reference/client-js/agents) for endpoints, SDK methods, and code examples.
|
|
215
215
|
|
|
216
216
|
### Version lifecycle
|
|
217
217
|
|
|
218
|
-
|
|
218
|
+
Version snapshots don't store a lifecycle status. Instead, the agent or prompt block stores an `activeVersionId` that identifies its published version.
|
|
219
219
|
|
|
220
|
-
|
|
|
221
|
-
|
|
|
222
|
-
|
|
|
223
|
-
| Published
|
|
224
|
-
|
|
|
220
|
+
| Term | Description |
|
|
221
|
+
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------- |
|
|
222
|
+
| Latest | The most recently saved version snapshot. |
|
|
223
|
+
| Published | The version whose ID matches `activeVersionId`. Only one version can be active at a time. |
|
|
224
|
+
| Draft | The latest version when it differs from the active version. If `activeVersionId` isn't set, the latest version remains unpublished. |
|
|
225
|
+
| Historical | Any other saved version. Historical versions remain available for comparison, direct selection, and restoration. |
|
|
225
226
|
|
|
226
|
-
|
|
227
|
+
Saving a database-backed resource creates a new latest version. If an active version already exists, it continues to handle requests until you publish the new version. Publishing sets `activeVersionId` to the selected version without deleting or changing the previous active version.
|
|
227
228
|
|
|
228
|
-
|
|
229
|
+
Restoring a historical version copies its configuration into a new draft that remains inactive until you publish it.
|
|
229
230
|
|
|
230
231
|
### Version targeting and experimentation
|
|
231
232
|
|
|
232
|
-
Because every version has a unique ID, you can route different requests to different agent configurations. This
|
|
233
|
+
Because every version has a unique ID, you can route different requests to different agent configurations. This supports several patterns:
|
|
233
234
|
|
|
234
|
-
- **A/B testing**: Split traffic between
|
|
235
|
-
- **Canary rollouts**: Send a small percentage of requests to a
|
|
236
|
-
- **Per-user targeting**: Pin specific users or accounts to a version while others use the
|
|
237
|
-
- **Environment separation**: Use the
|
|
235
|
+
- **A/B testing**: Split traffic between specific version IDs and compare performance metrics.
|
|
236
|
+
- **Canary rollouts**: Send a small percentage of requests to a draft or historical version before publishing it.
|
|
237
|
+
- **Per-user targeting**: Pin specific users or accounts to a version while others use the active version.
|
|
238
|
+
- **Environment separation**: Use the latest version in staging and the active version in production.
|
|
238
239
|
|
|
239
|
-
Pass a `versionId` or `status` when calling the agent through the Client SDK, server query parameters, or React SDK `requestContext
|
|
240
|
+
Pass a `versionId` or `status` when calling the agent through the Client SDK, server query parameters, or React SDK `requestContext`. A `versionId` selects that exact snapshot, `status: 'draft'` selects the latest snapshot, and `status: 'published'` selects the active snapshot.
|
|
240
241
|
|
|
241
242
|
### Version selection
|
|
242
243
|
|
|
243
|
-
|
|
244
|
+
Calling [`mastra.getAgentById()`](https://mastra.ai/reference/core/getAgentById) without a version selector returns the registered code-defined agent. Pass a selector to apply a published, draft, or specific stored override:
|
|
244
245
|
|
|
245
246
|
```typescript
|
|
246
|
-
// Load the
|
|
247
|
-
const
|
|
247
|
+
// Load the registered code-defined agent without stored overrides
|
|
248
|
+
const codeAgent = mastra.getAgentById('support-agent')
|
|
248
249
|
|
|
249
|
-
// Load the
|
|
250
|
-
const
|
|
250
|
+
// Load the active published override
|
|
251
|
+
const publishedAgent = await mastra.getAgentById('support-agent', {
|
|
252
|
+
status: 'published',
|
|
253
|
+
})
|
|
254
|
+
|
|
255
|
+
// Load the latest override
|
|
256
|
+
const draftAgent = await mastra.getAgentById('support-agent', {
|
|
251
257
|
status: 'draft',
|
|
252
258
|
})
|
|
253
259
|
|
|
254
260
|
// Load a specific version
|
|
255
|
-
const
|
|
261
|
+
const versionedAgent = await mastra.getAgentById('support-agent', {
|
|
256
262
|
versionId: 'abc-123',
|
|
257
263
|
})
|
|
258
264
|
```
|
|
@@ -278,9 +284,9 @@ When a [supervisor agent](https://mastra.ai/docs/agents/supervisor-agents) deleg
|
|
|
278
284
|
|
|
279
285
|
Set version overrides at three levels, with later levels taking priority:
|
|
280
286
|
|
|
281
|
-
1. **Mastra instance config
|
|
282
|
-
2. **Per-invocation options
|
|
283
|
-
3. **Server request body
|
|
287
|
+
1. **Mastra instance config**: global defaults that apply to every `generate()` and `stream()` call.
|
|
288
|
+
2. **Per-invocation options**: overrides passed directly to `generate()` or `stream()`.
|
|
289
|
+
3. **Server request body**: overrides sent in the `versions` field of an API request.
|
|
284
290
|
|
|
285
291
|
Resolution order: **per-invocation > request body > Mastra instance defaults > code-defined agent**.
|
|
286
292
|
|
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
# Prompts
|
|
4
4
|
|
|
5
|
-
Prompt blocks are reusable instruction templates that you compose into an agent's system prompt. Each block can contain plain text, template variables, and display conditions.
|
|
5
|
+
Prompt blocks are reusable instruction templates that you compose into an agent's system prompt. Each block can contain plain text, template variables, and display conditions.
|
|
6
|
+
|
|
7
|
+
Non-technical team members can edit and test prompt content before publishing changes. Every edit is versioned, so you can compare prompt variations and roll back. The history also records what changed over time.
|
|
8
|
+
|
|
9
|
+
You can create and manage prompt blocks through the Studio UI or programmatically through the server API, then reference them across multiple agents.
|
|
6
10
|
|
|
7
11
|
## Quickstart
|
|
8
12
|
|
|
@@ -28,7 +32,7 @@ To turn an inline block into a reusable prompt block, open the block's menu and
|
|
|
28
32
|
|
|
29
33
|
## Template variables
|
|
30
34
|
|
|
31
|
-
Prompt blocks support `{{variable}}` syntax for
|
|
35
|
+
Prompt blocks support `{{variable}}` syntax for runtime content. Variables are resolved at runtime from the agent's variables and request context.
|
|
32
36
|
|
|
33
37
|
```text
|
|
34
38
|
You are helping {{userName}} with their {{task || 'request'}}.
|
|
@@ -63,7 +67,7 @@ In the Studio, open a block's **Display conditions** panel to set up rules visua
|
|
|
63
67
|
|
|
64
68
|
## Programmatic control
|
|
65
69
|
|
|
66
|
-
Prompt blocks can be managed from code through [`mastra.getEditor().prompt`](https://mastra.ai/reference/editor/mastra-editor). This is useful for seeding a set of starter prompts
|
|
70
|
+
Prompt blocks can be managed from code through [`mastra.getEditor().prompt`](https://mastra.ai/reference/editor/mastra-editor). This is useful for seeding a set of starter prompts or syncing blocks between environments, or alternatively generating prompt variants from a script.
|
|
67
71
|
|
|
68
72
|
Create a new prompt block with `editor.prompt.create()`:
|
|
69
73
|
|
|
@@ -126,7 +130,7 @@ See the [MastraEditor reference](https://mastra.ai/reference/editor/mastra-edito
|
|
|
126
130
|
|
|
127
131
|
## Versioning
|
|
128
132
|
|
|
129
|
-
Prompt blocks follow the same [versioning lifecycle](https://mastra.ai/docs/editor/overview) as agents. Each prompt block has a draft that you can edit and publish as a versioned snapshot.
|
|
133
|
+
Prompt blocks follow the same [versioning lifecycle](https://mastra.ai/docs/editor/overview) as agents. Each prompt block has a draft that you can edit and publish as a versioned snapshot. As a result, prompt content can be versioned and rolled back independently from the agent that uses it.
|
|
130
134
|
|
|
131
135
|
When an agent references a prompt block, the resolved content comes from the block's active published version by default. During editing, draft content is used for previews. This separation makes it safe for non-technical team members to experiment with prompt wording. The published version stays stable until they explicitly activate a new one.
|
|
132
136
|
|
|
@@ -8,7 +8,7 @@ The editor gives you three ways to add tools to agents:
|
|
|
8
8
|
- **Integration providers**: Third-party tool platforms like Composio and Arcade.
|
|
9
9
|
- **MCP clients**: Tools from MCP servers, configured as reusable client definitions.
|
|
10
10
|
|
|
11
|
-
You can manage all three sources through the Studio UI or programmatically through the server API. Non-technical team members can browse tool catalogs
|
|
11
|
+
You can manage all three sources through the Studio UI or programmatically through the server API. Non-technical team members can browse tool catalogs and add tools to agents, plus test different tool combinations without code changes. Tool configurations are versioned alongside the rest of the agent, so you can roll back tool changes and compare versions, plus experiment safely.
|
|
12
12
|
|
|
13
13
|
## Description overrides
|
|
14
14
|
|
|
@@ -24,7 +24,7 @@ In the Studio, select a tool in the agent's tool list and edit the **Description
|
|
|
24
24
|
|
|
25
25
|
## Display conditions
|
|
26
26
|
|
|
27
|
-
Each tool in an agent can have display conditions
|
|
27
|
+
Each tool in an agent can have display conditions, rule groups that control whether the tool is available at runtime. This uses the same rule system as [prompt blocks](https://mastra.ai/docs/editor/prompts).
|
|
28
28
|
|
|
29
29
|
When a request comes in, the editor evaluates each tool's rules against the current context (agent variables and request context). Tools whose conditions aren't met are excluded from that run.
|
|
30
30
|
|
|
@@ -124,7 +124,7 @@ You can filter MCP tools at two levels:
|
|
|
124
124
|
|
|
125
125
|
### Tool namespacing
|
|
126
126
|
|
|
127
|
-
Tools from MCP servers are namespaced as `serverName_toolName` to avoid conflicts. For example, a
|
|
127
|
+
Tools from MCP servers are namespaced as `serverName_toolName` to avoid conflicts. For example, a `search` tool from the `docs` server becomes `docs_search`.
|
|
128
128
|
|
|
129
129
|
### Conditional activation
|
|
130
130
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Built-in scorers
|
|
4
4
|
|
|
5
|
-
Mastra provides a
|
|
5
|
+
Mastra provides a complete set of built-in scorers for evaluating AI outputs. These scorers are optimized for common evaluation scenarios and are ready to use in your agents and workflows.
|
|
6
6
|
|
|
7
7
|
To create your own scorers, see the [Custom Scorers](https://mastra.ai/docs/evals/custom-scorers) guide.
|
|
8
8
|
|
|
@@ -20,15 +20,15 @@ These scorers evaluate how correct, truthful, and complete your agent's answers
|
|
|
20
20
|
- [`content-similarity`](https://mastra.ai/reference/evals/content-similarity): Measures textual similarity using character-level matching (`0-1`, higher is better)
|
|
21
21
|
- [`textual-difference`](https://mastra.ai/reference/evals/textual-difference): Measures textual differences between strings (`0-1`, higher means more similar)
|
|
22
22
|
- [`tool-call-accuracy`](https://mastra.ai/reference/evals/tool-call-accuracy): Evaluates whether the LLM selects the correct tool from available options (`0-1`, higher is better)
|
|
23
|
-
- [`trajectory-accuracy`](https://mastra.ai/reference/evals/trajectory-accuracy): Evaluates
|
|
23
|
+
- [`trajectory-accuracy`](https://mastra.ai/reference/evals/trajectory-accuracy): Evaluates the expected action sequence for all span types. Covered spans include tool and model activity plus workflow steps (`0-1`, higher is better)
|
|
24
24
|
- [`prompt-alignment`](https://mastra.ai/reference/evals/prompt-alignment): Measures how well agent responses align with user prompt intent, requirements, completeness, and format (`0-1`, higher is better)
|
|
25
25
|
|
|
26
26
|
### Context quality
|
|
27
27
|
|
|
28
28
|
These scorers evaluate the quality and relevance of context used in generating responses:
|
|
29
29
|
|
|
30
|
-
- [`context-precision`](https://mastra.ai/reference/evals/context-precision):
|
|
31
|
-
- [`context-relevance`](https://mastra.ai/reference/evals/context-relevance): Measures context utility
|
|
30
|
+
- [`context-precision`](https://mastra.ai/reference/evals/context-precision): Uses Mean Average Precision to evaluate context ranking. Relevant context receives a higher score when it occurs early (`0-1`, higher is better)
|
|
31
|
+
- [`context-relevance`](https://mastra.ai/reference/evals/context-relevance): Measures context utility through relevance levels and usage tracking. It also detects missing context (`0-1`, higher is better)
|
|
32
32
|
|
|
33
33
|
> **Context Scorer Selection:**
|
|
34
34
|
>
|
|
@@ -46,7 +46,7 @@ const glutenCheckerScorer = createScorer({
|
|
|
46
46
|
id: 'gluten-checker',
|
|
47
47
|
description: 'Check if recipes contain gluten ingredients',
|
|
48
48
|
judge: { // Optional: for prompt object steps
|
|
49
|
-
model: 'openai/gpt-5.
|
|
49
|
+
model: 'openai/gpt-5.6-sol',
|
|
50
50
|
instructions: 'You are a Chef that identifies if recipes contain gluten.'
|
|
51
51
|
}
|
|
52
52
|
})
|
|
@@ -119,7 +119,7 @@ const myScorer = createScorer({
|
|
|
119
119
|
|
|
120
120
|
### preprocess Step (Optional)
|
|
121
121
|
|
|
122
|
-
Prepares input/output data when you need to extract specific elements
|
|
122
|
+
Prepares input/output data when you need to extract specific elements or filter content, or alternatively transform complex data structures.
|
|
123
123
|
|
|
124
124
|
**Functions:** `({ run, results }) => any`
|
|
125
125
|
|
|
@@ -274,7 +274,7 @@ const glutenCheckerScorer = createScorer({...})
|
|
|
274
274
|
|
|
275
275
|
## Input filtering
|
|
276
276
|
|
|
277
|
-
Agent conversations can contain hundreds of messages with tool calls
|
|
277
|
+
Agent conversations can contain hundreds of messages with tool calls and data parts, plus system metadata. Most scorers only need a subset of this data. The `prepareRun` option transforms the run data before the scorer pipeline executes, reducing noise and keeping scorers focused.
|
|
278
278
|
|
|
279
279
|
### Declarative filtering with `filterRun()`
|
|
280
280
|
|
|
@@ -463,7 +463,7 @@ The analysis step uses a prompt object to:
|
|
|
463
463
|
|
|
464
464
|
- Provide a clear description of the analysis task
|
|
465
465
|
- Define expected output structure with a Standard JSON Schema (both boolean result and list of gluten sources)
|
|
466
|
-
- Generate
|
|
466
|
+
- Generate runtime prompts based on the input content
|
|
467
467
|
|
|
468
468
|
### Score Generation
|
|
469
469
|
|
|
@@ -493,7 +493,7 @@ Provides human-readable explanations for the score using another LLM call.
|
|
|
493
493
|
})
|
|
494
494
|
```
|
|
495
495
|
|
|
496
|
-
The reason generation step creates explanations that help users understand why a
|
|
496
|
+
The reason generation step creates explanations that help users understand why a score was assigned, using both the boolean result and the specific gluten sources identified by the analysis step.
|
|
497
497
|
|
|
498
498
|
## High gluten-free example
|
|
499
499
|
|
|
@@ -154,13 +154,13 @@ Tool mocks are supported for `agent` targets only.
|
|
|
154
154
|
|
|
155
155
|
### Matching and consumption
|
|
156
156
|
|
|
157
|
-
Arguments are matched strictly: object key order is ignored
|
|
157
|
+
Arguments are matched strictly: object key order is ignored and array order is substantial, plus there is no type coercion. A mock is served only when the agent calls the tool with arguments that deep-equal the mock's `args`.
|
|
158
158
|
|
|
159
|
-
When an item declares several mocks for the same tool and arguments, they're consumed in order
|
|
159
|
+
When an item declares several mocks for the same tool and arguments, they're consumed in order, the first call gets the first mock, the next call gets the second, and so on. Ordering is tracked per `(toolName, args)` group and is independent across different arguments.
|
|
160
160
|
|
|
161
161
|
### Matching mode
|
|
162
162
|
|
|
163
|
-
By default each mock matches strictly on its `args`. Set `matchArgs: 'ignore'` to match on the tool name only
|
|
163
|
+
By default each mock matches strictly on its `args`. Set `matchArgs: 'ignore'` to match on the tool name only, the mock's `args` aren't compared and the next unconsumed mock for that tool is served regardless of how the agent called it:
|
|
164
164
|
|
|
165
165
|
```typescript
|
|
166
166
|
const subAgentMock = {
|
|
@@ -171,16 +171,16 @@ const subAgentMock = {
|
|
|
171
171
|
}
|
|
172
172
|
```
|
|
173
173
|
|
|
174
|
-
This is useful when a tool's arguments are noisy or generated by the model. The most common case is mocking a **sub-agent's response**: a delegated sub-agent is exposed to the parent as
|
|
174
|
+
This is useful when a tool's arguments are noisy or generated by the model. The most common case is mocking a **sub-agent's response**: a delegated sub-agent is exposed to the parent as an `agent-<name>` tool, and its arguments include an LLM-authored `prompt` plus runtime-injected fields. Mocking `agent-<name>` returns the canned response in place of running the sub-agent and its inner tools. When you create a mock from a trace, sub-agent delegation calls are derived with `matchArgs: 'ignore'` automatically. You can change it to `'strict'` to pin the exact arguments.
|
|
175
175
|
|
|
176
176
|
### Failures
|
|
177
177
|
|
|
178
178
|
A mocked tool call fails the item when the arguments don't match or all matching mocks have been consumed:
|
|
179
179
|
|
|
180
|
-
- `TOOL_MOCK_MISMATCH
|
|
181
|
-
- `TOOL_MOCK_EXHAUSTED
|
|
180
|
+
- `TOOL_MOCK_MISMATCH`: the tool was called with arguments that no mock matches.
|
|
181
|
+
- `TOOL_MOCK_EXHAUSTED`: every matching mock has already been consumed.
|
|
182
182
|
|
|
183
|
-
When a mocked tool is mis-called, the agent run is aborted immediately, so the model can't go on to call any further tools
|
|
183
|
+
When a mocked tool is mis-called, the agent run is aborted immediately, so the model can't go on to call any further tools, including unmocked, side-effecting tools that would otherwise run live. These failures are deterministic, so they're not retried. Mocks that are declared but never used don't fail the item, they're reported as unconsumed.
|
|
184
184
|
|
|
185
185
|
While an item has mocks, the agent's tools execute sequentially so repeated `(toolName, args)` mocks are consumed in the provider's call order. This serialization applies only to items that declare mocks.
|
|
186
186
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Evals with memory
|
|
4
4
|
|
|
5
|
-
Agents that use memory in `thread` scope
|
|
5
|
+
Agents that use memory in `thread` scope, including observational memory, require a thread ID at run time. When an eval invokes the agent without one, you'll see:
|
|
6
6
|
|
|
7
7
|
```text
|
|
8
8
|
ObservationalMemory (scope: 'thread') requires a threadId, but none was found in RequestContext or MessageList.
|
|
@@ -18,11 +18,11 @@ This page covers the three working patterns for running Mastra evals against mem
|
|
|
18
18
|
| One independent thread per item, focused CI loop | [`runEvals` per item](#per-item-threads-with-runevals) |
|
|
19
19
|
| Per-item threads driven by a stored `Dataset` | [`dataset.startExperiment` with an inline task](#dataset-experiments-with-an-inline-task) |
|
|
20
20
|
|
|
21
|
-
Pre-seeding `RequestContext` with `MastraMemory` **isn't** a supported way to drive memory into an agent. Thread resolution reads `args.memory.thread
|
|
21
|
+
Pre-seeding `RequestContext` with `MastraMemory` **isn't** a supported way to drive memory into an agent. Thread resolution reads `args.memory.thread`, `RequestContext.MastraMemory` is populated by `prepare-memory-step` after the agent has already resolved its thread.
|
|
22
22
|
|
|
23
23
|
## Shared thread with `runEvals`
|
|
24
24
|
|
|
25
|
-
`runEvals` accepts `targetOptions`, which is forwarded to `agent.generate()`. Passing `memory: { thread, resource }` runs every data item against the same thread
|
|
25
|
+
`runEvals` accepts `targetOptions`, which is forwarded to `agent.generate()`. Passing `memory: { thread, resource }` runs every data item against the same thread, useful for testing recall across a multi-turn conversation.
|
|
26
26
|
|
|
27
27
|
```typescript
|
|
28
28
|
import { runEvals } from '@mastra/core/evals'
|
|
@@ -88,7 +88,7 @@ const average = scores.reduce((a, b) => a + b, 0) / scores.length
|
|
|
88
88
|
|
|
89
89
|
## Dataset experiments with an inline task
|
|
90
90
|
|
|
91
|
-
`dataset.startExperiment({ target: agent })` **doesn't** forward a `memory` option to the agent
|
|
91
|
+
`dataset.startExperiment({ target: agent })` **doesn't** forward a `memory` option to the agent, only `requestContext`. To run a stored dataset against a memory-enabled agent, use an inline `task` function and stash `{ threadId, resourceId }` in each item's `metadata`. The scorer pipeline still runs as normal.
|
|
92
92
|
|
|
93
93
|
```typescript
|
|
94
94
|
import { randomUUID } from 'node:crypto'
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Gates and verdicts
|
|
4
4
|
|
|
5
|
-
Gates and verdicts add severity semantics to `runEvals`. Gates are scorers that must score 1.0
|
|
5
|
+
Gates and verdicts add severity semantics to `runEvals`. Gates are scorers that must score 1.0, hard requirements that block a run. Thresholds are minimum acceptable scores on tracked metrics. The verdict summarizes the outcome as `passed`, `scored`, or `failed`.
|
|
6
6
|
|
|
7
7
|
## When to use gates and verdicts
|
|
8
8
|
|
|
@@ -81,7 +81,7 @@ const result = await runEvals({
|
|
|
81
81
|
})
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
-
You must provide at least one scorer or gate
|
|
84
|
+
You must provide at least one scorer or gate, a run with neither throws an error.
|
|
85
85
|
|
|
86
86
|
## Thresholds
|
|
87
87
|
|
|
@@ -89,8 +89,8 @@ Wrap a scorer in `{ scorer, threshold }` to set pass/fail bounds. The threshold
|
|
|
89
89
|
|
|
90
90
|
A `threshold` can be:
|
|
91
91
|
|
|
92
|
-
- **A number
|
|
93
|
-
- **An object with `min` and/or `max
|
|
92
|
+
- **A number**: implies minimum (score at or above passes): `{ scorer, threshold: 0.7 }`
|
|
93
|
+
- **An object with `min` and/or `max`**: for range-based checks: `{ scorer, threshold: { max: 0.3 } }`
|
|
94
94
|
|
|
95
95
|
Use `max` for scorers where a high score is bad (e.g., hallucination, toxicity). Use `{ min, max }` when the score should fall within a specific band.
|
|
96
96
|
|
|
@@ -37,9 +37,9 @@ Each turn runs `agent.generate()` with the same thread ID, so the agent sees the
|
|
|
37
37
|
|
|
38
38
|
## Memory is required for cross-turn recall
|
|
39
39
|
|
|
40
|
-
Multi-turn recall depends on the agent having a **memory store configured**. The shared thread ID is what lets each turn see the earlier ones
|
|
40
|
+
Multi-turn recall depends on the agent having a **memory store configured**. The shared thread ID is what lets each turn see the earlier ones, but a thread only persists history when the agent has memory. If the agent has no memory configured, the turns still run sequentially and their outputs still accumulate for scoring, but the agent won't recall earlier turns (each input runs in isolation). `runEvals` logs a warning when you use `inputs` on an agent without memory.
|
|
41
41
|
|
|
42
|
-
`runEvals` manages the conversation identity for you: it generates the shared `threadId` and injects a `resourceId` (Mastra memory scopes messages by resource + thread, so both are required for recall to work). By default the resource is derived from the generated thread so each conversation is isolated. To pin a specific resource
|
|
42
|
+
`runEvals` manages the conversation identity for you: it generates the shared `threadId` and injects a `resourceId` (Mastra memory scopes messages by resource + thread, so both are required for recall to work). By default the resource is derived from the generated thread so each conversation is isolated. To pin a specific resource, for example to reuse an existing user's memory, pass `targetOptions.memory.resource`; `runEvals` still owns the thread, so you don't provide one:
|
|
43
43
|
|
|
44
44
|
```typescript
|
|
45
45
|
await runEvals({
|
|
@@ -61,18 +61,18 @@ When a data item has an `inputs` array, `runEvals`:
|
|
|
61
61
|
3. Accumulates all output messages across turns
|
|
62
62
|
4. Passes the full accumulated output to scorers for evaluation
|
|
63
63
|
|
|
64
|
-
Scorers see the complete conversation output,
|
|
64
|
+
Scorers see the complete conversation output, including every turn.
|
|
65
65
|
|
|
66
66
|
## Scoring semantics
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
These details matter when writing scorers for multi-turn items:
|
|
69
69
|
|
|
70
|
-
- **`run.output` is the accumulated output from every turn.** Output-based scorers
|
|
70
|
+
- **`run.output` is the accumulated output from every turn.** Output-based scorers: `checks.includes`, `checks.calledTool`, `checks.similarity`, and similar: evaluate the whole conversation. For example, `checks.calledTool('get_weather', { times: 2 })` counts calls across all turns.
|
|
71
71
|
- **`run.input` is only the first turn's input.** Scorers that compare input against output (faithfulness, answer relevancy, and other input-relative LLM scorers) only see the first user message, not the full conversation. Prefer output-based checks for multi-turn, or build scorers that read the accumulated `run.output` directly.
|
|
72
72
|
|
|
73
73
|
## Per-turn assertions with `turns`
|
|
74
74
|
|
|
75
|
-
The `inputs` form scores the **accumulated** output
|
|
75
|
+
The `inputs` form scores the **accumulated** output as a whole, a single score over every turn's output. That can hide per-turn failures: an output-based check like `checks.includes('Brooklyn')` passes if _any_ turn mentions Brooklyn, even when the follow-up turn is broken.
|
|
76
76
|
|
|
77
77
|
When you need to assert that a **specific turn** behaved correctly, use `turns` instead. Each turn is an object with its own `input` and optional `gates`/`scorers` that evaluate **only that turn's** input and output:
|
|
78
78
|
|
|
@@ -108,14 +108,14 @@ result.turnResults // per-turn gate/threshold/scorer outcomes
|
|
|
108
108
|
|
|
109
109
|
Semantics:
|
|
110
110
|
|
|
111
|
-
- A per-turn gate or scorer sees **only that turn's** `run.input` and `run.output
|
|
112
|
-
- Per-turn outcomes fold into the
|
|
111
|
+
- A per-turn gate or scorer sees **only that turn's** `run.input` and `run.output`: never the accumulated conversation. This fixes both blind spots of `inputs`: the wrong turn can't satisfy a check, and `run.input` is correct for each turn.
|
|
112
|
+
- Per-turn outcomes fold into the [verdict](https://mastra.ai/docs/evals/gates-and-verdicts): a failing turn gate makes the verdict `failed`. A missed turn threshold (with gates passing) makes it `scored`.
|
|
113
113
|
- `result.turnResults[i]` reports each turn's `gateResults`, `thresholdResults`, and `scores`, so a failure points at the exact turn. Across multiple conversations, turn results are averaged by turn index.
|
|
114
|
-
- A turn with no `gates
|
|
115
|
-
- Top-level `scorers`/`gates` still run
|
|
114
|
+
- A turn with no `gates` or `scorers` advances the conversation.
|
|
115
|
+
- Top-level `scorers`/`gates` still run as a whole over the accumulated output, so you can combine "this turn must call the tool" with "the answer mentions Brooklyn."
|
|
116
116
|
- When the agent has storage configured, each per-turn scorer/gate result is persisted like top-level scores, so per-turn outcomes appear in your scores store. Each stored per-turn score is labeled with its turn index (`metadata.turnIndex`), shares the conversation's `threadId`, and links to that turn's own trace span.
|
|
117
117
|
|
|
118
|
-
Use `inputs` when a single
|
|
118
|
+
Use `inputs` when a single whole-conversation score over the whole conversation is enough. Use `turns` when correctness depends on individual turns. `turns` can't be combined with `input` or `inputs` in the same data item.
|
|
119
119
|
|
|
120
120
|
## Combining with gates and thresholds
|
|
121
121
|
|
|
@@ -156,7 +156,7 @@ const result = await runEvals({
|
|
|
156
156
|
})
|
|
157
157
|
```
|
|
158
158
|
|
|
159
|
-
Single-turn items use `input` as usual. Multi-turn items use `inputs
|
|
159
|
+
Single-turn items use `input` as usual. Multi-turn items use `inputs`, `input` can be omitted entirely.
|
|
160
160
|
|
|
161
161
|
## Validation
|
|
162
162
|
|