@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
|
@@ -68,6 +68,13 @@ interface Processor<TId extends string = string, TTripwireMetadata = unknown> {
|
|
|
68
68
|
| void
|
|
69
69
|
| undefined
|
|
70
70
|
|
|
71
|
+
/** State lane id for `computeStateSignal`. Defaults to the processor id. */
|
|
72
|
+
stateId?: string
|
|
73
|
+
|
|
74
|
+
computeStateSignal?(
|
|
75
|
+
args: ComputeStateSignalArgs<TTripwireMetadata>,
|
|
76
|
+
): Promise<ComputeStateSignalResult> | ComputeStateSignalResult
|
|
77
|
+
|
|
71
78
|
processLLMRequest?(
|
|
72
79
|
args: ProcessLLMRequestArgs<TTripwireMetadata>,
|
|
73
80
|
): Promise<ProcessLLMRequestResult> | ProcessLLMRequestResult
|
|
@@ -267,13 +274,14 @@ processInputStep?<TTripwireMetadata = unknown>(
|
|
|
267
274
|
1. `processInput` (once at start)
|
|
268
275
|
2. `processInputStep` from inputProcessors (at each step, before LLM call)
|
|
269
276
|
3. `prepareStep` callback (runs as part of the processInputStep pipeline, after inputProcessors)
|
|
270
|
-
4. `
|
|
271
|
-
5.
|
|
272
|
-
6.
|
|
273
|
-
7. `
|
|
274
|
-
8. `
|
|
275
|
-
9.
|
|
276
|
-
10.
|
|
277
|
+
4. `computeStateSignal` from inputProcessors (after `processInputStep`, before the LLM request)
|
|
278
|
+
5. `processLLMRequest` from inputProcessors (after prompt conversion, before the provider call)
|
|
279
|
+
6. LLM execution
|
|
280
|
+
7. `processOutputStream` from outputProcessors (on each streaming chunk)
|
|
281
|
+
8. `processLLMResponse` from inputProcessors (after stream completes, pairs with `processLLMRequest`)
|
|
282
|
+
9. `processOutputStep` from outputProcessors (after LLM response, before tool execution)
|
|
283
|
+
10. Tool execution (if needed)
|
|
284
|
+
11. Repeat from step 2 if tools were called
|
|
277
285
|
|
|
278
286
|
#### `ProcessInputStepArgs`
|
|
279
287
|
|
|
@@ -369,6 +377,54 @@ System messages are **reset to their original values** at the start of each step
|
|
|
369
377
|
|
|
370
378
|
***
|
|
371
379
|
|
|
380
|
+
### `computeStateSignal`
|
|
381
|
+
|
|
382
|
+
Computes a thread-scoped state signal once per model input step, after `processInputStep()` and before the LLM request is finalized. This method requires an agent with memory and an active `resourceId` and `threadId`.
|
|
383
|
+
|
|
384
|
+
```typescript
|
|
385
|
+
computeStateSignal?(
|
|
386
|
+
args: ComputeStateSignalArgs,
|
|
387
|
+
): Promise<ProcessorStateSignal | undefined | void> | ProcessorStateSignal | undefined | void;
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
Return a state signal to store it, or `undefined` or `void` when nothing changed. The returned `id` defaults to the processor's `stateId`, which itself defaults to the processor `id`. `mode` defaults to `snapshot`.
|
|
391
|
+
|
|
392
|
+
#### `ComputeStateSignalArgs`
|
|
393
|
+
|
|
394
|
+
**stepNumber** (`number`): Current step number (0-indexed).
|
|
395
|
+
|
|
396
|
+
**steps** (`StepResult[]`): Results from previous steps.
|
|
397
|
+
|
|
398
|
+
**state** (`Record<string, unknown>`): Per-processor state that persists across method calls within the request.
|
|
399
|
+
|
|
400
|
+
**resourceId** (`string`): Memory resource ID for the active thread.
|
|
401
|
+
|
|
402
|
+
**threadId** (`string`): Memory thread ID that scopes the state lane.
|
|
403
|
+
|
|
404
|
+
**activeStateSignals** (`ProcessorActiveStateSignal[]`): Active state signals for this processor and thread that the runtime currently knows about.
|
|
405
|
+
|
|
406
|
+
**contextWindow** (`{ hasSnapshot: boolean }`): Whether the active message window already contains a snapshot for this lane.
|
|
407
|
+
|
|
408
|
+
**lastSnapshot** (`ProcessorActiveStateSignal | undefined`): Latest snapshot for this lane, resolved from message history when the current message list does not contain it.
|
|
409
|
+
|
|
410
|
+
**deltasSinceSnapshot** (`ProcessorActiveStateSignal[]`): Delta signals accepted after the latest snapshot.
|
|
411
|
+
|
|
412
|
+
**tracking** (`ProcessorStateSignalTracking | undefined`): Last persisted tracking metadata for this lane, including the current cache key, mode, version, and active copies.
|
|
413
|
+
|
|
414
|
+
**sendStateSignal** (`(signal: AgentStateSignalInput) => Promise<CreatedAgentSignal | ApplyStateSignalResult>`): Adds another state signal from inside the method. Returns a skip result when the same cache key and mode are already current.
|
|
415
|
+
|
|
416
|
+
#### Deduplication
|
|
417
|
+
|
|
418
|
+
Mastra stores tracking metadata under `metadata.mastra.stateSignals[stateId]` on the thread. When a returned state signal has the same `cacheKey` and mode as the current state and a copy is still in the active message window, Mastra skips it instead of storing a duplicate. If the matching copy has left the active window, Mastra stores it again so the model keeps seeing the state. State signals can't be transient because this tracking is rebuilt from persisted history.
|
|
419
|
+
|
|
420
|
+
#### Use cases
|
|
421
|
+
|
|
422
|
+
- Sync browser, editor, or background-watcher state into a lane the model can see
|
|
423
|
+
- Emit a fresh snapshot after older state messages leave the context window
|
|
424
|
+
- Keep working memory or goal state outside the system prompt
|
|
425
|
+
|
|
426
|
+
***
|
|
427
|
+
|
|
372
428
|
### `processLLMRequest`
|
|
373
429
|
|
|
374
430
|
Processes the final LLM request after Mastra converts the `MessageList` into `LanguageModelV2Prompt` and before the provider call. Use this method for transient, model-aware rewrites that should affect only the current outbound request.
|
|
@@ -668,6 +724,14 @@ processOutputStep?(args: ProcessOutputStepArgs): ProcessorMessageResult;
|
|
|
668
724
|
|
|
669
725
|
**requestContext** (`RequestContext`): Request-scoped context with execution metadata.
|
|
670
726
|
|
|
727
|
+
#### Return value
|
|
728
|
+
|
|
729
|
+
`processOutputStep` returns a `MessageList` or `MastraDBMessage[]`, directly or in a promise.
|
|
730
|
+
|
|
731
|
+
- Return the supplied `messageList` instance to keep it, including any in-place changes.
|
|
732
|
+
- Return a messages array to replace the current messages. Return the supplied `messages` array to leave them unchanged.
|
|
733
|
+
- Returning `[]` removes all current messages, including the conversation history and the latest response. It isn't a no-op.
|
|
734
|
+
|
|
671
735
|
#### Use cases
|
|
672
736
|
|
|
673
737
|
- Implementing quality guardrails that can request retries
|
|
@@ -683,7 +747,7 @@ import type { Processor } from '@mastra/core/processors'
|
|
|
683
747
|
export class QualityGuardrail implements Processor {
|
|
684
748
|
id = 'quality-guardrail'
|
|
685
749
|
|
|
686
|
-
async processOutputStep({ text, abort, retryCount }) {
|
|
750
|
+
async processOutputStep({ messages, text, abort, retryCount }) {
|
|
687
751
|
const score = await evaluateResponseQuality(text)
|
|
688
752
|
|
|
689
753
|
if (score < 0.7) {
|
|
@@ -699,7 +763,7 @@ export class QualityGuardrail implements Processor {
|
|
|
699
763
|
}
|
|
700
764
|
}
|
|
701
765
|
|
|
702
|
-
return
|
|
766
|
+
return messages
|
|
703
767
|
}
|
|
704
768
|
}
|
|
705
769
|
```
|
|
@@ -886,12 +950,12 @@ export class DynamicModelProcessor implements Processor {
|
|
|
886
950
|
}: ProcessInputStepArgs): Promise<ProcessInputStepResult> {
|
|
887
951
|
// Use a fast model for initial response
|
|
888
952
|
if (stepNumber === 0) {
|
|
889
|
-
return { model: 'openai/gpt-
|
|
953
|
+
return { model: 'openai/gpt-6-luna' }
|
|
890
954
|
}
|
|
891
955
|
|
|
892
956
|
// Switch to powerful model after tool calls
|
|
893
957
|
if (steps.length > 0 && steps[steps.length - 1].toolCalls?.length) {
|
|
894
|
-
return { model: 'openai/gpt-
|
|
958
|
+
return { model: 'openai/gpt-6.1-sol' }
|
|
895
959
|
}
|
|
896
960
|
|
|
897
961
|
// Disable tools after 5 steps to force completion
|
|
@@ -1112,7 +1176,7 @@ import { PrefillErrorHandler } from '@mastra/core/processors'
|
|
|
1112
1176
|
const agent = new Agent({
|
|
1113
1177
|
id: 'support-agent',
|
|
1114
1178
|
name: 'support-agent',
|
|
1115
|
-
model: 'openai/gpt-5',
|
|
1179
|
+
model: 'openai/gpt-5.6',
|
|
1116
1180
|
instructions: '...',
|
|
1117
1181
|
inputProcessors: [new ContentFilter(['secret'])],
|
|
1118
1182
|
outputProcessors: [new WordCounter()],
|
|
@@ -62,7 +62,7 @@ export const agent = new Agent({
|
|
|
62
62
|
id: 'secure-agent',
|
|
63
63
|
name: 'secure-agent',
|
|
64
64
|
instructions: 'You are a helpful assistant',
|
|
65
|
-
model: 'openai/gpt-
|
|
65
|
+
model: 'openai/gpt-6.1-sol',
|
|
66
66
|
inputProcessors: [
|
|
67
67
|
new PromptInjectionDetector({
|
|
68
68
|
model: 'openrouter/openai/gpt-oss-safeguard-20b',
|
|
@@ -61,7 +61,7 @@ Registering in `errorProcessors` alone, as the example above does, covers both h
|
|
|
61
61
|
| `cerebras-strip-reasoning-content` | Cerebras | Preemptive prompt rewrite | Removes assistant `reasoning` parts from the outbound prompt so they're not serialized as unsupported `reasoning_content` fields. |
|
|
62
62
|
| `anthropic-strip-empty-signed-reasoning-content` | Anthropic | Preemptive prompt rewrite | Removes assistant `reasoning` parts that carry an Anthropic signature but have empty text, which legacy records can contain. Anthropic signs the exact thinking text, so the mismatched pair would be rejected. |
|
|
63
63
|
| `anthropic-strip-foreign-reasoning-content` | Anthropic | Preemptive prompt rewrite | Removes non-Anthropic assistant `reasoning` parts from the outbound prompt. Anthropic-native thinking history is preserved. |
|
|
64
|
-
| `anthropic-strip-foreign-signed-reasoning` | Anthropic-compatible | Preemptive prompt rewrite | Drops signed thinking from the outbound prompt when its origin turn was stamped with a different provider (for example Kimi For Coding ↔ `anthropic/claude-sonnet-
|
|
64
|
+
| `anthropic-strip-foreign-signed-reasoning` | Anthropic-compatible | Preemptive prompt rewrite | Drops signed thinking from the outbound prompt when its origin turn was stamped with a different provider (for example Kimi For Coding ↔ `anthropic/claude-sonnet-5-5`), since the receiving provider can't verify another provider's signature. Turns emptied of all content by the drop are removed from the prompt. Unstamped history is left untouched. |
|
|
65
65
|
| `azure-system-reminder-transform` | Azure OpenAI | Preemptive prompt rewrite | Renames `<system-reminder>` wrappers in user text and system instructions to `<memory-context>` for the outbound request. Stored history remains unchanged. |
|
|
66
66
|
| `openai-orphan-item-id` | OpenAI, Azure OpenAI (Responses) | Reactive API error recovery | Recovers history that OpenAI rejects with `Item 'msg_…' of type 'message' was provided without its required 'reasoning' item`. Drops the Responses `itemId` from every item-bearing part of an assistant message that carries one but has no `reasoning` part, and retries. The message then replays by value instead of as an unsatisfiable `item_reference`. The repair is applied to the in-memory list for the current turn. |
|
|
67
67
|
| `anthropic-orphaned-thinking-step` | Anthropic | Reactive API error recovery | Recovers history that Anthropic rejects because `thinking` or `redacted_thinking` blocks in the latest assistant message cannot be modified. Removes steps that contain only reasoning when more assistant content follows them, and retries. Covers history saved by older `@mastra/memory` releases ([#22798](https://github.com/mastra-ai/mastra/issues/22798)). |
|
|
@@ -72,7 +72,7 @@ import { RegexFilterProcessor } from '@mastra/core/processors'
|
|
|
72
72
|
const agent = new Agent({
|
|
73
73
|
id: 'my-agent',
|
|
74
74
|
name: 'my-agent',
|
|
75
|
-
model: 'openai/gpt-
|
|
75
|
+
model: 'openai/gpt-6-luna',
|
|
76
76
|
inputProcessors: [
|
|
77
77
|
new RegexFilterProcessor({
|
|
78
78
|
presets: ['pii', 'secrets'],
|
|
@@ -30,7 +30,7 @@ const processor = new SemanticRecall({
|
|
|
30
30
|
|
|
31
31
|
**options.vector** (`MastraVector`): Vector store for semantic search
|
|
32
32
|
|
|
33
|
-
**options.embedder** (`MastraEmbeddingModel<string>`): Embedder for generating query embeddings
|
|
33
|
+
**options.embedder** (`MastraEmbeddingModel<string>`): Embedder for generating query embeddings. Required unless the vector store embeds text itself (self-embedding)
|
|
34
34
|
|
|
35
35
|
**options.topK** (`number`): Number of most similar messages to retrieve
|
|
36
36
|
|
|
@@ -86,7 +86,7 @@ export const agent = new Agent({
|
|
|
86
86
|
id: 'semantic-memory-agent',
|
|
87
87
|
name: 'semantic-memory-agent',
|
|
88
88
|
instructions: 'You are a helpful assistant with semantic memory recall',
|
|
89
|
-
model: 'openai/gpt-
|
|
89
|
+
model: 'openai/gpt-6.1-sol',
|
|
90
90
|
inputProcessors: [semanticRecall, new MessageHistory({ storage, lastMessages: 50 })],
|
|
91
91
|
outputProcessors: [semanticRecall, new MessageHistory({ storage })],
|
|
92
92
|
})
|
|
@@ -81,7 +81,7 @@ const agent = new Agent({
|
|
|
81
81
|
name: 'skill-agent',
|
|
82
82
|
instructions:
|
|
83
83
|
'You are a helpful assistant. Use search_skills to find relevant skills, then load_skill to load their instructions.',
|
|
84
|
-
model: 'openai/gpt-
|
|
84
|
+
model: 'openai/gpt-6.1-sol',
|
|
85
85
|
workspace,
|
|
86
86
|
inputProcessors: [skillSearch],
|
|
87
87
|
})
|
|
@@ -20,7 +20,7 @@ export const agent = new Agent({
|
|
|
20
20
|
id: 'openai-agent',
|
|
21
21
|
name: 'openai-agent',
|
|
22
22
|
instructions: 'You are a helpful assistant.',
|
|
23
|
-
model: 'openai/gpt-5',
|
|
23
|
+
model: 'openai/gpt-5.6',
|
|
24
24
|
errorProcessors: [new StreamErrorRetryProcessor({ maxRetries: 5 })],
|
|
25
25
|
maxProcessorRetries: 5,
|
|
26
26
|
})
|
|
@@ -66,7 +66,7 @@ export const agent = new Agent({
|
|
|
66
66
|
id: 'resilient-agent',
|
|
67
67
|
name: 'Resilient agent',
|
|
68
68
|
instructions: 'You are a helpful assistant.',
|
|
69
|
-
model: 'openai/gpt-5',
|
|
69
|
+
model: 'openai/gpt-5.6',
|
|
70
70
|
errorProcessors: [
|
|
71
71
|
new StreamErrorRetryProcessor({
|
|
72
72
|
retryUnknownErrors: true,
|
|
@@ -99,7 +99,7 @@ export const agent = new Agent({
|
|
|
99
99
|
id: 'resilient-agent',
|
|
100
100
|
name: 'resilient-agent',
|
|
101
101
|
instructions: 'You are a helpful assistant.',
|
|
102
|
-
model: 'openai/gpt-5',
|
|
102
|
+
model: 'openai/gpt-5.6',
|
|
103
103
|
errorProcessors: [
|
|
104
104
|
new StreamErrorRetryProcessor({
|
|
105
105
|
maxRetries: 2,
|
|
@@ -68,7 +68,7 @@ export const agent = new Agent({
|
|
|
68
68
|
id: 'scrubbed-agent',
|
|
69
69
|
name: 'scrubbed-agent',
|
|
70
70
|
instructions: 'You are a helpful assistant',
|
|
71
|
-
model: 'openai/gpt-
|
|
71
|
+
model: 'openai/gpt-6.1-sol',
|
|
72
72
|
outputProcessors: [
|
|
73
73
|
// Batch stream parts first to reduce LLM calls
|
|
74
74
|
new BatchPartsProcessor({
|
|
@@ -107,7 +107,7 @@ export const agent = new Agent({
|
|
|
107
107
|
id: 'context-limited-agent',
|
|
108
108
|
name: 'context-limited-agent',
|
|
109
109
|
instructions: 'You are a helpful assistant',
|
|
110
|
-
model: 'openai/gpt-
|
|
110
|
+
model: 'openai/gpt-6.1-sol',
|
|
111
111
|
memory: new Memory({/* ... */}),
|
|
112
112
|
inputProcessors: [
|
|
113
113
|
new TokenLimiterProcessor({ limit: 4000 }), // Limits historical messages to ~4000 tokens
|
|
@@ -127,7 +127,7 @@ export const agent = new Agent({
|
|
|
127
127
|
id: 'multi-step-agent',
|
|
128
128
|
name: 'multi-step-agent',
|
|
129
129
|
instructions: 'You are a helpful research assistant with access to tools',
|
|
130
|
-
model: 'openai/gpt-
|
|
130
|
+
model: 'openai/gpt-6.1-sol',
|
|
131
131
|
inputProcessors: [
|
|
132
132
|
new TokenLimiterProcessor({ limit: 8000 }), // Applied at every step
|
|
133
133
|
],
|
|
@@ -153,7 +153,7 @@ export const agent = new Agent({
|
|
|
153
153
|
id: 'response-limited-agent',
|
|
154
154
|
name: 'response-limited-agent',
|
|
155
155
|
instructions: 'You are a helpful assistant',
|
|
156
|
-
model: 'openai/gpt-
|
|
156
|
+
model: 'openai/gpt-6.1-sol',
|
|
157
157
|
outputProcessors: [
|
|
158
158
|
new TokenLimiterProcessor({
|
|
159
159
|
limit: 1000,
|
|
@@ -95,7 +95,7 @@ export const agent = new Agent({
|
|
|
95
95
|
id: 'filtered-agent',
|
|
96
96
|
name: 'filtered-agent',
|
|
97
97
|
instructions: 'You are a helpful assistant',
|
|
98
|
-
model: 'openai/gpt-
|
|
98
|
+
model: 'openai/gpt-6.1-sol',
|
|
99
99
|
tools: {
|
|
100
100
|
searchDatabase,
|
|
101
101
|
sendEmail,
|
|
@@ -121,7 +121,7 @@ export const agent = new Agent({
|
|
|
121
121
|
id: 'no-tools-context-agent',
|
|
122
122
|
name: 'no-tools-context-agent',
|
|
123
123
|
instructions: 'You are a helpful assistant',
|
|
124
|
-
model: 'openai/gpt-
|
|
124
|
+
model: 'openai/gpt-6.1-sol',
|
|
125
125
|
tools: {
|
|
126
126
|
searchDatabase,
|
|
127
127
|
sendEmail,
|
|
@@ -145,7 +145,7 @@ const agent = new Agent({
|
|
|
145
145
|
id: 'mcp-agent',
|
|
146
146
|
name: 'mcp-agent',
|
|
147
147
|
instructions: 'Search for a tool when you need a capability you do not have.',
|
|
148
|
-
model: 'openai/gpt-
|
|
148
|
+
model: 'openai/gpt-6.1-sol',
|
|
149
149
|
// Resolved per request, then searchable alongside staticTools
|
|
150
150
|
tools: async ({ requestContext }) => mcpClient.getTools(requestContext.get('userToken')),
|
|
151
151
|
inputProcessors: [toolSearch],
|
|
@@ -184,7 +184,7 @@ const agent = new Agent({
|
|
|
184
184
|
name: 'dynamic-tools-agent',
|
|
185
185
|
instructions:
|
|
186
186
|
'You are a helpful assistant with access to many tools. Use search_tools to find relevant tools, then load_tool to make them available.',
|
|
187
|
-
model: 'openai/gpt-
|
|
187
|
+
model: 'openai/gpt-6.1-sol',
|
|
188
188
|
inputProcessors: [toolSearch],
|
|
189
189
|
})
|
|
190
190
|
```
|
|
@@ -264,7 +264,7 @@ import { ToolSearchProcessor, TokenLimiter } from '@mastra/core/processors'
|
|
|
264
264
|
const agent = new Agent({
|
|
265
265
|
id: 'my-agent',
|
|
266
266
|
name: 'my-agent',
|
|
267
|
-
model: 'openai/gpt-
|
|
267
|
+
model: 'openai/gpt-6.1-sol',
|
|
268
268
|
inputProcessors: [
|
|
269
269
|
new ToolSearchProcessor({
|
|
270
270
|
tools: allTools,
|
|
@@ -47,7 +47,7 @@ export const agent = new Agent({
|
|
|
47
47
|
id: 'normalized-agent',
|
|
48
48
|
name: 'normalized-agent',
|
|
49
49
|
instructions: 'You are a helpful assistant',
|
|
50
|
-
model: 'openai/gpt-
|
|
50
|
+
model: 'openai/gpt-6.1-sol',
|
|
51
51
|
inputProcessors: [
|
|
52
52
|
new UnicodeNormalizer({
|
|
53
53
|
stripControlChars: true,
|
|
@@ -35,7 +35,7 @@ const processor = new WorkingMemory({
|
|
|
35
35
|
|
|
36
36
|
**options.template.format** (`'markdown' | 'json'`): Format of the working memory content
|
|
37
37
|
|
|
38
|
-
**options.template.content** (`string
|
|
38
|
+
**options.template.content** (`string | Record<string, unknown>`): Template content defining the structure of working memory data. The object form is only valid when format is json
|
|
39
39
|
|
|
40
40
|
**options.scope** (`'thread' | 'resource'`): Scope of working memory. 'thread' scopes to current thread, 'resource' shares across all threads for the resource
|
|
41
41
|
|
|
@@ -73,7 +73,7 @@ export const agent = new Agent({
|
|
|
73
73
|
id: 'personalized-agent',
|
|
74
74
|
name: 'personalized-agent',
|
|
75
75
|
instructions: 'You are a helpful assistant that remembers user preferences',
|
|
76
|
-
model: 'openai/gpt-
|
|
76
|
+
model: 'openai/gpt-6.1-sol',
|
|
77
77
|
inputProcessors: [
|
|
78
78
|
new WorkingMemory({
|
|
79
79
|
storage,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# LeaseProvider
|
|
6
6
|
|
|
7
|
-
`LeaseProvider` is the distributed leasing contract, separate from event delivery ([`PubSub`](https://mastra.ai/reference/pubsub/base)). Mastra's [signals layer](https://mastra.ai/docs/
|
|
7
|
+
`LeaseProvider` is the distributed leasing contract, separate from event delivery ([`PubSub`](https://mastra.ai/reference/pubsub/base)). Mastra's [signals layer](https://mastra.ai/docs/signals/overview) uses it to elect a single owner across multiple processes (for example, serverless invocations) for a resource, most commonly a thread key. The owner is the process that wakes and runs the agent stream, so other processes route follow-up work to it instead of starting a competing run.
|
|
8
8
|
|
|
9
9
|
[Durable agents](https://mastra.ai/docs/harness/durable-agents) also claim each run through a lease when the workflows store doesn't support run fencing, so crash recovery can tell whether another process still drives the run.
|
|
10
10
|
|
|
@@ -133,5 +133,5 @@ When the configured pub/sub backend doesn't implement `LeaseProvider`, the runti
|
|
|
133
133
|
|
|
134
134
|
- [PubSub](https://mastra.ai/reference/pubsub/base): The event delivery contract, separate from leasing
|
|
135
135
|
- [RedisStreamsPubSub](https://mastra.ai/reference/pubsub/redis-streams): The built-in backend that implements `LeaseProvider`
|
|
136
|
-
- [Signals](https://mastra.ai/docs/
|
|
136
|
+
- [Signals](https://mastra.ai/docs/signals/overview): The runtime that uses leasing to coordinate thread execution across processes
|
|
137
137
|
- [Channels](https://mastra.ai/docs/channels): Uses leasing to coordinate agent runs in serverless and multi-instance deployments
|
|
@@ -183,7 +183,7 @@ A subscription never reclaims an event its own handler is still processing, so a
|
|
|
183
183
|
|
|
184
184
|
## Distributed leasing
|
|
185
185
|
|
|
186
|
-
`RedisStreamsPubSub` implements the [`LeaseProvider`](https://mastra.ai/reference/pubsub/lease-provider) contract on top of the same Redis connection. The [signals runtime](https://mastra.ai/docs/
|
|
186
|
+
`RedisStreamsPubSub` implements the [`LeaseProvider`](https://mastra.ai/reference/pubsub/lease-provider) contract on top of the same Redis connection. The [signals runtime](https://mastra.ai/docs/signals/overview) uses it to elect a single owner (usually per thread key) so that across instances only one process wakes and runs the agent, and others route follow-up work to the holder. This is what makes signals work on serverless and multi-instance deployments; without a shared lease, each instance would start its own competing run.
|
|
187
187
|
|
|
188
188
|
Lease keys are namespaced under the same `keyPrefix` as topics, as `<keyPrefix>:lease:<key>`. All operations are atomic: `acquireLease` uses `SET NX PX` and refreshes its own TTL idempotently, while `releaseLease`, `renewLease`, and `transferLease` use Lua scripts that check ownership before mutating, so a concurrent renewal from another owner is never clobbered.
|
|
189
189
|
|
|
@@ -79,7 +79,7 @@ const ragAgent = new Agent({
|
|
|
79
79
|
instructions: `You are a helpful assistant that answers questions based on the provided context.
|
|
80
80
|
When answering questions, use the graph query tool to find relevant information and relationships.
|
|
81
81
|
Base your answers on the context provided by the tool, and clearly state if the context doesn't contain enough information.`,
|
|
82
|
-
model: 'openai/gpt-
|
|
82
|
+
model: 'openai/gpt-6.1-sol',
|
|
83
83
|
tools: {
|
|
84
84
|
graphQueryTool,
|
|
85
85
|
},
|
|
@@ -201,7 +201,7 @@ const agent = new Agent({
|
|
|
201
201
|
name: 'RAG Agent',
|
|
202
202
|
instructions: `Use vector search for simple fact-finding queries.
|
|
203
203
|
Use graph search when you need to understand relationships or find connected information.`,
|
|
204
|
-
model: 'openai/gpt-
|
|
204
|
+
model: 'openai/gpt-6.1-sol',
|
|
205
205
|
tools: {
|
|
206
206
|
vectorQueryTool,
|
|
207
207
|
graphQueryTool,
|
|
@@ -36,7 +36,7 @@ const results = await store.query({
|
|
|
36
36
|
|
|
37
37
|
### Array Operators
|
|
38
38
|
|
|
39
|
-
`$in`Matches any value in array{ category: { $in: \["A", "B"] } }Supported by: All except Couchbase`$nin`Matches none of the values{ status: { $nin: \["deleted", "archived"] } }Supported by: All except Couchbase`$all`Matches arrays containing all elements{ tags: { $all: \["urgent", "high"] } }Supported by: Astra, Pinecone, Upstash, MongoDB, OracleDB`$elemMatch`Matches array elements meeting criteria{ scores: { $elemMatch: { $gt: 80 } } }Supported by: libSQL, PgVector, MongoDB, OracleDB
|
|
39
|
+
`$in`Matches any value in array{ category: { $in: \["A", "B"] } }Supported by: All except Couchbase`$nin`Matches none of the values{ status: { $nin: \["deleted", "archived"] } }Supported by: All except Couchbase`$all`Matches arrays containing all elements{ tags: { $all: \["urgent", "high"] } }Supported by: Astra, Pinecone, Qdrant, Upstash, MongoDB, OracleDB`$elemMatch`Matches array elements meeting criteria{ scores: { $elemMatch: { $gt: 80 } } }Supported by: libSQL, PgVector, MongoDB, OracleDB
|
|
40
40
|
|
|
41
41
|
### Logical Operators
|
|
42
42
|
|
|
@@ -21,7 +21,7 @@ function rerank(
|
|
|
21
21
|
import { ModelRouterLanguageModel } from '@mastra/core/llm'
|
|
22
22
|
import { rerank } from '@mastra/rag'
|
|
23
23
|
|
|
24
|
-
const model = new ModelRouterLanguageModel('openai/gpt-
|
|
24
|
+
const model = new ModelRouterLanguageModel('openai/gpt-6.1-sol')
|
|
25
25
|
|
|
26
26
|
const rerankedResults = await rerank(vectorSearchResults, 'How do I deploy to production?', model, {
|
|
27
27
|
weights: {
|
|
@@ -386,7 +386,7 @@ import { MONGODB_PROMPT } from '@mastra/mongodb'
|
|
|
386
386
|
export const ragAgent = new Agent({
|
|
387
387
|
id: 'rag-agent',
|
|
388
388
|
name: 'RAG Agent',
|
|
389
|
-
model: 'openai/gpt-
|
|
389
|
+
model: 'openai/gpt-6.1-sol',
|
|
390
390
|
instructions: `
|
|
391
391
|
Process queries using the provided context. Structure responses to be concise and relevant.
|
|
392
392
|
${MONGODB_PROMPT}
|
|
@@ -403,7 +403,7 @@ import { PGVECTOR_PROMPT } from '@mastra/pg'
|
|
|
403
403
|
export const ragAgent = new Agent({
|
|
404
404
|
id: 'rag-agent',
|
|
405
405
|
name: 'RAG Agent',
|
|
406
|
-
model: 'openai/gpt-
|
|
406
|
+
model: 'openai/gpt-6.1-sol',
|
|
407
407
|
instructions: `
|
|
408
408
|
Process queries using the provided context. Structure responses to be concise and relevant.
|
|
409
409
|
${PGVECTOR_PROMPT}
|
|
@@ -420,7 +420,7 @@ import { PINECONE_PROMPT } from '@mastra/pinecone'
|
|
|
420
420
|
export const ragAgent = new Agent({
|
|
421
421
|
id: 'rag-agent',
|
|
422
422
|
name: 'RAG Agent',
|
|
423
|
-
model: 'openai/gpt-
|
|
423
|
+
model: 'openai/gpt-6.1-sol',
|
|
424
424
|
instructions: `
|
|
425
425
|
Process queries using the provided context. Structure responses to be concise and relevant.
|
|
426
426
|
${PINECONE_PROMPT}
|
|
@@ -437,7 +437,7 @@ import { QDRANT_PROMPT } from '@mastra/qdrant'
|
|
|
437
437
|
export const ragAgent = new Agent({
|
|
438
438
|
id: 'rag-agent',
|
|
439
439
|
name: 'RAG Agent',
|
|
440
|
-
model: 'openai/gpt-
|
|
440
|
+
model: 'openai/gpt-6.1-sol',
|
|
441
441
|
instructions: `
|
|
442
442
|
Process queries using the provided context. Structure responses to be concise and relevant.
|
|
443
443
|
${QDRANT_PROMPT}
|
|
@@ -454,7 +454,7 @@ import { CHROMA_PROMPT } from '@mastra/chroma'
|
|
|
454
454
|
export const ragAgent = new Agent({
|
|
455
455
|
id: 'rag-agent',
|
|
456
456
|
name: 'RAG Agent',
|
|
457
|
-
model: 'openai/gpt-
|
|
457
|
+
model: 'openai/gpt-6.1-sol',
|
|
458
458
|
instructions: `
|
|
459
459
|
Process queries using the provided context. Structure responses to be concise and relevant.
|
|
460
460
|
${CHROMA_PROMPT}
|
|
@@ -471,7 +471,7 @@ import { ASTRA_PROMPT } from '@mastra/astra'
|
|
|
471
471
|
export const ragAgent = new Agent({
|
|
472
472
|
id: 'rag-agent',
|
|
473
473
|
name: 'RAG Agent',
|
|
474
|
-
model: 'openai/gpt-
|
|
474
|
+
model: 'openai/gpt-6.1-sol',
|
|
475
475
|
instructions: `
|
|
476
476
|
Process queries using the provided context. Structure responses to be concise and relevant.
|
|
477
477
|
${ASTRA_PROMPT}
|
|
@@ -488,7 +488,7 @@ import { LIBSQL_PROMPT } from '@mastra/libsql'
|
|
|
488
488
|
export const ragAgent = new Agent({
|
|
489
489
|
id: 'rag-agent',
|
|
490
490
|
name: 'RAG Agent',
|
|
491
|
-
model: 'openai/gpt-
|
|
491
|
+
model: 'openai/gpt-6.1-sol',
|
|
492
492
|
instructions: `
|
|
493
493
|
Process queries using the provided context. Structure responses to be concise and relevant.
|
|
494
494
|
${LIBSQL_PROMPT}
|
|
@@ -505,7 +505,7 @@ import { UPSTASH_PROMPT } from '@mastra/upstash'
|
|
|
505
505
|
export const ragAgent = new Agent({
|
|
506
506
|
id: 'rag-agent',
|
|
507
507
|
name: 'RAG Agent',
|
|
508
|
-
model: 'openai/gpt-
|
|
508
|
+
model: 'openai/gpt-6.1-sol',
|
|
509
509
|
instructions: `
|
|
510
510
|
Process queries using the provided context. Structure responses to be concise and relevant.
|
|
511
511
|
${UPSTASH_PROMPT}
|
|
@@ -522,7 +522,7 @@ import { VECTORIZE_PROMPT } from '@mastra/vectorize'
|
|
|
522
522
|
export const ragAgent = new Agent({
|
|
523
523
|
id: 'rag-agent',
|
|
524
524
|
name: 'RAG Agent',
|
|
525
|
-
model: 'openai/gpt-
|
|
525
|
+
model: 'openai/gpt-6.1-sol',
|
|
526
526
|
instructions: `
|
|
527
527
|
Process queries using the provided context. Structure responses to be concise and relevant.
|
|
528
528
|
${VECTORIZE_PROMPT}
|
|
@@ -539,7 +539,7 @@ import { OPENSEARCH_PROMPT } from '@mastra/opensearch'
|
|
|
539
539
|
export const ragAgent = new Agent({
|
|
540
540
|
id: 'rag-agent',
|
|
541
541
|
name: 'RAG Agent',
|
|
542
|
-
model: 'openai/gpt-
|
|
542
|
+
model: 'openai/gpt-6.1-sol',
|
|
543
543
|
instructions: `
|
|
544
544
|
Process queries using the provided context. Structure responses to be concise and relevant.
|
|
545
545
|
${OPENSEARCH_PROMPT}
|
|
@@ -556,7 +556,7 @@ import { ORACLEDB_PROMPT } from '@mastra/oracledb'
|
|
|
556
556
|
export const ragAgent = new Agent({
|
|
557
557
|
id: 'rag-agent',
|
|
558
558
|
name: 'RAG Agent',
|
|
559
|
-
model: 'openai/gpt-
|
|
559
|
+
model: 'openai/gpt-6.1-sol',
|
|
560
560
|
instructions: `
|
|
561
561
|
Process queries using the provided context. Structure responses to be concise and relevant.
|
|
562
562
|
${ORACLEDB_PROMPT}
|
|
@@ -573,7 +573,7 @@ import { S3VECTORS_PROMPT } from '@mastra/s3vectors'
|
|
|
573
573
|
export const ragAgent = new Agent({
|
|
574
574
|
id: 'rag-agent',
|
|
575
575
|
name: 'RAG Agent',
|
|
576
|
-
model: 'openai/gpt-
|
|
576
|
+
model: 'openai/gpt-6.1-sol',
|
|
577
577
|
instructions: `
|
|
578
578
|
Process queries using the provided context. Structure responses to be concise and relevant.
|
|
579
579
|
${S3VECTORS_PROMPT}
|
|
@@ -605,7 +605,7 @@ const initialResults = await pgVector.query({
|
|
|
605
605
|
// Create a relevance scorer
|
|
606
606
|
const relevanceProvider = new MastraAgentRelevanceScorer(
|
|
607
607
|
'relevance-scorer',
|
|
608
|
-
'openai/gpt-
|
|
608
|
+
'openai/gpt-6.1-sol',
|
|
609
609
|
)
|
|
610
610
|
|
|
611
611
|
// Re-rank the results
|
|
@@ -116,7 +116,7 @@ import { Mastra } from '@mastra/core/mastra'
|
|
|
116
116
|
greeter: {
|
|
117
117
|
name: 'greeter',
|
|
118
118
|
description: 'Greets the user',
|
|
119
|
-
model: config.get('MASTRA_MODEL', 'openai/gpt-
|
|
119
|
+
model: config.get('MASTRA_MODEL', 'openai/gpt-6-luna'),
|
|
120
120
|
},
|
|
121
121
|
},
|
|
122
122
|
}),
|