@mastra/mcp-docs-server 1.2.17-alpha.13 → 1.2.17-alpha.16

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 (209) hide show
  1. package/.docs/course/02-agent-tools-mcp/32-conclusion.md +1 -1
  2. package/.docs/docs/agents/code-mode.md +3 -3
  3. package/.docs/docs/agents/guardrails.md +1 -1
  4. package/.docs/docs/agents/{agent-approval.md → human-in-the-loop.md} +5 -5
  5. package/.docs/docs/agents/networks.md +3 -3
  6. package/.docs/docs/agents/overview.md +7 -7
  7. package/.docs/docs/agents/processors.md +2 -2
  8. package/.docs/docs/agents/{using-tools.md → tools.md} +7 -7
  9. package/.docs/docs/{server/auth → auth}/custom-auth-provider.md +1 -1
  10. package/.docs/docs/{server/auth → auth}/fga.md +27 -1
  11. package/.docs/docs/{server/auth.md → auth/overview.md} +4 -4
  12. package/.docs/docs/{server/auth → auth}/simple-auth.md +1 -1
  13. package/.docs/docs/{server/auth → auth}/workers.md +2 -2
  14. package/.docs/docs/{capabilities/channels.md → channels.md} +2 -2
  15. package/.docs/docs/{agents → connections}/a2a.md +2 -2
  16. package/.docs/docs/{agents → connections}/acp.md +1 -1
  17. package/.docs/docs/{mcp/overview.md → connections/mcp.md} +1 -1
  18. package/.docs/docs/connections/overview.md +5 -5
  19. package/.docs/docs/{agents → connections}/sdk-agents.md +1 -1
  20. package/.docs/docs/deployment/mastra-server.md +2 -2
  21. package/.docs/docs/deployment/overview.md +1 -1
  22. package/.docs/docs/deployment/sandbox.md +3 -3
  23. package/.docs/docs/deployment/workers.md +4 -4
  24. package/.docs/docs/guides/multi-agent-systems.md +7 -7
  25. package/.docs/docs/guides/streaming.md +1 -1
  26. package/.docs/docs/harness/agent-controller.md +5 -3
  27. package/.docs/docs/{long-running-agents → harness}/background-tasks.md +5 -5
  28. package/.docs/docs/{long-running-agents → harness}/durable-agents.md +2 -2
  29. package/.docs/docs/{long-running-agents → harness}/goals.md +6 -6
  30. package/.docs/docs/harness/overview.md +11 -10
  31. package/.docs/docs/{long-running-agents → harness}/schedules.md +5 -5
  32. package/.docs/docs/{long-running-agents → harness}/signal-providers.md +4 -4
  33. package/.docs/docs/mastra-platform/deploy.md +1 -1
  34. package/.docs/docs/mastra-platform/overview.md +1 -1
  35. package/.docs/docs/mastra-platform/server.md +1 -1
  36. package/.docs/docs/memory/message-history.md +1 -1
  37. package/.docs/docs/memory/overview.md +4 -4
  38. package/.docs/docs/memory/working-memory.md +1 -1
  39. package/.docs/docs/observability/integrations/exporters/mastra-storage.md +1 -1
  40. package/.docs/docs/{workspace → sandbox}/filesystem.md +2 -2
  41. package/.docs/docs/{workspace → sandbox}/lsp.md +3 -3
  42. package/.docs/docs/{workspace/sandbox.md → sandbox/overview.md} +3 -3
  43. package/.docs/docs/{workspace → sandbox}/search.md +2 -2
  44. package/.docs/docs/{workspace → sandbox}/skills.md +5 -5
  45. package/.docs/docs/server/custom-api-routes.md +2 -2
  46. package/.docs/docs/server/mastra-client.md +2 -2
  47. package/.docs/docs/server/{mastra-server.md → overview.md} +3 -3
  48. package/.docs/docs/server/pubsub.md +2 -2
  49. package/.docs/docs/server/server-adapters.md +4 -4
  50. package/.docs/docs/{agents/skills.md → skills.md} +4 -4
  51. package/.docs/docs/{storage/overview.md → storage.md} +1 -1
  52. package/.docs/docs/studio/auth.md +4 -4
  53. package/.docs/docs/studio/overview.md +2 -2
  54. package/.docs/docs/{capabilities/subagents.md → subagents.md} +35 -5
  55. package/.docs/docs/workflows/agents-and-tools.md +1 -1
  56. package/.docs/docs/workflows/overview.md +1 -1
  57. package/.docs/docs/workflows/scheduled-workflows.md +2 -2
  58. package/.docs/docs/workflows/snapshots.md +1 -1
  59. package/.docs/integrations/agentic-ui/ai-sdk-ui.md +1 -1
  60. package/.docs/integrations/agentic-ui/copilotkit.md +1 -1
  61. package/.docs/integrations/auth/google.md +2 -2
  62. package/.docs/integrations/auth/workos.md +1 -1
  63. package/.docs/integrations/browsers/agent-browser.md +2 -2
  64. package/.docs/integrations/browsers/browser-viewer.md +6 -6
  65. package/.docs/integrations/browsers/firecrawl.md +1 -1
  66. package/.docs/integrations/browsers/stagehand.md +2 -2
  67. package/.docs/integrations/channels/discord.md +2 -2
  68. package/.docs/integrations/channels/github.md +1 -1
  69. package/.docs/integrations/channels/imessage.md +4 -4
  70. package/.docs/integrations/channels/slack.md +5 -5
  71. package/.docs/integrations/channels/teams.md +2 -2
  72. package/.docs/integrations/channels/telegram.md +2 -2
  73. package/.docs/integrations/channels/whatsapp.md +2 -2
  74. package/.docs/integrations/databases/postgresql.md +1 -0
  75. package/.docs/integrations/deploy/amazon-ec2.md +2 -2
  76. package/.docs/integrations/deploy/aws-lambda.md +3 -3
  77. package/.docs/integrations/deploy/azure-app-services.md +2 -2
  78. package/.docs/integrations/deploy/cloudflare.md +2 -2
  79. package/.docs/integrations/deploy/digital-ocean.md +3 -3
  80. package/.docs/integrations/deploy/kubernetes.md +11 -11
  81. package/.docs/integrations/deploy/netlify.md +3 -3
  82. package/.docs/integrations/deploy/vercel.md +2 -2
  83. package/.docs/integrations/file-storage/amazon-s3.md +1 -1
  84. package/.docs/integrations/file-storage/azure-blob.md +1 -1
  85. package/.docs/integrations/file-storage/google-cloud-storage.md +1 -1
  86. package/.docs/integrations/file-storage/mesa.md +2 -2
  87. package/.docs/integrations/file-storage/vercel-files.md +1 -1
  88. package/.docs/integrations/frameworks/astro.md +1 -1
  89. package/.docs/integrations/frameworks/electron.md +1 -1
  90. package/.docs/integrations/frameworks/express.md +1 -1
  91. package/.docs/integrations/frameworks/hono.md +1 -1
  92. package/.docs/integrations/frameworks/nestjs.md +1 -1
  93. package/.docs/integrations/frameworks/next-js.md +1 -1
  94. package/.docs/integrations/frameworks/nuxt.md +1 -1
  95. package/.docs/integrations/frameworks/sveltekit.md +1 -1
  96. package/.docs/integrations/frameworks/vite-react.md +1 -1
  97. package/.docs/integrations/sandboxes/agentcore.md +1 -1
  98. package/.docs/integrations/sandboxes/apple-container.md +1 -1
  99. package/.docs/integrations/sandboxes/daytona.md +1 -1
  100. package/.docs/integrations/sandboxes/docker.md +4 -3
  101. package/.docs/integrations/sandboxes/e2b.md +1 -1
  102. package/.docs/integrations/sandboxes/modal.md +1 -1
  103. package/.docs/models/environment-variables.md +2 -0
  104. package/.docs/models/gateways/vercel.md +3 -1
  105. package/.docs/models/index.md +1 -1
  106. package/.docs/models/providers/arcee.md +79 -0
  107. package/.docs/models/providers/baseten.md +1 -1
  108. package/.docs/models/providers/cerebras.md +2 -3
  109. package/.docs/models/providers/cloudflare-workers-ai.md +1 -1
  110. package/.docs/models/providers/cortecs.md +2 -1
  111. package/.docs/models/providers/crof.md +1 -1
  112. package/.docs/models/providers/crossmodel.md +1 -1
  113. package/.docs/models/providers/deepinfra.md +2 -1
  114. package/.docs/models/providers/edenai.md +11 -5
  115. package/.docs/models/providers/huggingface.md +3 -1
  116. package/.docs/models/providers/hyper.md +5 -5
  117. package/.docs/models/providers/jalapeno.md +89 -0
  118. package/.docs/models/providers/kilo.md +8 -7
  119. package/.docs/models/providers/merge-gateway.md +3 -1
  120. package/.docs/models/providers/nano-gpt.md +3 -9
  121. package/.docs/models/providers/vivgrid.md +2 -1
  122. package/.docs/models/providers.md +2 -0
  123. package/.docs/reference/acp/acp-agent.md +2 -2
  124. package/.docs/reference/acp/create-acp-tool.md +1 -1
  125. package/.docs/reference/agent-controller/agent-controller-class.md +2 -2
  126. package/.docs/reference/agents/agent.md +2 -2
  127. package/.docs/reference/agents/channels.md +2 -2
  128. package/.docs/reference/agents/createSkill.md +2 -2
  129. package/.docs/reference/agents/durable-agent.md +1 -1
  130. package/.docs/reference/agents/generate.md +1 -1
  131. package/.docs/reference/agents/getSkill.md +1 -1
  132. package/.docs/reference/agents/listSkills.md +1 -1
  133. package/.docs/reference/agents/listSuspendedRuns.md +6 -6
  134. package/.docs/reference/agents/listTools.md +2 -2
  135. package/.docs/reference/agents/network.md +1 -1
  136. package/.docs/reference/ai-sdk/handle-network-stream.md +1 -1
  137. package/.docs/reference/ai-sdk/network-route.md +1 -1
  138. package/.docs/reference/auth/fga.md +7 -5
  139. package/.docs/reference/auth/jwt.md +1 -1
  140. package/.docs/reference/browser/agent-browser.md +2 -2
  141. package/.docs/reference/browser/browser-viewer.md +2 -2
  142. package/.docs/reference/browser/firecrawl-browser.md +1 -1
  143. package/.docs/reference/browser/mastra-browser.md +1 -1
  144. package/.docs/reference/browser/stagehand-browser.md +2 -2
  145. package/.docs/reference/build-with-ai.md +2 -2
  146. package/.docs/reference/channels/channel-provider.md +1 -1
  147. package/.docs/reference/channels/slack-provider.md +1 -1
  148. package/.docs/reference/cli/mastra.md +2 -0
  149. package/.docs/reference/client-js/agents.md +4 -4
  150. package/.docs/reference/coding-agent/create-coding-agent.md +142 -13
  151. package/.docs/reference/configuration.md +6 -6
  152. package/.docs/reference/core/getEditor.md +1 -1
  153. package/.docs/reference/core/getMCPServer.md +1 -1
  154. package/.docs/reference/core/getMCPServerById.md +1 -1
  155. package/.docs/reference/core/getTool.md +1 -1
  156. package/.docs/reference/core/getToolById.md +1 -1
  157. package/.docs/reference/core/listMCPServers.md +1 -1
  158. package/.docs/reference/core/listTools.md +1 -1
  159. package/.docs/reference/core/removeWorkspace.md +1 -1
  160. package/.docs/reference/editor/mastra-editor.md +2 -2
  161. package/.docs/reference/editor/prompt-blocks.md +2 -2
  162. package/.docs/reference/editor/tool-provider.md +1 -1
  163. package/.docs/reference/editor/tools.md +1 -1
  164. package/.docs/reference/editor/versioning.md +3 -3
  165. package/.docs/reference/evals/prompt-alignment.md +18 -0
  166. package/.docs/reference/evals/rubric.md +1 -1
  167. package/.docs/reference/file-based-agents/memory.md +2 -2
  168. package/.docs/reference/file-based-agents/server.md +3 -3
  169. package/.docs/reference/file-based-agents/skills.md +1 -1
  170. package/.docs/reference/file-based-agents/storage.md +3 -3
  171. package/.docs/reference/file-based-agents/subagents.md +1 -1
  172. package/.docs/reference/file-based-agents/workspace.md +3 -3
  173. package/.docs/reference/index.md +1 -0
  174. package/.docs/reference/manual-install.md +3 -3
  175. package/.docs/reference/memory/memory-class.md +1 -0
  176. package/.docs/reference/memory/settled.md +57 -0
  177. package/.docs/reference/migrations/network-to-supervisor.md +2 -2
  178. package/.docs/reference/processors/skill-search-processor.md +1 -1
  179. package/.docs/reference/processors/tool-call-filter.md +7 -7
  180. package/.docs/reference/processors/tool-search-processor.md +1 -1
  181. package/.docs/reference/project-structure.md +1 -1
  182. package/.docs/reference/pubsub/lease-provider.md +3 -3
  183. package/.docs/reference/pubsub/redis-streams.md +1 -1
  184. package/.docs/reference/rag/graph-rag.md +71 -8
  185. package/.docs/reference/schedules/overview.md +1 -1
  186. package/.docs/reference/streaming/ChunkType.md +2 -2
  187. package/.docs/reference/streaming/agents/stream.md +7 -4
  188. package/.docs/reference/streaming/agents/streamUntilIdle.md +1 -1
  189. package/.docs/reference/tools/ask-user-tool.md +1 -1
  190. package/.docs/reference/tools/create-code-mode.md +1 -1
  191. package/.docs/reference/tools/create-tool.md +4 -4
  192. package/.docs/reference/tools/mcp-server.md +47 -2
  193. package/.docs/reference/tools/submit-plan-tool.md +1 -1
  194. package/.docs/reference/tools/task-tools.md +2 -2
  195. package/.docs/reference/vectors/vectorize.md +12 -2
  196. package/.docs/reference/workers/overview.md +2 -2
  197. package/.docs/reference/workspace/local-filesystem.md +1 -1
  198. package/.docs/reference/workspace/local-sandbox.md +4 -3
  199. package/.docs/reference/workspace/process-manager.md +20 -4
  200. package/.docs/reference/workspace/sandbox.md +1 -1
  201. package/.docs/reference/workspace/workspace-class.md +5 -5
  202. package/CHANGELOG.md +15 -0
  203. package/package.json +4 -4
  204. /package/.docs/docs/{server/auth → auth}/composite-auth.md +0 -0
  205. /package/.docs/docs/{server/auth → auth}/jwt.md +0 -0
  206. /package/.docs/docs/{browser/overview.md → browser.md} +0 -0
  207. /package/.docs/docs/{getting-started/develop.md → develop.md} +0 -0
  208. /package/.docs/docs/{long-running-agents → harness}/signals.md +0 -0
  209. /package/.docs/docs/{editor/overview.md → studio/editor.md} +0 -0
