@mastra/mcp-docs-server 1.2.15-alpha.9 → 1.2.16-alpha.1
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/agent-approval.md +19 -5
- package/.docs/docs/agents/code-mode.md +17 -2
- package/.docs/docs/agents/networks.md +2 -2
- package/.docs/docs/agents/overview.md +6 -6
- package/.docs/docs/agents/processors.md +3 -3
- package/.docs/docs/agents/using-tools.md +1 -1
- package/.docs/docs/browser/overview.md +9 -9
- package/.docs/docs/browser/recording.md +4 -4
- package/.docs/docs/capabilities/{channels/overview.md → channels.md} +71 -8
- package/.docs/docs/capabilities/subagents.md +7 -4
- package/.docs/docs/connections/overview.md +1 -1
- package/.docs/docs/datasets/overview.md +1 -1
- package/.docs/docs/datasets/running-experiments.md +49 -0
- package/.docs/docs/deployment/cloud-providers.md +13 -11
- package/.docs/docs/deployment/mastra-server.md +1 -1
- package/.docs/docs/deployment/monorepo.md +1 -1
- package/.docs/docs/deployment/overview.md +13 -10
- package/.docs/docs/deployment/sandbox.md +4 -4
- package/.docs/docs/deployment/web-framework.md +7 -7
- package/.docs/docs/deployment/workers.md +249 -3
- package/.docs/docs/deployment/workflow-runners.md +2 -2
- package/.docs/docs/evals/overview.md +1 -1
- package/.docs/docs/evals/quick-checks.md +1 -1
- package/.docs/docs/getting-started/develop.md +1 -1
- package/.docs/{guides/concepts → docs/guides}/multi-agent-systems.md +1 -1
- package/.docs/docs/harness/agent-controller.md +50 -9
- package/.docs/docs/harness/overview.md +3 -5
- package/.docs/docs/index.md +8 -8
- package/.docs/docs/long-running-agents/durable-agents.md +3 -3
- package/.docs/docs/long-running-agents/goals.md +1 -1
- package/.docs/docs/long-running-agents/schedules.md +1 -1
- package/.docs/docs/long-running-agents/signal-providers.md +5 -18
- package/.docs/docs/long-running-agents/signals.md +2 -2
- package/.docs/docs/mastra-platform/database.md +2 -2
- package/.docs/docs/mastra-platform/deploy.md +28 -1
- package/.docs/docs/mastra-platform/observability.md +63 -18
- package/.docs/docs/mastra-platform/overview.md +1 -1
- package/.docs/docs/mastra-platform/server.md +1 -1
- package/.docs/docs/mastra-platform/trace-intelligence.md +9 -13
- package/.docs/docs/mcp/overview.md +43 -1
- package/.docs/docs/memory/memory-processors.md +5 -5
- package/.docs/docs/memory/message-history.md +3 -3
- package/.docs/docs/memory/multi-user-threads.md +1 -1
- package/.docs/docs/memory/observational-memory.md +2 -2
- package/.docs/docs/memory/semantic-recall.md +2 -1
- package/.docs/docs/memory/working-memory.md +2 -1
- package/.docs/docs/observability/integrations/exporters/mastra-storage.md +18 -17
- package/.docs/docs/observability/logging.md +1 -1
- package/.docs/docs/observability/metrics/overview.md +1 -1
- package/.docs/docs/observability/overview.md +1 -5
- package/.docs/docs/observability/tracing/overview.md +3 -6
- package/.docs/docs/server/auth/fga.md +1 -1
- package/.docs/docs/server/auth/simple-auth.md +1 -1
- package/.docs/docs/server/auth/workers.md +3 -1
- package/.docs/docs/server/auth.md +15 -13
- package/.docs/docs/server/custom-adapters.md +1 -1
- package/.docs/docs/server/custom-api-routes.md +35 -0
- package/.docs/docs/server/mastra-client.md +3 -3
- package/.docs/docs/server/mastra-server.md +2 -2
- package/.docs/docs/storage/overview.md +20 -17
- package/.docs/docs/studio/observability.md +1 -1
- package/.docs/docs/workflows/dynamic-workflows.md +1 -1
- package/.docs/docs/workflows/human-in-the-loop.md +2 -2
- package/.docs/docs/workflows/overview.md +4 -4
- package/.docs/docs/workflows/snapshots.md +12 -10
- package/.docs/docs/workflows/time-travel.md +2 -0
- package/.docs/docs/workspace/filesystem.md +15 -15
- package/.docs/docs/workspace/sandbox.md +18 -19
- package/.docs/docs/workspace/search.md +1 -1
- package/.docs/{guides/build-your-ui → integrations/agentic-ui}/ai-sdk-ui.md +6 -6
- package/.docs/{guides/build-your-ui → integrations/agentic-ui}/assistant-ui.md +2 -2
- package/.docs/{guides/build-your-ui/copilotkit/overview.md → integrations/agentic-ui/copilotkit.md} +258 -5
- package/.docs/{guides/build-your-ui → integrations/agentic-ui}/openui.md +1 -1
- package/.docs/{docs/server → integrations}/auth/auth0.md +1 -1
- package/.docs/{docs/server → integrations}/auth/clerk.md +2 -2
- package/.docs/{docs/server → integrations}/auth/firebase.md +1 -1
- package/.docs/{docs/server → integrations}/auth/okta.md +24 -4
- package/.docs/{docs/server → integrations}/auth/supabase.md +2 -2
- package/.docs/{docs/server → integrations}/auth/workos.md +1 -1
- package/.docs/{docs/browser → integrations/browsers}/agent-browser.md +2 -2
- package/.docs/{docs/browser → integrations/browsers}/browser-viewer.md +3 -3
- package/.docs/{docs/browser → integrations/browsers}/firecrawl.md +2 -2
- package/.docs/{docs/browser → integrations/browsers}/stagehand.md +1 -1
- package/.docs/{docs/capabilities → integrations}/channels/discord.md +2 -2
- package/.docs/integrations/channels/github.md +103 -0
- package/.docs/{docs/capabilities → integrations}/channels/imessage.md +12 -4
- package/.docs/{docs/capabilities → integrations}/channels/slack.md +4 -4
- package/.docs/{docs/capabilities → integrations}/channels/teams.md +2 -2
- package/.docs/{docs/capabilities → integrations}/channels/telegram.md +2 -2
- package/.docs/{docs/capabilities → integrations}/channels/whatsapp.md +2 -2
- package/.docs/{reference/storage/dsql.md → integrations/databases/aurora-dsql.md} +1 -1
- package/.docs/{reference/storage → integrations/databases}/clickhouse.md +2 -2
- package/.docs/{reference/storage → integrations/databases}/cloudflare-d1.md +1 -1
- package/.docs/{reference/storage/cloudflare.md → integrations/databases/cloudflare-kv.md} +1 -1
- package/.docs/{reference/storage → integrations/databases}/convex.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/duckdb.md +5 -5
- package/.docs/{reference/storage → integrations/databases}/dynamodb.md +1 -1
- package/.docs/{reference/storage/lance.md → integrations/databases/lancedb.md} +1 -1
- package/.docs/{reference/storage → integrations/databases}/libsql.md +2 -2
- package/.docs/{reference/storage → integrations/databases}/mongodb.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/mssql.md +1 -1
- package/.docs/integrations/databases/neon.md +220 -0
- package/.docs/integrations/databases/oracledb.md +239 -0
- package/.docs/{reference/storage → integrations/databases}/postgresql.md +9 -9
- package/.docs/{reference/storage → integrations/databases}/redis.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/spanner.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/upstash.md +1 -1
- package/.docs/{guides/deployment → integrations/deploy}/amazon-ec2.md +3 -3
- package/.docs/{guides/deployment → integrations/deploy}/aws-bedrock-agentcore.md +2 -2
- package/.docs/{guides/deployment → integrations/deploy}/aws-lambda.md +4 -4
- package/.docs/{guides/deployment → integrations/deploy}/azure-app-services.md +4 -4
- package/.docs/{guides/deployment → integrations/deploy}/cloudflare.md +4 -4
- package/.docs/{guides/deployment → integrations/deploy}/digital-ocean.md +5 -5
- package/.docs/{guides/deployment → integrations/deploy}/inngest.md +1 -1
- package/.docs/{guides/deployment → integrations/deploy}/kubernetes.md +4 -5
- package/.docs/{guides/deployment → integrations/deploy}/netlify.md +5 -5
- package/.docs/{guides/deployment → integrations/deploy}/temporal.md +1 -1
- package/.docs/{guides/deployment → integrations/deploy}/vercel.md +5 -5
- package/.docs/{reference/workspace/agentfs-filesystem.md → integrations/file-storage/agentfs.md} +1 -1
- package/.docs/{reference/workspace/s3-filesystem.md → integrations/file-storage/amazon-s3.md} +6 -6
- package/.docs/{reference/workspace/archil-filesystem.md → integrations/file-storage/archil.md} +4 -4
- package/.docs/{reference/workspace/azure-blob-filesystem.md → integrations/file-storage/azure-blob.md} +3 -3
- package/.docs/{reference/workspace/gcs-filesystem.md → integrations/file-storage/google-cloud-storage.md} +6 -6
- package/.docs/{reference/workspace/google-drive-filesystem.md → integrations/file-storage/google-drive.md} +1 -1
- package/.docs/{reference/workspace/mesa-filesystem.md → integrations/file-storage/mesa.md} +3 -3
- package/.docs/{reference/workspace/files-sdk-filesystem.md → integrations/file-storage/vercel-files.md} +6 -6
- package/.docs/{guides/getting-started → integrations/frameworks}/astro.md +2 -2
- package/.docs/{guides/getting-started → integrations/frameworks}/electron.md +4 -4
- package/.docs/{guides/getting-started → integrations/frameworks}/express.md +1 -1
- package/.docs/{guides/getting-started → integrations/frameworks}/hono.md +1 -1
- package/.docs/{guides/getting-started → integrations/frameworks}/nestjs.md +1 -1
- package/.docs/{guides/getting-started → integrations/frameworks}/next-js.md +3 -3
- package/.docs/{guides/getting-started → integrations/frameworks}/nuxt.md +2 -2
- package/.docs/{guides/getting-started → integrations/frameworks}/sveltekit.md +2 -2
- package/.docs/{guides/getting-started → integrations/frameworks}/vite-react.md +2 -2
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/arize.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/arthur.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/braintrust.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/confident-ai.md +1 -1
- package/.docs/integrations/observability/datadog.md +538 -0
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/laminar.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/langfuse.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/langsmith.md +1 -1
- package/.docs/{docs/observability/integrations/exporters/otel.md → integrations/observability/opentelemetry.md} +278 -46
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/posthog.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/sentry.md +1 -1
- package/.docs/{reference/workspace/agentcore-runtime-sandbox.md → integrations/sandboxes/agentcore.md} +1 -1
- package/.docs/{reference/workspace/apple-container-sandbox.md → integrations/sandboxes/apple-container.md} +2 -2
- package/.docs/{reference/workspace/blaxel-sandbox.md → integrations/sandboxes/blaxel.md} +1 -1
- package/.docs/{reference/workspace/daytona-sandbox.md → integrations/sandboxes/daytona.md} +24 -3
- package/.docs/{reference/workspace/docker-sandbox.md → integrations/sandboxes/docker.md} +2 -2
- package/.docs/{reference/workspace/e2b-sandbox.md → integrations/sandboxes/e2b.md} +4 -4
- package/.docs/{reference/workspace/modal-sandbox.md → integrations/sandboxes/modal.md} +3 -3
- package/.docs/{reference/workspace/railway-sandbox.md → integrations/sandboxes/railway.md} +9 -1
- package/.docs/{reference/workspace/vercel-sandbox.md → integrations/sandboxes/vercel.md} +143 -12
- package/.docs/{reference → integrations}/tools/brightdata.md +1 -1
- package/.docs/{guides/guide → integrations/tools}/firecrawl.md +2 -2
- package/.docs/{reference → integrations}/tools/perplexity.md +1 -1
- package/.docs/{reference → integrations}/tools/tavily.md +1 -1
- package/.docs/{reference → integrations}/voice/aws-nova-sonic.md +1 -1
- package/.docs/{reference → integrations}/voice/cloudflare.md +3 -3
- package/.docs/{reference/voice/google-gemini-live.md → integrations/voice/google.md} +305 -30
- package/.docs/{reference/voice/inworld-realtime.md → integrations/voice/inworld.md} +163 -25
- package/.docs/{reference → integrations}/voice/livekit.md +436 -33
- package/.docs/{reference/voice/openai-realtime.md → integrations/voice/openai.md} +117 -20
- package/.docs/integrations.md +147 -0
- package/.docs/models/embeddings.md +3 -3
- package/.docs/models/environment-variables.md +1 -0
- package/.docs/models/gateways/custom-gateways.md +4 -0
- package/.docs/models/gateways/neon.md +1 -1
- package/.docs/models/gateways/netlify.md +1 -1
- package/.docs/models/gateways/openrouter.md +9 -3
- package/.docs/models/gateways/vercel.md +6 -4
- package/.docs/models/index.md +3 -3
- package/.docs/models/providers/302ai.md +1 -1
- package/.docs/models/providers/abacus.md +1 -1
- package/.docs/models/providers/abliteration-ai.md +1 -1
- package/.docs/models/providers/agentrouter.md +1 -1
- package/.docs/models/providers/ai-router.md +1 -1
- package/.docs/models/providers/aiand.md +1 -1
- package/.docs/models/providers/aki-io.md +1 -1
- package/.docs/models/providers/alibaba-cn.md +1 -1
- package/.docs/models/providers/alibaba-coding-plan-cn.md +1 -1
- package/.docs/models/providers/alibaba-coding-plan.md +1 -1
- package/.docs/models/providers/alibaba-token-plan-cn.md +1 -1
- package/.docs/models/providers/alibaba-token-plan.md +1 -1
- package/.docs/models/providers/alibaba.md +7 -5
- package/.docs/models/providers/ambient.md +2 -2
- package/.docs/models/providers/anyapi.md +1 -1
- package/.docs/models/providers/atomic-chat.md +1 -1
- package/.docs/models/providers/auriko.md +1 -1
- package/.docs/models/providers/bailing.md +1 -1
- package/.docs/models/providers/baseten.md +2 -2
- package/.docs/models/providers/berget.md +1 -1
- package/.docs/models/providers/blueclaw.md +1 -1
- package/.docs/models/providers/chutes.md +1 -1
- package/.docs/models/providers/clarifai.md +1 -1
- package/.docs/models/providers/claudinio.md +1 -1
- package/.docs/models/providers/cline-pass.md +1 -1
- package/.docs/models/providers/cloudferro-sherlock.md +1 -1
- package/.docs/models/providers/cloudflare-workers-ai.md +1 -1
- package/.docs/models/providers/coralbricks.md +75 -0
- package/.docs/models/providers/cortecs.md +3 -5
- package/.docs/models/providers/crof.md +1 -1
- package/.docs/models/providers/crossmodel.md +2 -3
- package/.docs/models/providers/daoxe.md +1 -1
- package/.docs/models/providers/databricks.md +1 -1
- package/.docs/models/providers/deepinfra.md +6 -5
- package/.docs/models/providers/digitalocean.md +5 -5
- package/.docs/models/providers/dinference.md +1 -1
- package/.docs/models/providers/drun.md +1 -1
- package/.docs/models/providers/ebcloud.md +1 -1
- package/.docs/models/providers/empiriolabs.md +3 -2
- package/.docs/models/providers/evroc.md +3 -4
- package/.docs/models/providers/fastrouter.md +1 -1
- package/.docs/models/providers/firepass.md +1 -1
- package/.docs/models/providers/fireworks-ai.md +1 -1
- package/.docs/models/providers/firmware.md +1 -1
- package/.docs/models/providers/freemodel.md +1 -1
- package/.docs/models/providers/friendli.md +1 -1
- package/.docs/models/providers/frogbot.md +1 -1
- package/.docs/models/providers/github-models.md +1 -1
- package/.docs/models/providers/gmicloud.md +1 -1
- package/.docs/models/providers/google.md +1 -1
- package/.docs/models/providers/greenpt.md +1 -1
- package/.docs/models/providers/helicone.md +1 -1
- package/.docs/models/providers/hetzner.md +8 -5
- package/.docs/models/providers/hpc-ai.md +1 -1
- package/.docs/models/providers/huggingface.md +1 -1
- package/.docs/models/providers/hyper.md +7 -7
- package/.docs/models/providers/iflowcn.md +1 -1
- package/.docs/models/providers/impossibl.md +1 -1
- package/.docs/models/providers/inception.md +1 -1
- package/.docs/models/providers/inceptron.md +1 -1
- package/.docs/models/providers/inference.md +1 -1
- package/.docs/models/providers/inferx.md +1 -1
- package/.docs/models/providers/infomaniak.md +1 -1
- package/.docs/models/providers/io-intelligence.md +1 -1
- package/.docs/models/providers/io-net.md +1 -1
- package/.docs/models/providers/jiekou.md +1 -1
- package/.docs/models/providers/kenari.md +1 -1
- package/.docs/models/providers/kilo.md +19 -13
- package/.docs/models/providers/kimi-for-coding.md +1 -1
- package/.docs/models/providers/kiro.md +1 -1
- package/.docs/models/providers/kuae-cloud-coding-plan.md +1 -1
- package/.docs/models/providers/lilac.md +1 -1
- package/.docs/models/providers/llama.md +1 -1
- package/.docs/models/providers/llmgateway.md +2 -7
- package/.docs/models/providers/llmtr.md +1 -1
- package/.docs/models/providers/lmstudio.md +1 -1
- package/.docs/models/providers/longcat.md +1 -1
- package/.docs/models/providers/lucidquery.md +1 -1
- package/.docs/models/providers/lynkr.md +1 -1
- package/.docs/models/providers/meganova.md +1 -1
- package/.docs/models/providers/meta.md +1 -1
- package/.docs/models/providers/minimax-cn-coding-plan.md +1 -1
- package/.docs/models/providers/minimax-cn.md +1 -1
- package/.docs/models/providers/minimax-coding-plan.md +1 -1
- package/.docs/models/providers/minimax.md +1 -1
- package/.docs/models/providers/mixlayer.md +1 -1
- package/.docs/models/providers/moark.md +1 -1
- package/.docs/models/providers/modal.md +1 -1
- package/.docs/models/providers/model-oracle-ai.md +1 -1
- package/.docs/models/providers/modelis.md +1 -1
- package/.docs/models/providers/modelscope.md +1 -1
- package/.docs/models/providers/moonshotai-cn.md +1 -1
- package/.docs/models/providers/moonshotai.md +1 -1
- package/.docs/models/providers/morph.md +1 -1
- package/.docs/models/providers/nano-gpt.md +11 -7
- package/.docs/models/providers/nearai.md +1 -1
- package/.docs/models/providers/nebius.md +3 -2
- package/.docs/models/providers/neuralwatt.md +1 -1
- package/.docs/models/providers/nova.md +1 -1
- package/.docs/models/providers/novita-ai.md +1 -1
- package/.docs/models/providers/nvidia.md +3 -2
- package/.docs/models/providers/ofox.md +4 -3
- package/.docs/models/providers/ollama-cloud.md +1 -1
- package/.docs/models/providers/opencode-go.md +1 -1
- package/.docs/models/providers/opencode.md +64 -64
- package/.docs/models/providers/orcarouter.md +1 -1
- package/.docs/models/providers/ovhcloud.md +1 -1
- package/.docs/models/providers/perplexity-agent.md +1 -1
- package/.docs/models/providers/pioneer.md +1 -1
- package/.docs/models/providers/poe.md +1 -1
- package/.docs/models/providers/poolside.md +1 -1
- package/.docs/models/providers/privatemode-ai.md +12 -10
- package/.docs/models/providers/qihang-ai.md +1 -1
- package/.docs/models/providers/qiniu-ai.md +1 -1
- package/.docs/models/providers/regolo-ai.md +26 -21
- package/.docs/models/providers/requesty.md +3 -3
- package/.docs/models/providers/routing-run.md +1 -1
- package/.docs/models/providers/sakana.md +1 -1
- package/.docs/models/providers/sarvam.md +1 -1
- package/.docs/models/providers/scaleway.md +1 -1
- package/.docs/models/providers/scx.md +1 -1
- package/.docs/models/providers/siliconflow-cn.md +1 -1
- package/.docs/models/providers/siliconflow.md +1 -1
- package/.docs/models/providers/snowflake-cortex.md +6 -2
- package/.docs/models/providers/stackit.md +1 -1
- package/.docs/models/providers/stepfun-ai-step-plan.md +1 -1
- package/.docs/models/providers/stepfun-ai.md +1 -1
- package/.docs/models/providers/stepfun-step-plan.md +1 -1
- package/.docs/models/providers/stepfun.md +1 -1
- package/.docs/models/providers/subconscious.md +1 -1
- package/.docs/models/providers/submodel.md +1 -1
- package/.docs/models/providers/synthetic.md +1 -1
- package/.docs/models/providers/tencent-coding-plan.md +1 -1
- package/.docs/models/providers/tencent-token-plan.md +1 -1
- package/.docs/models/providers/tencent-tokenhub.md +1 -1
- package/.docs/models/providers/tensorx.md +1 -1
- package/.docs/models/providers/the-grid-ai.md +1 -1
- package/.docs/models/providers/thinkingmachines.md +1 -1
- package/.docs/models/providers/tinfoil.md +2 -2
- package/.docs/models/providers/togetherai.md +1 -1
- package/.docs/models/providers/trustedrouter.md +1 -1
- package/.docs/models/providers/umans-ai-coding-plan.md +1 -1
- package/.docs/models/providers/umans-ai.md +1 -1
- package/.docs/models/providers/unorouter.md +1 -1
- package/.docs/models/providers/upstage.md +1 -1
- package/.docs/models/providers/venice.md +1 -1
- package/.docs/models/providers/vivgrid.md +1 -1
- package/.docs/models/providers/vultr.md +1 -1
- package/.docs/models/providers/wafer.ai.md +1 -1
- package/.docs/models/providers/wandb.md +3 -2
- package/.docs/models/providers/xiaomi-token-plan-ams.md +1 -1
- package/.docs/models/providers/xiaomi-token-plan-cn.md +1 -1
- package/.docs/models/providers/xiaomi-token-plan-sgp.md +1 -1
- package/.docs/models/providers/xiaomi.md +1 -1
- package/.docs/models/providers/xpersona.md +1 -1
- package/.docs/models/providers/zai-coding-plan.md +1 -1
- package/.docs/models/providers/zai.md +1 -1
- package/.docs/models/providers/zeldoc.md +8 -8
- package/.docs/models/providers/zenifra.md +1 -1
- package/.docs/models/providers/zenmux.md +1 -16
- package/.docs/models/providers/zhipuai-coding-plan.md +1 -1
- package/.docs/models/providers/zhipuai.md +1 -1
- package/.docs/models/providers.md +1 -0
- package/.docs/reference/agent-controller/agent-controller-class.md +35 -4
- package/.docs/reference/agent-controller/session.md +5 -3
- package/.docs/reference/agents/channels.md +2 -2
- package/.docs/reference/agents/durable-agent.md +2 -0
- package/.docs/reference/agents/generateLegacy.md +2 -2
- package/.docs/reference/agents/getDefaultOptions.md +1 -1
- package/.docs/reference/agents/getDefaultStreamOptions.md +1 -1
- package/.docs/reference/agents/getVoice.md +1 -1
- package/.docs/reference/agents/inngest-agent.md +3 -1
- package/.docs/reference/agents/network.md +1 -1
- package/.docs/reference/ai-sdk/handle-network-stream.md +1 -1
- package/.docs/reference/ai-sdk/network-route.md +1 -1
- package/.docs/{guides/agent-frameworks/ai-sdk.md → reference/ai-sdk/overview.md} +2 -2
- package/.docs/reference/auth/auth0.md +1 -1
- package/.docs/reference/auth/better-auth.md +1 -1
- package/.docs/reference/auth/clerk.md +1 -1
- package/.docs/reference/auth/firebase.md +1 -1
- package/.docs/reference/auth/google.md +1 -1
- package/.docs/reference/auth/okta.md +5 -1
- package/.docs/reference/auth/supabase.md +1 -1
- package/.docs/reference/auth/workos.md +1 -1
- package/.docs/reference/browser/agent-browser.md +2 -2
- 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 +1 -1
- package/.docs/reference/browser/stagehand-browser.md +2 -2
- package/.docs/reference/channels/channel-provider.md +1 -1
- package/.docs/reference/channels/slack-provider.md +2 -2
- package/.docs/reference/cli/mastra.md +6 -6
- package/.docs/reference/client-js/agents.md +2 -1
- package/.docs/reference/client-js/workflows.md +3 -3
- package/.docs/reference/code-sdk/mount-agent-controller.md +1 -1
- package/.docs/reference/configuration.md +22 -28
- package/.docs/reference/core/addDynamicWorkflow.md +2 -2
- package/.docs/reference/core/addDynamicWorkflows.md +2 -2
- package/.docs/reference/core/getStorage.md +1 -1
- package/.docs/reference/core/getVector.md +2 -2
- package/.docs/reference/core/listVectors.md +2 -2
- package/.docs/reference/core/setStorage.md +1 -1
- package/.docs/reference/datasets/startExperiment.md +8 -0
- package/.docs/reference/file-based-agents/config.md +2 -0
- package/.docs/reference/file-based-agents/instructions.md +2 -0
- package/.docs/reference/file-based-agents/logger.md +2 -0
- package/.docs/reference/file-based-agents/memory.md +2 -0
- package/.docs/reference/file-based-agents/observability.md +2 -0
- package/.docs/reference/file-based-agents/processors.md +2 -0
- package/.docs/reference/file-based-agents/schedules.md +2 -0
- package/.docs/reference/file-based-agents/scorers.md +2 -0
- package/.docs/reference/file-based-agents/server.md +2 -0
- package/.docs/reference/file-based-agents/skills.md +2 -0
- package/.docs/reference/file-based-agents/storage.md +3 -1
- package/.docs/reference/file-based-agents/studio.md +3 -1
- package/.docs/reference/file-based-agents/subagents.md +2 -0
- package/.docs/reference/file-based-agents/tools.md +2 -0
- package/.docs/reference/file-based-agents/workflows.md +2 -0
- package/.docs/reference/file-based-agents/workspace.md +2 -0
- package/.docs/reference/index.md +34 -55
- package/.docs/{guides/getting-started → reference}/manual-install.md +3 -3
- package/.docs/{guides → reference}/migrations/ai-sdk-v4-to-v5.md +1 -1
- package/.docs/{guides → reference}/migrations/mastra-cloud.md +2 -2
- package/.docs/{guides → reference}/migrations/network-to-supervisor.md +1 -1
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/cli.md +1 -1
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/memory.md +1 -1
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/overview.md +41 -41
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/tools.md +1 -1
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/tracing.md +11 -13
- package/.docs/reference/observability/tracing/bridges/datadog.md +2 -2
- package/.docs/reference/observability/tracing/bridges/otel.md +2 -2
- package/.docs/reference/observability/tracing/exporters/arize.md +1 -1
- package/.docs/reference/observability/tracing/exporters/arthur.md +1 -1
- package/.docs/reference/observability/tracing/exporters/cloud-exporter.md +0 -1
- package/.docs/reference/observability/tracing/exporters/confident-ai.md +1 -1
- package/.docs/reference/observability/tracing/exporters/console-exporter.md +0 -1
- package/.docs/reference/observability/tracing/exporters/datadog.md +1 -1
- package/.docs/reference/observability/tracing/exporters/default-exporter.md +0 -1
- package/.docs/reference/observability/tracing/exporters/mastra-platform-exporter.md +12 -1
- package/.docs/reference/observability/tracing/exporters/mastra-storage-exporter.md +0 -1
- package/.docs/reference/observability/tracing/exporters/otel.md +2 -2
- package/.docs/reference/observability/tracing/processors/sensitive-data-filter.md +111 -99
- package/.docs/reference/observability/tracing/span-filtering.md +1 -1
- package/.docs/reference/processors/pii-detector.md +2 -0
- package/.docs/reference/processors/prompt-injection-detector.md +2 -0
- package/.docs/reference/processors/regex-filter-processor.md +20 -0
- package/.docs/reference/processors/response-cache.md +2 -0
- package/.docs/reference/processors/tool-search-processor.md +33 -1
- package/.docs/reference/pubsub/lease-provider.md +1 -1
- package/.docs/{guides → reference}/rag/chunking-and-embedding.md +16 -19
- package/.docs/reference/rag/database-config.md +1 -1
- package/.docs/{guides/rag/graph-rag.md → reference/rag/graph-rag-guide.md} +1 -1
- package/.docs/reference/rag/metadata-filters.md +13 -4
- package/.docs/{guides → reference}/rag/overview.md +2 -2
- package/.docs/{guides → reference}/rag/retrieval.md +18 -1
- package/.docs/{guides → reference}/rag/vector-databases.md +42 -1
- package/.docs/reference/schedules/overview.md +2 -0
- package/.docs/reference/server/create-route.md +27 -1
- package/.docs/reference/server/register-api-route.md +2 -0
- package/.docs/reference/signals/create-notification-inbox-tool.md +2 -0
- package/.docs/reference/signals/signal-provider.md +2 -0
- package/.docs/reference/signals/task-signal-provider.md +2 -0
- package/.docs/reference/signals/webhook-signal-provider.md +2 -0
- package/.docs/reference/storage/composite.md +4 -4
- package/.docs/reference/storage/overview.md +1 -1
- package/.docs/reference/storage/retention.md +4 -4
- package/.docs/reference/streaming/ChunkType.md +3 -3
- package/.docs/reference/streaming/agents/stream.md +1 -1
- package/.docs/reference/streaming/agents/streamLegacy.md +3 -3
- package/.docs/reference/streaming/agents/streamUntilIdle.md +1 -1
- package/.docs/reference/templates/overview.md +1 -1
- package/.docs/reference/tools/create-code-mode.md +3 -1
- package/.docs/reference/tools/isolated-vm-transport.md +1 -1
- package/.docs/reference/tools/mcp-client.md +51 -0
- package/.docs/reference/tools/mcp-server.md +1 -1
- package/.docs/reference/tools/quickjs-transport.md +92 -0
- package/.docs/reference/vectors/chroma.md +1 -1
- package/.docs/reference/vectors/convex.md +2 -2
- package/.docs/reference/vectors/oracledb.md +347 -0
- package/.docs/{guides → reference}/voice/overview.md +58 -109
- package/.docs/{guides → reference}/voice/speech-to-speech.md +1 -1
- package/.docs/{guides → reference}/voice/speech-to-text.md +8 -8
- package/.docs/{guides → reference}/voice/text-to-speech.md +11 -12
- package/.docs/reference/workers/overview.md +10 -8
- package/.docs/reference/workflows/dynamic-workflow-definition.md +3 -1
- package/.docs/reference/workflows/run-methods/timeTravel.md +1 -0
- package/.docs/reference/workflows/workflow.md +18 -0
- package/.docs/reference/workspace/local-sandbox.md +1 -1
- package/.docs/reference/workspace/platform-filesystem.md +3 -3
- package/.docs/reference/workspace/platform-sandbox.md +11 -3
- package/.docs/reference/workspace/process-manager.md +3 -3
- package/.docs/reference/workspace/sandbox.md +10 -0
- package/CHANGELOG.md +97 -0
- package/dist/index.js +1 -1
- package/dist/{src-BZcgzbk9.js → src-D-W-bx5t.js} +2 -2
- package/dist/{src-BZcgzbk9.js.map → src-D-W-bx5t.js.map} +1 -1
- package/dist/stdio.js +1 -1
- package/package.json +6 -6
- package/.docs/docs/capabilities/channels/other-adapters.md +0 -68
- package/.docs/docs/observability/integrations/bridges/datadog.md +0 -219
- package/.docs/docs/observability/integrations/bridges/otel.md +0 -234
- package/.docs/docs/observability/integrations/exporters/datadog.md +0 -321
- package/.docs/docs/observability/integrations/exporters/mastra-platform.md +0 -201
- package/.docs/docs/observability/integrations/overview.md +0 -47
- package/.docs/docs/observability/integrations/processors/sensitive-data-filter.md +0 -302
- package/.docs/guides/build-your-ui/copilotkit/channels.md +0 -86
- package/.docs/guides/build-your-ui/copilotkit/generative-ui.md +0 -174
- package/.docs/guides/deployment/mastra-workers.md +0 -576
- package/.docs/guides/getting-started/quickstart.md +0 -88
- package/.docs/guides/guide/ai-recruiter.md +0 -228
- package/.docs/guides/guide/chef-michel.md +0 -211
- package/.docs/guides/guide/code-review-bot.md +0 -228
- package/.docs/guides/guide/coding-agent.md +0 -392
- package/.docs/guides/guide/dev-assistant.md +0 -309
- package/.docs/guides/guide/docs-manager.md +0 -240
- package/.docs/guides/guide/github-actions-pr-description.md +0 -238
- package/.docs/guides/guide/notes-mcp-server.md +0 -418
- package/.docs/guides/guide/publishing-mcp-server.md +0 -137
- package/.docs/guides/guide/research-assistant.md +0 -350
- package/.docs/guides/guide/research-coordinator.md +0 -418
- package/.docs/guides/guide/signal-provider.md +0 -221
- package/.docs/guides/guide/slack-assistant.md +0 -193
- package/.docs/guides/guide/stock-agent.md +0 -132
- package/.docs/guides/guide/web-search.md +0 -322
- package/.docs/guides/guide/whatsapp-chat-bot.md +0 -407
- package/.docs/guides/index.md +0 -24
- package/.docs/guides/voice/realtime-voice.md +0 -430
- package/.docs/reference/voice/google.md +0 -290
- package/.docs/reference/voice/inworld.md +0 -137
- package/.docs/reference/voice/openai.md +0 -96
- package/.docs/reference/voice/playai.md +0 -82
- package/.docs/reference/workspace/vercel-serverless.md +0 -128
- /package/.docs/{guides/concepts → docs/guides}/streaming.md +0 -0
- /package/.docs/{reference → docs}/mastra-platform/api.md +0 -0
- /package/.docs/{docs/server → integrations}/auth/better-auth.md +0 -0
- /package/.docs/{docs/server → integrations}/auth/google.md +0 -0
- /package/.docs/{reference → integrations}/voice/azure.md +0 -0
- /package/.docs/{reference → integrations}/voice/deepgram.md +0 -0
- /package/.docs/{reference → integrations}/voice/elevenlabs.md +0 -0
- /package/.docs/{reference → integrations}/voice/mistral.md +0 -0
- /package/.docs/{reference → integrations}/voice/murf.md +0 -0
- /package/.docs/{reference → integrations}/voice/sarvam.md +0 -0
- /package/.docs/{reference → integrations}/voice/speechify.md +0 -0
- /package/.docs/{reference/voice/xai-realtime.md → integrations/voice/xai.md} +0 -0
- /package/.docs/{guides → reference}/migrations/agentnetwork.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/agent.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/client.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/deployment.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/evals.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/mastra.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/mcp.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/processors.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/rag.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/storage.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/vectors.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/voice.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/workflows.md +0 -0
- /package/.docs/{guides → reference}/migrations/vnext-to-standard-apis.md +0 -0
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
2
|
|
|
3
|
-
#
|
|
3
|
+
# Web framework
|
|
4
4
|
|
|
5
5
|
When Mastra is integrated with a web framework, it deploys alongside your application using the framework's standard deployment process. Follow the instructions below to ensure your Mastra integration deploys correctly.
|
|
6
6
|
|
|
7
|
-
> **Warning:** If you're deploying to a cloud provider, remove any usage of [LibSQLStore](https://mastra.ai/
|
|
7
|
+
> **Warning:** If you're deploying to a cloud provider, remove any usage of [LibSQLStore](https://mastra.ai/integrations/databases/libsql) from your Mastra configuration. LibSQLStore requires filesystem access and isn't compatible with serverless platforms.
|
|
8
8
|
|
|
9
9
|
Integration guides:
|
|
10
10
|
|
|
11
|
-
- [With Next.js](https://mastra.ai/
|
|
12
|
-
- [With Astro](https://mastra.ai/
|
|
11
|
+
- [With Next.js](https://mastra.ai/integrations/frameworks/next-js)
|
|
12
|
+
- [With Astro](https://mastra.ai/integrations/frameworks/astro)
|
|
13
13
|
|
|
14
14
|
## With Next.js on Vercel
|
|
15
15
|
|
|
16
|
-
If you've integrated Mastra with Next.js [by following our guide](https://mastra.ai/
|
|
16
|
+
If you've integrated Mastra with Next.js [by following our guide](https://mastra.ai/integrations/frameworks/next-js) and plan to deploy to Vercel, add `serverExternalPackages: ["@mastra/*"]` to your `next.config.ts`:
|
|
17
17
|
|
|
18
18
|
```typescript
|
|
19
19
|
import type { NextConfig } from 'next'
|
|
@@ -27,7 +27,7 @@ export default nextConfig
|
|
|
27
27
|
|
|
28
28
|
## With Astro on Vercel
|
|
29
29
|
|
|
30
|
-
If you've integrated Mastra with Astro [by following our guide](https://mastra.ai/
|
|
30
|
+
If you've integrated Mastra with Astro [by following our guide](https://mastra.ai/integrations/frameworks/astro) and plan to deploy to Vercel, add the Vercel adapter and server output to your `astro.config.mjs`:
|
|
31
31
|
|
|
32
32
|
```javascript
|
|
33
33
|
import { defineConfig } from 'astro/config'
|
|
@@ -41,7 +41,7 @@ export default defineConfig({
|
|
|
41
41
|
|
|
42
42
|
## With Astro on Netlify
|
|
43
43
|
|
|
44
|
-
If you've integrated Mastra with Astro [by following our guide](https://mastra.ai/
|
|
44
|
+
If you've integrated Mastra with Astro [by following our guide](https://mastra.ai/integrations/frameworks/astro) and plan to deploy to Netlify, add the Netlify adapter and server output to your `astro.config.mjs`:
|
|
45
45
|
|
|
46
46
|
```javascript
|
|
47
47
|
import { defineConfig } from 'astro/config'
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Workers
|
|
4
4
|
|
|
5
|
-
> **Beta:**
|
|
5
|
+
> **Beta:** Breaking changes may occur without a major version bump until the API is stable. See [known limitations](#known-limitations) for current gaps.
|
|
6
6
|
|
|
7
7
|
Workers handle background processing outside the request-response cycle. Workflow step execution, cron-based scheduling, and long-running tool calls all run in workers, keeping the API responsive.
|
|
8
8
|
|
|
@@ -106,7 +106,23 @@ Run the same build artifact in multiple containers, each with a different [`MAST
|
|
|
106
106
|
|
|
107
107
|
Split deployments require a distributed PubSub backend ([`RedisStreamsPubSub`](https://mastra.ai/reference/pubsub/redis-streams) or [`GoogleCloudPubSub`](https://mastra.ai/reference/pubsub/google-cloud-pubsub)), a shared [storage backend](https://mastra.ai/reference/workers/overview), and network connectivity between the orchestration worker and the API.
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
### Select workers
|
|
110
|
+
|
|
111
|
+
Set [`MASTRA_WORKERS`](https://mastra.ai/reference/workers/overview) to control which workers run in each process:
|
|
112
|
+
|
|
113
|
+
| Value | Behavior |
|
|
114
|
+
| ------------------------------- | ------------------------------------------------------------------------------ |
|
|
115
|
+
| `false` | Disable all workers. Use this for the API process in a fully split deployment. |
|
|
116
|
+
| `orchestration` | Start the orchestration worker. |
|
|
117
|
+
| `scheduler` | Start the scheduler worker. |
|
|
118
|
+
| `backgroundTasks` | Start the background task worker. |
|
|
119
|
+
| `orchestration,backgroundTasks` | Start multiple workers from a comma-separated allowlist. |
|
|
120
|
+
|
|
121
|
+
You can also pass a worker name to the CLI. The command sets `MASTRA_WORKERS` in the spawned process:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
mastra worker start orchestration
|
|
125
|
+
```
|
|
110
126
|
|
|
111
127
|
## Network architecture
|
|
112
128
|
|
|
@@ -120,6 +136,237 @@ In a split deployment:
|
|
|
120
136
|
|
|
121
137
|
All three worker types (orchestration, scheduler, background task) sit behind the API on a private network. They share access to the PubSub backend and storage database but never receive traffic directly from clients. If a worker-related feature needs an HTTP route (for example, token minting for a voice integration), that route runs on the API server, not on the worker process.
|
|
122
138
|
|
|
139
|
+
## Deploy split workers
|
|
140
|
+
|
|
141
|
+
Build the API and worker artifacts:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
mastra build
|
|
145
|
+
mastra worker build --output-dir .mastra/worker
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
`mastra build` creates the API artifact in `.mastra/output/`. [`mastra worker build`](https://mastra.ai/reference/cli/mastra) creates a worker artifact in `.mastra/worker/`. The following Dockerfile accepts either directory:
|
|
149
|
+
|
|
150
|
+
```dockerfile
|
|
151
|
+
FROM node:22-alpine
|
|
152
|
+
|
|
153
|
+
ARG MASTRA_OUTPUT=.mastra/output
|
|
154
|
+
|
|
155
|
+
WORKDIR /app
|
|
156
|
+
|
|
157
|
+
COPY ${MASTRA_OUTPUT}/package.json ${MASTRA_OUTPUT}/.npmrc* ./
|
|
158
|
+
RUN npm install --omit=dev
|
|
159
|
+
|
|
160
|
+
COPY ${MASTRA_OUTPUT}/ .
|
|
161
|
+
|
|
162
|
+
EXPOSE 4111
|
|
163
|
+
CMD ["node", "index.mjs"]
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
See [Deploy a Mastra server](https://mastra.ai/docs/deployment/mastra-server) for more information about the build output.
|
|
167
|
+
|
|
168
|
+
### Docker Compose
|
|
169
|
+
|
|
170
|
+
The following configuration runs PostgreSQL, Redis, the API, and one process for each worker type. Every process uses shared infrastructure, and the worker processes use the worker artifact.
|
|
171
|
+
|
|
172
|
+
```yaml
|
|
173
|
+
x-worker: &worker
|
|
174
|
+
build:
|
|
175
|
+
context: .
|
|
176
|
+
args:
|
|
177
|
+
MASTRA_OUTPUT: .mastra/worker
|
|
178
|
+
|
|
179
|
+
x-mastra-environment: &shared-environment
|
|
180
|
+
DATABASE_URL: postgres://mastra:${POSTGRES_PASSWORD}@postgres:5432/mastra
|
|
181
|
+
REDIS_URL: redis://redis:6379
|
|
182
|
+
|
|
183
|
+
services:
|
|
184
|
+
postgres:
|
|
185
|
+
image: postgres:16-alpine
|
|
186
|
+
environment:
|
|
187
|
+
POSTGRES_USER: mastra
|
|
188
|
+
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
189
|
+
POSTGRES_DB: mastra
|
|
190
|
+
volumes:
|
|
191
|
+
- pgdata:/var/lib/postgresql/data
|
|
192
|
+
healthcheck:
|
|
193
|
+
test: ['CMD-SHELL', 'pg_isready -U mastra']
|
|
194
|
+
interval: 5s
|
|
195
|
+
timeout: 3s
|
|
196
|
+
retries: 5
|
|
197
|
+
|
|
198
|
+
redis:
|
|
199
|
+
image: redis:7-alpine
|
|
200
|
+
healthcheck:
|
|
201
|
+
test: ['CMD', 'redis-cli', 'ping']
|
|
202
|
+
interval: 5s
|
|
203
|
+
timeout: 3s
|
|
204
|
+
retries: 5
|
|
205
|
+
|
|
206
|
+
api:
|
|
207
|
+
build:
|
|
208
|
+
context: .
|
|
209
|
+
args:
|
|
210
|
+
MASTRA_OUTPUT: .mastra/output
|
|
211
|
+
ports:
|
|
212
|
+
- '4111:4111'
|
|
213
|
+
environment:
|
|
214
|
+
<<: *shared-environment
|
|
215
|
+
WORKER_TOKEN: ${WORKER_TOKEN}
|
|
216
|
+
MASTRA_WORKERS: 'false'
|
|
217
|
+
depends_on:
|
|
218
|
+
postgres:
|
|
219
|
+
condition: service_healthy
|
|
220
|
+
redis:
|
|
221
|
+
condition: service_healthy
|
|
222
|
+
healthcheck:
|
|
223
|
+
test: ['CMD', 'wget', '-qO-', 'http://localhost:4111/api/agents']
|
|
224
|
+
interval: 5s
|
|
225
|
+
timeout: 3s
|
|
226
|
+
retries: 5
|
|
227
|
+
|
|
228
|
+
orchestration-worker:
|
|
229
|
+
<<: *worker
|
|
230
|
+
environment:
|
|
231
|
+
<<: *shared-environment
|
|
232
|
+
MASTRA_WORKERS: orchestration
|
|
233
|
+
MASTRA_STEP_EXECUTION_URL: http://api:4111/api
|
|
234
|
+
MASTRA_WORKER_AUTH_TOKEN: ${WORKER_TOKEN}
|
|
235
|
+
depends_on:
|
|
236
|
+
api:
|
|
237
|
+
condition: service_healthy
|
|
238
|
+
|
|
239
|
+
scheduler-worker:
|
|
240
|
+
<<: *worker
|
|
241
|
+
environment:
|
|
242
|
+
<<: *shared-environment
|
|
243
|
+
MASTRA_WORKERS: scheduler
|
|
244
|
+
depends_on:
|
|
245
|
+
api:
|
|
246
|
+
condition: service_healthy
|
|
247
|
+
|
|
248
|
+
background-task-worker:
|
|
249
|
+
<<: *worker
|
|
250
|
+
environment:
|
|
251
|
+
<<: *shared-environment
|
|
252
|
+
MASTRA_WORKERS: backgroundTasks
|
|
253
|
+
depends_on:
|
|
254
|
+
api:
|
|
255
|
+
condition: service_healthy
|
|
256
|
+
|
|
257
|
+
volumes:
|
|
258
|
+
pgdata:
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
Set the secrets next to `docker-compose.yml`, along with any model provider credentials your application needs:
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
POSTGRES_PASSWORD=your-secure-password
|
|
265
|
+
WORKER_TOKEN=your-shared-secret-token
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
Configure the API auth provider to accept `WORKER_TOKEN` before exposing the deployment. The orchestration worker sends the same value through `MASTRA_WORKER_AUTH_TOKEN`. The scheduler and background task workers don't call the step execution endpoint in this pull-based topology, so they don't need that variable.
|
|
269
|
+
|
|
270
|
+
Start the stack and verify that the containers and API are available:
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
docker compose up -d
|
|
274
|
+
docker compose ps
|
|
275
|
+
curl http://localhost:4111/api/agents
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
### Kubernetes
|
|
279
|
+
|
|
280
|
+
Create separate Deployments for the API, orchestration worker, scheduler worker, and background task worker. Use the same image and Secret for each Deployment. Set only the role-specific environment variables directly on each container.
|
|
281
|
+
|
|
282
|
+
The orchestration worker Deployment has the following shape:
|
|
283
|
+
|
|
284
|
+
```yaml
|
|
285
|
+
apiVersion: apps/v1
|
|
286
|
+
kind: Deployment
|
|
287
|
+
metadata:
|
|
288
|
+
name: orchestration-worker
|
|
289
|
+
spec:
|
|
290
|
+
replicas: 1
|
|
291
|
+
selector:
|
|
292
|
+
matchLabels:
|
|
293
|
+
app: orchestration-worker
|
|
294
|
+
template:
|
|
295
|
+
metadata:
|
|
296
|
+
labels:
|
|
297
|
+
app: orchestration-worker
|
|
298
|
+
spec:
|
|
299
|
+
containers:
|
|
300
|
+
- name: worker
|
|
301
|
+
image: your-registry/mastra-workers:latest
|
|
302
|
+
env:
|
|
303
|
+
- name: MASTRA_WORKERS
|
|
304
|
+
value: orchestration
|
|
305
|
+
- name: MASTRA_STEP_EXECUTION_URL
|
|
306
|
+
value: http://api:4111/api
|
|
307
|
+
envFrom:
|
|
308
|
+
- secretRef:
|
|
309
|
+
name: mastra-secrets
|
|
310
|
+
resources:
|
|
311
|
+
requests:
|
|
312
|
+
cpu: 250m
|
|
313
|
+
memory: 256Mi
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
Use `MASTRA_WORKERS: scheduler` and `MASTRA_WORKERS: backgroundTasks` for the other worker Deployments. Set `MASTRA_WORKERS: 'false'` on the API Deployment and expose the API with a Service. Give every process access to the same database and PubSub backend. Configure the API auth provider with a worker token, then expose that token to the orchestration worker as `MASTRA_WORKER_AUTH_TOKEN`. See [Deploy Mastra to Kubernetes](https://mastra.ai/integrations/deploy/kubernetes) for the base Kubernetes resources.
|
|
317
|
+
|
|
318
|
+
Apply the manifests, then verify the pods and API:
|
|
319
|
+
|
|
320
|
+
```bash
|
|
321
|
+
kubectl apply -f k8s/
|
|
322
|
+
kubectl get pods
|
|
323
|
+
kubectl port-forward svc/api 4111:4111
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
In a separate terminal, request an API route:
|
|
327
|
+
|
|
328
|
+
```bash
|
|
329
|
+
curl http://localhost:4111/api/agents
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
### Step execution URL
|
|
333
|
+
|
|
334
|
+
In a fully split deployment, the orchestration worker delegates workflow step execution to the API over HTTP. Set `MASTRA_STEP_EXECUTION_URL` to the API's internal URL, including the `/api` prefix:
|
|
335
|
+
|
|
336
|
+
```bash
|
|
337
|
+
MASTRA_STEP_EXECUTION_URL=http://api:4111/api
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
Without this variable, the orchestration worker attempts to execute steps in its own process. That process doesn't have access to the full Mastra runtime in a split deployment.
|
|
341
|
+
|
|
342
|
+
The endpoint uses the server's normal auth pipeline. If the API has an auth provider, set `MASTRA_WORKER_AUTH_TOKEN` to a bearer token that provider accepts. Mastra forwards the value as an `Authorization: Bearer` credential. The configured auth provider validates the token. See [Worker authentication](https://mastra.ai/docs/server/auth/workers) for server configuration and other credential formats.
|
|
343
|
+
|
|
344
|
+
### Scale workers
|
|
345
|
+
|
|
346
|
+
The orchestration and background task workers can scale horizontally. PubSub consumer groups distribute events across their instances:
|
|
347
|
+
|
|
348
|
+
```bash
|
|
349
|
+
docker compose up -d --scale orchestration-worker=3
|
|
350
|
+
docker compose up -d --scale background-task-worker=2
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
For Kubernetes, change the Deployment replica count manually or use a HorizontalPodAutoscaler:
|
|
354
|
+
|
|
355
|
+
```bash
|
|
356
|
+
kubectl scale deployment/orchestration-worker --replicas=3
|
|
357
|
+
kubectl scale deployment/background-task-worker --replicas=2
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
Run exactly one scheduler worker. Multiple schedulers polling the same storage can publish duplicate events for a schedule.
|
|
361
|
+
|
|
362
|
+
### Crash recovery
|
|
363
|
+
|
|
364
|
+
A distributed PubSub backend persists unacknowledged events so orchestration and background task workers can resume processing after a restart. If the API is unavailable when the orchestration worker requests step execution, the request fails and the event is delivered again. An event can be processed more than once, so handlers should be idempotent when possible.
|
|
365
|
+
|
|
366
|
+
The scheduler calculates the next fire time from the current time after it restarts. It doesn't replay schedules that elapsed while it was unavailable.
|
|
367
|
+
|
|
368
|
+
If the API crashes while a step is executing, that work can be lost and the workflow run can remain in a `running` state. See [known limitations](#known-limitations) and [durable agent crash recovery](https://mastra.ai/docs/long-running-agents/durable-agents).
|
|
369
|
+
|
|
123
370
|
## Known limitations
|
|
124
371
|
|
|
125
372
|
- **No dead-letter queue**: Failed events are nacked and retried, but there's no DLQ for events that fail after all retries.
|
|
@@ -129,7 +376,6 @@ All three worker types (orchestration, scheduler, background task) sit behind th
|
|
|
129
376
|
|
|
130
377
|
## Related
|
|
131
378
|
|
|
132
|
-
- [Worker deployment guide](https://mastra.ai/guides/deployment/mastra-workers): Docker Compose and Kubernetes examples
|
|
133
379
|
- [Worker authentication](https://mastra.ai/docs/server/auth/workers): Secure worker-to-API communication
|
|
134
380
|
- [Workers reference](https://mastra.ai/reference/workers/overview): Details about worker environment variables and types, with a list of supported storage backends
|
|
135
381
|
- [CLI reference](https://mastra.ai/reference/cli/mastra): `mastra worker build` and `mastra worker start`
|
|
@@ -8,10 +8,10 @@ Mastra [workflows](https://mastra.ai/docs/workflows/overview) can be executed us
|
|
|
8
8
|
|
|
9
9
|
Inngest is a developer platform for running background workflows without managing infrastructure. Mastra workflows can be deployed to Inngest, which provides step memoization, automatic retries, real-time monitoring, and suspend/resume capabilities.
|
|
10
10
|
|
|
11
|
-
Visit the [Inngest deployment guide](https://mastra.ai/
|
|
11
|
+
Visit the [Inngest deployment guide](https://mastra.ai/integrations/deploy/inngest) for setup instructions and the [Inngest workflow example](https://github.com/mastra-ai/mastra/tree/main/examples/inngest) for a complete implementation.
|
|
12
12
|
|
|
13
13
|
## Temporal
|
|
14
14
|
|
|
15
15
|
Temporal is a durable execution platform for orchestrating long-running workflows. Mastra workflows can run on Temporal workers, with each `createStep` mapped to a Temporal activity for automatic retries and durable state.
|
|
16
16
|
|
|
17
|
-
The `@mastra/temporal` package is experimental and not ready for production use. Visit the [Temporal deployment guide](https://mastra.ai/
|
|
17
|
+
The `@mastra/temporal` package is experimental and not ready for production use. Visit the [Temporal deployment guide](https://mastra.ai/integrations/deploy/temporal) for setup instructions.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
2
|
|
|
3
|
-
#
|
|
3
|
+
# Evals
|
|
4
4
|
|
|
5
5
|
While traditional software tests have clear pass/fail conditions, AI outputs are non-deterministic, they can vary with the same input. **Scorers** help bridge this gap by providing quantifiable metrics for measuring agent quality.
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
2
|
|
|
3
|
-
# Quick
|
|
3
|
+
# Quick checks
|
|
4
4
|
|
|
5
5
|
Quick Checks are composable micro-scorers for common assertions like "output contains X" or "agent called tool Y." They require no LLM, run instantly, and plug into the same `scorers: [...]` array as any other scorer.
|
|
6
6
|
|
|
@@ -138,7 +138,7 @@ See the [project structure reference](https://mastra.ai/reference/project-struct
|
|
|
138
138
|
|
|
139
139
|
## File-based agents
|
|
140
140
|
|
|
141
|
-
> **Beta:**
|
|
141
|
+
> **Beta:** Breaking changes may occur without a major version bump until the API is stable.
|
|
142
142
|
>
|
|
143
143
|
> File-based discovery only runs through `mastra dev` or `mastra build`. If your app imports `mastra` directly, including through a web framework or server adapter, file-based agents aren't discovered. Register those agents in code or run Mastra as a separate server.
|
|
144
144
|
|
|
@@ -46,7 +46,7 @@ Use this pattern when the task is open-ended and the full sequence isn't known i
|
|
|
46
46
|
|
|
47
47
|
In Mastra, this pattern maps directly to [supervisor agents](https://mastra.ai/docs/capabilities/subagents). A supervisor agent defines subagents on the `agents` property and uses `stream()` or `generate()` to coordinate them. Mastra also provides delegation hooks, message filtering, and memory isolation to help control this pattern.
|
|
48
48
|
|
|
49
|
-
> **Tip:** Follow the [supervisor agents tutorial](https://mastra.ai/
|
|
49
|
+
> **Tip:** Follow the [supervisor agents tutorial](https://mastra.ai/blog/build-a-research-coordinator-with-supervisor-agents) for a step-by-step guide.
|
|
50
50
|
|
|
51
51
|
## Council
|
|
52
52
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
2
|
|
|
3
|
-
#
|
|
3
|
+
# Agent Controller
|
|
4
4
|
|
|
5
|
-
> **Beta:**
|
|
5
|
+
> **Beta:** Breaking changes may occur without a major version bump until the API is stable.
|
|
6
6
|
|
|
7
7
|
`AgentController` is a shared runtime host for interactive agent applications. It coordinates modes, models, storage, workspaces, tool approvals, subagents, and channels. Each user or active task works through an isolated [`Session`](https://mastra.ai/reference/agent-controller/session).
|
|
8
8
|
|
|
9
|
-
[Mastra Code](https://code.mastra.ai) is the flagship AgentController implementation. It's a terminal-based coding agent with multi-model support, persistent conversations, and plan-then-execute workflows. Read [Building a coding agent](https://mastra.ai/
|
|
9
|
+
[Mastra Code](https://code.mastra.ai) is the flagship AgentController implementation. It's a terminal-based coding agent with multi-model support, persistent conversations, and plan-then-execute workflows. Read [Building a coding agent](https://mastra.ai/blog/building-a-coding-agent) for a step-by-step guide.
|
|
10
10
|
|
|
11
|
-
## When to use the
|
|
11
|
+
## When to use the Agent Controller
|
|
12
12
|
|
|
13
|
-
Use the
|
|
13
|
+
Use the Agent Controller when your application needs:
|
|
14
14
|
|
|
15
15
|
- Multiple agent modes that share one conversation thread (e.g., plan → build → review)
|
|
16
16
|
- A control layer between your UI and the agent loop (model switching, state persistence, thread management)
|
|
@@ -343,11 +343,52 @@ Point each platform webhook at the controller-specific route:
|
|
|
343
343
|
|
|
344
344
|
Each external chat thread maps to one controller Session and Mastra thread. By default, new sessions use a resource ID derived from the adapter's chat-thread ID, prefixed with `channel:`. Use `resolveResourceId` to map direct messages to an existing application user or choose another memory owner. The callback only affects new threads; an existing thread keeps its stored resource ID.
|
|
345
345
|
|
|
346
|
-
Channel sessions are created by the controller rather than by your code, so `onSessionStart` is where you configure them. It runs once per session, after the session is bound to its mapped thread and before the first message is handled.
|
|
346
|
+
Channel sessions are created by the controller rather than by your code, so `onSessionStart` is where you configure them. It runs once per session, after the session is bound to its mapped thread and before the first message is handled. A channel session starts with controller defaults, so this is where you set its model and memory settings. Later messages in the same thread reuse the session and don't call it again. Errors are logged and swallowed so a session that can't be configured still answers the message.
|
|
347
|
+
|
|
348
|
+
### Authorize and route channel sessions
|
|
349
|
+
|
|
350
|
+
`onSessionStart` runs after the session exists and swallows errors, so it can't refuse a request. Use `resolveSession` when your host decides whether a session may exist. It replaces the built-in session creation and runs before any session exists. Throwing refuses the request before the controller creates a session or calls the model. Mastra logs the refusal and leaves the chat thread silent, so your authorization message never reaches the channel.
|
|
351
|
+
|
|
352
|
+
```typescript
|
|
353
|
+
channels: {
|
|
354
|
+
adapters: { slack: createSlackAdapter() },
|
|
355
|
+
resolveSession: async ({ controller, thread, requestContext }) => {
|
|
356
|
+
const install = await installs.authorize(requestContext.get('teamId'))
|
|
357
|
+
|
|
358
|
+
return controller.createSession({
|
|
359
|
+
resourceId: thread.resourceId,
|
|
360
|
+
scope: install.id,
|
|
361
|
+
ownerId: controller.id,
|
|
362
|
+
requestContext,
|
|
363
|
+
})
|
|
364
|
+
},
|
|
365
|
+
}
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
Create the session under `thread.resourceId`. A session can only bind threads it owns, so use `resolveResourceId` if you want a different owner for the mapped thread. Sessions are get-or-create per `resourceId` and `scope`, so pass `scope` when one thread needs separate sessions per install or principal.
|
|
369
|
+
|
|
370
|
+
Failures that aren't refusals (a storage outage, a bug in your resolver's dependencies) still post an error to the thread, so a broken bot doesn't look like a silent one. If you need to tell them apart in your own code, a refusal is a `ChannelSessionRejectedError` with the original error as its `cause`.
|
|
371
|
+
|
|
372
|
+
`resolveSession` also runs when a user answers an approval card, with that action's request context, so a shared install revalidates the person approving rather than trusting the person who sent the original message.
|
|
373
|
+
|
|
374
|
+
### Handle stale approvals
|
|
375
|
+
|
|
376
|
+
An approval gate lives in memory, so every approval answered after a restart is stale. Mastra never runs the tool for a stale action. Use `onStaleToolApproval` to settle the attempt the user answered, instead of dropping it:
|
|
377
|
+
|
|
378
|
+
```typescript
|
|
379
|
+
channels: {
|
|
380
|
+
adapters: { slack: createSlackAdapter() },
|
|
381
|
+
onStaleToolApproval: async ({ decision, toolCallId, runId, memory }) => {
|
|
382
|
+
await runs.markInterrupted({ runId, toolCallId, decision, threadId: memory.thread })
|
|
383
|
+
},
|
|
384
|
+
}
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
`runId` is the run the approval card was rendered for, which is the attempt the user answered and the one you settle against after a restart. The session's own run is passed separately as `currentRunId`, and is usually `null` or a different run by then.
|
|
347
388
|
|
|
348
389
|
Controller channel sessions and auto-approval state are held in memory, so use a long-lived server. Pending approvals and live Session state don't survive process restarts. Adapters that can't render approval controls automatically run tools without an approval prompt so the run doesn't remain suspended.
|
|
349
390
|
|
|
350
|
-
See [Channels](https://mastra.ai/docs/capabilities/channels
|
|
391
|
+
See [Channels](https://mastra.ai/docs/capabilities/channels) for adapter setup and platform-specific webhook configuration.
|
|
351
392
|
|
|
352
393
|
## Connect a UI
|
|
353
394
|
|
|
@@ -366,11 +407,11 @@ render(session.displayState.get())
|
|
|
366
407
|
unsubscribe()
|
|
367
408
|
```
|
|
368
409
|
|
|
369
|
-
Subscriptions are isolated by Session. Events from another Session on the same controller aren't delivered to this listener. Read the [Building a coding agent](https://mastra.ai/
|
|
410
|
+
Subscriptions are isolated by Session. Events from another Session on the same controller aren't delivered to this listener. Read the [Building a coding agent](https://mastra.ai/blog/building-a-coding-agent) guide for a complete TUI example.
|
|
370
411
|
|
|
371
412
|
## Related
|
|
372
413
|
|
|
373
414
|
- [Agents](https://mastra.ai/docs/agents/overview)
|
|
374
415
|
- [Workspace](https://mastra.ai/docs/workspace/overview)
|
|
375
416
|
- [Observational memory](https://mastra.ai/docs/memory/observational-memory)
|
|
376
|
-
- [Channels](https://mastra.ai/docs/capabilities/channels
|
|
417
|
+
- [Channels](https://mastra.ai/docs/capabilities/channels)
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
2
|
|
|
3
|
-
# Harness
|
|
3
|
+
# Harness
|
|
4
4
|
|
|
5
5
|
A harness lets an agent pursue long-running, complex goals while keeping its work durable, visible, and steerable. It preserves progress across retries and interruptions, while giving people and other systems a way to inspect progress, add context, approve actions, redirect the agent, or stop it.
|
|
6
6
|
|
|
7
|
-
In Mastra, harness refers to a set of capabilities for managing an agent beyond a single uninterrupted run. You can adopt these capabilities individually or combine them as needed.
|
|
8
|
-
|
|
9
|
-
[`AgentController`](https://mastra.ai/docs/harness/agent-controller) is a harness designed for interactive agent applications. It extends the base [`Agent`](https://mastra.ai/docs/agents/overview) loop with isolated sessions for each user or task, persistent threads and state, switchable modes and models, tool permissions and approvals, subagent orchestration, and streams for events and display state.
|
|
10
|
-
|
|
11
7
|
Agent harnesses are useful wherever work continues over time. Common examples include coding agents that carry changes through CI and review, software factories that coordinate many tasks in parallel, SRE agents that adapt as incidents evolve, and go-to-market agents that respond as accounts, signals, and conversations change.
|
|
12
8
|
|
|
9
|
+
In Mastra, harness refers to a set of capabilities for managing an agent beyond a single uninterrupted run. You can adopt these capabilities individually or combine them as needed.
|
|
10
|
+
|
|
13
11
|
## When to use a harness
|
|
14
12
|
|
|
15
13
|
Choose a starting point based on what the agent needs. You may use one capability or several.
|
package/.docs/docs/index.md
CHANGED
|
@@ -147,20 +147,20 @@ yarn create mastra
|
|
|
147
147
|
bunx create-mastra
|
|
148
148
|
```
|
|
149
149
|
|
|
150
|
-
You can open [Studio](https://mastra.ai/docs/studio/overview) immediately, which is an interactive UI for your Mastra project.
|
|
150
|
+
You can open [Studio](https://mastra.ai/docs/studio/overview) immediately, which is an interactive UI for your Mastra project.
|
|
151
151
|
|
|
152
152
|
## Integrate with your framework
|
|
153
153
|
|
|
154
154
|
Add Mastra to an existing project, or create a new app with your preferred framework:
|
|
155
155
|
|
|
156
|
-
- [Next.js](https://mastra.ai/
|
|
157
|
-
- [React](https://mastra.ai/
|
|
158
|
-
- [Astro](https://mastra.ai/
|
|
159
|
-
- [Express](https://mastra.ai/
|
|
160
|
-
- [SvelteKit](https://mastra.ai/
|
|
161
|
-
- [Hono](https://mastra.ai/
|
|
156
|
+
- [Next.js](https://mastra.ai/integrations/frameworks/next-js)
|
|
157
|
+
- [React + Vite](https://mastra.ai/integrations/frameworks/vite-react)
|
|
158
|
+
- [Astro](https://mastra.ai/integrations/frameworks/astro)
|
|
159
|
+
- [Express](https://mastra.ai/integrations/frameworks/express)
|
|
160
|
+
- [SvelteKit](https://mastra.ai/integrations/frameworks/sveltekit)
|
|
161
|
+
- [Hono](https://mastra.ai/integrations/frameworks/hono)
|
|
162
162
|
|
|
163
|
-
For other frameworks, see the [
|
|
163
|
+
For other frameworks, see the [integration guides](https://mastra.ai/integrations).
|
|
164
164
|
|
|
165
165
|
## Templates
|
|
166
166
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
**Added in:** `@mastra/core@1.45.0`
|
|
6
6
|
|
|
7
|
-
> **
|
|
7
|
+
> **Beta:** Breaking changes may occur without a major version bump until the API is stable.
|
|
8
8
|
|
|
9
9
|
A durable agent wraps a regular [`Agent`](https://mastra.ai/docs/agents/overview) so the agentic loop runs inside a workflow. Events flow through [PubSub](https://mastra.ai/docs/server/pubsub), which means a client can disconnect and reconnect without missing chunks. The run state is persisted, so it survives process restarts.
|
|
10
10
|
|
|
@@ -15,7 +15,7 @@ Use a durable agent when any of the following apply:
|
|
|
15
15
|
- The client may drop and reconnect mid-stream (mobile, spotty networks, long-running calls).
|
|
16
16
|
- The agentic loop may outlive a single HTTP request (background research, multi-step tool use).
|
|
17
17
|
- You need an observe/reconnect API where a second client picks up a stream that a first client started.
|
|
18
|
-
- You want [Inngest-powered execution](https://mastra.ai/
|
|
18
|
+
- You want [Inngest-powered execution](https://mastra.ai/integrations/deploy/inngest) with step memoization, retries, and monitoring.
|
|
19
19
|
|
|
20
20
|
For short-lived, request-scoped calls where the client stays connected, a regular `Agent` with `stream()` or `generate()` is simpler.
|
|
21
21
|
|
|
@@ -268,6 +268,6 @@ Mastra doesn't provide a distributed lease or lock yet. In multi-replica deploym
|
|
|
268
268
|
- [DurableAgent reference](https://mastra.ai/reference/agents/durable-agent)
|
|
269
269
|
- [`createInngestAgent()` reference](https://mastra.ai/reference/agents/inngest-agent)
|
|
270
270
|
- [Background tasks](https://mastra.ai/docs/long-running-agents/background-tasks)
|
|
271
|
-
- [Inngest deployment guide](https://mastra.ai/
|
|
271
|
+
- [Inngest deployment guide](https://mastra.ai/integrations/deploy/inngest)
|
|
272
272
|
- [Agent overview](https://mastra.ai/docs/agents/overview)
|
|
273
273
|
- [Worker overview](https://mastra.ai/docs/deployment/workers)
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
**Added in:** `@mastra/core@1.42.0`
|
|
6
6
|
|
|
7
|
-
> **Beta:**
|
|
7
|
+
> **Beta:** Breaking changes may occur without a major version bump until the API is stable.
|
|
8
8
|
|
|
9
9
|
A goal is a durable, thread-scoped objective: a standing instruction the agent keeps working toward across loop iterations until a judge model decides it's satisfied or a run budget is exhausted.
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
**Added in:** `@mastra/core@1.50.0`
|
|
6
6
|
|
|
7
|
-
> **Beta:**
|
|
7
|
+
> **Beta:** Breaking changes may occur without a major version bump until the API is stable.
|
|
8
8
|
|
|
9
9
|
A schedule runs an agent on a cron cadence. On each fire, Mastra sends a prompt to the agent, either as a [signal](https://mastra.ai/docs/long-running-agents/signals) into a thread or as a threadless [`agent.generate()`](https://mastra.ai/reference/agents/generate) run. Use schedules for recurring agent work such as daily summaries, periodic checks, or scheduled nudges into a conversation.
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
**Added in:** `@mastra/core@1.39.0`
|
|
6
6
|
|
|
7
|
-
> **Beta:**
|
|
7
|
+
> **Beta:** Breaking changes may occur without a major version bump until the API is stable.
|
|
8
8
|
|
|
9
9
|
A signal provider monitors an external source, such as GitHub, Slack, continuous integration (CI), or your own API, and pushes [notification signals](https://mastra.ai/docs/long-running-agents/signals) into subscribed agent threads.
|
|
10
10
|
|
|
@@ -45,7 +45,7 @@ export const supportAgent = new Agent({
|
|
|
45
45
|
})
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
> **Note:** Notification delivery requires a storage adapter with notification support, such as [libSQL](https://mastra.ai/
|
|
48
|
+
> **Note:** Notification delivery requires a storage adapter with notification support, such as [libSQL](https://mastra.ai/integrations/databases/libsql), [PostgreSQL](https://mastra.ai/integrations/databases/postgresql), or [MongoDB](https://mastra.ai/integrations/databases/mongodb). Configure storage on the Mastra instance so `notify()` can store notification records.
|
|
49
49
|
|
|
50
50
|
## Quickstart
|
|
51
51
|
|
|
@@ -122,7 +122,7 @@ ciSignals.watch({ resourceId: 'user_123', threadId: 'thread_456' }, 'acme-app-ma
|
|
|
122
122
|
|
|
123
123
|
Mastra calls `poll()` on the `pollInterval` with all active subscriptions. It skips a cycle when there are no subscriptions and doesn't overlap cycles, so a slow `poll()` doesn't run concurrently with itself.
|
|
124
124
|
|
|
125
|
-
> **Note:** For a complete polling-provider build with notification storage, agent registration, thread subscription, and testing, follow [Building a signal provider](https://mastra.ai/
|
|
125
|
+
> **Note:** For a complete polling-provider build with notification storage, agent registration, thread subscription, and testing, follow [Building a signal provider](https://mastra.ai/blog/building-a-signal-provider).
|
|
126
126
|
|
|
127
127
|
## Polling and webhook providers
|
|
128
128
|
|
|
@@ -200,24 +200,11 @@ A provider can support more than event ingestion. Add only the capabilities your
|
|
|
200
200
|
- **Lifecycle hooks:** Override [`start()`](https://mastra.ai/reference/signals/signal-provider) for async setup and [`stop()`](https://mastra.ai/reference/signals/signal-provider) for cleanup. Call `super.stop()` when overriding `stop()` so the base provider can stop polling and clear its registry.
|
|
201
201
|
- **Processors and tools:** Return processors from [`getInputProcessors()`](https://mastra.ai/reference/signals/signal-provider) or [`getOutputProcessors()`](https://mastra.ai/reference/signals/signal-provider), and return agent-callable tools from [`getTools()`](https://mastra.ai/reference/signals/signal-provider).
|
|
202
202
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
```typescript
|
|
206
|
-
import { Agent } from '@mastra/core/agent'
|
|
207
|
-
import { GithubSignals } from '@mastra/github-signals'
|
|
208
|
-
|
|
209
|
-
export const devAgent = new Agent({
|
|
210
|
-
id: 'dev-agent',
|
|
211
|
-
name: 'Dev Agent',
|
|
212
|
-
instructions: 'Help triage pull request activity.',
|
|
213
|
-
model: 'openai/gpt-5.6-sol',
|
|
214
|
-
signals: [new GithubSignals()],
|
|
215
|
-
})
|
|
216
|
-
```
|
|
203
|
+
For a production provider that watches GitHub pull requests, see the [GitHub Channels integration](https://mastra.ai/integrations/channels/github).
|
|
217
204
|
|
|
218
205
|
## Related
|
|
219
206
|
|
|
220
|
-
- [Guide: Building a signal provider](https://mastra.ai/
|
|
207
|
+
- [Guide: Building a signal provider](https://mastra.ai/blog/building-a-signal-provider)
|
|
221
208
|
- [Signals](https://mastra.ai/docs/long-running-agents/signals)
|
|
222
209
|
- [Notification signals](https://mastra.ai/docs/long-running-agents/signals)
|
|
223
210
|
- [`SignalProvider` reference](https://mastra.ai/reference/signals/signal-provider)
|