@mastra/mcp-docs-server 1.2.13-alpha.1 → 1.2.13-alpha.11

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 (128) hide show
  1. package/.docs/docs/agents/agent-approval.md +2 -2
  2. package/.docs/docs/agents/overview.md +1 -1
  3. package/.docs/docs/agents/supervisor-agents.md +2 -2
  4. package/.docs/docs/agents/using-tools.md +29 -0
  5. package/.docs/docs/{evals/datasets → datasets}/overview.md +3 -3
  6. package/.docs/docs/{evals/datasets → datasets}/running-experiments.md +27 -3
  7. package/.docs/docs/deployment/workers.md +14 -14
  8. package/.docs/docs/editor/overview.md +201 -206
  9. package/.docs/docs/evals/evals-with-memory.md +1 -1
  10. package/.docs/docs/getting-started/develop.md +196 -0
  11. package/.docs/docs/index.md +78 -1
  12. package/.docs/docs/long-running-agents/durable-agents.md +2 -2
  13. package/.docs/docs/mastra-platform/overview.md +1 -1
  14. package/.docs/docs/mastra-platform/workspaces.md +152 -0
  15. package/.docs/docs/memory/observational-memory.md +53 -13
  16. package/.docs/docs/memory/overview.md +14 -0
  17. package/.docs/docs/server/auth/workers.md +7 -5
  18. package/.docs/docs/server/mastra-client.md +60 -0
  19. package/.docs/docs/server/pubsub.md +2 -2
  20. package/.docs/docs/studio/observability.md +4 -0
  21. package/.docs/docs/studio/overview.md +2 -2
  22. package/.docs/docs/workflows/overview.md +1 -1
  23. package/.docs/docs/workflows/scheduled-workflows.md +1 -0
  24. package/.docs/docs/workspace/search.md +1 -1
  25. package/.docs/guides/deployment/kubernetes.md +2 -0
  26. package/.docs/guides/deployment/mastra-workers.md +350 -6
  27. package/.docs/guides/deployment/vercel.md +2 -0
  28. package/.docs/guides/getting-started/quickstart.md +3 -3
  29. package/.docs/{docs → guides}/rag/chunking-and-embedding.md +1 -1
  30. package/.docs/{docs → guides}/rag/graph-rag.md +1 -1
  31. package/.docs/{docs → guides}/rag/overview.md +2 -2
  32. package/.docs/{docs → guides}/rag/retrieval.md +1 -1
  33. package/.docs/{docs → guides}/voice/overview.md +4 -4
  34. package/.docs/{docs → guides}/voice/realtime-voice.md +2 -2
  35. package/.docs/{docs → guides}/voice/speech-to-speech.md +1 -1
  36. package/.docs/{docs → guides}/voice/speech-to-text.md +1 -1
  37. package/.docs/{docs → guides}/voice/text-to-speech.md +2 -2
  38. package/.docs/models/embeddings.md +63 -65
  39. package/.docs/models/environment-variables.md +1 -1
  40. package/.docs/models/gateways/openrouter.md +3 -6
  41. package/.docs/models/gateways/vercel.md +4 -1
  42. package/.docs/models/index.md +1 -1
  43. package/.docs/models/providers/crof.md +2 -1
  44. package/.docs/models/providers/crossmodel.md +4 -3
  45. package/.docs/models/providers/empiriolabs.md +2 -1
  46. package/.docs/models/providers/huggingface.md +3 -1
  47. package/.docs/models/providers/hyper.md +10 -7
  48. package/.docs/models/providers/llmgateway.md +5 -4
  49. package/.docs/models/providers/minimax.md +1 -1
  50. package/.docs/models/providers/neuralwatt.md +3 -1
  51. package/.docs/models/providers/openai.md +2 -2
  52. package/.docs/models/providers/opencode-go.md +2 -1
  53. package/.docs/models/providers/opencode.md +1 -1
  54. package/.docs/models/providers/perplexity-agent.md +3 -1
  55. package/.docs/models/providers/scaleway.md +1 -3
  56. package/.docs/models/providers/the-grid-ai.md +3 -3
  57. package/.docs/models/providers/zai-coding-plan.md +11 -13
  58. package/.docs/models/providers/zhipuai-coding-plan.md +12 -12
  59. package/.docs/reference/agents/agent.md +1 -1
  60. package/.docs/reference/agents/durable-agent.md +12 -1
  61. package/.docs/reference/agents/generate.md +1 -1
  62. package/.docs/reference/agents/getVoice.md +1 -1
  63. package/.docs/{docs/getting-started → reference}/build-with-ai.md +5 -110
  64. package/.docs/reference/cli/create-mastra.md +2 -0
  65. package/.docs/reference/cli/mastra.md +36 -16
  66. package/.docs/reference/client-js/agents.md +1 -1
  67. package/.docs/reference/configuration.md +2 -2
  68. package/.docs/reference/core/getEditor.md +1 -1
  69. package/.docs/reference/core/getVector.md +2 -2
  70. package/.docs/reference/core/listVectors.md +2 -2
  71. package/.docs/reference/core/mastra-class.md +2 -2
  72. package/.docs/reference/datasets/startExperiment.md +6 -0
  73. package/.docs/reference/datasets/startExperimentAsync.md +4 -0
  74. package/.docs/reference/editor/browser-provider.md +2 -2
  75. package/.docs/reference/editor/filesystem-provider.md +1 -1
  76. package/.docs/reference/editor/mastra-editor.md +31 -18
  77. package/.docs/reference/editor/prompt-blocks.md +137 -0
  78. package/.docs/reference/editor/sandbox-provider.md +1 -1
  79. package/.docs/reference/editor/storage-browser-ref.md +3 -3
  80. package/.docs/reference/editor/storage-workspace-ref.md +3 -3
  81. package/.docs/reference/editor/tool-provider.md +44 -10
  82. package/.docs/reference/editor/tools.md +100 -0
  83. package/.docs/reference/editor/versioning.md +130 -0
  84. package/.docs/reference/evals/mastra-scorer.md +68 -8
  85. package/.docs/reference/evals/summarization.md +203 -0
  86. package/.docs/reference/file-based-agents/config.md +39 -1
  87. package/.docs/reference/index.md +4 -4
  88. package/.docs/reference/memory/observational-memory.md +76 -24
  89. package/.docs/reference/memory/serialized-memory-config.md +3 -3
  90. package/.docs/reference/observability/tracing/interfaces.md +6 -1
  91. package/.docs/reference/processors/processor-interface.md +14 -2
  92. package/.docs/reference/processors/regex-filter-processor.md +1 -1
  93. package/.docs/reference/processors/token-limiter-processor.md +15 -1
  94. package/.docs/reference/project-structure.md +1 -1
  95. package/.docs/reference/rag/database-config.md +1 -1
  96. package/.docs/reference/storage/composite.md +2 -0
  97. package/.docs/reference/streaming/agents/stream.md +1 -1
  98. package/.docs/reference/tools/isolated-vm-transport.md +1 -1
  99. package/.docs/reference/vectors/mongodb.md +13 -13
  100. package/.docs/reference/voice/livekit.md +3 -3
  101. package/.docs/reference/workers/overview.md +10 -8
  102. package/.docs/reference/workspace/platform-filesystem.md +8 -5
  103. package/.docs/reference/workspace/platform-sandbox.md +83 -7
  104. package/CHANGELOG.md +44 -0
  105. package/README.md +1 -1
  106. package/package.json +5 -5
  107. package/.docs/docs/agent-builder/access-control.md +0 -99
  108. package/.docs/docs/agent-builder/browser.md +0 -63
  109. package/.docs/docs/agent-builder/channels.md +0 -78
  110. package/.docs/docs/agent-builder/configuration.md +0 -132
  111. package/.docs/docs/agent-builder/deploying.md +0 -124
  112. package/.docs/docs/agent-builder/integrations.md +0 -115
  113. package/.docs/docs/agent-builder/memory.md +0 -69
  114. package/.docs/docs/agent-builder/model-policy.md +0 -50
  115. package/.docs/docs/agent-builder/overview.md +0 -114
  116. package/.docs/docs/agent-builder/skill-registries.md +0 -31
  117. package/.docs/docs/agent-builder/workspace.md +0 -62
  118. package/.docs/docs/editor/prompts.md +0 -140
  119. package/.docs/docs/editor/tools.md +0 -148
  120. package/.docs/docs/getting-started/file-based-agents.md +0 -121
  121. package/.docs/docs/mastra-platform/workspace.md +0 -111
  122. package/.docs/docs/what-is-mastra.md +0 -161
  123. package/.docs/reference/client-js/agent-builder.md +0 -163
  124. package/.docs/reference/editor/agent-builder/agent-builder-options.md +0 -76
  125. package/.docs/reference/editor/agent-builder/builder-agent-defaults.md +0 -79
  126. package/.docs/reference/editor/agent-builder/builder-models.md +0 -66
  127. /package/.docs/{docs → guides}/getting-started/manual-install.md +0 -0
  128. /package/.docs/{docs → guides}/rag/vector-databases.md +0 -0
