@mastra/mcp-docs-server 1.2.15 → 1.2.16-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/.docs/docs/agents/agent-approval.md +5 -5
  2. package/.docs/docs/agents/overview.md +4 -4
  3. package/.docs/docs/browser/overview.md +1 -1
  4. package/.docs/docs/capabilities/channels.md +5 -5
  5. package/.docs/docs/capabilities/subagents.md +1 -1
  6. package/.docs/docs/connections/overview.md +1 -1
  7. package/.docs/docs/datasets/overview.md +1 -1
  8. package/.docs/docs/deployment/cloud-providers.md +4 -2
  9. package/.docs/docs/deployment/mastra-server.md +1 -1
  10. package/.docs/docs/deployment/monorepo.md +1 -1
  11. package/.docs/docs/deployment/overview.md +4 -1
  12. package/.docs/docs/deployment/sandbox.md +1 -1
  13. package/.docs/docs/deployment/web-framework.md +1 -1
  14. package/.docs/docs/deployment/workers.md +248 -2
  15. package/.docs/docs/evals/overview.md +1 -1
  16. package/.docs/docs/evals/quick-checks.md +1 -1
  17. package/.docs/docs/guides/multi-agent-systems.md +1 -1
  18. package/.docs/docs/harness/agent-controller.md +5 -5
  19. package/.docs/docs/harness/overview.md +1 -1
  20. package/.docs/docs/index.md +3 -3
  21. package/.docs/docs/long-running-agents/signal-providers.md +2 -2
  22. package/.docs/docs/mastra-platform/deploy.md +1 -1
  23. package/.docs/docs/mastra-platform/observability.md +63 -18
  24. package/.docs/docs/mastra-platform/overview.md +1 -1
  25. package/.docs/docs/mcp/overview.md +1 -1
  26. package/.docs/docs/memory/working-memory.md +1 -1
  27. package/.docs/docs/observability/integrations/exporters/mastra-storage.md +2 -2
  28. package/.docs/docs/observability/logging.md +1 -1
  29. package/.docs/docs/observability/metrics/overview.md +1 -1
  30. package/.docs/docs/observability/overview.md +1 -5
  31. package/.docs/docs/observability/tracing/overview.md +3 -6
  32. package/.docs/docs/server/auth/workers.md +1 -1
  33. package/.docs/docs/server/auth.md +5 -5
  34. package/.docs/docs/server/mastra-client.md +1 -1
  35. package/.docs/docs/server/mastra-server.md +1 -1
  36. package/.docs/docs/storage/overview.md +7 -6
  37. package/.docs/docs/workflows/human-in-the-loop.md +2 -2
  38. package/.docs/docs/workflows/overview.md +2 -2
  39. package/.docs/docs/workspace/lsp.md +27 -0
  40. package/.docs/docs/workspace/sandbox.md +11 -12
  41. package/.docs/integrations/agentic-ui/ai-sdk-ui.md +1 -1
  42. package/.docs/integrations/agentic-ui/assistant-ui.md +1 -1
  43. package/.docs/integrations/agentic-ui/copilotkit.md +1 -1
  44. package/.docs/integrations/agentic-ui/openui.md +1 -1
  45. package/.docs/integrations/databases/postgresql.md +8 -8
  46. package/.docs/integrations/deploy/amazon-ec2.md +2 -2
  47. package/.docs/integrations/deploy/aws-bedrock-agentcore.md +1 -1
  48. package/.docs/integrations/deploy/aws-lambda.md +2 -2
  49. package/.docs/integrations/deploy/azure-app-services.md +2 -2
  50. package/.docs/integrations/deploy/cloudflare.md +2 -2
  51. package/.docs/integrations/deploy/digital-ocean.md +2 -2
  52. package/.docs/integrations/deploy/inngest.md +1 -1
  53. package/.docs/integrations/deploy/kubernetes.md +2 -3
  54. package/.docs/integrations/deploy/netlify.md +2 -2
  55. package/.docs/integrations/deploy/temporal.md +1 -1
  56. package/.docs/integrations/deploy/vercel.md +2 -2
  57. package/.docs/integrations/file-storage/agentfs.md +1 -1
  58. package/.docs/integrations/file-storage/amazon-s3.md +1 -1
  59. package/.docs/integrations/file-storage/archil.md +1 -1
  60. package/.docs/integrations/file-storage/azure-blob.md +1 -1
  61. package/.docs/integrations/file-storage/google-cloud-storage.md +1 -1
  62. package/.docs/integrations/file-storage/google-drive.md +1 -1
  63. package/.docs/integrations/file-storage/mesa.md +1 -1
  64. package/.docs/integrations/file-storage/vercel-files.md +1 -1
  65. package/.docs/integrations/frameworks/astro.md +1 -1
  66. package/.docs/integrations/frameworks/electron.md +1 -1
  67. package/.docs/integrations/frameworks/express.md +1 -1
  68. package/.docs/integrations/frameworks/hono.md +1 -1
  69. package/.docs/integrations/frameworks/nestjs.md +1 -1
  70. package/.docs/integrations/frameworks/next-js.md +1 -1
  71. package/.docs/integrations/frameworks/nuxt.md +1 -1
  72. package/.docs/integrations/frameworks/sveltekit.md +1 -1
  73. package/.docs/integrations/frameworks/vite-react.md +1 -1
  74. package/.docs/integrations/sandboxes/agentcore.md +1 -1
  75. package/.docs/integrations/sandboxes/apple-container.md +1 -1
  76. package/.docs/integrations/sandboxes/blaxel.md +1 -1
  77. package/.docs/integrations/sandboxes/daytona.md +1 -1
  78. package/.docs/integrations/sandboxes/docker.md +1 -1
  79. package/.docs/integrations/sandboxes/e2b.md +1 -1
  80. package/.docs/integrations/sandboxes/modal.md +1 -1
  81. package/.docs/integrations/sandboxes/railway.md +1 -1
  82. package/.docs/integrations/sandboxes/vercel.md +3 -1
  83. package/.docs/integrations/tools/firecrawl.md +2 -2
  84. package/.docs/integrations/voice/livekit.md +3 -3
  85. package/.docs/integrations.md +108 -108
  86. package/.docs/models/environment-variables.md +2 -0
  87. package/.docs/models/gateways/openrouter.md +5 -1
  88. package/.docs/models/gateways/vercel.md +3 -2
  89. package/.docs/models/index.md +1 -1
  90. package/.docs/models/providers/aiand.md +3 -2
  91. package/.docs/models/providers/digitalocean.md +3 -2
  92. package/.docs/models/providers/edenai.md +88 -0
  93. package/.docs/models/providers/hyper.md +3 -3
  94. package/.docs/models/providers/inceptron.md +8 -9
  95. package/.docs/models/providers/kilo.md +11 -6
  96. package/.docs/models/providers/llmgateway.md +3 -1
  97. package/.docs/models/providers/merge-gateway.md +262 -0
  98. package/.docs/models/providers/nano-gpt.md +13 -37
  99. package/.docs/models/providers/opencode.md +2 -2
  100. package/.docs/models/providers/tinfoil.md +9 -8
  101. package/.docs/models/providers/xai.md +2 -1
  102. package/.docs/models/providers.md +2 -0
  103. package/.docs/reference/agents/getVoice.md +1 -1
  104. package/.docs/reference/configuration.md +1 -1
  105. package/.docs/reference/index.md +5 -1
  106. package/.docs/reference/manual-install.md +1 -1
  107. package/.docs/reference/migrations/network-to-supervisor.md +1 -1
  108. package/.docs/reference/migrations/upgrade-to-v1/tracing.md +1 -3
  109. package/.docs/reference/observability/tracing/exporters/cloud-exporter.md +0 -1
  110. package/.docs/reference/observability/tracing/exporters/console-exporter.md +0 -1
  111. package/.docs/reference/observability/tracing/exporters/default-exporter.md +0 -1
  112. package/.docs/reference/observability/tracing/exporters/mastra-platform-exporter.md +0 -1
  113. package/.docs/reference/observability/tracing/exporters/mastra-storage-exporter.md +0 -1
  114. package/.docs/reference/observability/tracing/processors/sensitive-data-filter.md +111 -99
  115. package/.docs/reference/observability/tracing/span-filtering.md +1 -1
  116. package/.docs/reference/storage/overview.md +1 -1
  117. package/.docs/reference/templates/overview.md +1 -1
  118. package/.docs/{guides → reference}/voice/overview.md +3 -3
  119. package/.docs/{guides → reference}/voice/speech-to-speech.md +1 -1
  120. package/.docs/{guides → reference}/voice/speech-to-text.md +1 -1
  121. package/.docs/{guides → reference}/voice/text-to-speech.md +2 -2
  122. package/CHANGELOG.md +14 -0
  123. package/package.json +4 -4
  124. package/.docs/docs/observability/integrations/exporters/mastra-platform.md +0 -201
  125. package/.docs/docs/observability/integrations/overview.md +0 -47
  126. package/.docs/docs/observability/integrations/processors/sensitive-data-filter.md +0 -302
  127. package/.docs/guides/deployment/mastra-workers.md +0 -578
  128. package/.docs/guides/getting-started/quickstart.md +0 -88
  129. package/.docs/guides/guide/ai-recruiter.md +0 -228
  130. package/.docs/guides/guide/code-review-bot.md +0 -228
  131. package/.docs/guides/guide/coding-agent.md +0 -392
  132. package/.docs/guides/guide/dev-assistant.md +0 -309
  133. package/.docs/guides/guide/docs-manager.md +0 -240
  134. package/.docs/guides/guide/github-actions-pr-description.md +0 -238
  135. package/.docs/guides/guide/notes-mcp-server.md +0 -418
  136. package/.docs/guides/guide/research-assistant.md +0 -350
  137. package/.docs/guides/guide/research-coordinator.md +0 -418
  138. package/.docs/guides/guide/signal-provider.md +0 -221
  139. package/.docs/guides/index.md +0 -24
  140. /package/.docs/{reference → docs}/mastra-platform/api.md +0 -0
  141. /package/.docs/{guides/agent-frameworks/ai-sdk.md → reference/ai-sdk/overview.md} +0 -0
