@mastra/mcp-docs-server 1.3.9-alpha.9 → 1.3.10-alpha.0
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/agents/code-mode.md +2 -2
- package/.docs/docs/agents/guardrails.md +5 -2
- package/.docs/docs/agents/human-in-the-loop.md +18 -5
- package/.docs/docs/agents/networks.md +1 -1
- package/.docs/docs/agents/overview.md +8 -7
- package/.docs/docs/agents/processors.md +72 -21
- package/.docs/docs/agents/structured-output.md +6 -6
- package/.docs/docs/agents/tools.md +10 -10
- package/.docs/docs/auth/composite-auth.md +4 -2
- package/.docs/docs/auth/custom-auth-provider.md +1 -1
- package/.docs/docs/auth/overview.md +3 -1
- package/.docs/docs/browser.md +13 -1
- package/.docs/docs/channels.md +33 -6
- package/.docs/docs/connections/a2a.md +1 -1
- package/.docs/docs/connections/acp.md +2 -2
- package/.docs/docs/connections/mcp.md +159 -50
- package/.docs/docs/connections/overview.md +1 -1
- package/.docs/docs/connections/sdk-agents.md +26 -15
- package/.docs/docs/develop.md +1 -1
- package/.docs/docs/evals/custom-scorers.md +5 -5
- package/.docs/docs/evals/experiments.md +29 -4
- package/.docs/docs/evals/multi-turn.md +2 -2
- package/.docs/docs/evals/overview.md +4 -4
- package/.docs/docs/evals/quick-checks.md +2 -2
- package/.docs/docs/guides/build-an-eval-loop.md +3 -3
- package/.docs/docs/guides/context-engineering.md +13 -6
- package/.docs/docs/guides/mcp-authentication-authorization.md +4 -4
- package/.docs/docs/guides/streaming.md +1 -1
- package/.docs/docs/harness/agent-controller.md +18 -21
- package/.docs/docs/harness/background-tasks.md +14 -3
- package/.docs/docs/harness/durable-agents.md +15 -9
- package/.docs/docs/harness/goals.md +5 -5
- package/.docs/docs/harness/overview.md +2 -2
- package/.docs/docs/harness/schedules.md +13 -11
- package/.docs/docs/index.md +7 -6
- package/.docs/docs/mastra-platform/connect/channels.md +1 -1
- package/.docs/docs/mastra-platform/connect/tools.md +4 -4
- package/.docs/docs/mastra-platform/environments.md +1 -1
- package/.docs/docs/mastra-platform/observability.md +1 -1
- package/.docs/docs/mastra-platform/server.md +1 -1
- package/.docs/docs/mastra-platform/studio.md +1 -1
- package/.docs/docs/memory/memory-processors.md +21 -15
- package/.docs/docs/memory/message-history.md +5 -5
- package/.docs/docs/memory/multi-user-threads.md +1 -1
- package/.docs/docs/memory/observational-memory.md +14 -14
- package/.docs/docs/memory/semantic-recall.md +22 -2
- package/.docs/docs/memory/working-memory.md +3 -3
- package/.docs/docs/observability/logging.md +5 -5
- package/.docs/docs/observability/tracing/overview.md +1 -0
- package/.docs/docs/sandbox/filesystem.md +26 -11
- package/.docs/docs/sandbox/overview.md +1 -1
- package/.docs/docs/server/mastra-client.md +1 -1
- package/.docs/docs/server/middleware.md +1 -1
- package/.docs/docs/server/overview.md +27 -0
- package/.docs/docs/server/request-context.md +3 -3
- package/.docs/docs/server/server-adapters.md +12 -204
- package/.docs/docs/signals/notifications.md +233 -0
- package/.docs/docs/signals/overview.md +94 -0
- package/.docs/docs/signals/running-across-processes.md +132 -0
- package/.docs/docs/signals/sending-signals.md +166 -0
- package/.docs/docs/signals/signal-providers.md +278 -0
- package/.docs/docs/signals/state-signals.md +103 -0
- package/.docs/docs/signals/thread-streams.md +94 -0
- package/.docs/docs/skills.md +4 -4
- package/.docs/docs/storage.md +1 -1
- package/.docs/docs/studio/auth.md +2 -2
- package/.docs/docs/studio/editor.md +39 -23
- package/.docs/docs/studio/observability.md +5 -1
- package/.docs/docs/subagents.md +6 -6
- package/.docs/docs/workflows/control-flow.md +14 -14
- package/.docs/docs/workflows/error-handling.md +1 -1
- package/.docs/integrations/agentic-ui/ai-sdk-ui.md +1 -1
- package/.docs/integrations/agentic-ui/copilotkit.md +1 -1
- package/.docs/integrations/agentic-ui/openui.md +1 -1
- package/.docs/integrations/browsers/agent-browser.md +1 -1
- package/.docs/integrations/browsers/browser-viewer.md +1 -1
- package/.docs/integrations/browsers/firecrawl.md +1 -1
- package/.docs/integrations/browsers/stagehand.md +6 -6
- package/.docs/integrations/channels/discord.md +1 -1
- package/.docs/integrations/channels/github.md +2 -2
- package/.docs/integrations/channels/imessage.md +2 -50
- package/.docs/integrations/channels/slack.md +1 -1
- package/.docs/integrations/channels/teams.md +1 -1
- package/.docs/integrations/channels/telegram.md +1 -1
- package/.docs/integrations/channels/whatsapp.md +1 -1
- package/.docs/integrations/databases/aurora-dsql.md +1 -1
- package/.docs/integrations/databases/cloudflare-kv.md +4 -0
- package/.docs/integrations/databases/elasticsearch.md +1 -1
- package/.docs/integrations/databases/mongodb.md +1 -1
- package/.docs/integrations/databases/oracledb.md +1 -1
- package/.docs/integrations/databases/postgresql.md +1 -1
- package/.docs/integrations/databases/redis.md +1 -1
- package/.docs/integrations/databases/upstash.md +1 -1
- package/.docs/integrations/deploy/aws-bedrock-agentcore.md +1 -0
- package/.docs/integrations/deploy/kubernetes.md +1 -1
- package/.docs/integrations/deploy/neon.md +2 -1
- package/.docs/integrations/deploy/render.md +2 -2
- package/.docs/integrations/file-storage/agentfs.md +1 -1
- package/.docs/integrations/file-storage/amazon-s3.md +20 -3
- package/.docs/integrations/file-storage/archil.md +1 -1
- package/.docs/integrations/file-storage/azure-blob.md +1 -1
- package/.docs/integrations/file-storage/google-cloud-storage.md +1 -1
- package/.docs/integrations/file-storage/google-drive.md +1 -1
- package/.docs/integrations/file-storage/mesa.md +1 -1
- package/.docs/integrations/file-storage/neon.md +210 -0
- package/.docs/integrations/file-storage/vercel-files.md +5 -1
- package/.docs/integrations/frameworks/express.md +0 -64
- package/.docs/integrations/observability/langfuse.md +1 -1
- package/.docs/integrations/observability/langsmith.md +2 -2
- package/.docs/integrations/observability/opentelemetry.md +5 -5
- package/.docs/integrations/sandboxes/apple-container.md +1 -1
- package/.docs/integrations/sandboxes/blaxel.md +1 -1
- package/.docs/integrations/sandboxes/daytona.md +1 -1
- package/.docs/integrations/sandboxes/docker.md +1 -1
- package/.docs/integrations/sandboxes/e2b-desktop.md +1 -1
- package/.docs/integrations/sandboxes/e2b.md +6 -2
- package/.docs/integrations/sandboxes/modal.md +1 -1
- package/.docs/integrations/sandboxes/railway.md +1 -1
- package/.docs/integrations/sandboxes/sprites.md +1 -1
- package/.docs/integrations/sandboxes/vercel.md +2 -2
- package/.docs/integrations/tools/brightdata.md +1 -1
- package/.docs/integrations/tools/firecrawl.md +1 -1
- package/.docs/integrations/tools/parallel.md +1 -1
- package/.docs/integrations/tools/perplexity.md +1 -1
- package/.docs/integrations/tools/tavily.md +1 -1
- package/.docs/integrations/voice/livekit.md +2 -2
- package/.docs/integrations.md +1 -0
- package/.docs/models/embeddings.md +2 -1
- package/.docs/models/environment-variables.md +1 -3
- package/.docs/models/gateways/custom-gateways.md +3 -3
- package/.docs/models/gateways/merge-gateway.md +7 -13
- package/.docs/models/gateways/netlify.md +2 -1
- package/.docs/models/gateways/openrouter.md +3 -2
- package/.docs/models/gateways/vercel.md +8 -5
- package/.docs/models/index.md +14 -16
- package/.docs/models/providers/302ai.md +3 -3
- package/.docs/models/providers/abacus.md +70 -110
- package/.docs/models/providers/aimlapi.md +171 -171
- package/.docs/models/providers/aixy.md +3 -1
- package/.docs/models/providers/aki-io.md +5 -6
- package/.docs/models/providers/alibaba-cn.md +9 -57
- package/.docs/models/providers/alibaba-coding-plan-cn.md +8 -12
- package/.docs/models/providers/alibaba-coding-plan.md +8 -12
- package/.docs/models/providers/alibaba-token-plan-cn.md +0 -2
- package/.docs/models/providers/alibaba-token-plan.md +29 -30
- package/.docs/models/providers/alibaba.md +33 -62
- package/.docs/models/providers/ambient.md +1 -9
- package/.docs/models/providers/amd.md +13 -9
- package/.docs/models/providers/anthropic.md +4 -2
- package/.docs/models/providers/arcee.md +6 -4
- package/.docs/models/providers/auriko.md +2 -2
- package/.docs/models/providers/baseten.md +4 -14
- package/.docs/models/providers/berget.md +3 -4
- package/.docs/models/providers/bothub.md +4 -4
- package/.docs/models/providers/boundless.md +0 -4
- package/.docs/models/providers/cline-pass.md +2 -8
- package/.docs/models/providers/cloudflare-workers-ai.md +1 -1
- package/.docs/models/providers/commandcode.md +0 -1
- package/.docs/models/providers/coralbricks.md +1 -1
- package/.docs/models/providers/cortecs.md +1 -1
- package/.docs/models/providers/crossmodel.md +69 -73
- package/.docs/models/providers/crusoe.md +1 -7
- package/.docs/models/providers/daoxe.md +1 -1
- package/.docs/models/providers/databricks.md +5 -10
- package/.docs/models/providers/deepinfra.md +2 -2
- package/.docs/models/providers/digitalocean.md +8 -24
- package/.docs/models/providers/dinference.md +0 -3
- package/.docs/models/providers/edenai.md +29 -5
- package/.docs/models/providers/empiriolabs.md +1 -8
- package/.docs/models/providers/engy.md +2 -2
- package/.docs/models/providers/evroc.md +2 -2
- package/.docs/models/providers/fastrouter.md +41 -50
- package/.docs/models/providers/fireworks-ai.md +6 -5
- package/.docs/models/providers/friendli.md +4 -5
- package/.docs/models/providers/frogbot.md +2 -7
- package/.docs/models/providers/google.md +5 -5
- package/.docs/models/providers/greenpt.md +14 -20
- package/.docs/models/providers/groq.md +3 -8
- package/.docs/models/providers/huggingface.md +5 -6
- package/.docs/models/providers/iflowcn.md +2 -18
- package/.docs/models/providers/impossibl.md +2 -9
- package/.docs/models/providers/inception.md +3 -2
- package/.docs/models/providers/inceptron.md +8 -6
- package/.docs/models/providers/inco.md +1 -1
- package/.docs/models/providers/inference.md +5 -11
- package/.docs/models/providers/infomaniak.md +10 -12
- package/.docs/models/providers/io-net.md +11 -17
- package/.docs/models/providers/iteracompute.md +5 -5
- package/.docs/models/providers/jalapeno.md +14 -19
- package/.docs/models/providers/jiekou.md +53 -63
- package/.docs/models/providers/kenari.md +35 -54
- package/.docs/models/providers/kilo.md +19 -33
- package/.docs/models/providers/lilac.md +2 -8
- package/.docs/models/providers/liquid.md +77 -0
- package/.docs/models/providers/llama.md +2 -11
- package/.docs/models/providers/llmgateway-providers.md +10 -27
- package/.docs/models/providers/llmgateway.md +12 -21
- package/.docs/models/providers/llmtr.md +1 -6
- package/.docs/models/providers/longcat.md +6 -5
- package/.docs/models/providers/lowrouter.md +1 -1
- package/.docs/models/providers/lucidquery.md +2 -2
- package/.docs/models/providers/meganova.md +6 -7
- package/.docs/models/providers/melious.md +11 -15
- package/.docs/models/providers/minimax-cn-coding-plan.md +4 -11
- package/.docs/models/providers/minimax-cn.md +4 -10
- package/.docs/models/providers/minimax-coding-plan.md +4 -11
- package/.docs/models/providers/minimax.md +4 -10
- package/.docs/models/providers/mistral.md +7 -6
- package/.docs/models/providers/moark.md +0 -2
- package/.docs/models/providers/modal.md +11 -7
- package/.docs/models/providers/moonshotai-cn.md +2 -2
- package/.docs/models/providers/nan.md +1 -1
- package/.docs/models/providers/nano-gpt.md +28 -31
- package/.docs/models/providers/nearai.md +3 -2
- package/.docs/models/providers/neuralwatt.md +1 -4
- package/.docs/models/providers/novita-ai.md +2 -1
- package/.docs/models/providers/nvidia.md +15 -35
- package/.docs/models/providers/oci.md +0 -1
- package/.docs/models/providers/ofox.md +149 -157
- package/.docs/models/providers/ollama-cloud.md +7 -12
- package/.docs/models/providers/openai.md +4 -2
- package/.docs/models/providers/opencode-go.md +2 -3
- package/.docs/models/providers/opencode.md +85 -87
- package/.docs/models/providers/opper.md +1 -4
- package/.docs/models/providers/orcarouter.md +14 -16
- package/.docs/models/providers/pareto.md +1 -1
- package/.docs/models/providers/perplexity-agent.md +43 -29
- package/.docs/models/providers/perplexity.md +2 -8
- package/.docs/models/providers/pioneer.md +13 -118
- package/.docs/models/providers/poe.md +16 -70
- package/.docs/models/providers/prime.md +2 -1
- package/.docs/models/providers/qihang-ai.md +7 -11
- package/.docs/models/providers/qiniu-ai.md +9 -94
- package/.docs/models/providers/regolo-ai.md +5 -7
- package/.docs/models/providers/requesty.md +0 -4
- package/.docs/models/providers/runinfra.md +3 -5
- package/.docs/models/providers/sarvam.md +1 -2
- package/.docs/models/providers/scaleway.md +12 -13
- package/.docs/models/providers/siliconflow-cn.md +35 -41
- package/.docs/models/providers/siliconflow.md +3 -6
- package/.docs/models/providers/snowflake-cortex.md +22 -22
- package/.docs/models/providers/stackit.md +2 -4
- package/.docs/models/providers/stepfun-ai.md +5 -7
- package/.docs/models/providers/stepfun.md +8 -10
- package/.docs/models/providers/submodel.md +1 -1
- package/.docs/models/providers/synthetic.md +2 -5
- package/.docs/models/providers/tempr.md +1 -4
- package/.docs/models/providers/tencent-coding-plan.md +3 -10
- package/.docs/models/providers/tensorx.md +0 -13
- package/.docs/models/providers/the-grid-ai.md +2 -1
- package/.docs/models/providers/thinkingmachines.md +45 -9
- package/.docs/models/providers/togetherai.md +17 -23
- package/.docs/models/providers/tokengo.md +1 -1
- package/.docs/models/providers/umans-ai-coding-plan.md +12 -11
- package/.docs/models/providers/umans-ai.md +11 -10
- package/.docs/models/providers/unorouter.md +0 -13
- package/.docs/models/providers/vancine.md +0 -1
- package/.docs/models/providers/vivgrid.md +3 -3
- package/.docs/models/providers/volcengine-coding-plan.md +8 -12
- package/.docs/models/providers/volcengine.md +12 -18
- package/.docs/models/providers/vultr.md +0 -2
- package/.docs/models/providers/wafer.ai.md +3 -7
- package/.docs/models/providers/wandb.md +1 -1
- package/.docs/models/providers/xai.md +21 -4
- package/.docs/models/providers/xiaomi-token-plan-ams.md +4 -5
- package/.docs/models/providers/xiaomi-token-plan-cn.md +4 -5
- package/.docs/models/providers/xiaomi-token-plan-sgp.md +4 -5
- package/.docs/models/providers/xiaomi.md +4 -4
- package/.docs/models/providers/xpersona.md +0 -1
- package/.docs/models/providers/zai-coding-plan.md +0 -4
- package/.docs/models/providers/zenmux.md +105 -125
- package/.docs/models/providers/zhipuai-coding-plan.md +0 -1
- package/.docs/models/providers/zhipuai.md +12 -12
- package/.docs/models/providers.md +1 -3
- package/.docs/reference/acp/acp-agent.md +4 -4
- package/.docs/reference/acp/create-acp-tool.md +1 -1
- package/.docs/reference/agent-controller/agent-controller-class.md +18 -23
- package/.docs/reference/agent-controller/session.md +8 -8
- package/.docs/reference/agents/agent.md +22 -46
- package/.docs/reference/agents/channels.md +17 -9
- package/.docs/reference/agents/durable-agent.md +14 -10
- package/.docs/reference/agents/generate.md +57 -3
- package/.docs/reference/agents/generateLegacy.md +2 -2
- package/.docs/reference/agents/getLLM.md +2 -2
- package/.docs/reference/agents/getMetadata.md +2 -2
- package/.docs/reference/agents/getSkill.md +1 -1
- package/.docs/reference/agents/inngest-agent.md +1 -1
- package/.docs/reference/agents/listSkills.md +1 -4
- package/.docs/reference/agents/network.md +1 -1
- package/.docs/reference/browser/agent-browser.md +1 -1
- package/.docs/reference/browser/browser-viewer.md +1 -1
- package/.docs/reference/browser/firecrawl-browser.md +1 -1
- package/.docs/reference/browser/mastra-browser.md +2 -2
- package/.docs/reference/browser/stagehand-browser.md +4 -4
- package/.docs/reference/channels/slack-provider.md +3 -0
- package/.docs/reference/cli/mastra.md +26 -0
- package/.docs/reference/client-js/agent-controller.md +14 -4
- package/.docs/reference/client-js/agents.md +21 -1
- package/.docs/reference/client-js/mastra-client.md +1 -1
- package/.docs/reference/client-js/observability.md +29 -4
- package/.docs/reference/coding-agent/build-base-prompt.md +1 -1
- package/.docs/reference/coding-agent/create-coding-agent.md +8 -8
- package/.docs/reference/configuration.md +33 -3
- package/.docs/reference/connect/tools.md +2 -2
- package/.docs/reference/core/getAgentById.md +1 -1
- package/.docs/reference/core/mastra-class.md +2 -2
- package/.docs/reference/core/mastra-model-gateway.md +34 -5
- package/.docs/reference/datasets/delete.md +6 -0
- package/.docs/reference/editor/mastra-editor.md +11 -9
- package/.docs/reference/editor/tool-provider.md +2 -2
- package/.docs/reference/evals/answer-relevancy.md +1 -1
- package/.docs/reference/evals/answer-similarity.md +1 -1
- package/.docs/reference/evals/bias.md +1 -1
- package/.docs/reference/evals/checks.md +1 -1
- package/.docs/reference/evals/context-precision.md +3 -3
- package/.docs/reference/evals/context-recall.md +3 -3
- package/.docs/reference/evals/context-relevance.md +11 -11
- package/.docs/reference/evals/create-classifier-scorer.md +6 -2
- package/.docs/reference/evals/faithfulness.md +1 -1
- package/.docs/reference/evals/hallucination.md +5 -5
- package/.docs/reference/evals/multi-turn-judge.md +2 -2
- package/.docs/reference/evals/noise-sensitivity.md +12 -12
- package/.docs/reference/evals/not-scorable.md +1 -1
- package/.docs/reference/evals/prompt-alignment.md +16 -16
- package/.docs/reference/evals/rubric.md +5 -5
- package/.docs/reference/evals/summarization.md +4 -4
- package/.docs/reference/evals/tool-call-accuracy.md +4 -4
- package/.docs/reference/evals/toxicity.md +1 -1
- package/.docs/reference/file-based-agents/config.md +3 -3
- package/.docs/reference/file-based-agents/instructions.md +1 -1
- package/.docs/reference/file-based-agents/processors.md +2 -0
- package/.docs/reference/file-based-agents/schedules.md +2 -2
- package/.docs/reference/file-based-agents/skills.md +1 -1
- package/.docs/reference/file-based-agents/subagents.md +5 -5
- package/.docs/reference/file-based-agents/workspace.md +1 -1
- package/.docs/reference/index.md +2 -0
- package/.docs/reference/manual-install.md +3 -2
- package/.docs/reference/memory/cloneThread.md +1 -1
- package/.docs/reference/memory/copyThread.md +1 -1
- package/.docs/reference/memory/deleteMessages.md +4 -1
- package/.docs/reference/memory/memory-class.md +5 -3
- package/.docs/reference/memory/observational-memory.md +16 -16
- package/.docs/reference/memory/serialized-memory-config.md +1 -1
- package/.docs/reference/memory/summarizeConversation.md +3 -3
- package/.docs/reference/memory/summarizeThread.md +3 -3
- package/.docs/reference/migrations/agentnetwork.md +4 -4
- package/.docs/reference/migrations/mcp-v2.md +1 -1
- package/.docs/reference/migrations/upgrade-to-v1/agent.md +1 -1
- package/.docs/reference/migrations/vnext-to-standard-apis.md +2 -2
- package/.docs/reference/observability/tracing/advanced-queries.md +131 -41
- package/.docs/reference/observability/tracing/exporters/langfuse.md +1 -1
- package/.docs/reference/observability/tracing/interfaces.md +2 -0
- package/.docs/reference/processors/batch-parts-processor.md +1 -1
- package/.docs/reference/processors/classifier-processor.md +2 -2
- package/.docs/reference/processors/cyber-refusal-handler.md +1 -1
- package/.docs/reference/processors/file-upload-processor.md +1 -1
- package/.docs/reference/processors/language-detector.md +1 -1
- package/.docs/reference/processors/message-history-processor.md +2 -2
- package/.docs/reference/processors/model-selection-processor.md +7 -7
- package/.docs/reference/processors/moderation-processor.md +2 -2
- package/.docs/reference/processors/pii-detector.md +2 -2
- package/.docs/reference/processors/prefill-error-handler.md +2 -2
- package/.docs/reference/processors/processor-interface.md +76 -12
- package/.docs/reference/processors/prompt-injection-detector.md +1 -1
- 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 +1 -1
- package/.docs/reference/processors/semantic-recall-processor.md +2 -2
- package/.docs/reference/processors/skill-search-processor.md +1 -1
- package/.docs/reference/processors/stream-error-retry-processor.md +3 -3
- package/.docs/reference/processors/system-prompt-scrubber.md +1 -1
- package/.docs/reference/processors/token-cost-control.md +1 -1
- package/.docs/reference/processors/token-limiter-processor.md +3 -3
- package/.docs/reference/processors/tool-call-filter.md +2 -2
- package/.docs/reference/processors/tool-search-processor.md +3 -3
- package/.docs/reference/processors/unicode-normalizer.md +1 -1
- package/.docs/reference/processors/working-memory-processor.md +2 -2
- package/.docs/reference/pubsub/lease-provider.md +2 -2
- package/.docs/reference/pubsub/redis-streams.md +1 -1
- package/.docs/reference/rag/chunking-and-embedding.md +1 -1
- package/.docs/reference/rag/graph-rag-guide.md +2 -2
- package/.docs/reference/rag/metadata-filters.md +1 -1
- package/.docs/reference/rag/rerank.md +1 -1
- package/.docs/reference/rag/retrieval.md +13 -13
- package/.docs/reference/server/nestjs-adapter.md +1 -1
- package/.docs/reference/server/routes.md +159 -0
- package/.docs/reference/signals/create-notification-inbox-tool.md +4 -4
- package/.docs/reference/signals/notifications.md +249 -0
- package/.docs/reference/signals/signal-provider.md +2 -0
- package/.docs/reference/signals/task-signal-provider.md +3 -3
- package/.docs/reference/signals/thread-events.md +69 -0
- package/.docs/reference/streaming/ChunkType.md +68 -0
- package/.docs/reference/streaming/agents/stream.md +3 -3
- package/.docs/reference/tools/create-code-mode.md +1 -1
- package/.docs/reference/tools/create-tool.md +17 -0
- package/.docs/reference/tools/mcp-client.md +430 -3
- package/.docs/reference/tools/mcp-server.md +173 -1
- package/.docs/reference/tools/task-tools.md +1 -1
- package/.docs/reference/tools/vector-query-tool.md +1 -1
- package/.docs/reference/vectors/libsql.md +1 -1
- package/.docs/reference/vectors/mongodb.md +2 -2
- package/.docs/reference/vectors/oracledb.md +2 -2
- package/.docs/reference/vectors/pg.md +1 -1
- package/.docs/reference/vectors/upstash.md +1 -1
- package/.docs/reference/voice/overview.md +24 -24
- package/.docs/reference/voice/speech-to-speech.md +6 -6
- package/.docs/reference/voice/speech-to-text.md +1 -1
- package/.docs/reference/voice/text-to-speech.md +1 -1
- package/.docs/reference/voice/voice.addInstructions.md +1 -1
- package/.docs/reference/workflows/workflow-methods/branch.md +1 -1
- package/.docs/reference/workspace/filesystem.md +17 -17
- package/.docs/reference/workspace/local-filesystem.md +52 -27
- package/.docs/reference/workspace/local-sandbox.md +1 -1
- package/.docs/reference/workspace/platform-filesystem.md +1 -1
- package/.docs/reference/workspace/platform-sandbox.md +23 -2
- package/.docs/reference/workspace/process-manager.md +13 -2
- package/.docs/reference/workspace/sandbox.md +16 -0
- package/.docs/reference/workspace/workspace-class.md +13 -12
- package/dist/index.js +1 -2
- package/dist/{src-Baf8l9Sp.js → src-DnH_jHt9.js} +2 -3
- package/dist/{src-Baf8l9Sp.js.map → src-DnH_jHt9.js.map} +1 -1
- package/dist/stdio.js +1 -1
- package/package.json +9 -9
- package/.docs/docs/harness/signal-providers.md +0 -212
- package/.docs/docs/harness/signals.md +0 -546
|
@@ -28,7 +28,7 @@ const myAgent = new Agent({
|
|
|
28
28
|
name: 'MyExampleAgent',
|
|
29
29
|
description: 'A generalist to help with basic questions.',
|
|
30
30
|
instructions: 'You are a helpful assistant.',
|
|
31
|
-
model: 'openai/gpt-
|
|
31
|
+
model: 'openai/gpt-6.1-sol',
|
|
32
32
|
})
|
|
33
33
|
|
|
34
34
|
const weatherTool = createTool({
|
|
@@ -93,6 +93,8 @@ The constructor accepts an `MCPServerConfig` object with the following propertie
|
|
|
93
93
|
|
|
94
94
|
**cacheHints** (`MCPServerCacheHints`): Cache hints (ttlMs / cacheScope) advertised on cacheable results, keyed by operation: 'tools/list', 'prompts/list', 'resources/list', 'resources/templates/list', 'resources/read' and 'server/discover'.
|
|
95
95
|
|
|
96
|
+
**legacy** (`'reject' | 'stateless'`): How HTTP requests from 2025-era clients (those that open with initialize, such as VS Code and Cursor) are served. 'reject' (default) answers them with an unsupported-protocol-version error. 'stateless' answers each request without a session: listing and calling tools, reading resources and getting prompts work, GET and DELETE session requests get 405, and features that need 2026-07-28 (suspend/resume, subscriptions/listen, events) aren't available to these clients.
|
|
97
|
+
|
|
96
98
|
**jsonSchemaValidator** (`jsonSchemaValidator`): Custom JSON Schema validator used for tool input, output and continuation answers, for runtimes where the SDK default is unavailable.
|
|
97
99
|
|
|
98
100
|
**repository** (`Repository`): Optional repository information for the server's source code.
|
|
@@ -1414,6 +1416,176 @@ const server = new MCPServer({
|
|
|
1414
1416
|
|
|
1415
1417
|
Link a tool to its app resource by setting `mcp._meta.ui.resourceUri` in `createTool()` to the matching `ui://` URI. The server normalizes this metadata for older hosts when listing tools, and returns the same link on successful tool call results. Visit [MCP Apps](https://mastra.ai/docs/connections/mcp) for the full app bridge API and usage patterns.
|
|
1416
1418
|
|
|
1419
|
+
## Events (experimental)
|
|
1420
|
+
|
|
1421
|
+
> **Warning:** Events implement [SEP-3415](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/3415), a draft MCP extension. The wire format and this API may change in any release.
|
|
1422
|
+
|
|
1423
|
+
For an end-to-end walkthrough, see [MCP events](https://mastra.ai/docs/connections/mcp).
|
|
1424
|
+
|
|
1425
|
+
The `events` option lets clients subscribe to things that happen on your server, such as a ticket being created or a build finishing. The server advertises the `io.modelcontextprotocol/events` extension and answers `events/list`, `events/poll` and `events/stream` over both stdio and Streamable HTTP. With [`eventsOptions.webhook`](#webhook-delivery) set, it also answers `events/subscribe` and `events/unsubscribe` and POSTs occurrences to client webhook URLs.
|
|
1426
|
+
|
|
1427
|
+
Declare each event type with `defineEvent()` and publish occurrences with `server.events.emit()`:
|
|
1428
|
+
|
|
1429
|
+
```typescript
|
|
1430
|
+
import { MCPServer, defineEvent } from '@mastra/mcp'
|
|
1431
|
+
import { z } from 'zod'
|
|
1432
|
+
|
|
1433
|
+
const server = new MCPServer({
|
|
1434
|
+
id: 'tickets',
|
|
1435
|
+
name: 'Tickets',
|
|
1436
|
+
version: '1.0.0',
|
|
1437
|
+
tools: {},
|
|
1438
|
+
events: {
|
|
1439
|
+
'ticket.created': defineEvent({
|
|
1440
|
+
description: 'A ticket was created',
|
|
1441
|
+
inputSchema: z.object({ project: z.string().optional() }),
|
|
1442
|
+
payloadSchema: z.object({ id: z.string(), project: z.string() }),
|
|
1443
|
+
match: (args, data) => !args.project || data.project === args.project,
|
|
1444
|
+
}),
|
|
1445
|
+
},
|
|
1446
|
+
})
|
|
1447
|
+
|
|
1448
|
+
await server.events.emit('ticket.created', { id: 't-1', project: 'web' })
|
|
1449
|
+
```
|
|
1450
|
+
|
|
1451
|
+
A client that subscribed with `{ project: 'web' }` receives this occurrence. A client that subscribed with `{ project: 'api' }` doesn't.
|
|
1452
|
+
|
|
1453
|
+
`match` filters on the arguments the client chooses, so it doesn't control who can subscribe. To restrict callers, add `authorize`. It receives the validated arguments and the caller's `requestContext`, which includes `user` when you set `mapAuthInfoToUser`:
|
|
1454
|
+
|
|
1455
|
+
```typescript
|
|
1456
|
+
const ticketCreated = defineEvent({
|
|
1457
|
+
inputSchema: z.object({ project: z.string() }),
|
|
1458
|
+
payloadSchema: z.object({ id: z.string(), project: z.string() }),
|
|
1459
|
+
match: (args, data) => data.project === args.project,
|
|
1460
|
+
authorize: ({ arguments: args, requestContext }) => {
|
|
1461
|
+
const user = requestContext.get('user') as { projects: string[] } | undefined
|
|
1462
|
+
return user?.projects.includes(args.project) ?? false
|
|
1463
|
+
},
|
|
1464
|
+
})
|
|
1465
|
+
```
|
|
1466
|
+
|
|
1467
|
+
`authorize` runs on every `events/poll`, every `events/stream` open, and every webhook `events/subscribe`, including refreshes. An open stream isn't checked again until it reconnects, and a webhook subscription until its next refresh. A caller who loses access keeps receiving occurrences until then. FGA isn't applied to events; use `authorize` to restrict them.
|
|
1468
|
+
|
|
1469
|
+
### `defineEvent()` options
|
|
1470
|
+
|
|
1471
|
+
**description** (`string`): Description returned by events/list.
|
|
1472
|
+
|
|
1473
|
+
**inputSchema** (`StandardSchemaWithJSON`): Schema for the subscription arguments. Advertised as JSON Schema. Arguments that fail validation are rejected with error -32602, and match and poll receive the parsed value.
|
|
1474
|
+
|
|
1475
|
+
**payloadSchema** (`StandardSchemaWithJSON`): Schema for the event data. Advertised as JSON Schema and enforced by server.events.emit().
|
|
1476
|
+
|
|
1477
|
+
**match** (`(args, data) => boolean`): Decides whether an emitted event reaches a subscription with these arguments. Applies to push streams and to polls served from the buffer. Defaults to delivering every event.
|
|
1478
|
+
|
|
1479
|
+
**authorize** (`(context) => boolean | Promise<boolean>`): Decides whether the caller may receive this type with these arguments. Receives arguments, requestContext and delivery ('poll', 'push' or 'webhook'). Runs on every events/poll, before a poll source is called, on every events/stream open, and on every webhook events/subscribe, including refreshes. Returning false rejects the request with -32024. A refresh that is denied also removes the webhook subscription. If it throws, the client gets a generic -32603 error and the details are logged on the server. Defaults to allowing every caller.
|
|
1480
|
+
|
|
1481
|
+
**poll** (`(context) => Promise<MCPServerEventPollResult>`): Pull source for events/poll. Receives arguments, cursor (null means start from now), maxEvents, maxAgeMs, requestContext and signal. Returns { events, cursor, hasMore?, nextPollMs?, truncated? }. Each event needs data and a stable eventId (clients dedupe by it, so return the same id whenever the same occurrence is polled); when cursor is null, resolve the starting position once, and return the id of the last occurrence, or that starting position when the result is empty; a missing timestamp defaults to now. If poll or match throws, the client gets a generic -32603 error and the details are logged on the server.
|
|
1482
|
+
|
|
1483
|
+
**delivery** (`Array<'poll' | 'push' | 'webhook'>`): Restricts the advertised delivery modes to this list. It only narrows the modes from the table below, and a definition left with no mode throws when the server is constructed.
|
|
1484
|
+
|
|
1485
|
+
**bufferSize** (`number`): Number of emitted events kept in memory for replay and buffered polls. (Default: `1000`)
|
|
1486
|
+
|
|
1487
|
+
**pollIntervalMs** (`number`): nextPollMs suggested to clients that poll the buffer.
|
|
1488
|
+
|
|
1489
|
+
### Delivery modes
|
|
1490
|
+
|
|
1491
|
+
How a type is served depends on where its events come from:
|
|
1492
|
+
|
|
1493
|
+
| Definition | Advertised `delivery` | Source |
|
|
1494
|
+
| ---------- | ------------------------------------------------------------------------ | -------------------------------------------------------- |
|
|
1495
|
+
| No `poll` | `['push', 'poll']`, plus `'webhook'` when `eventsOptions.webhook` is set | `server.events.emit()`. Polls read the in-memory buffer. |
|
|
1496
|
+
| `poll` | `['poll']` | Your `poll` function, called for each `events/poll`. |
|
|
1497
|
+
|
|
1498
|
+
A type with a `poll` source can't also be pushed: `delivery` can't add `'push'` to it, and `server.events.emit()` throws for it. The advertised modes never change after the server starts, because clients only learn them from `events/list`. To push events, define a type without `poll` and emit to it.
|
|
1499
|
+
|
|
1500
|
+
A request for a mode the type doesn't advertise fails with `-32026`. An unknown event name fails with `-32023`.
|
|
1501
|
+
|
|
1502
|
+
### Push streams
|
|
1503
|
+
|
|
1504
|
+
Each `events/stream` request is one subscription. The server sends `notifications/events/active` first, then one `notifications/events/event` per matching occurrence. Every notification carries the request id as `_meta["io.modelcontextprotocol/subscriptionId"]`. When the request includes a `cursor`, buffered events after it are replayed before live ones. If that cursor is older than the buffer, `active` reports `truncated: true`.
|
|
1505
|
+
|
|
1506
|
+
When no other message has been sent for `heartbeatIntervalMs`, the stream sends `notifications/events/heartbeat` with the current cursor. Cancelling the request, or calling `server.close()`, ends the stream and releases its listener and timer.
|
|
1507
|
+
|
|
1508
|
+
### `eventsOptions`
|
|
1509
|
+
|
|
1510
|
+
**heartbeatIntervalMs** (`number`): Longest gap between messages on a push stream. (Default: `30000`)
|
|
1511
|
+
|
|
1512
|
+
**listPageSize** (`number`): Number of event types per events/list page. (Default: `100`)
|
|
1513
|
+
|
|
1514
|
+
**maxStreams** (`number`): Most push streams open at once across all clients. Further events/stream requests are rejected with -32025 until one closes. A Mastra client retries the rejection when reconnecting an established subscription; a new subscribe() call rejects with it. (Default: `1024`)
|
|
1515
|
+
|
|
1516
|
+
**webhook** (`MCPServerWebhookOptions`): Enables webhook delivery for event types without a poll source. Without it, the server doesn't advertise webhook or answer events/subscribe.
|
|
1517
|
+
|
|
1518
|
+
### Webhook delivery
|
|
1519
|
+
|
|
1520
|
+
With `eventsOptions.webhook` set, a client can register a callback URL with `events/subscribe`, and the server POSTs each matching occurrence to it, signed with the client's secret using [Standard Webhooks](https://www.standardwebhooks.com/) HMAC-SHA256.
|
|
1521
|
+
|
|
1522
|
+
```typescript
|
|
1523
|
+
const server = new MCPServer({
|
|
1524
|
+
id: 'tickets',
|
|
1525
|
+
name: 'Tickets',
|
|
1526
|
+
version: '1.0.0',
|
|
1527
|
+
tools: {},
|
|
1528
|
+
events: {
|
|
1529
|
+
'ticket.created': defineEvent({ payloadSchema: z.object({ id: z.string() }) }),
|
|
1530
|
+
},
|
|
1531
|
+
eventsOptions: {
|
|
1532
|
+
webhook: { ttl: { defaultMs: 30 * 60_000 } },
|
|
1533
|
+
},
|
|
1534
|
+
})
|
|
1535
|
+
```
|
|
1536
|
+
|
|
1537
|
+
The server enforces these rules:
|
|
1538
|
+
|
|
1539
|
+
- **Authentication:** Webhook subscriptions need an authenticated caller. Without `authInfo` on the request, `events/subscribe` fails with `-32024`. A subscription is identified by the caller, the URL, the event name, and the arguments, so repeating `events/subscribe` refreshes the same subscription and returns the same `id`.
|
|
1540
|
+
- **Authorization:** `authorize` runs on each subscribe and each refresh. When it denies a refresh, the subscription is removed and no further occurrences are POSTed. A Mastra client can't tell this `-32024` from the one for an unauthenticated caller, so in its default delivery mode it reports `MCP_EVENTS_WEBHOOK_UNAVAILABLE`, tries push, and then rejects with the same `-32024`.
|
|
1541
|
+
- **Callback URLs:** The URL must use `https`. Every address it resolves to must be publicly routable: loopback, private, link-local, and other special-purpose ranges are rejected with `-32602` and `data.reason`. The check runs again before every delivery, and the request connects to the address that passed, to prevent DNS rebinding. Redirects are never followed.
|
|
1542
|
+
- **Verification:** Before the first delivery to a URL, the server POSTs a signed verification challenge, and the endpoint must echo it. A failed or unreachable endpoint fails `events/subscribe` with `-32027` and a `data.reason` such as `challenge_failed` or `timeout`. The result is cached per caller and URL. URLs accepted by `allowedUrls` skip this step.
|
|
1543
|
+
- **Lifetime:** Each subscription expires at the returned `refreshBefore` time unless the client refreshes it. A requested `ttlMs` is clamped to the `ttl` bounds.
|
|
1544
|
+
- **Retries:** Each occurrence is retried with exponential backoff until it's acknowledged with a `2xx`, `retry.maxAttempts` is reached, or `retry.maxWindowMs` has passed. A `410` or `413` response stops retries for that occurrence. The `cursor` in each body only advances past occurrences that are acknowledged or given up on.
|
|
1545
|
+
- **Suspension:** When most deliveries to a subscription fail over `suspend.windowMs`, the server pauses it and reports `active: false` in `deliveryStatus` on the next refresh. The refresh resumes delivery.
|
|
1546
|
+
- **Errors:** Clients only see a failure category such as `timeout` or `http_5xx`, never the endpoint's response body or headers.
|
|
1547
|
+
|
|
1548
|
+
**ttl** (`{ defaultMs?: number; minMs?: number; maxMs?: number }`): Subscription lifetime granted when the client omits ttlMs, and the bounds a requested ttlMs is clamped to. Defaults to 30 minutes, 60 seconds, and 24 hours.
|
|
1549
|
+
|
|
1550
|
+
**allowNoExpiry** (`boolean`): Grants ttlMs: null requests a subscription that never expires. Otherwise they get ttl.maxMs. Only enable it with a durable store, because clients with no-expiry subscriptions don't need to refresh after a server restart. (Default: `false`)
|
|
1551
|
+
|
|
1552
|
+
**store** (`WebhookSubscriptionStore`): Stores subscription records (identity, secret, expiry) with async get, set, delete, and list methods. The default keeps them in memory, so subscriptions are lost on restart until clients refresh. (Default: `InMemoryWebhookSubscriptionStore`)
|
|
1553
|
+
|
|
1554
|
+
**url** (`{ allowPrivate?: boolean; allowInsecure?: boolean; lookup?: WebhookLookup }`): Callback URL policy. allowPrivate accepts non-public addresses and allowInsecure accepts http. Use them for local development only. lookup replaces DNS resolution.
|
|
1555
|
+
|
|
1556
|
+
**allowedUrls** (`(url: URL) => boolean`): Returns true for URLs you trust, which then skip the verification challenge.
|
|
1557
|
+
|
|
1558
|
+
**verificationTtlMs** (`number`): How long a successful verification is remembered for a caller and URL. (Default: `86400000`)
|
|
1559
|
+
|
|
1560
|
+
**timeoutMs** (`number`): Timeout for each delivery attempt. (Default: `5000`)
|
|
1561
|
+
|
|
1562
|
+
**retry** (`{ maxAttempts?: number; initialDelayMs?: number; maxDelayMs?: number; maxWindowMs?: number }`): Retry policy for each occurrence. Defaults to 5 attempts, a 1 second initial delay, a 5 minute maximum delay, and a 15 minute window. Time spent suspended doesn't count against the window.
|
|
1563
|
+
|
|
1564
|
+
**suspend** (`{ windowMs?: number; minAttempts?: number; failureRate?: number }`): Suspends a subscription when at least failureRate of at least minAttempts attempts fail within windowMs. Defaults to 0.95, 100, and 60 minutes.
|
|
1565
|
+
|
|
1566
|
+
**maxPending** (`number`): Undelivered occurrences kept per subscription. On overflow the oldest are dropped and the client receives a gap body, so it reports truncated: true. (Default: `1000`)
|
|
1567
|
+
|
|
1568
|
+
**maxSubscriptions** (`number`): Most webhook subscriptions this process keeps across all callers. New subscriptions past the limit are rejected with -32025, and a Mastra client falls back to push or poll unless it forced webhook delivery. Refreshing an existing subscription still works. (Default: `1000`)
|
|
1569
|
+
|
|
1570
|
+
**maxSubscriptionsPerPrincipal** (`number`): Most webhook subscriptions one authenticated caller can hold. (Default: `100`)
|
|
1571
|
+
|
|
1572
|
+
**secretGraceMs** (`number`): After a client rotates its secret, deliveries are signed with both secrets for this long. (Default: `300000`)
|
|
1573
|
+
|
|
1574
|
+
**transport** (`WebhookTransport`): Replaces the HTTP client that sends deliveries, for example in tests.
|
|
1575
|
+
|
|
1576
|
+
### `server.events.emit(name, data, options?)`
|
|
1577
|
+
|
|
1578
|
+
Records an occurrence, delivers it to matching push streams and webhook subscriptions, and returns it with its `eventId`, `timestamp` and `cursor`. `options.eventId` and `options.timestamp` override the defaults (a random UUID and the current time). It throws when `name` isn't configured, when `data` fails `payloadSchema`, or when the type has a `poll` source.
|
|
1579
|
+
|
|
1580
|
+
`server.events.list()` returns the descriptors `events/list` serves.
|
|
1581
|
+
|
|
1582
|
+
### Limits
|
|
1583
|
+
|
|
1584
|
+
- Emitted events stay in the process that emitted them. Push streams, webhook subscriptions, and buffered polls only see events emitted by the same `MCPServer` instance, so a serverless or multi-instance deployment needs a `poll` source backed by shared storage.
|
|
1585
|
+
- The buffer is in memory. A restarted server treats earlier cursors as a gap and reports `truncated: true`.
|
|
1586
|
+
- Webhook delivery state (pending retries, suspension, verification results) is in memory and rebuilt when clients refresh.
|
|
1587
|
+
- Changes to the list of event types aren't announced yet. The server doesn't advertise `listChanged` or send `notifications/events/list_changed`, because the MCP TypeScript SDK 2.2.0 doesn't carry the `eventsListChanged` filter on `subscriptions/listen`. Clients should re-run `events/list` to see changed event types.
|
|
1588
|
+
|
|
1417
1589
|
## Related information
|
|
1418
1590
|
|
|
1419
1591
|
- For connecting to MCP servers in Mastra, see the [MCPClient documentation](https://mastra.ai/reference/tools/mcp-client).
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Task tools
|
|
6
6
|
|
|
7
|
-
Four built-in, agent-agnostic tools that manage a structured task list for an agent run. The task list is persisted in the thread-scoped `threadState` storage domain and projected onto the agent [state-signal](https://mastra.ai/docs/
|
|
7
|
+
Four built-in, agent-agnostic tools that manage a structured task list for an agent run. The task list is persisted in the thread-scoped `threadState` storage domain and projected onto the agent [state-signal](https://mastra.ai/docs/signals/state-signals) lane so it survives [observational-memory](https://mastra.ai/docs/memory/observational-memory) truncation.
|
|
8
8
|
|
|
9
9
|
Task tracking requires a memory-backed thread (`threadId` + `resourceId`). Without memory the tools return an error explaining that task tracking requires agent memory.
|
|
10
10
|
|
|
@@ -148,7 +148,7 @@ const queryTool = createVectorQueryTool({
|
|
|
148
148
|
indexName: 'documentation',
|
|
149
149
|
model: new ModelRouterEmbeddingModel('openai/text-embedding-3-small'),
|
|
150
150
|
reranker: {
|
|
151
|
-
model: 'openai/gpt-
|
|
151
|
+
model: 'openai/gpt-6.1-sol',
|
|
152
152
|
options: {
|
|
153
153
|
weights: {
|
|
154
154
|
semantic: 0.5, // Semantic relevance weight
|
|
@@ -281,7 +281,7 @@ export const libsqlAgent = new Agent({
|
|
|
281
281
|
name: 'libSQL Agent',
|
|
282
282
|
instructions:
|
|
283
283
|
'You are an AI agent with the ability to automatically recall memories from previous interactions.',
|
|
284
|
-
model: 'openai/gpt-
|
|
284
|
+
model: 'openai/gpt-6.1-sol',
|
|
285
285
|
memory: new Memory({
|
|
286
286
|
storage: new LibSQLStore({
|
|
287
287
|
id: 'libsql-agent-storage',
|
|
@@ -558,7 +558,7 @@ export const mongodbAgent = new Agent({
|
|
|
558
558
|
name: 'mongodb-agent',
|
|
559
559
|
instructions:
|
|
560
560
|
'You are an AI agent with the ability to automatically recall memories from previous interactions.',
|
|
561
|
-
model: 'openai/gpt-
|
|
561
|
+
model: 'openai/gpt-6.1-sol',
|
|
562
562
|
memory: new Memory({
|
|
563
563
|
storage: new MongoDBStore({
|
|
564
564
|
id: 'mongodb-storage',
|
|
@@ -623,7 +623,7 @@ export const mongodbVoyageAgent = new Agent({
|
|
|
623
623
|
id: 'mongodb-voyage-agent',
|
|
624
624
|
name: 'MongoDB VoyageAI Agent',
|
|
625
625
|
instructions: 'You are an AI agent with semantic recall powered by VoyageAI and MongoDB.',
|
|
626
|
-
model: 'openai/gpt-
|
|
626
|
+
model: 'openai/gpt-6.1-sol',
|
|
627
627
|
memory: new Memory({
|
|
628
628
|
storage: new MongoDBStore({
|
|
629
629
|
id: 'mongodb-storage',
|
|
@@ -283,7 +283,7 @@ const vectorQueryTool = createVectorQueryTool({
|
|
|
283
283
|
export const ragAgent = new Agent({
|
|
284
284
|
id: 'oracle-rag-agent',
|
|
285
285
|
name: 'Oracle RAG Agent',
|
|
286
|
-
model: 'openai/gpt-
|
|
286
|
+
model: 'openai/gpt-6.1-sol',
|
|
287
287
|
instructions: `
|
|
288
288
|
Use the retrieval tool when you need source context.
|
|
289
289
|
Available metadata fields: resource_id, thread_id, source, category, tags.
|
|
@@ -330,7 +330,7 @@ export const oracleAgent = new Agent({
|
|
|
330
330
|
id: 'oracle-agent',
|
|
331
331
|
name: 'Oracle Agent',
|
|
332
332
|
instructions: 'You are an assistant with OracleDB-backed memory and semantic recall.',
|
|
333
|
-
model: 'openai/gpt-
|
|
333
|
+
model: 'openai/gpt-6.1-sol',
|
|
334
334
|
memory: new Memory({
|
|
335
335
|
storage,
|
|
336
336
|
vector,
|
|
@@ -412,7 +412,7 @@ export const pgAgent = new Agent({
|
|
|
412
412
|
name: 'PG Agent',
|
|
413
413
|
instructions:
|
|
414
414
|
'You are an AI agent with the ability to automatically recall memories from previous interactions.',
|
|
415
|
-
model: 'openai/gpt-
|
|
415
|
+
model: 'openai/gpt-6.1-sol',
|
|
416
416
|
memory: new Memory({
|
|
417
417
|
storage: new PostgresStore({
|
|
418
418
|
id: 'pg-agent-storage',
|
|
@@ -275,7 +275,7 @@ export const upstashAgent = new Agent({
|
|
|
275
275
|
name: 'Upstash Agent',
|
|
276
276
|
instructions:
|
|
277
277
|
'You are an AI agent with the ability to automatically recall memories from previous interactions.',
|
|
278
|
-
model: 'openai/gpt-
|
|
278
|
+
model: 'openai/gpt-6.1-sol',
|
|
279
279
|
memory: new Memory({
|
|
280
280
|
storage: new UpstashStore({
|
|
281
281
|
id: 'upstash-agent-storage',
|
|
@@ -20,7 +20,7 @@ const voiceAgent = new Agent({
|
|
|
20
20
|
id: 'voice-agent',
|
|
21
21
|
name: 'Voice Agent',
|
|
22
22
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
23
|
-
model: 'openai/gpt-
|
|
23
|
+
model: 'openai/gpt-6.1-sol',
|
|
24
24
|
voice: new OpenAIVoice(),
|
|
25
25
|
})
|
|
26
26
|
```
|
|
@@ -44,7 +44,7 @@ const voiceAgent = new Agent({
|
|
|
44
44
|
id: 'voice-agent',
|
|
45
45
|
name: 'Voice Agent',
|
|
46
46
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
47
|
-
model: 'openai/gpt-
|
|
47
|
+
model: 'openai/gpt-6.1-sol',
|
|
48
48
|
voice: new OpenAIVoice(),
|
|
49
49
|
})
|
|
50
50
|
|
|
@@ -72,7 +72,7 @@ const voiceAgent = new Agent({
|
|
|
72
72
|
id: 'voice-agent',
|
|
73
73
|
name: 'Voice Agent',
|
|
74
74
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
75
|
-
model: 'openai/gpt-
|
|
75
|
+
model: 'openai/gpt-6.1-sol',
|
|
76
76
|
voice: new AzureVoice(),
|
|
77
77
|
})
|
|
78
78
|
|
|
@@ -99,7 +99,7 @@ const voiceAgent = new Agent({
|
|
|
99
99
|
id: 'voice-agent',
|
|
100
100
|
name: 'Voice Agent',
|
|
101
101
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
102
|
-
model: 'openai/gpt-
|
|
102
|
+
model: 'openai/gpt-6.1-sol',
|
|
103
103
|
voice: new ElevenLabsVoice(),
|
|
104
104
|
})
|
|
105
105
|
|
|
@@ -126,7 +126,7 @@ const voiceAgent = new Agent({
|
|
|
126
126
|
id: 'voice-agent',
|
|
127
127
|
name: 'Voice Agent',
|
|
128
128
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
129
|
-
model: 'openai/gpt-
|
|
129
|
+
model: 'openai/gpt-6.1-sol',
|
|
130
130
|
voice: new GoogleVoice(),
|
|
131
131
|
})
|
|
132
132
|
|
|
@@ -153,7 +153,7 @@ const voiceAgent = new Agent({
|
|
|
153
153
|
id: 'voice-agent',
|
|
154
154
|
name: 'Voice Agent',
|
|
155
155
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
156
|
-
model: 'openai/gpt-
|
|
156
|
+
model: 'openai/gpt-6.1-sol',
|
|
157
157
|
voice: new CloudflareVoice(),
|
|
158
158
|
})
|
|
159
159
|
|
|
@@ -180,7 +180,7 @@ const voiceAgent = new Agent({
|
|
|
180
180
|
id: 'voice-agent',
|
|
181
181
|
name: 'Voice Agent',
|
|
182
182
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
183
|
-
model: 'openai/gpt-
|
|
183
|
+
model: 'openai/gpt-6.1-sol',
|
|
184
184
|
voice: new DeepgramVoice(),
|
|
185
185
|
})
|
|
186
186
|
|
|
@@ -207,7 +207,7 @@ const voiceAgent = new Agent({
|
|
|
207
207
|
id: 'voice-agent',
|
|
208
208
|
name: 'Voice Agent',
|
|
209
209
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
210
|
-
model: 'openai/gpt-
|
|
210
|
+
model: 'openai/gpt-6.1-sol',
|
|
211
211
|
voice: new InworldVoice(),
|
|
212
212
|
})
|
|
213
213
|
|
|
@@ -234,7 +234,7 @@ const voiceAgent = new Agent({
|
|
|
234
234
|
id: 'voice-agent',
|
|
235
235
|
name: 'Voice Agent',
|
|
236
236
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
237
|
-
model: 'openai/gpt-
|
|
237
|
+
model: 'openai/gpt-6.1-sol',
|
|
238
238
|
voice: new SpeechifyVoice(),
|
|
239
239
|
})
|
|
240
240
|
|
|
@@ -261,7 +261,7 @@ const voiceAgent = new Agent({
|
|
|
261
261
|
id: 'voice-agent',
|
|
262
262
|
name: 'Voice Agent',
|
|
263
263
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
264
|
-
model: 'openai/gpt-
|
|
264
|
+
model: 'openai/gpt-6.1-sol',
|
|
265
265
|
voice: new SarvamVoice(),
|
|
266
266
|
})
|
|
267
267
|
|
|
@@ -288,7 +288,7 @@ const voiceAgent = new Agent({
|
|
|
288
288
|
id: 'voice-agent',
|
|
289
289
|
name: 'Voice Agent',
|
|
290
290
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
291
|
-
model: 'openai/gpt-
|
|
291
|
+
model: 'openai/gpt-6.1-sol',
|
|
292
292
|
voice: new MurfVoice(),
|
|
293
293
|
})
|
|
294
294
|
|
|
@@ -323,7 +323,7 @@ const voiceAgent = new Agent({
|
|
|
323
323
|
id: 'voice-agent',
|
|
324
324
|
name: 'Voice Agent',
|
|
325
325
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
326
|
-
model: 'openai/gpt-
|
|
326
|
+
model: 'openai/gpt-6.1-sol',
|
|
327
327
|
voice: new OpenAIVoice(),
|
|
328
328
|
})
|
|
329
329
|
|
|
@@ -352,7 +352,7 @@ const voiceAgent = new Agent({
|
|
|
352
352
|
id: 'voice-agent',
|
|
353
353
|
name: 'Voice Agent',
|
|
354
354
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
355
|
-
model: 'openai/gpt-
|
|
355
|
+
model: 'openai/gpt-6.1-sol',
|
|
356
356
|
voice: new AzureVoice(),
|
|
357
357
|
})
|
|
358
358
|
|
|
@@ -380,7 +380,7 @@ const voiceAgent = new Agent({
|
|
|
380
380
|
id: 'voice-agent',
|
|
381
381
|
name: 'Voice Agent',
|
|
382
382
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
383
|
-
model: 'openai/gpt-
|
|
383
|
+
model: 'openai/gpt-6.1-sol',
|
|
384
384
|
voice: new ElevenLabsVoice(),
|
|
385
385
|
})
|
|
386
386
|
|
|
@@ -408,7 +408,7 @@ const voiceAgent = new Agent({
|
|
|
408
408
|
id: 'voice-agent',
|
|
409
409
|
name: 'Voice Agent',
|
|
410
410
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
411
|
-
model: 'openai/gpt-
|
|
411
|
+
model: 'openai/gpt-6.1-sol',
|
|
412
412
|
voice: new GoogleVoice(),
|
|
413
413
|
})
|
|
414
414
|
|
|
@@ -436,7 +436,7 @@ const voiceAgent = new Agent({
|
|
|
436
436
|
id: 'voice-agent',
|
|
437
437
|
name: 'Voice Agent',
|
|
438
438
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
439
|
-
model: 'openai/gpt-
|
|
439
|
+
model: 'openai/gpt-6.1-sol',
|
|
440
440
|
voice: new CloudflareVoice(),
|
|
441
441
|
})
|
|
442
442
|
|
|
@@ -464,7 +464,7 @@ const voiceAgent = new Agent({
|
|
|
464
464
|
id: 'voice-agent',
|
|
465
465
|
name: 'Voice Agent',
|
|
466
466
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
467
|
-
model: 'openai/gpt-
|
|
467
|
+
model: 'openai/gpt-6.1-sol',
|
|
468
468
|
voice: new DeepgramVoice(),
|
|
469
469
|
})
|
|
470
470
|
|
|
@@ -492,7 +492,7 @@ const voiceAgent = new Agent({
|
|
|
492
492
|
id: 'voice-agent',
|
|
493
493
|
name: 'Voice Agent',
|
|
494
494
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
495
|
-
model: 'openai/gpt-
|
|
495
|
+
model: 'openai/gpt-6.1-sol',
|
|
496
496
|
voice: new InworldVoice(),
|
|
497
497
|
})
|
|
498
498
|
|
|
@@ -520,7 +520,7 @@ const voiceAgent = new Agent({
|
|
|
520
520
|
id: 'voice-agent',
|
|
521
521
|
name: 'Voice Agent',
|
|
522
522
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
523
|
-
model: 'openai/gpt-
|
|
523
|
+
model: 'openai/gpt-6.1-sol',
|
|
524
524
|
voice: new SarvamVoice(),
|
|
525
525
|
})
|
|
526
526
|
|
|
@@ -552,7 +552,7 @@ const voiceAgent = new Agent({
|
|
|
552
552
|
id: 'voice-agent',
|
|
553
553
|
name: 'Voice Agent',
|
|
554
554
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
555
|
-
model: 'openai/gpt-
|
|
555
|
+
model: 'openai/gpt-6.1-sol',
|
|
556
556
|
voice: new OpenAIRealtimeVoice(),
|
|
557
557
|
})
|
|
558
558
|
|
|
@@ -582,7 +582,7 @@ const voiceAgent = new Agent({
|
|
|
582
582
|
id: 'voice-agent',
|
|
583
583
|
name: 'Voice Agent',
|
|
584
584
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
585
|
-
model: 'openai/gpt-
|
|
585
|
+
model: 'openai/gpt-6.1-sol',
|
|
586
586
|
voice: new GeminiLiveVoice({
|
|
587
587
|
// Live API mode
|
|
588
588
|
apiKey: process.env.GOOGLE_API_KEY,
|
|
@@ -631,7 +631,7 @@ const voiceAgent = new Agent({
|
|
|
631
631
|
id: 'voice-agent',
|
|
632
632
|
name: 'Voice Agent',
|
|
633
633
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
634
|
-
model: 'openai/gpt-
|
|
634
|
+
model: 'openai/gpt-6.1-sol',
|
|
635
635
|
voice: new NovaSonicVoice({
|
|
636
636
|
region: 'us-east-1',
|
|
637
637
|
speaker: 'matthew',
|
|
@@ -674,7 +674,7 @@ const voiceAgent = new Agent({
|
|
|
674
674
|
id: 'voice-agent',
|
|
675
675
|
name: 'Voice Agent',
|
|
676
676
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
677
|
-
model: 'openai/gpt-
|
|
677
|
+
model: 'openai/gpt-6.1-sol',
|
|
678
678
|
voice: new InworldRealtimeVoice({
|
|
679
679
|
apiKey: process.env.INWORLD_API_KEY,
|
|
680
680
|
model: 'inworld/models/gemma-4-26b-a4b-it',
|
|
@@ -1120,7 +1120,7 @@ const voiceAgent = new Agent({
|
|
|
1120
1120
|
id: 'aisdk-voice-agent',
|
|
1121
1121
|
name: 'AI SDK Voice Agent',
|
|
1122
1122
|
instructions: 'You are a helpful assistant with voice capabilities.',
|
|
1123
|
-
model: 'openai/gpt-
|
|
1123
|
+
model: 'openai/gpt-6.1-sol',
|
|
1124
1124
|
voice,
|
|
1125
1125
|
})
|
|
1126
1126
|
```
|
|
@@ -36,7 +36,7 @@ const agent = new Agent({
|
|
|
36
36
|
id: 'agent',
|
|
37
37
|
name: 'OpenAI Realtime Agent',
|
|
38
38
|
instructions: `You are a helpful assistant with real-time voice capabilities.`,
|
|
39
|
-
model: 'openai/gpt-
|
|
39
|
+
model: 'openai/gpt-6.1-sol',
|
|
40
40
|
voice: new OpenAIRealtimeVoice(),
|
|
41
41
|
})
|
|
42
42
|
|
|
@@ -71,7 +71,7 @@ export const agent = new Agent({
|
|
|
71
71
|
id: 'speech-to-speech-agent',
|
|
72
72
|
name: 'Speech-to-Speech Agent',
|
|
73
73
|
instructions: 'You are a helpful assistant with speech-to-speech capabilities.',
|
|
74
|
-
model: 'openai/gpt-
|
|
74
|
+
model: 'openai/gpt-6.1-sol',
|
|
75
75
|
tools: {
|
|
76
76
|
search,
|
|
77
77
|
calculate,
|
|
@@ -115,7 +115,7 @@ export const agent = new Agent({
|
|
|
115
115
|
id: 'support-line',
|
|
116
116
|
name: 'Support Line',
|
|
117
117
|
instructions: ({ requestContext }) => `Help user ${requestContext.get('user')}.`,
|
|
118
|
-
model: 'openai/gpt-
|
|
118
|
+
model: 'openai/gpt-6.1-sol',
|
|
119
119
|
voice: ({ requestContext }) =>
|
|
120
120
|
new OpenAIRealtimeVoice({
|
|
121
121
|
apiKey: requestContext.get('apiKey'),
|
|
@@ -150,7 +150,7 @@ const agent = new Agent({
|
|
|
150
150
|
name: 'Gemini Live Agent',
|
|
151
151
|
instructions: 'You are a helpful assistant with real-time voice capabilities.',
|
|
152
152
|
// Model used for text generation; voice provider handles realtime audio
|
|
153
|
-
model: 'openai/gpt-
|
|
153
|
+
model: 'openai/gpt-6.1-sol',
|
|
154
154
|
voice: new GeminiLiveVoice({
|
|
155
155
|
apiKey: process.env.GOOGLE_API_KEY,
|
|
156
156
|
model: 'gemini-2.0-flash-exp',
|
|
@@ -197,7 +197,7 @@ const agent = new Agent({
|
|
|
197
197
|
name: 'Nova Sonic Agent',
|
|
198
198
|
instructions: 'You are a helpful assistant with real-time voice capabilities.',
|
|
199
199
|
// Model used for text generation; voice provider handles realtime audio
|
|
200
|
-
model: 'openai/gpt-
|
|
200
|
+
model: 'openai/gpt-6.1-sol',
|
|
201
201
|
voice: new NovaSonicVoice({
|
|
202
202
|
region: 'us-east-1',
|
|
203
203
|
speaker: 'matthew',
|
|
@@ -241,7 +241,7 @@ const agent = new Agent({
|
|
|
241
241
|
name: 'Inworld Realtime Agent',
|
|
242
242
|
instructions: 'You are a helpful assistant with real-time voice capabilities.',
|
|
243
243
|
// Model used for text generation; voice provider handles realtime audio
|
|
244
|
-
model: 'openai/gpt-
|
|
244
|
+
model: 'openai/gpt-6.1-sol',
|
|
245
245
|
voice: new InworldRealtimeVoice({
|
|
246
246
|
apiKey: process.env.INWORLD_API_KEY,
|
|
247
247
|
model: 'inworld/models/gemma-4-26b-a4b-it',
|
|
@@ -25,7 +25,7 @@ const agent = new Agent({
|
|
|
25
25
|
id: 'customer-support-agent',
|
|
26
26
|
name: 'Customer Support Agent',
|
|
27
27
|
instructions: 'You are a helpful customer support agent for a software company.',
|
|
28
|
-
model: 'openai/gpt-
|
|
28
|
+
model: 'openai/gpt-6.1-sol',
|
|
29
29
|
voice,
|
|
30
30
|
})
|
|
31
31
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Workflow\.branch()
|
|
6
6
|
|
|
7
|
-
The `.branch()` method creates conditional branches between workflow steps, allowing for different paths to be taken based on the result of a previous step.
|
|
7
|
+
The `.branch()` method creates conditional branches between workflow steps, allowing for different paths to be taken based on the result of a previous step. Every branch whose condition evaluates to `true` runs; conditions are evaluated independently, so overlapping conditions run multiple branches. Use mutually exclusive conditions when only one branch should run.
|
|
8
8
|
|
|
9
9
|
## Usage example
|
|
10
10
|
|