@@ -108,7 +108,7 @@ A tool's own `requireApproval` setting takes precedence over the function above.
108
108
 
109
109
  For sensitive tools, bind the approval to the exact tool name and arguments that were shown to the reviewer. If those arguments drift before execution, the tool shouldn't run under the old approval.
110
110
 
111
- The `tool-call-approval` chunk already includes `toolName`, `toolCallId`, and `args`. You can fingerprint those fields when the approval request is shown. The example below uses a simple JSON string as the fingerprint, but in production you should use a stable hash of the tool name and arguments:
111
+ The `tool-call-approval` chunk already includes `toolName`, `toolCallId`, and `args`. You can fingerprint those fields when the approval request is shown. The example below uses a JSON string as the fingerprint, but in production you should use a stable hash of the tool name and arguments:
112
112
 
113
113
  ```typescript
114
114
  import { Agent } from '@mastra/core/agent'
@@ -174,7 +174,7 @@ async function approveReviewedToolCall(runId: string, toolCallId: string, finger
174
174
  await consumeApprovalStream(stream)
175
175
  ```
176
176
 
177
- In production, store the approved fingerprint in durable storage scoped to the user, run, tool call, and policy version. The `Set` above is intentionally small so the boundary is easy to see: the approval is consumed once, and only for the same canonical tool arguments that were reviewed.
177
+ In production, store the approved fingerprint in durable storage scoped to the user, run, tool call, and policy version. The `Set` above is intentionally small so the boundary is clear: the approval is consumed once, and only for the same canonical tool arguments that were reviewed.
178
178
 