@@ -1,10 +1,10 @@
1
1
  > Discover all available pages from the documentation index: https://mastra.ai/llms.txt
2
2
 
3
- # Agent approval
3
+ # Human-in-the-loop
4
4
 
5
- Agents sometimes require the same [human-in-the-loop](https://mastra.ai/docs/workflows/human-in-the-loop) oversight used in workflows when calling tools that handle sensitive operations, like deleting resources or running long processes. With agent approval you can suspend a tool call before it executes so a human can approve or decline it, or let tools suspend themselves to request additional context from the user.
5
+ Agents sometimes require the same [human-in-the-loop (HITL)](https://mastra.ai/docs/workflows/human-in-the-loop) oversight used in workflows when calling tools that handle sensitive operations, like deleting resources or running long processes. With human-in-the-loop you can suspend a tool call before it executes so a human can approve or decline it, or let tools suspend themselves to request additional context from the user.
6
6
 
7
- ## When to use agent approval
7
+ ## When to use human-in-the-loop
8
8
 
9
9
  - **Destructive or irreversible actions** such as deleting records or sending emails, or alternatively processing payments.
10
10
  - **Cost-heavy operations** like calling expensive third-party APIs where you want to verify arguments first.
@@ -12,7 +12,7 @@ Agents sometimes require the same [human-in-the-loop](https://mastra.ai/docs/wor
12
12
 
13
13
  ## Quickstart
14
14
 
15
- Mark a tool with `requireApproval: true`, then check for the `tool-call-approval` chunk in the stream to approve or decline:
15
+ Mark a tool with `requireApproval: true`, then check for the `tool-call-approval` chunk in the stream to approve or decline the action:
16
16
 
17
17
  ```typescript
18
18
  import { Agent } from '@mastra/core/agent'
@@ -48,7 +48,7 @@ for await (const chunk of stream.fullStream) {
48
48
  }
49
49
  ```
50
50
 
51
- > **Note:** Agent approval uses snapshots to capture request state. Configure a [storage provider](https://mastra.ai/docs/storage/overview) on your Mastra instance or you'll see a "snapshot not found" error.
51
+ > **Note:** Human-in-the-loop uses snapshots to capture request state. Configure a [storage provider](https://mastra.ai/docs/storage/overview) on your Mastra instance or you'll see a "snapshot not found" error.
52
52
  >
53
53
  > Snapshots for agent runs are minimal resume artifacts: they hold only what's needed to resume the suspended run and are deleted once the run finishes. Use [tracing](https://mastra.ai/docs/observability/overview) for the execution record and [memory](https://mastra.ai/docs/memory/overview) for the conversation history.
54
54
 
@@ -1,6 +1,6 @@
1
1
  > Discover all available pages from the documentation index: https://mastra.ai/llms.txt
2
2
 
3
- # Agents overview
3
+ # Agents
4
4
 
5
5
  Agents use LLMs and tools to solve open-ended tasks. They reason about goals and decide which tools to use. They retain conversation memory and continue iterating until the model emits a final answer or an optional stop condition is met.
6
6
 
@@ -163,7 +163,7 @@ Visit the [agent reference](https://mastra.ai/reference/agents/agent) for more i
163
163
 
164
164
  ## Use your agent
165
165
 
166
- After registration, retrieve your agent with [`mastra.getAgentById()`](https://mastra.ai/reference/core/getAgentById). Call `.generate()` for a complete response or `.stream()` to deliver tokens in real time. You can call agents from [workflow steps](https://mastra.ai/docs/workflows/agents-and-tools), [tools](https://mastra.ai/docs/agents/using-tools), the [Mastra Client](https://mastra.ai/reference/client-js/mastra-client), route handlers, [server adapters](https://mastra.ai/docs/server/server-adapters), or the command line. Visit the [guides section](https://mastra.ai/guides) to learn how to use agents in your framework of choice.
166
+ After registration, retrieve your agent with [`mastra.getAgentById()`](https://mastra.ai/reference/core/getAgentById). Call `.generate()` for a complete response or `.stream()` to deliver tokens in real time. You can call agents from [workflow steps](https://mastra.ai/docs/workflows/agents-and-tools), [tools](https://mastra.ai/docs/agents/using-tools), the [Mastra Client](https://mastra.ai/reference/client-js/mastra-client), route handlers, [server adapters](https://mastra.ai/docs/server/server-adapters), or the command line. See [Integrations](https://mastra.ai/integrations) to use agents in your application framework.
167
167
 
168
168
  When referencing an agent from your Mastra instance, use `mastra.getAgentById()` to ensure it has access to shared services such as instance-level storage, logging, and agent registry. A directly imported agent can still work with its own local configuration, but it won't have access to those shared services.
169
169
 
@@ -203,14 +203,14 @@ Once your agent is running, use this table to find the right page for what you w
203
203
  | Give your agent tools to call external APIs or services | [Tools](https://mastra.ai/docs/agents/using-tools) |
204
204
  | Keep context and preferences across conversations | [Memory](https://mastra.ai/docs/memory/overview) |
205
205
  | Get typed objects back instead of plain text | [Structured output](https://mastra.ai/docs/agents/structured-output) |
206
- | Human-in-the-loop: Pause execution and wait for human approval | [Approval](https://mastra.ai/docs/agents/agent-approval) |
206
+ | Human-in-the-loop: Pause execution and wait for human approval | [Human-in-the-loop](https://mastra.ai/docs/agents/agent-approval) |
207
207
  | Build a multi-agent network | [Supervisor agents](https://mastra.ai/docs/capabilities/subagents) |
208
208
  | Register subagents | [Tools](https://mastra.ai/docs/agents/using-tools) |
209
209
  | Intercept or transform messages before and after generation | [Processors](https://mastra.ai/docs/agents/processors) |
210
210
  | Keep your agent safe | [Guardrails](https://mastra.ai/docs/agents/guardrails) |
211
211
  | Build agents that correct their work | [Rubric scorer](https://mastra.ai/docs/capabilities/subagents) |
212
212
  | Swap instructions or models based on request context | [Dynamic configuration](https://mastra.ai/docs/server/request-context) |
213
- | Add speech-to-text or text-to-speech | [Voice](https://mastra.ai/guides/voice/overview) |
213
+ | Add speech-to-text or text-to-speech | [Voice](https://mastra.ai/reference/voice/overview) |
214
214
  | Connect to Slack, Discord, or Telegram | [Channels](https://mastra.ai/docs/capabilities/channels) |
215
215
 
216
216
  ## Multi-agent systems
@@ -1,6 +1,6 @@
1
1
  > Discover all available pages from the documentation index: https://mastra.ai/llms.txt
2
2
 
3
- # Browser overview
3
+ # Browser
4
4
 
5
5
  Browser support enables agents to move through websites, interact with page elements, fill forms, and extract data. Mastra provides browser capabilities through SDK providers that wrap browser automation libraries and a CLI provider for agents that drive browsers through command-line tools.
6
6
 
@@ -1,6 +1,6 @@
1
1
  > Discover all available pages from the documentation index: https://mastra.ai/llms.txt
2
2
 
3
- # Channels overview
3
+ # Channels
4
4
 
5
5
  **Added in:** `@mastra/core@1.22.0`
6
6
 
@@ -8,13 +8,13 @@ Channels connect agents to messaging and collaboration platforms like Slack, Mic
8
8
 
9
9
  Start with the page for your platform:
10
10
 
11
- - [Slack](https://mastra.ai/integrations/channels/slack)
12
- - [Microsoft Teams](https://mastra.ai/integrations/channels/teams)
13
11
  - [Discord](https://mastra.ai/integrations/channels/discord)
12
+ - [GitHub](https://mastra.ai/integrations/channels/github)
13
+ - [iMessage](https://mastra.ai/integrations/channels/imessage)
14
+ - [Microsoft Teams](https://mastra.ai/integrations/channels/teams)
15
+ - [Slack](https://mastra.ai/integrations/channels/slack)
14
16
  - [Telegram](https://mastra.ai/integrations/channels/telegram)
15
17
  - [WhatsApp](https://mastra.ai/integrations/channels/whatsapp)
16
- - [iMessage](https://mastra.ai/integrations/channels/imessage)
17
- - [GitHub](https://mastra.ai/integrations/channels/github)
18
18
 
19
19
  [Other adapters](#other-adapters) lists additional platforms. Mastra channels work with compatible [Chat SDK adapters](https://chat-sdk.dev/adapters) beyond the platforms listed here, and the same Mastra configuration pattern applies across adapters.
20
20
 
@@ -447,7 +447,7 @@ Version overrides propagate automatically through delegation. See [Subagent vers
447
447
 
448
448
  - [Background tasks](https://mastra.ai/docs/long-running-agents/background-tasks)
449
449
  - [Subagent versioning](https://mastra.ai/reference/editor/versioning)
450
- - [Guide: Research coordinator](https://mastra.ai/guides/guide/research-coordinator)
450
+ - [Guide: Research coordinator](https://mastra.ai/blog/build-a-research-coordinator-with-supervisor-agents)
451
451
  - [Agent.stream() reference](https://mastra.ai/reference/streaming/agents/stream)
452
452
  - [Agent.streamUntilIdle() reference](https://mastra.ai/reference/streaming/agents/streamUntilIdle)
453
453
  - [Agent.generate() reference](https://mastra.ai/reference/agents/generate)
@@ -1,6 +1,6 @@
1
1
  > Discover all available pages from the documentation index: https://mastra.ai/llms.txt
2
2
 
3
- # Connections overview
3
+ # Connections
4
4
 
5
5
  Connections let Mastra work with remote agents, coding agents, provider software development kit (SDK) runtimes, and external tools and resources. Choose a connection type based on which system owns the agent runtime and what you need to exchange.
6
6
 
@@ -1,6 +1,6 @@
1
1
  > Discover all available pages from the documentation index: https://mastra.ai/llms.txt
2
2
 
3
- # Datasets overview
3
+ # Datasets
4
4
 
5
5
  **Added in:** `@mastra/core@1.4.0`
6
6
 
@@ -1,6 +1,6 @@
1
1
  > Discover all available pages from the documentation index: https://mastra.ai/llms.txt
2
2
 
3
- # Deploy to cloud providers
3
+ # Cloud providers
4
4
 
5
5
  Mastra applications can be deployed to cloud providers and serverless platforms. Mastra includes optional built-in deployers for Vercel, Netlify, and Cloudflare to automate the deployment process.
6
6
 
@@ -10,7 +10,7 @@ Mastra provides a platform to deploy your server to the cloud. Read the [Mastra
10
10
 
11
11
  ## Cloud providers
12
12
 
13
- The following guides show how to deploy Mastra to specific cloud providers:
13
+ The following pages show you how to deploy Mastra to specific cloud providers.
14
14
 
15
15
  - [Amazon Bedrock AgentCore](https://mastra.ai/integrations/deploy/aws-bedrock-agentcore)
16
16
  - [Amazon EC2](https://mastra.ai/integrations/deploy/amazon-ec2)
@@ -18,6 +18,8 @@ The following guides show how to deploy Mastra to specific cloud providers:
18
18
  - [Azure App Services](https://mastra.ai/integrations/deploy/azure-app-services)
19
19
  - [Cloudflare](https://mastra.ai/integrations/deploy/cloudflare)
20
20
  - [Digital Ocean](https://mastra.ai/integrations/deploy/digital-ocean)
21
+ - [Inngest](https://mastra.ai/integrations/deploy/inngest)
21
22
  - [Kubernetes](https://mastra.ai/integrations/deploy/kubernetes)
22
23
  - [Netlify](https://mastra.ai/integrations/deploy/netlify)
24
+ - [Temporal](https://mastra.ai/integrations/deploy/temporal)
23
25
  - [Vercel](https://mastra.ai/integrations/deploy/vercel)
@@ -1,6 +1,6 @@
1
1
  > Discover all available pages from the documentation index: https://mastra.ai/llms.txt
2
2
 
3
- # Deploy a Mastra server
3
+ # Mastra server
4
4
 
5
5
  Mastra compiles your application into a standalone Node.js server that can run on any platform supporting Node.js, Bun, or Deno.
6
6
 
@@ -1,6 +1,6 @@
1
1
  > Discover all available pages from the documentation index: https://mastra.ai/llms.txt
2
2
 
3
- # Deploy in a monorepo
3
+ # Monorepo
4
4
 
5
5
  Deploying Mastra in a monorepo follows the same process as a standalone application. This guide covers monorepo-specific considerations. For the core build and deployment steps, see [Deploy a Mastra Server](https://mastra.ai/docs/deployment/mastra-server).
6
6
 
@@ -1,6 +1,6 @@
1
1
  > Discover all available pages from the documentation index: https://mastra.ai/llms.txt
2
2
 
3
- # Deployment overview
3
+ # Deploy
4
4
 
5
5
  Mastra applications can be deployed to any Node.js-compatible environment. You can deploy a Mastra server, integrate with an existing web framework, deploy to cloud providers, or use [Mastra platform](https://mastra.ai/docs/mastra-platform/overview) for observability, Studio, and server deployment.
6
6
 
@@ -43,13 +43,16 @@ Mastra applications can be deployed to cloud providers and serverless platforms.
43
43
 
44
44
  Use this option for auto-scaling, minimal infrastructure management, or when you're already using one of these platforms.
45
45
 
46
+ - [Amazon Bedrock AgentCore](https://mastra.ai/integrations/deploy/aws-bedrock-agentcore)
46
47
  - [Amazon EC2](https://mastra.ai/integrations/deploy/amazon-ec2)
47
48
  - [AWS Lambda](https://mastra.ai/integrations/deploy/aws-lambda)
48
49
  - [Azure App Services](https://mastra.ai/integrations/deploy/azure-app-services)
49
50
  - [Cloudflare](https://mastra.ai/integrations/deploy/cloudflare)
50
51
  - [Digital Ocean](https://mastra.ai/integrations/deploy/digital-ocean)
52
+ - [Inngest](https://mastra.ai/integrations/deploy/inngest)
51
53
  - [Kubernetes](https://mastra.ai/integrations/deploy/kubernetes)
52
54
  - [Netlify](https://mastra.ai/integrations/deploy/netlify)
55
+ - [Temporal](https://mastra.ai/integrations/deploy/temporal)
53
56
  - [Vercel](https://mastra.ai/integrations/deploy/vercel)
54
57
 
55
58
  ### Sandbox
@@ -1,6 +1,6 @@
1
1
  > Discover all available pages from the documentation index: https://mastra.ai/llms.txt
2
2
 
3
- # Deploy to a sandbox
3
+ # Sandbox
4
4
 
5
5
  `@mastra/deployer-sandbox` deploys a full Mastra server, including Studio, into an ephemeral workspace sandbox and returns a live public URL. Repeat deployments can finish faster because the deployer skips dependency installation.
6
6
 
@@ -1,6 +1,6 @@
1
1
  > Discover all available pages from the documentation index: https://mastra.ai/llms.txt
2
2
 
3
- # Deploy with a web framework
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
 
@@ -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
- The [worker deployment guide](https://mastra.ai/guides/deployment/mastra-workers) walks through this setup with Docker Compose and Kubernetes examples.
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`
@@ -1,6 +1,6 @@
1
1
  > Discover all available pages from the documentation index: https://mastra.ai/llms.txt
2
2
 
3
- # Scorers overview
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 Checks
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
 
@@ -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/guides/guide/research-coordinator) for a step-by-step guide.
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
- # AgentController
3
+ # Agent Controller
4
4
 
5
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/guides/guide/coding-agent) for a step-by-step guide.
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 AgentController
11
+ ## When to use the Agent Controller
12
12
 
13
- Use the AgentController when your application needs:
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)
@@ -407,7 +407,7 @@ render(session.displayState.get())
407
407
  unsubscribe()
408
408
  ```
409
409
 
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/guides/guide/coding-agent) guide for a complete TUI example.
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.
411
411
 
412
412
  ## Related
413
413
 
@@ -1,6 +1,6 @@
1
1
  > Discover all available pages from the documentation index: https://mastra.ai/llms.txt
2
2
 
3
- # Harness overview
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
 
@@ -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. See the [quickstart guide](https://mastra.ai/guides/getting-started/quickstart) for a full walkthrough.
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
156
  - [Next.js](https://mastra.ai/integrations/frameworks/next-js)
157
- - [React](https://mastra.ai/integrations/frameworks/vite-react)
157
+ - [React + Vite](https://mastra.ai/integrations/frameworks/vite-react)
158
158
  - [Astro](https://mastra.ai/integrations/frameworks/astro)
159
159
  - [Express](https://mastra.ai/integrations/frameworks/express)
160
160
  - [SvelteKit](https://mastra.ai/integrations/frameworks/sveltekit)
161
161
  - [Hono](https://mastra.ai/integrations/frameworks/hono)
162
162
 
163
- For other frameworks, see the [framework integration guides](https://mastra.ai/integrations/frameworks/next-js).
163
+ For other frameworks, see the [integration guides](https://mastra.ai/integrations).
164
164
 
165
165
  ## Templates
166
166
 
@@ -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/guides/guide/signal-provider).
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
 
@@ -204,7 +204,7 @@ For a production provider that watches GitHub pull requests, see the [GitHub Cha
204
204
 
205
205
  ## Related
206
206
 
207
- - [Guide: Building a signal provider](https://mastra.ai/guides/guide/signal-provider)
207
+ - [Guide: Building a signal provider](https://mastra.ai/blog/building-a-signal-provider)
208
208
  - [Signals](https://mastra.ai/docs/long-running-agents/signals)
209
209
  - [Notification signals](https://mastra.ai/docs/long-running-agents/signals)
210
210
  - [`SignalProvider` reference](https://mastra.ai/reference/signals/signal-provider)
@@ -14,7 +14,7 @@ mastra deploy
14
14
 
15
15
  ## Before you begin
16
16
 
17
- You'll need a [Mastra application](https://mastra.ai/guides/getting-started/quickstart) and a [Mastra platform](https://projects.mastra.ai) account. If you're not authenticated, the CLI prompts you to log in on first use.
17
+ You'll need a [Mastra application](https://mastra.ai/docs) and a [Mastra platform](https://projects.mastra.ai) account. If you're not authenticated, the CLI prompts you to log in on first use.
18
18
 
19
19
  A local `.env` file is optional. Environment variables stored on the platform are used as-is at deploy time, and managed resources like [hosted databases](https://mastra.ai/docs/mastra-platform/database) inject their own variables. Pass `--env-file` only when you want to layer local values on top.
20
20