@@ -14,4 +14,4 @@ The power of MCP lies in its ability to connect your agent to a wide variety of
14
14
 
15
15
  As you continue to develop your Mastra agent, consider exploring other MCP servers and tools that might be useful for your specific use case. The Mastra ecosystem is constantly growing, with new tools and capabilities being added regularly.
16
16
 
17
- For more information on MCP and available servers, check out the [Mastra MCP documentation](https://mastra.ai/docs/mcp/overview).
17
+ For more information on MCP and available servers, check out the [Mastra MCP documentation](https://mastra.ai/docs/connections/mcp).
@@ -29,7 +29,7 @@ Each turn adds the full tool response to the agent's context window which can le
29
29
 
30
30
  With code mode, your tools keep running on the host with full validation, request context, and tracing. Only the model's orchestration code runs in the sandbox. Each `external_*` call is bridged back to the real tool on the host, and the function can reduce or aggregate results before returning one response to the agent.
31
31
 
32
- The function runs in a [Workspace sandbox](https://mastra.ai/docs/workspace/sandbox). A sandbox is required, because code mode runs model-authored code and the execution boundary must be chosen deliberately. Pass one via `sandbox`, or run the agent in a workspace that provides one. To execute on the host machine, pass `new LocalSandbox()` explicitly. This runs the function as a host `node` process with host privileges, so only use it for trusted or local development.
32
+ The function runs in a [Workspace sandbox](https://mastra.ai/docs/sandbox/overview). A sandbox is required, because code mode runs model-authored code and the execution boundary must be chosen deliberately. Pass one via `sandbox`, or run the agent in a workspace that provides one. To execute on the host machine, pass `new LocalSandbox()` explicitly. This runs the function as a host `node` process with host privileges, so only use it for trusted or local development.
33
33
 
34
34
  Transports that bring their own execution boundary are the exception: with [`IsolatedVmCodeModeTransport`](https://mastra.ai/reference/tools/isolated-vm-transport) the program runs in an in-process V8 isolate and no sandbox is needed (see [In-process isolation](#in-process-isolation)).
35
35
 
@@ -183,5 +183,5 @@ See [Choosing a transport](https://mastra.ai/reference/tools/quickjs-transport)
183
183
  - [createCodeMode() reference](https://mastra.ai/reference/tools/create-code-mode)
184
184
  - [IsolatedVmCodeModeTransport reference](https://mastra.ai/reference/tools/isolated-vm-transport)
185
185
  - [QuickJsCodeModeTransport reference](https://mastra.ai/reference/tools/quickjs-transport)
186
- - [Tools](https://mastra.ai/docs/agents/using-tools)
187
- - [Sandbox](https://mastra.ai/docs/workspace/sandbox)
186
+ - [Tools](https://mastra.ai/docs/agents/tools)
187
+ - [Sandbox](https://mastra.ai/docs/sandbox/overview)
@@ -130,7 +130,7 @@ const scrubbedAgent = new Agent({
130
130
 
131
131
  Visit [`SystemPromptScrubber()`](https://mastra.ai/reference/processors/system-prompt-scrubber) reference for a full list of configuration options.
132
132
 
133
- > **Note:** When streaming responses over HTTP, Mastra redacts sensitive request data (system prompts, tool definitions, API keys) from stream chunks at the server level by default. See [Stream data redaction](https://mastra.ai/docs/server/mastra-server) for details.
133
+ > **Note:** When streaming responses over HTTP, Mastra redacts sensitive request data (system prompts, tool definitions, API keys) from stream chunks at the server level by default. See [Stream data redaction](https://mastra.ai/docs/server/overview) for details.
134
134
 
135
135
  ## Hybrid processors
136
136
 
@@ -48,7 +48,7 @@ for await (const chunk of stream.fullStream) {
48
48
  }
49
49
  ```
50
50
 
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.
51
+ > **Note:** Human-in-the-loop uses snapshots to capture request state. Configure a [storage provider](https://mastra.ai/docs/storage) 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
 
@@ -510,11 +510,11 @@ Each returned run includes the suspended tool calls (`toolCallId`, `toolName`, `
510
510
 
511
511
  The same discovery is available over HTTP as `GET /agents/:agentId/suspended-runs` and in the client SDK as [`agent.listSuspendedRuns()`](https://mastra.ai/reference/client-js/agents), so browser-based approval UIs can rediscover pending runs directly.
512
512
 
513
- > **Note:** Suspended runs only survive restarts when your Mastra instance is configured with a persistent [storage provider](https://mastra.ai/docs/storage/overview). The default in-memory store loses snapshots when the process exits.
513
+ > **Note:** Suspended runs only survive restarts when your Mastra instance is configured with a persistent [storage provider](https://mastra.ai/docs/storage). The default in-memory store loses snapshots when the process exits.
514
514
 
515
515
  ## Tool approval: Supervisor agents
516
516
 
517
- A [supervisor agent](https://mastra.ai/docs/capabilities/subagents) coordinates multiple subagents using `.stream()` or `.generate()`. When a subagent calls a tool that requires approval, the request propagates up through the delegation chain and surfaces at the supervisor level:
517
+ A [supervisor agent](https://mastra.ai/docs/subagents) coordinates multiple subagents using `.stream()` or `.generate()`. When a subagent calls a tool that requires approval, the request propagates up through the delegation chain and surfaces at the supervisor level:
518
518
 
519
519
  1. The supervisor delegates a task to a subagent.
520
520
  2. The subagent calls a tool that has `requireApproval: true` or uses `suspend()`.
@@ -673,8 +673,8 @@ if (output.finishReason === 'suspended') {
673
673
 
674
674
  ## Related
675
675
 
676
- - [Tools](https://mastra.ai/docs/agents/using-tools)
676
+ - [Tools](https://mastra.ai/docs/agents/tools)
677
677
  - [Agent overview](https://mastra.ai/docs/agents/overview)
678
- - [MCP overview](https://mastra.ai/docs/mcp/overview)
678
+ - [MCP overview](https://mastra.ai/docs/connections/mcp)
679
679
  - [Memory](https://mastra.ai/docs/memory/overview)
680
680
  - [Request context](https://mastra.ai/docs/server/request-context)
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Agent networks
4
4
 
5
- > **Deprecated:** Agent networks are deprecated and will be removed in a future major release. [Supervisor agents](https://mastra.ai/docs/capabilities/subagents) using `agent.stream()` or `agent.generate()` are now the recommended approach. It provides the same multi-agent coordination with better control, a simpler API, and easier debugging.
5
+ > **Deprecated:** Agent networks are deprecated and will be removed in a future major release. [Supervisor agents](https://mastra.ai/docs/subagents) using `agent.stream()` or `agent.generate()` are now the recommended approach. It provides the same multi-agent coordination with better control, a simpler API, and easier debugging.
6
6
  >
7
7
  > See the [migration guide](https://mastra.ai/reference/migrations/network-to-supervisor) to upgrade.
8
8
 
@@ -95,7 +95,7 @@ console.log(final?.summary)
95
95
 
96
96
  When a primitive requires approval, the stream emits an `agent-execution-approval` or `tool-execution-approval` chunk. Use `approveNetworkToolCall()` or `declineNetworkToolCall()` to respond.
97
97
 
98
- Network approval uses snapshots to capture execution state. Ensure a [storage provider](https://mastra.ai/docs/storage/overview) is enabled in your Mastra instance.
98
+ Network approval uses snapshots to capture execution state. Ensure a [storage provider](https://mastra.ai/docs/storage) is enabled in your Mastra instance.
99
99
 
100
100
  ```typescript
101
101
  const stream = await routingAgent.network('Perform some sensitive action', {
@@ -180,5 +180,5 @@ Requirements for automatic resumption:
180
180
 
181
181
  ## Related
182
182
 
183
- - [Supervisor agents](https://mastra.ai/docs/capabilities/subagents)
183
+ - [Supervisor agents](https://mastra.ai/docs/subagents)
184
184
  - [Migration: `.network()` to supervisor agents](https://mastra.ai/reference/migrations/network-to-supervisor)
@@ -165,7 +165,7 @@ Visit the [agent reference](https://mastra.ai/reference/agents/agent) for more i
165
165
 
166
166
  ## Use your agent
167
167
 
168
- 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.
168
+ 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/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.
169
169
 
170
170
  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.
171
171
 
@@ -202,18 +202,18 @@ Once your agent is running, use this table to find the right page for what you w
202
202
 
203
203
  | Goal | Start here |
204
204
  | -------------------------------------------------------------- | ---------------------------------------------------------------------- |
205
- | Give your agent tools to call external APIs or services | [Tools](https://mastra.ai/docs/agents/using-tools) |
205
+ | Give your agent tools to call external APIs or services | [Tools](https://mastra.ai/docs/agents/tools) |
206
206
  | Keep context and preferences across conversations | [Memory](https://mastra.ai/docs/memory/overview) |
207
207
  | Get typed objects back instead of plain text | [Structured output](https://mastra.ai/docs/agents/structured-output) |
208
- | Human-in-the-loop: Pause execution and wait for human approval | [Human-in-the-loop](https://mastra.ai/docs/agents/agent-approval) |
209
- | Build a multi-agent network | [Supervisor agents](https://mastra.ai/docs/capabilities/subagents) |
210
- | Register subagents | [Tools](https://mastra.ai/docs/agents/using-tools) |
208
+ | Human-in-the-loop: Pause execution and wait for human approval | [Human-in-the-loop](https://mastra.ai/docs/agents/human-in-the-loop) |
209
+ | Build a multi-agent network | [Supervisor agents](https://mastra.ai/docs/subagents) |
210
+ | Register subagents | [Tools](https://mastra.ai/docs/agents/tools) |
211
211
  | Intercept or transform messages before and after generation | [Processors](https://mastra.ai/docs/agents/processors) |
212
212
  | Keep your agent safe | [Guardrails](https://mastra.ai/docs/agents/guardrails) |
213
- | Build agents that correct their work | [Rubric scorer](https://mastra.ai/docs/capabilities/subagents) |
213
+ | Build agents that correct their work | [Rubric scorer](https://mastra.ai/docs/subagents) |
214
214
  | Swap instructions or models based on request context | [Dynamic configuration](https://mastra.ai/docs/server/request-context) |
215
215
  | Add speech-to-text or text-to-speech | [Voice](https://mastra.ai/reference/voice/overview) |
216
- | Connect to Slack, Discord, or Telegram | [Channels](https://mastra.ai/docs/capabilities/channels) |
216
+ | Connect to Slack, Discord, or Telegram | [Channels](https://mastra.ai/docs/channels) |
217
217
 
218
218
  ## Multi-agent systems
219
219
 
@@ -398,7 +398,7 @@ See the [`TokenLimiterProcessor` reference](https://mastra.ai/reference/processo
398
398
 
399
399
  Removes tool calls and results from messages sent to the LLM, saving tokens on verbose tool interactions. Optionally exclude only specific tools. This filter only affects the LLM input, filtered messages are still saved to memory.
400
400
 
401
- By default, `ToolCallFilter` filters the initial input before the agent loop starts. Use `filterAfterToolSteps` to also filter during each loop step while preserving recent tool-producing steps.
401
+ By default, `ToolCallFilter` filters tool calls from prior history and leaves tool calls made during the current agent loop in place. Use `filterAfterToolSteps` to also filter during the loop while preserving the most recent tool-producing steps.
402
402
 
403
403
  ```typescript
404
404
  new ToolCallFilter({
@@ -640,7 +640,7 @@ Do not mention the reminder to the user or quote the tags back to them.`,
640
640
  await agent.generate('Your prompt', { maxSteps: MAX_STEPS })
641
641
  ```
642
642
 
643
- > **Note:** Reactive signals default to `tagName: 'system-reminder'`. Visit [Signals](https://mastra.ai/docs/long-running-agents/signals) for more on processor-emitted signals.
643
+ > **Note:** Reactive signals default to `tagName: 'system-reminder'`. Visit [Signals](https://mastra.ai/docs/harness/signals) for more on processor-emitted signals.
644
644
 
645
645
  ### Deliver a reminder without retaining it
646
646
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Tools
4
4
 
5
- Agents use tools to call APIs or query databases. They can also run custom functions from your codebase. Tools give agents capabilities beyond language generation by providing structured access to data and performing clearly defined operations. You can also load tools from remote [MCP servers](https://mastra.ai/docs/mcp/overview) to expand an agent's capabilities.
5
+ Agents use tools to call APIs or query databases. They can also run custom functions from your codebase. Tools give agents capabilities beyond language generation by providing structured access to data and performing clearly defined operations. You can also load tools from remote [MCP servers](https://mastra.ai/docs/connections/mcp) to expand an agent's capabilities.
6
6
 
7
7
  **For AI agents:** Run `npx mastra api tool execute weather-tool '{"location":"San Francisco"}'` to test this tool directly instead of writing a temporary script. The command requires a running Mastra server; start the local server with `npx mastra dev`, or pass the reachable server's base URL with `--url`. Run `npx mastra api tool execute --schema` before constructing different input. Install Mastra's skill with `npx skills add mastra-ai/skills --skill mastra` for complete API CLI discovery, targeting, schema, authentication, and error-handling guidance.
8
8
 
@@ -166,7 +166,7 @@ export const weatherAgent = new Agent({
166
166
 
167
167
  ## Agents as tools
168
168
 
169
- Add subagents through the `agents` configuration to create a [supervisor](https://mastra.ai/docs/capabilities/subagents). Mastra converts each subagent to an `agent-<key>` tool. Include a `description` on each subagent so the supervisor knows when to delegate.
169
+ Add subagents through the `agents` configuration to create a [supervisor](https://mastra.ai/docs/subagents). Mastra converts each subagent to an `agent-<key>` tool. Include a `description` on each subagent so the supervisor knows when to delegate.
170
170
 
171
171
  ```typescript
172
172
  import { Agent } from '@mastra/core/agent'
@@ -605,7 +605,7 @@ for await (const chunk of stream.fullStream) {
605
605
  }
606
606
  ```
607
607
 
608
- `askUserTool` supports free-text, single-select (`options` array), and multi-select (`selectionMode: 'multi_select'`) prompts. Pair it with `autoResumeSuspendedTools` so the agent resumes automatically from the user's next chat message. See [Automatic tool resumption](https://mastra.ai/docs/agents/agent-approval) for details.
608
+ `askUserTool` supports free-text, single-select (`options` array), and multi-select (`selectionMode: 'multi_select'`) prompts. Pair it with `autoResumeSuspendedTools` so the agent resumes automatically from the user's next chat message. See [Automatic tool resumption](https://mastra.ai/docs/agents/human-in-the-loop) for details.
609
609
 
610
610
  ### Submit a plan for review
611
611
 
@@ -643,7 +643,7 @@ const agent = new Agent({
643
643
  })
644
644
  ```
645
645
 
646
- Only one task can be `in_progress` at a time. The list is stored in the thread-scoped `threadState` storage domain and projected onto the agent's [state-signal](https://mastra.ai/docs/long-running-agents/signals) lane, so it survives observational-memory truncation. See the [Task tools reference](https://mastra.ai/reference/tools/task-tools) for full schemas.
646
+ Only one task can be `in_progress` at a time. The list is stored in the thread-scoped `threadState` storage domain and projected onto the agent's [state-signal](https://mastra.ai/docs/harness/signals) lane, so it survives observational-memory truncation. See the [Task tools reference](https://mastra.ai/reference/tools/task-tools) for full schemas.
647
647
 
648
648
  The [AgentController](https://mastra.ai/docs/harness/agent-controller) automatically includes all built-in tools in every mode, you don't need to add them manually. See [Tool approvals](https://mastra.ai/docs/harness/agent-controller) for AgentController-specific behavior.
649
649
 
@@ -651,11 +651,11 @@ The [AgentController](https://mastra.ai/docs/harness/agent-controller) automatic
651
651
 
652
652
  - [`createTool` reference](https://mastra.ai/reference/tools/create-tool)
653
653
  - [`Agent.generate()` reference](https://mastra.ai/reference/agents/generate): Runtime options for tool selection, steps, and callbacks
654
- - [Background tasks](https://mastra.ai/docs/long-running-agents/background-tasks): Run long-running tools without blocking the agent loop
655
- - [MCP overview](https://mastra.ai/docs/mcp/overview)
654
+ - [Background tasks](https://mastra.ai/docs/harness/background-tasks): Run long-running tools without blocking the agent loop
655
+ - [MCP overview](https://mastra.ai/docs/connections/mcp)
656
656
  - [Dynamic tool search](https://mastra.ai/reference/processors/tool-search-processor): Load tools on demand for agents with large tool libraries
657
657
  - [Tools with structured output](https://mastra.ai/docs/agents/structured-output): Model compatibility when combining tools and structured output
658
- - [Agent approval](https://mastra.ai/docs/agents/agent-approval)
658
+ - [Agent approval](https://mastra.ai/docs/agents/human-in-the-loop)
659
659
  - [`askUserTool` reference](https://mastra.ai/reference/tools/ask-user-tool)
660
660
  - [`submitPlanTool` reference](https://mastra.ai/reference/tools/submit-plan-tool)
661
661
  - [Task tools reference](https://mastra.ai/reference/tools/task-tools)
@@ -509,5 +509,5 @@ See the [source code](https://github.com/mastra-ai/mastra/tree/main/auth) for im
509
509
 
510
510
  ## Related
511
511
 
512
- - [Auth Overview](https://mastra.ai/docs/server/auth): Authentication concepts and configuration
512
+ - [Auth Overview](https://mastra.ai/docs/auth/overview): Authentication concepts and configuration
513
513
  - [Custom API Routes](https://mastra.ai/docs/server/custom-api-routes): Controlling authentication on custom endpoints
@@ -284,6 +284,32 @@ class MyFGAProvider implements IFGAProvider {
284
284
  }
285
285
  ```
286
286
 
287
+ ### Propagating an actor into workflow steps
288
+
289
+ A workflow run's `actor` reaches each step's execute context, but it isn't passed to the agent and tool calls that step makes. Steps that call an agent without an `actor` fall back to user membership resolution, which fails on system runs that have no user.
290
+
291
+ Set `propagate: true` on the actor to have the framework forward it into the agent and tool calls it makes for declarative `.then(agent)` and `.then(tool)` steps in the run:
292
+
293
+ ```typescript
294
+ await run.start({
295
+ inputData: { city: 'London' },
296
+ actor: { actorKind: 'system', sourceWorkflow: 'nightly-report', propagate: true },
297
+ })
298
+ ```
299
+
300
+ Propagation is opt-in and deliberately narrow:
301
+
302
+ - The `true` shorthand never propagates. Use the object form to opt in.
303
+ - Custom step `execute` functions are never covered. Read `actor` from the step context and pass it explicitly, so a step that acts on a user's behalf can't silently inherit system trust.
304
+ - Pass `actor` when creating the step to override the run actor for that step, including `actor: undefined` to drop back to user authorization mid-run.
305
+
306
+ ```typescript
307
+ // Runs as the system actor even though it loads user-supplied data.
308
+ workflow.then(createStep(reportAgent))
309
+ // Explicitly runs as the user instead.
310
+ workflow.then(createStep(summaryAgent, { actor: undefined }))
311
+ ```
312
+
287
313
  ### Trust requirements
288
314
 
289
315
  The actor signal is trusted input, so construct it server-side:
@@ -299,5 +325,5 @@ The actor signal is trusted input, so construct it server-side:
299
325
  ## Related
300
326
 
301
327
  - [`IFGAProvider` reference](https://mastra.ai/reference/auth/fga)
302
- - [Authentication overview](https://mastra.ai/docs/server/auth)
328
+ - [Authentication overview](https://mastra.ai/docs/auth/overview)
303
329
  - [WorkOS authentication](https://mastra.ai/integrations/auth/workos)
@@ -25,8 +25,8 @@ See [Custom API Routes](https://mastra.ai/docs/server/custom-api-routes) for con
25
25
 
26
26
  ### Built-in
27
27
 
28
- - [Simple Auth](https://mastra.ai/docs/server/auth/simple-auth)
29
- - [JSON Web Token](https://mastra.ai/docs/server/auth/jwt)
28
+ - [Simple Auth](https://mastra.ai/docs/auth/simple-auth)
29
+ - [JSON Web Token](https://mastra.ai/docs/auth/jwt)
30
30
 
31
31
  ### Third-party integrations
32
32
 
@@ -41,5 +41,5 @@ See [Custom API Routes](https://mastra.ai/docs/server/custom-api-routes) for con
41
41
 
42
42
  ### Advanced
43
43
 
44
- - [Composite Auth](https://mastra.ai/docs/server/auth/composite-auth)
45
- - [Custom Provider](https://mastra.ai/docs/server/auth/custom-auth-provider)
44
+ - [Composite Auth](https://mastra.ai/docs/auth/composite-auth)
45
+ - [Custom Provider](https://mastra.ai/docs/auth/custom-auth-provider)
@@ -171,4 +171,4 @@ SimpleAuth is designed for simplicity, not production security:
171
171
  - No cryptographic verification
172
172
  - All tokens must be known at startup
173
173
 
174
- For production applications, consider using [JWT](https://mastra.ai/docs/server/auth/jwt), [Clerk](https://mastra.ai/integrations/auth/clerk), [Auth0](https://mastra.ai/integrations/auth/auth0), or another identity provider.
174
+ For production applications, consider using [JWT](https://mastra.ai/docs/auth/jwt), [Clerk](https://mastra.ai/integrations/auth/clerk), [Auth0](https://mastra.ai/integrations/auth/auth0), or another identity provider.
@@ -130,8 +130,8 @@ Your auth provider's `authenticateToken` callback must recognize whatever creden
130
130
 
131
131
  ## Related
132
132
 
133
- - [Auth overview](https://mastra.ai/docs/server/auth): Available auth providers and how they work
134
- - [Token-based auth](https://mastra.ai/docs/server/auth/simple-auth): Token-to-user mapping authentication
133
+ - [Auth overview](https://mastra.ai/docs/auth/overview): Available auth providers and how they work
134
+ - [Token-based auth](https://mastra.ai/docs/auth/simple-auth): Token-to-user mapping authentication
135
135
  - [Worker deployment](https://mastra.ai/docs/deployment/workers): Set up split worker processes
136
136
  - [Workers reference](https://mastra.ai/reference/workers/overview): Configuration details for all worker types
137
137
  - [CLI reference](https://mastra.ai/reference/cli/mastra): `mastra worker build` and `mastra worker start`
@@ -50,7 +50,7 @@ export const yourAgent = new Agent({
50
50
 
51
51
  > **Note:** Channel adapters require provider-specific environment variables for credentials and request verification, such as bot tokens, signing secrets, app IDs, and webhook verification tokens. Check the guide for your platform or the [Chat SDK adapter catalog](https://chat-sdk.dev/adapters) for the exact variable names.
52
52
 
53
- We recommend configuring [storage](https://mastra.ai/docs/storage/overview) for channels. Storage lets Mastra persist channel state, thread subscriptions, tool approvals, and memory across restarts:
53
+ We recommend configuring [storage](https://mastra.ai/docs/storage) for channels. Storage lets Mastra persist channel state, thread subscriptions, tool approvals, and memory across restarts:
54
54
 
55
55
  ```typescript
56
56
  import { Mastra } from '@mastra/core'
@@ -284,7 +284,7 @@ Vercel and AWS Lambda require `waitUntil`, since they freeze the function as soo
284
284
 
285
285
  ### Coordinate instances with a shared pub/sub
286
286
 
287
- Channels route messages through the agent's [signal pipeline](https://mastra.ai/docs/long-running-agents/signals), and each run acquires a lease on its thread so one run owns the conversation at a time.
287
+ Channels route messages through the agent's [signal pipeline](https://mastra.ai/docs/harness/signals), and each run acquires a lease on its thread so one run owns the conversation at a time.
288
288
 
289
289
  The default in-memory pub/sub can't cross instance boundaries, so on serverless a follow-up message can be routed to a different instance than the one running the agent.
290
290
 
@@ -80,7 +80,7 @@ Use `A2AAgent` when another Mastra agent should delegate work to a remote agent.
80
80
 
81
81
  ## Consume A2A agents as subagents
82
82
 
83
- Use `A2AAgent` to wrap a remote A2A agent, then add it to a parent agent with the [supervisor agents](https://mastra.ai/docs/capabilities/subagents) pattern. Pass an explicit agent card URL when the remote server hosts multiple agents or uses a custom well-known path.
83
+ Use `A2AAgent` to wrap a remote A2A agent, then add it to a parent agent with the [supervisor agents](https://mastra.ai/docs/subagents) pattern. Pass an explicit agent card URL when the remote server hosts multiple agents or uses a custom well-known path.
84
84
 
85
85
  ```typescript
86
86
  import { Agent } from '@mastra/core/agent'
@@ -221,7 +221,7 @@ A2A models human-in-the-loop (HITL) work with the `input-required` task state. W
221
221
 
222
222
  Mastra maps its agent suspension model to this state in both directions:
223
223
 
224
- - **As a server**: when an exposed agent suspends, the task transitions to `input-required`. This includes suspensions caused by [tool approval](https://mastra.ai/docs/agents/agent-approval) or a tool that calls `suspend()`. The task status message includes a text prompt and a data part with the structured `suspendPayload` and `resumeSchema`. A follow-up `message/send` or `message/stream` request with the same `taskId` resumes the suspended run with the provided input.
224
+ - **As a server**: when an exposed agent suspends, the task transitions to `input-required`. This includes suspensions caused by [tool approval](https://mastra.ai/docs/agents/human-in-the-loop) or a tool that calls `suspend()`. The task status message includes a text prompt and a data part with the structured `suspendPayload` and `resumeSchema`. A follow-up `message/send` or `message/stream` request with the same `taskId` resumes the suspended run with the provided input.
225
225
  - **As a client**: when a remote task reaches `input-required` or `auth-required`, `A2AAgent` returns a suspended result with `finishReason: 'suspended'` and a `suspendPayload`. Calling `resumeGenerate()` or `resumeStream()` sends the input or credentials back to the remote task with the original `taskId`.
226
226
 
227
227
  ```typescript
@@ -151,6 +151,6 @@ See the [AcpAgent workspace integration](https://mastra.ai/reference/acp/acp-age
151
151
  - [AcpAgent reference](https://mastra.ai/reference/acp/acp-agent)
152
152
  - [createACPTool() reference](https://mastra.ai/reference/acp/create-acp-tool)
153
153
  - [Agent reference](https://mastra.ai/reference/agents/agent)
154
- - [Subagents](https://mastra.ai/docs/capabilities/subagents)
154
+ - [Subagents](https://mastra.ai/docs/subagents)
155
155
  - [Agent Client Protocol introduction](https://agentclientprotocol.com/overview/introduction)
156
156
  - [Agent Client Protocol schema](https://agentclientprotocol.com/protocol/schema)
@@ -406,7 +406,7 @@ App iframes allow scripts, forms, and popups. They can't access the parent page'
406
406
 
407
407
  ## Next steps
408
408
 
409
- - [Use tools with agents](https://mastra.ai/docs/agents/using-tools)
409
+ - [Use tools with agents](https://mastra.ai/docs/agents/tools)
410
410
  - [`MCPClient` reference](https://mastra.ai/reference/tools/mcp-client)
411
411
  - [`MCPServer` reference](https://mastra.ai/reference/tools/mcp-server)
412
412
  - [MCP Apps extension specification](https://github.com/modelcontextprotocol/ext-apps)
@@ -4,10 +4,10 @@
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
 
7
- - [**Agent-to-Agent (A2A)**](https://mastra.ai/docs/agents/a2a): Expose or consume remote agents across service, framework, vendor, and language boundaries.
8
- - [**Agent Client Protocol (ACP)**](https://mastra.ai/docs/agents/acp): Run compatible coding-agent processes as Mastra tools or subagents.
9
- - [**SDK agents**](https://mastra.ai/docs/agents/sdk-agents): Register Claude, Cursor, or OpenAI SDK-backed agents while the provider SDK retains control of the runtime, tools, permissions, and agent loop.
10
- - [**Model Context Protocol (MCP)**](https://mastra.ai/docs/mcp/overview): Connect agents to external tools and resources, or expose Mastra agents, tools, workflows, prompts, and resources to MCP-compatible systems.
7
+ - [**Model Context Protocol (MCP)**](https://mastra.ai/docs/connections/mcp): Connect agents to external tools and resources, or expose Mastra agents, tools, workflows, prompts, and resources to MCP-compatible systems.
8
+ - [**Agent-to-Agent (A2A)**](https://mastra.ai/docs/connections/a2a): Expose or consume remote agents across service, framework, vendor, and language boundaries.
9
+ - [**Agent Client Protocol (ACP)**](https://mastra.ai/docs/connections/acp): Run compatible coding-agent processes as Mastra tools or subagents.
10
+ - [**SDK agents**](https://mastra.ai/docs/connections/sdk-agents): Register Claude, Cursor, or OpenAI SDK-backed agents while the provider SDK retains control of the runtime, tools, permissions, and agent loop.
11
11
 
12
12
  ## When to use connections
13
13
 
@@ -20,7 +20,7 @@ Use connections when you need to:
20
20
 
21
21
  ## Get started
22
22
 
23
- Start with the boundary you need to cross. Use [A2A](https://mastra.ai/docs/agents/a2a) for remote agent endpoints, [ACP](https://mastra.ai/docs/agents/acp) for coding-agent processes, [SDK agents](https://mastra.ai/docs/agents/sdk-agents) for provider-owned runtimes, or [MCP](https://mastra.ai/docs/mcp/overview) for tools and resources.
23
+ Start with the boundary you need to cross. Use [A2A](https://mastra.ai/docs/connections/a2a) for remote agent endpoints, [ACP](https://mastra.ai/docs/connections/acp) for coding-agent processes, [SDK agents](https://mastra.ai/docs/connections/sdk-agents) for provider-owned runtimes, or [MCP](https://mastra.ai/docs/connections/mcp) for tools and resources.
24
24
 
25
25
  **A2A**:
26
26
 
@@ -423,5 +423,5 @@ For storage and dashboard setup, see [Observability](https://mastra.ai/docs/obse
423
423
  ## Related
424
424
 
425
425
  - [Agents overview](https://mastra.ai/docs/agents/overview)
426
- - [Tools](https://mastra.ai/docs/agents/using-tools)
426
+ - [Tools](https://mastra.ai/docs/agents/tools)
427
427
  - [Observability](https://mastra.ai/docs/observability/overview)
@@ -102,7 +102,7 @@ If a `public` folder exists in your Mastra directory (`src/mastra/public`), its
102
102
 
103
103
  ### Mastra configuration
104
104
 
105
- The build process respects configuration in your Mastra instance. For server behavior like CORS, timeouts, and middleware, see [server overview](https://mastra.ai/docs/server/mastra-server). For all available options, see the [configuration reference](https://mastra.ai/reference/configuration).
105
+ The build process respects configuration in your Mastra instance. For server behavior like CORS, timeouts, and middleware, see [server overview](https://mastra.ai/docs/server/overview). For all available options, see the [configuration reference](https://mastra.ai/reference/configuration).
106
106
 
107
107
  ## Build process
108
108
 
@@ -151,7 +151,7 @@ NODE_OPTIONS="--max-old-space-size=4096" mastra build
151
151
 
152
152
  ## Related
153
153
 
154
- - [Server Overview](https://mastra.ai/docs/server/mastra-server): Configure server behavior, middleware, and authentication
154
+ - [Server Overview](https://mastra.ai/docs/server/overview): Configure server behavior, middleware, and authentication
155
155
  - [Server Adapters](https://mastra.ai/docs/server/server-adapters): Use Express or Hono instead of `mastra build`
156
156
  - [Custom API Routes](https://mastra.ai/docs/server/custom-api-routes): Add custom HTTP endpoints
157
157
  - [Configuration Reference](https://mastra.ai/reference/configuration): Full configuration options
@@ -17,7 +17,7 @@ Mastra can run against any of these runtime environments:
17
17
 
18
18
  ### Mastra server
19
19
 
20
- Mastra provides a [server](https://mastra.ai/docs/server/mastra-server) powered by Hono that can be deployed independently. Use the `mastra build` command to build your application and deploy the output to your preferred VM, container, or PaaS platform.
20
+ Mastra provides a [server](https://mastra.ai/docs/server/overview) powered by Hono that can be deployed independently. Use the `mastra build` command to build your application and deploy the output to your preferred VM, container, or PaaS platform.
21
21
 
22
22
  Use this option when you need full control over your infrastructure, long-running processes, or WebSocket connections. The [Mastra server deployment guide](https://mastra.ai/docs/deployment/mastra-server) provides more details.
23
23
 
@@ -362,12 +362,12 @@ jobs:
362
362
 
363
363
  ## Security
364
364
 
365
- - The sandbox URL is public. Anyone with the URL can reach your Mastra server, including Studio. Enable [server auth](https://mastra.ai/docs/server/auth) for anything beyond throwaway previews.
365
+ - The sandbox URL is public. Anyone with the URL can reach your Mastra server, including Studio. Enable [server auth](https://mastra.ai/docs/auth/overview) for anything beyond throwaway previews.
366
366
  - Environment variables from your `.env` files are injected into the remote sandbox VM so the server can run. The deploy logs a warning when this happens. Don't deploy secrets you wouldn't put on a shared preview server.
367
- - To restrict access to Tier 3 traffic, pass a `secret` to `createSandboxHandler()` or `createSandboxProxy()`. The helpers attach it as the `x-mastra-sandbox-secret` header on forwarded requests. Configure [server auth](https://mastra.ai/docs/server/auth) to require that header, and direct hits to the sandbox URL get rejected while traffic through your domain works.
367
+ - To restrict access to Tier 3 traffic, pass a `secret` to `createSandboxHandler()` or `createSandboxProxy()`. The helpers attach it as the `x-mastra-sandbox-secret` header on forwarded requests. Configure [server auth](https://mastra.ai/docs/auth/overview) to require that header, and direct hits to the sandbox URL get rejected while traffic through your domain works.
368
368
 
369
369
  ## Related
370
370
 
371
371
  - [Deployment overview](https://mastra.ai/docs/deployment/overview)
372
- - [Server authentication](https://mastra.ai/docs/server/auth)
372
+ - [Server authentication](https://mastra.ai/docs/auth/overview)
373
373
  - [`WorkspaceSandbox` reference](https://mastra.ai/reference/workspace/sandbox)
@@ -339,7 +339,7 @@ MASTRA_STEP_EXECUTION_URL=http://api:4111/api
339
339
 
340
340
  Without this variable, the orchestration worker attempts to execute steps in its own process, which doesn't have access to the full Mastra runtime in a split deployment.
341
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.
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/auth/workers) for server configuration and other credential formats.
343
343
 
344
344
  ### Scale workers
345
345
 
@@ -365,18 +365,18 @@ A distributed PubSub backend persists unacknowledged events, which lets orchestr
365
365
 
366
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
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).
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/harness/durable-agents).
369
369
 
370
370
  ## Known limitations
371
371
 
372
372
  - **No dead-letter queue**: Failed events are nacked and retried, but there's no DLQ for events that fail after all retries.
373
373
  - **No built-in health endpoint**: Workers don't expose an HTTP health check. Use container-level liveness probes or process monitoring.
374
374
  - **Scheduler is single-instance**: Running multiple scheduler processes causes duplicate schedule fires.
375
- - **Runs stuck in "running" after API crash**: If the API process crashes while executing a workflow step, the run remains in `running` status with no automatic retry. For [durable agents](https://mastra.ai/docs/long-running-agents/durable-agents), set `recovery.durableAgents` to `'auto'` in the Mastra config to automatically re-drive orphaned runs on server restart. See [Crash recovery](https://mastra.ai/docs/long-running-agents/durable-agents) for details.
375
+ - **Runs stuck in "running" after API crash**: If the API process crashes while executing a workflow step, the run remains in `running` status with no automatic retry. For [durable agents](https://mastra.ai/docs/harness/durable-agents), set `recovery.durableAgents` to `'auto'` in the Mastra config to automatically re-drive orphaned runs on server restart. See [Crash recovery](https://mastra.ai/docs/harness/durable-agents) for details.
376
376
 
377
377
  ## Related
378
378
 
379
- - [Worker authentication](https://mastra.ai/docs/server/auth/workers): Secure worker-to-API communication
379
+ - [Worker authentication](https://mastra.ai/docs/auth/workers): Secure worker-to-API communication
380
380
  - [Workers reference](https://mastra.ai/reference/workers/overview): Details about worker environment variables and types, with a list of supported storage backends
381
381
  - [CLI reference](https://mastra.ai/reference/cli/mastra): `mastra worker build` and `mastra worker start`
382
382
  - [PubSub](https://mastra.ai/docs/server/pubsub): Event delivery backends
@@ -44,7 +44,7 @@ A supervisor pattern keeps one lead agent in control for the full task. The supe
44
44
 
45
45
  Use this pattern when the task is open-ended and the full sequence isn't known in advance. For example, a research task may require different lines of inquiry based on what earlier steps uncover. A supervisor can adapt as the task unfolds. The tradeoff is that the supervisor becomes the main coordination point. That makes the pattern flexible, but it also means the result depends heavily on good delegation behavior and clear subagent boundaries.
46
46
 
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.
47
+ In Mastra, this pattern maps directly to [supervisor agents](https://mastra.ai/docs/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
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
 
@@ -60,12 +60,12 @@ Mastra doesn't provide a dedicated council primitive. In Mastra, implement this
60
60
 
61
61
  These patterns differ mainly in how they distribute control:
62
62
 
63
- | Pattern | Who stays in control | Use when | Tradeoff | Mastra implementation |
64
- | ----------------- | -------------------- | ------------------------------------------------ | -------------------------------------------------------- | ------------------------------------------------------------------ |
65
- | Handoffs | Current specialist | Ownership should move between specialists | Context transfer becomes more important | Agents with workflows and memory |
66
- | Workflows | Execution graph | The path is known in advance | Less adaptive when the task changes | [Workflows](https://mastra.ai/docs/workflows/overview) |
67
- | Supervisor agents | One lead agent | Delegation must adapt during execution | Results depend on good coordination and clear boundaries | [Supervisor agents](https://mastra.ai/docs/capabilities/subagents) |
68
- | Council | Final synthesis step | The task needs multiple independent perspectives | Higher cost and latency | Agents with workflow parallelism |
63
+ | Pattern | Who stays in control | Use when | Tradeoff | Mastra implementation |
64
+ | ----------------- | -------------------- | ------------------------------------------------ | -------------------------------------------------------- | ------------------------------------------------------ |
65
+ | Handoffs | Current specialist | Ownership should move between specialists | Context transfer becomes more important | Agents with workflows and memory |
66
+ | Workflows | Execution graph | The path is known in advance | Less adaptive when the task changes | [Workflows](https://mastra.ai/docs/workflows/overview) |
67
+ | Supervisor agents | One lead agent | Delegation must adapt during execution | Results depend on good coordination and clear boundaries | [Supervisor agents](https://mastra.ai/docs/subagents) |
68
+ | Council | Final synthesis step | The task needs multiple independent perspectives | Higher cost and latency | Agents with workflow parallelism |
69
69
 
70
70
  In practice, these patterns are often combined:
71
71
 
@@ -31,7 +31,7 @@ for await (const chunk of stream.textStream) {
31
31
 
32
32
  Visit [Agent.stream()](https://mastra.ai/reference/streaming/agents/stream) for more information.
33
33
 
34
- > **Tip:** For agents that dispatch [background tasks](https://mastra.ai/docs/long-running-agents/background-tasks), use [`Agent.streamUntilIdle()`](https://mastra.ai/reference/streaming/agents/streamUntilIdle) to keep the stream open until those tasks complete and the agent has had a chance to respond to their results.
34
+ > **Tip:** For agents that dispatch [background tasks](https://mastra.ai/docs/harness/background-tasks), use [`Agent.streamUntilIdle()`](https://mastra.ai/reference/streaming/agents/streamUntilIdle) to keep the stream open until those tasks complete and the agent has had a chance to respond to their results.
35
35
 
36
36
  ### Output from `Agent.stream()`
37
37
 
@@ -8,6 +8,8 @@
8
8
 
9
9
  [Mastra Code](https://code.mastra.ai) and [Mastra Factory](https://factory.mastra.ai) are the flagship AgentController implementations. They're coding agents 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 TUI guide.
10
10
 
11
+ When the agent you host works in a codebase, build it with [`createCodingAgent()`](https://mastra.ai/reference/coding-agent/create-coding-agent) instead of `new Agent()`. It returns a standard `Agent` that already has a workspace, task tracking, and retries for transient model errors, which are the defaults Mastra Code runs on.
12
+
11
13
  ## When to use the Agent Controller
12
14
 
13
15
  Use the Agent Controller when your application needs:
@@ -388,7 +390,7 @@ channels: {
388
390
 
389
391
  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.
390
392
 
391
- See [Channels](https://mastra.ai/docs/capabilities/channels) for adapter setup and platform-specific webhook configuration.
393
+ See [Channels](https://mastra.ai/docs/channels) for adapter setup and platform-specific webhook configuration.
392
394
 
393
395
  ## Connect a UI
394
396
 
@@ -412,6 +414,6 @@ Subscriptions are isolated by Session. Events from another Session on the same c
412
414
  ## Related
413
415
 
414
416
  - [Agents](https://mastra.ai/docs/agents/overview)
415
- - [Workspace](https://mastra.ai/docs/workspace/sandbox)
417
+ - [Workspace](https://mastra.ai/docs/sandbox/overview)
416
418
  - [Observational memory](https://mastra.ai/docs/memory/observational-memory)
417
- - [Channels](https://mastra.ai/docs/capabilities/channels)
419
+ - [Channels](https://mastra.ai/docs/channels)
@@ -16,7 +16,7 @@ Use background tasks when a tool call may take long enough that the user shouldn
16
16
 
17
17
  For tool calls that return quickly, foreground execution using `agent.stream()` and `agent.generate()` is simpler.
18
18
 
19
- > **Note:** Background tasks require a configured [storage](https://mastra.ai/docs/storage/overview) backend on the Mastra instance. Tasks are persisted so they survive process restarts.
19
+ > **Note:** Background tasks require a configured [storage](https://mastra.ai/docs/storage) backend on the Mastra instance. Tasks are persisted so they survive process restarts.
20
20
 
21
21
  ## Quickstart
22
22
 
@@ -121,7 +121,7 @@ If the agent has `backgroundTasks.disabled: true`, every tool call runs synchron
121
121
 
122
122
  ## Background tasks related stream chunks
123
123
 
124
- When a tool call dispatches as a background task, two streams may surface lifecycle events for it: the agent's own stream and the [`backgroundTaskManager.stream()`](https://mastra.ai/docs/long-running-agents/background-tasks) SSE stream. Each stream covers a different set of chunk types:
124
+ When a tool call dispatches as a background task, two streams may surface lifecycle events for it: the agent's own stream and the [`backgroundTaskManager.stream()`](https://mastra.ai/docs/harness/background-tasks) SSE stream. Each stream covers a different set of chunk types:
125
125
 
126
126
  | Chunk type | When it fires | Emitted by |
127
127
  | --------------------------- | -------------------------------------------------------------------------------------- | -------------- |
@@ -376,7 +376,7 @@ These read from storage rather than the pubsub stream, so they're suitable for p
376
376
 
377
377
  - [`Agent.stream()` reference](https://mastra.ai/reference/streaming/agents/stream)
378
378
  - [backgroundTasks configuration reference](https://mastra.ai/reference/configuration)
379
- - [Durable agents](https://mastra.ai/docs/long-running-agents/durable-agents)
380
- - [Supervisor agents](https://mastra.ai/docs/capabilities/subagents)
379
+ - [Durable agents](https://mastra.ai/docs/harness/durable-agents)
380
+ - [Supervisor agents](https://mastra.ai/docs/subagents)
381
381
  - [Stream chunk types](https://mastra.ai/reference/streaming/ChunkType)
382
- - [Storage](https://mastra.ai/docs/storage/overview)
382
+ - [Storage](https://mastra.ai/docs/storage)