179
179
  ### Runtime suspension with `suspend()`
180
180
 
@@ -210,7 +210,7 @@ Once your agent is running, use this table to find the right page for what you w
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/agents/supervisor-agents) |
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/docs/voice/overview) |
213
+ | Add speech-to-text or text-to-speech | [Voice](https://mastra.ai/guides/voice/overview) |
214
214
  | Connect to Slack, Discord, or Telegram | [Channels](https://mastra.ai/docs/capabilities/channels/overview) |
215
215
 
216
216
  ## Multi-agent systems
@@ -420,12 +420,12 @@ const result = await supervisor.generate('Research and write about AI safety', {
420
420
  })
421
421
  ```
422
422
 
423
- Version overrides propagate automatically through delegation. See [Subagent versioning](https://mastra.ai/docs/editor/overview) for details on resolution order and server API usage.
423
+ Version overrides propagate automatically through delegation. See [Subagent versioning](https://mastra.ai/reference/editor/versioning) for details on resolution order and server API usage.
424
424
 
425
425
  ## Related
426
426
 
427
427
  - [Background tasks](https://mastra.ai/docs/long-running-agents/background-tasks)
428
- - [Subagent versioning](https://mastra.ai/docs/editor/overview)
428
+ - [Subagent versioning](https://mastra.ai/reference/editor/versioning)
429
429
  - [Guide: Research coordinator](https://mastra.ai/guides/guide/research-coordinator)
430
430
  - [Agent.stream() reference](https://mastra.ai/reference/streaming/agents/stream)
431
431
  - [Agent.streamUntilIdle() reference](https://mastra.ai/reference/streaming/agents/streamUntilIdle)
@@ -478,6 +478,7 @@ Mastra includes agent-agnostic built-in tools in `@mastra/core/tools` that add i
478
478
  | `task_complete` | Mark one tracked task completed |
479
479
  | `task_check` | Check task list completion status |
480
480
  | `webSearchTool` | Run provider-native web search with the active model |
481
+ | `webFetchTool` | Fetch a web page by URL and return its text content |
481
482
 
482
483
  ### Use provider web search
483
484
 
@@ -502,6 +503,34 @@ export const researchAgent = new Agent({
502
503
 
503
504
  The `search` key is only the agent-local tool name. Use any key. The `webSearchTool` value tells Mastra to use provider web search.
504
505
 
506
+ ### Fetch a web page
507
+
508
+ Import `webFetchTool` from `@mastra/core/tools` when the agent needs to read a specific URL. The tool requests the page over HTTP or HTTPS and returns its text content plus response metadata.
509
+
510
+ ```typescript
511
+ import { Agent } from '@mastra/core/agent'
512
+ import { webFetchTool } from '@mastra/core/tools'
513
+
514
+ export const readerAgent = new Agent({
515
+ id: 'reader-agent',
516
+ name: 'Reader Agent',
517
+ instructions: 'Fetch the page the user links to before answering.',
518
+ model: 'openai/gpt-5.6-sol',
519
+ tools: {
520
+ fetch: webFetchTool,
521
+ },
522
+ })
523
+ ```
524
+
525
+ The tool takes a single `url` input and returns `content`, `truncated`, `status`, `statusText`, `contentType`, `url`, and `ok`. It applies these limits:
526
+
527
+ - Only `http:` and `https:` URLs are allowed.
528
+ - Requests to `localhost` and to private or reserved IP addresses are blocked, including addresses returned by DNS resolution.
529
+ - Responses are truncated at 100,000 characters, with `truncated: true` in the result.
530
+ - Requests follow at most 5 redirects and time out after 15 seconds.
531
+
532
+ Failures don't throw. The tool returns `isError: true` with the reason in `content`, so the agent can retry or explain the problem.
533
+
505
534
  ### Ask the user a question
506
535
 
507
536
  Import [`askUserTool`](https://mastra.ai/reference/tools/ask-user-tool) and add it to the agent's toolset.
@@ -49,7 +49,7 @@ Visit the [`DatasetsManager` reference](https://mastra.ai/reference/datasets/dat
49
49
 
50
50
  You can also manage datasets in [Studio](https://mastra.ai/docs/studio/overview). After opening Studio, select **Datasets** from the sidebar to see all your available datasets or create a new one.
51
51
 
52
- To get started, select **Create Dataset** and set a name, description, and optional schemas. After confirming, you'll see the dataset details page with two tabs: **Items** and [**Experiments**](https://mastra.ai/docs/evals/datasets/running-experiments).
52
+ To get started, select **Create Dataset** and set a name, description, and optional schemas. After confirming, you'll see the dataset details page with two tabs: **Items** and [**Experiments**](https://mastra.ai/docs/datasets/running-experiments).
53
53
 
54
54
  In the **Items** view you can add, update, and delete items, and view version history. Select **Add Item** to insert a new item with JSON editors for input and ground truth. From this view you can also import items in bulk from a CSV or JSON file. When importing, map each column to the corresponding dataset field.
55
55
 
@@ -198,11 +198,11 @@ Fetch the exact items that existed at a past version:
198
198
  const items = await dataset.listItems({ version: 2 })
199
199
  ```
200
200
 
201
- You can also pin experiments to a version, see [running experiments](https://mastra.ai/docs/evals/datasets/running-experiments). Visit the [`Dataset` reference](https://mastra.ai/reference/datasets/dataset) for the full list of methods and parameters.
201
+ You can also pin experiments to a version, see [running experiments](https://mastra.ai/docs/datasets/running-experiments). Visit the [`Dataset` reference](https://mastra.ai/reference/datasets/dataset) for the full list of methods and parameters.
202
202
 
203
203
  ## Related
204
204
 
205
- - [Running experiments](https://mastra.ai/docs/evals/datasets/running-experiments)
205
+ - [Running experiments](https://mastra.ai/docs/datasets/running-experiments)
206
206
  - [Scorers overview](https://mastra.ai/docs/evals/overview)
207
207
  - [DatasetsManager reference](https://mastra.ai/reference/datasets/datasets-manager)
208
208
  - [Dataset reference](https://mastra.ai/reference/datasets/dataset)
@@ -4,7 +4,7 @@
4
4
 
5
5
  **Added in:** `@mastra/core@1.4.0`
6
6
 
7
- An experiment runs every item in a dataset through a target (an agent, a workflow, or a scorer) and then optionally scores the outputs. Use a scorer as the target when you want to evaluate an LLM judge itself. Results are persisted to storage so you can compare runs across different prompts, models, or code changes.
7
+ An experiment runs every item in a dataset through a target (an agent, a workflow, or a scorer) and then optionally scores the outputs. Use a scorer as the target when you want to evaluate an LLM judge itself. By default, results are persisted to storage so you can compare runs across different prompts, models, or code changes.
8
8
 
9
9
  **For AI agents:** Run `npx mastra api experiment run dataset_123 '{"name":"translation-baseline"}'` to start an experiment directly instead of opening Studio or writing a temporary script. Use a dataset ID returned by `npx mastra api dataset list` in place of the sample ID. The command requires a running Mastra server with dataset storage and registered experiment targets; start the local server with `npx mastra dev`, or pass the reachable server's base URL with `--url`. Run `npx mastra api experiment run --schema` before constructing different input, and get user approval before starting an experiment because it can make model calls. 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.
10
10
 
@@ -131,9 +131,33 @@ for (const item of summary.results) {
131
131
 
132
132
  Visit the [Scorers overview](https://mastra.ai/docs/evals/overview) for details on available and custom scorers.
133
133
 
134
+ ## Control persistence per run
135
+
136
+ Use `persistence` to skip storage writes for a specific run. Experiment records and score records can be disabled independently:
137
+
138
+ ```typescript
139
+ const summary = await dataset.startExperiment({
140
+ targetType: 'agent',
141
+ targetId: 'translation-agent',
142
+ scorers: ['accuracy'],
143
+ persistence: {
144
+ experiments: 'none',
145
+ scores: 'none',
146
+ },
147
+ })
148
+ ```
149
+
150
+ The target and scorers still run, and `startExperiment()` still returns the item results and scores in `summary`. The settings are independent. For example, set only `scores: 'none'` to persist the experiment and its item results without creating score records.
151
+
152
+ Omitted settings default to `'default'`, which preserves the standard storage behavior. This policy only controls experiment and score records created by the run. It doesn't disable storage used by the target, such as agent memory, vectors, observability, or custom tool storage.
153
+
154
+ When `startExperimentAsync()` runs with `experiments: 'none'`, it doesn't persist an experiment record, progress updates, or item results. Score persistence remains controlled separately by `persistence.scores`. Without an experiment event observer, the run is fire-and-forget, and the experiment API can't report whether it completed or failed.
155
+
156
+ Use synchronous `startExperiment()` when the caller needs the returned summary. An experiment event observer can receive lifecycle events and the terminal summary.
157
+
134
158
  ## Tool mocks
135
159
 
136
- When an experiment runs an agent that calls side-effecting tools, you can make the run deterministic by attaching static tool mocks to individual dataset items. During the experiment, a mocked tool returns its declared output instead of executing. By default, tools that have no mock on the item run live.
160
+ When an experiment runs an agent that calls side-effecting tools, attach static tool mocks to individual dataset items to make the run deterministic. During the experiment, a mocked tool returns its declared output instead of executing. Tools without a mock on the item run live by default.
137
161
 
138
162
  Mocks live on the dataset item, so they version with the row and travel with the test case. Each mock declares a tool name, the arguments it expects, and the output to return:
139
163
 
@@ -374,7 +398,7 @@ Visit the [`startExperiment` reference](https://mastra.ai/reference/datasets/sta
374
398
 
375
399
  ## Related
376
400
 
377
- - [Datasets overview](https://mastra.ai/docs/evals/datasets/overview)
401
+ - [Datasets overview](https://mastra.ai/docs/datasets/overview)
378
402
  - [Scorers overview](https://mastra.ai/docs/evals/overview)
379
403
  - [`startExperiment` reference](https://mastra.ai/reference/datasets/startExperiment)
380
404
  - [`listExperimentResults` reference](https://mastra.ai/reference/datasets/listExperimentResults)
@@ -17,7 +17,7 @@ Workers matter when any of these apply:
17
17
  - Different parts of the system need to scale independently (e.g., more orchestration capacity without more API instances)
18
18
  - Background tool calls should run on dedicated compute
19
19
 
20
- If your application handles light traffic and workflows complete quickly, the default in-process setup works fine. Skip the worker infrastructure until you need it.
20
+ If your application handles light traffic and workflows complete fast, the default in-process setup works fine. Skip the worker infrastructure until you need it.
21
21
 
22
22
  ## Worker types
23
23
 
@@ -33,11 +33,11 @@ The orchestration worker requires a PubSub backend that supports pull mode (e.g.
33
33
 
34
34
  ### Scheduler worker
35
35
 
36
- Polls storage for due cron schedules and publishes `workflow.start` events. It is a producer only, meaning it creates work for the orchestration worker to pick up.
36
+ Polls storage for due cron schedules and publishes `workflow.start` events. It's a producer only, meaning it creates work for the orchestration worker to pick up.
37
37
 
38
38
  The scheduler reads declarative `schedule` fields from your workflow definitions automatically. See [Scheduled workflows](https://mastra.ai/docs/workflows/scheduled-workflows) for how to declare schedules.
39
39
 
40
- **Do not run more than one scheduler instance.** Multiple schedulers polling the same storage would fire duplicate events for the same schedule.
40
+ **Don't run more than one scheduler instance.** Multiple schedulers polling the same storage would fire duplicate events for the same schedule.
41
41
 
42
42
  ### Background task worker
43
43
 
@@ -47,7 +47,7 @@ The background task worker manages concurrency limits, task lifecycle, and resul
47
47
 
48
48
  ## How workers run
49
49
 
50
- ### In-process (default)
50
+ ### In-process mode (default)
51
51
 
52
52
  With no configuration, Mastra creates and starts workers inside the API process. Events flow through an in-memory PubSub, and everything shares a single Node.js runtime.
53
53
 
@@ -64,7 +64,7 @@ This setup needs no external infrastructure beyond your storage adapter. It does
64
64
 
65
65
  ### Split processes
66
66
 
67
- To run workers separately, configure a distributed [PubSub](https://mastra.ai/docs/server/pubsub) backend and use the `MASTRA_WORKERS` environment variable to control which workers start in each process.
67
+ To run workers in their own processes, configure a distributed [PubSub](https://mastra.ai/docs/server/pubsub) backend and use the `MASTRA_WORKERS` environment variable to control which workers start in each process.
68
68
 
69
69
  **Redis Streams + PostgreSQL**:
70
70
 
@@ -100,38 +100,38 @@ export const mastra = new Mastra({
100
100
  })
101
101
  ```
102
102
 
103
- Any [supported storage backend](https://mastra.ai/reference/workers/overview) works swap the storage adapter for your preferred database.
103
+ Any [supported storage backend](https://mastra.ai/reference/workers/overview) works. Swap the storage adapter for your preferred database.
104
104
 
105
105
  Run the same build artifact in multiple containers, each with a different [`MASTRA_WORKERS`](https://mastra.ai/reference/workers/overview) value to control which worker starts in each process.
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 a Docker Compose example.
109
+ The [worker deployment guide](https://mastra.ai/guides/deployment/mastra-workers) walks through this setup with Docker Compose and Kubernetes examples.
110
110
 
111
111
  ## Network architecture
112
112
 
113
- Workers are internal infrastructure. They are not exposed to end users and do not need their own subdomain, public URL, or inbound HTTP route.
113
+ Workers are internal infrastructure. They're not exposed to end users and don't need their own subdomain, public URL, or inbound HTTP route.
114
114
 
115
115
  In a split deployment:
116
116
 
117
- - **The API server is the only public-facing process.** It serves all client HTTP requests REST endpoints, agent interactions, workflow triggers, and any custom routes.
118
- - **Workers connect outbound only.** They pull events from the distributed PubSub backend and read/write to the shared storage database. They do not accept inbound traffic from clients.
119
- - **The orchestration worker calls the API internally.** It sends step execution requests to the API over the container network using `MASTRA_STEP_EXECUTION_URL`. This is internal service-to-service communication, not a public endpoint.
117
+ - **The API server is the only public-facing process**: It serves all client HTTP requests, including REST endpoints, agent interactions, workflow triggers, and any custom routes.
118
+ - **Workers connect outbound only**: They pull events from the distributed PubSub backend and read/write to the shared storage database. They don't accept inbound traffic from clients.
119
+ - **The orchestration worker calls the API internally**: It sends step execution requests to the API over the container network using `MASTRA_STEP_EXECUTION_URL`. This is internal service-to-service communication, not a public endpoint.
120
120
 
121
121
  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
122
 
123
123
  ## Known limitations
124
124
 
125
- - **No dead-letter queue**: Failed events are nacked and retried, but there is no DLQ for events that repeatedly fail.
125
+ - **No dead-letter queue**: Failed events are nacked and retried, but there's no DLQ for events that fail after all retries.
126
126
  - **No built-in health endpoint**: Workers don't expose an HTTP health check. Use container-level liveness probes or process monitoring.
127
127
  - **Scheduler is single-instance**: Running multiple scheduler processes causes duplicate schedule fires.
128
128
  - **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.
129
129
 
130
130
  ## Related
131
131
 
132
- - [Worker deployment guide](https://mastra.ai/guides/deployment/mastra-workers): Docker Compose example and topology options
132
+ - [Worker deployment guide](https://mastra.ai/guides/deployment/mastra-workers): Docker Compose and Kubernetes examples
133
133
  - [Worker authentication](https://mastra.ai/docs/server/auth/workers): Secure worker-to-API communication
134
- - [Workers reference](https://mastra.ai/reference/workers/overview): Environment variables, worker types, and storage backends
134
+ - [Workers reference](https://mastra.ai/reference/workers/overview): Details about worker environment variables and types, with a list of supported storage backends
135
135
  - [CLI reference](https://mastra.ai/reference/cli/mastra): `mastra worker build` and `mastra worker start`
136
136
  - [PubSub](https://mastra.ai/docs/server/pubsub): Event delivery backends
137
137
  - [Scheduled workflows](https://mastra.ai/docs/workflows/scheduled-workflows): Declare cron schedules on workflows