@mastra/mcp-docs-server 1.2.11 → 1.2.12-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (448) hide show
  1. package/.docs/docs/agent-builder/access-control.md +3 -3
  2. package/.docs/docs/agent-builder/browser.md +1 -1
  3. package/.docs/docs/agent-builder/channels.md +1 -1
  4. package/.docs/docs/agent-builder/configuration.md +3 -3
  5. package/.docs/docs/agent-builder/deploying.md +2 -2
  6. package/.docs/docs/agent-builder/integrations.md +8 -8
  7. package/.docs/docs/agent-builder/memory.md +2 -2
  8. package/.docs/docs/agent-builder/overview.md +1 -1
  9. package/.docs/docs/agent-controller/channels.md +8 -6
  10. package/.docs/docs/agent-controller/modes.md +6 -6
  11. package/.docs/docs/agent-controller/overview.md +13 -9
  12. package/.docs/docs/agent-controller/session.md +27 -9
  13. package/.docs/docs/agent-controller/subagents.md +9 -6
  14. package/.docs/docs/agent-controller/threads-and-state.md +12 -8
  15. package/.docs/docs/agent-controller/tool-approvals.md +7 -3
  16. package/.docs/docs/agents/a2a.md +4 -2
  17. package/.docs/docs/agents/acp.md +5 -5
  18. package/.docs/docs/agents/agent-approval.md +13 -11
  19. package/.docs/docs/agents/code-mode.md +29 -6
  20. package/.docs/docs/agents/guardrails.md +8 -8
  21. package/.docs/docs/agents/networks.md +2 -2
  22. package/.docs/docs/agents/overview.md +9 -7
  23. package/.docs/docs/agents/processors.md +15 -15
  24. package/.docs/docs/agents/skills.md +6 -6
  25. package/.docs/docs/agents/structured-output.md +6 -6
  26. package/.docs/docs/agents/supervisor-agents.md +19 -13
  27. package/.docs/docs/agents/using-tools.md +48 -21
  28. package/.docs/docs/browser/agent-browser.md +4 -4
  29. package/.docs/docs/browser/browser-viewer.md +2 -2
  30. package/.docs/docs/browser/firecrawl.md +1 -1
  31. package/.docs/docs/browser/overview.md +2 -2
  32. package/.docs/docs/browser/recording.md +1 -1
  33. package/.docs/docs/browser/stagehand.md +7 -7
  34. package/.docs/docs/capabilities/channels/discord.md +1 -1
  35. package/.docs/docs/capabilities/channels/other-adapters.md +1 -1
  36. package/.docs/docs/capabilities/channels/overview.md +9 -5
  37. package/.docs/docs/capabilities/channels/slack.md +2 -2
  38. package/.docs/docs/capabilities/channels/teams.md +1 -1
  39. package/.docs/docs/capabilities/channels/telegram.md +1 -1
  40. package/.docs/docs/capabilities/channels/whatsapp.md +1 -1
  41. package/.docs/docs/deployment/mastra-server.md +1 -1
  42. package/.docs/docs/deployment/overview.md +6 -2
  43. package/.docs/docs/deployment/sandbox.md +3 -1
  44. package/.docs/docs/deployment/workers.md +137 -0
  45. package/.docs/docs/editor/overview.md +37 -31
  46. package/.docs/docs/editor/prompts.md +8 -4
  47. package/.docs/docs/editor/tools.md +3 -3
  48. package/.docs/docs/evals/built-in-scorers.md +4 -4
  49. package/.docs/docs/evals/custom-scorers.md +5 -5
  50. package/.docs/docs/evals/datasets/running-experiments.md +7 -7
  51. package/.docs/docs/evals/evals-with-memory.md +4 -4
  52. package/.docs/docs/evals/gates-and-verdicts.md +4 -4
  53. package/.docs/docs/evals/multi-turn.md +12 -12
  54. package/.docs/docs/evals/overview.md +6 -4
  55. package/.docs/docs/evals/quick-checks.md +2 -2
  56. package/.docs/docs/getting-started/build-with-ai.md +6 -4
  57. package/.docs/docs/getting-started/file-based-agents.md +6 -4
  58. package/.docs/docs/getting-started/manual-install.md +1 -1
  59. package/.docs/docs/index.md +9 -90
  60. package/.docs/docs/long-running-agents/background-tasks.md +10 -10
  61. package/.docs/docs/long-running-agents/durable-agents.md +46 -5
  62. package/.docs/docs/long-running-agents/goals.md +15 -11
  63. package/.docs/docs/long-running-agents/schedules.md +3 -3
  64. package/.docs/docs/long-running-agents/signal-providers.md +8 -6
  65. package/.docs/docs/long-running-agents/signals.md +9 -5
  66. package/.docs/docs/mastra-platform/configuration.md +3 -3
  67. package/.docs/docs/mastra-platform/database.md +8 -8
  68. package/.docs/docs/mastra-platform/deploy.md +8 -4
  69. package/.docs/docs/mastra-platform/environments.md +8 -4
  70. package/.docs/docs/mastra-platform/github.md +3 -1
  71. package/.docs/docs/mastra-platform/server.md +1 -1
  72. package/.docs/docs/mastra-platform/studio.md +2 -2
  73. package/.docs/docs/mastra-platform/workspace.md +6 -6
  74. package/.docs/docs/mcp/mcp-apps.md +1 -1
  75. package/.docs/docs/mcp/overview.md +9 -9
  76. package/.docs/docs/memory/memory-processors.md +10 -10
  77. package/.docs/docs/memory/message-history.md +11 -5
  78. package/.docs/docs/memory/multi-user-threads.md +6 -6
  79. package/.docs/docs/memory/observational-memory.md +27 -25
  80. package/.docs/docs/memory/overview.md +10 -10
  81. package/.docs/docs/memory/semantic-recall.md +3 -3
  82. package/.docs/docs/memory/working-memory.md +8 -8
  83. package/.docs/docs/observability/integrations/bridges/datadog.md +6 -6
  84. package/.docs/docs/observability/integrations/bridges/otel.md +5 -5
  85. package/.docs/docs/observability/integrations/exporters/datadog.md +1 -1
  86. package/.docs/docs/observability/integrations/exporters/laminar.md +1 -1
  87. package/.docs/docs/observability/integrations/exporters/langfuse.md +3 -3
  88. package/.docs/docs/observability/integrations/exporters/langsmith.md +4 -4
  89. package/.docs/docs/observability/integrations/exporters/mastra-platform.md +1 -1
  90. package/.docs/docs/observability/integrations/exporters/mastra-storage.md +1 -1
  91. package/.docs/docs/observability/integrations/exporters/otel.md +26 -4
  92. package/.docs/docs/observability/integrations/exporters/sentry.md +1 -1
  93. package/.docs/docs/observability/integrations/overview.md +1 -1
  94. package/.docs/docs/observability/integrations/processors/sensitive-data-filter.md +1 -1
  95. package/.docs/docs/observability/logging.md +1 -1
  96. package/.docs/docs/observability/metrics/overview.md +1 -1
  97. package/.docs/docs/observability/metrics/querying.md +8 -8
  98. package/.docs/docs/observability/overview.md +4 -4
  99. package/.docs/docs/observability/tracing/overview.md +18 -12
  100. package/.docs/docs/rag/chunking-and-embedding.md +1 -1
  101. package/.docs/docs/rag/graph-rag.md +7 -7
  102. package/.docs/docs/rag/overview.md +2 -2
  103. package/.docs/docs/rag/retrieval.md +18 -18
  104. package/.docs/docs/rag/vector-databases.md +2 -2
  105. package/.docs/docs/server/auth/composite-auth.md +2 -2
  106. package/.docs/docs/server/auth/fga.md +6 -6
  107. package/.docs/docs/server/auth/firebase.md +2 -2
  108. package/.docs/docs/server/auth/simple-auth.md +1 -1
  109. package/.docs/docs/server/auth/workers.md +133 -0
  110. package/.docs/docs/server/custom-adapters.md +4 -4
  111. package/.docs/docs/server/mastra-client.md +3 -3
  112. package/.docs/docs/server/mastra-server.md +2 -2
  113. package/.docs/docs/server/middleware.md +1 -1
  114. package/.docs/docs/server/pubsub.md +7 -4
  115. package/.docs/docs/server/request-context.md +11 -11
  116. package/.docs/docs/server/server-adapters.md +2 -2
  117. package/.docs/docs/storage/overview.md +2 -2
  118. package/.docs/docs/studio/auth.md +5 -5
  119. package/.docs/docs/studio/deployment.md +1 -1
  120. package/.docs/docs/studio/observability.md +2 -2
  121. package/.docs/docs/studio/overview.md +11 -9
  122. package/.docs/docs/voice/overview.md +26 -26
  123. package/.docs/docs/voice/realtime-voice.md +8 -8
  124. package/.docs/docs/voice/speech-to-speech.md +9 -9
  125. package/.docs/docs/voice/speech-to-text.md +3 -3
  126. package/.docs/docs/voice/text-to-speech.md +6 -6
  127. package/.docs/docs/what-is-mastra.md +161 -0
  128. package/.docs/docs/workflows/agents-and-tools.md +3 -3
  129. package/.docs/docs/workflows/control-flow.md +10 -8
  130. package/.docs/docs/workflows/error-handling.md +2 -2
  131. package/.docs/docs/workflows/overview.md +7 -6
  132. package/.docs/docs/workflows/scheduled-workflows.md +12 -12
  133. package/.docs/docs/workflows/snapshots.md +3 -3
  134. package/.docs/docs/workflows/suspend-and-resume.md +1 -1
  135. package/.docs/docs/workflows/time-travel.md +3 -1
  136. package/.docs/docs/workflows/workflow-state.md +1 -1
  137. package/.docs/docs/workspace/filesystem.md +10 -10
  138. package/.docs/docs/workspace/lsp.md +1 -1
  139. package/.docs/docs/workspace/overview.md +12 -12
  140. package/.docs/docs/workspace/sandbox.md +9 -7
  141. package/.docs/docs/workspace/search.md +3 -3
  142. package/.docs/docs/workspace/skills.md +7 -7
  143. package/.docs/guides/build-your-ui/ai-sdk-ui.md +6 -6
  144. package/.docs/guides/build-your-ui/copilotkit/generative-ui.md +9 -9
  145. package/.docs/guides/build-your-ui/copilotkit/overview.md +2 -2
  146. package/.docs/guides/build-your-ui/openui.md +2 -2
  147. package/.docs/guides/concepts/multi-agent-systems.md +5 -5
  148. package/.docs/guides/concepts/streaming.md +10 -10
  149. package/.docs/guides/deployment/amazon-ec2.md +1 -1
  150. package/.docs/guides/deployment/aws-lambda.md +1 -1
  151. package/.docs/guides/deployment/azure-app-services.md +1 -1
  152. package/.docs/guides/deployment/cloudflare.md +1 -1
  153. package/.docs/guides/deployment/inngest.md +6 -6
  154. package/.docs/guides/deployment/kubernetes.md +1 -1
  155. package/.docs/guides/deployment/mastra-workers.md +232 -0
  156. package/.docs/guides/deployment/temporal.md +1 -1
  157. package/.docs/guides/deployment/vercel.md +1 -1
  158. package/.docs/guides/getting-started/astro.md +1 -1
  159. package/.docs/guides/getting-started/electron.md +1 -1
  160. package/.docs/guides/getting-started/nestjs.md +5 -5
  161. package/.docs/guides/getting-started/vite-react.md +1 -1
  162. package/.docs/guides/guide/ai-recruiter.md +1 -1
  163. package/.docs/guides/guide/chef-michel.md +2 -2
  164. package/.docs/guides/guide/code-review-bot.md +2 -2
  165. package/.docs/guides/guide/coding-agent.md +5 -5
  166. package/.docs/guides/guide/dev-assistant.md +2 -2
  167. package/.docs/guides/guide/docs-manager.md +4 -4
  168. package/.docs/guides/guide/firecrawl.md +1 -1
  169. package/.docs/guides/guide/github-actions-pr-description.md +5 -5
  170. package/.docs/guides/guide/research-assistant.md +4 -4
  171. package/.docs/guides/guide/research-coordinator.md +5 -5
  172. package/.docs/guides/guide/signal-provider.md +1 -1
  173. package/.docs/guides/guide/slack-assistant.md +1 -1
  174. package/.docs/guides/guide/stock-agent.md +3 -3
  175. package/.docs/guides/guide/web-search.md +4 -4
  176. package/.docs/guides/guide/whatsapp-chat-bot.md +2 -2
  177. package/.docs/guides/index.md +1 -1
  178. package/.docs/guides/migrations/agentnetwork.md +4 -4
  179. package/.docs/guides/migrations/ai-sdk-v4-to-v5.md +1 -1
  180. package/.docs/guides/migrations/mastra-cloud.md +6 -6
  181. package/.docs/guides/migrations/network-to-supervisor.md +9 -9
  182. package/.docs/guides/migrations/upgrade-to-v1/agent.md +6 -6
  183. package/.docs/guides/migrations/upgrade-to-v1/cli.md +1 -1
  184. package/.docs/guides/migrations/upgrade-to-v1/client.md +3 -3
  185. package/.docs/guides/migrations/upgrade-to-v1/evals.md +2 -2
  186. package/.docs/guides/migrations/upgrade-to-v1/memory.md +1 -1
  187. package/.docs/guides/migrations/upgrade-to-v1/overview.md +3 -3
  188. package/.docs/guides/migrations/upgrade-to-v1/processors.md +1 -1
  189. package/.docs/guides/migrations/upgrade-to-v1/storage.md +11 -11
  190. package/.docs/guides/migrations/upgrade-to-v1/tools.md +3 -3
  191. package/.docs/guides/migrations/upgrade-to-v1/tracing.md +2 -2
  192. package/.docs/guides/migrations/upgrade-to-v1/voice.md +1 -1
  193. package/.docs/guides/migrations/upgrade-to-v1/workflows.md +1 -1
  194. package/.docs/guides/migrations/vnext-to-standard-apis.md +2 -2
  195. package/.docs/models/environment-variables.md +1 -0
  196. package/.docs/models/gateways/custom-gateways.md +3 -3
  197. package/.docs/models/gateways/openrouter.md +1 -3
  198. package/.docs/models/gateways/vercel.md +2 -1
  199. package/.docs/models/index.md +6 -6
  200. package/.docs/models/providers/baseten.md +1 -1
  201. package/.docs/models/providers/chutes.md +2 -1
  202. package/.docs/models/providers/crossmodel.md +2 -2
  203. package/.docs/models/providers/deepinfra.md +1 -1
  204. package/.docs/models/providers/hyper.md +3 -3
  205. package/.docs/models/providers/llmgateway.md +4 -3
  206. package/.docs/models/providers/modal.md +73 -0
  207. package/.docs/models/providers/wandb.md +2 -1
  208. package/.docs/models/providers.md +1 -0
  209. package/.docs/reference/acp/acp-agent.md +4 -4
  210. package/.docs/reference/acp/create-acp-tool.md +3 -3
  211. package/.docs/reference/agent-controller/agent-controller-class.md +36 -36
  212. package/.docs/reference/agent-controller/session.md +6 -6
  213. package/.docs/reference/agents/agent.md +14 -14
  214. package/.docs/reference/agents/channels.md +29 -13
  215. package/.docs/reference/agents/durable-agent.md +54 -5
  216. package/.docs/reference/agents/generate.md +3 -3
  217. package/.docs/reference/agents/generateLegacy.md +1 -1
  218. package/.docs/reference/agents/getDefaultOptions.md +1 -1
  219. package/.docs/reference/agents/getDefaultStreamOptions.md +1 -1
  220. package/.docs/reference/agents/getLLM.md +2 -2
  221. package/.docs/reference/agents/getMetadata.md +2 -2
  222. package/.docs/reference/agents/inngest-agent.md +1 -1
  223. package/.docs/reference/agents/listScorers.md +1 -1
  224. package/.docs/reference/agents/listSkills.md +1 -1
  225. package/.docs/reference/agents/listSuspendedRuns.md +2 -2
  226. package/.docs/reference/agents/network.md +1 -1
  227. package/.docs/reference/ai-sdk/chat-route.md +1 -1
  228. package/.docs/reference/ai-sdk/network-route.md +1 -1
  229. package/.docs/reference/ai-sdk/to-ai-sdk-messages.md +1 -1
  230. package/.docs/reference/ai-sdk/to-ai-sdk-v4-messages.md +1 -1
  231. package/.docs/reference/ai-sdk/to-ai-sdk-v5-messages.md +1 -1
  232. package/.docs/reference/ai-sdk/workflow-route.md +1 -1
  233. package/.docs/reference/ai-sdk/workflow-snapshot-to-stream.md +2 -2
  234. package/.docs/reference/auth/auth0.md +1 -1
  235. package/.docs/reference/auth/fga.md +2 -2
  236. package/.docs/reference/auth/google.md +2 -2
  237. package/.docs/reference/auth/okta.md +1 -1
  238. package/.docs/reference/auth/workos.md +2 -2
  239. package/.docs/reference/browser/agent-browser.md +3 -3
  240. package/.docs/reference/browser/browser-viewer.md +4 -4
  241. package/.docs/reference/browser/firecrawl-browser.md +1 -1
  242. package/.docs/reference/browser/mastra-browser.md +4 -4
  243. package/.docs/reference/browser/stagehand-browser.md +8 -8
  244. package/.docs/reference/channels/slack-provider.md +2 -2
  245. package/.docs/reference/cli/create-mastra.md +1 -1
  246. package/.docs/reference/cli/mastra.md +155 -24
  247. package/.docs/reference/client-js/agents.md +26 -9
  248. package/.docs/reference/client-js/memory.md +2 -2
  249. package/.docs/reference/client-js/workflows.md +1 -1
  250. package/.docs/reference/coding-agent/build-base-prompt.md +2 -2
  251. package/.docs/reference/coding-agent/create-coding-agent.md +2 -2
  252. package/.docs/reference/configuration.md +7 -7
  253. package/.docs/reference/core/getAgentById.md +1 -1
  254. package/.docs/reference/core/getMCPServer.md +1 -1
  255. package/.docs/reference/core/getScorer.md +1 -1
  256. package/.docs/reference/core/mastra-class.md +48 -1
  257. package/.docs/reference/core/mastra-model-gateway.md +1 -1
  258. package/.docs/reference/datasets/addItem.md +1 -1
  259. package/.docs/reference/datasets/listItems.md +1 -1
  260. package/.docs/reference/deployer/netlify.md +4 -4
  261. package/.docs/reference/deployer/vercel.md +7 -7
  262. package/.docs/reference/editor/agent-builder/agent-builder-options.md +4 -4
  263. package/.docs/reference/editor/agent-builder/builder-agent-defaults.md +6 -6
  264. package/.docs/reference/editor/agent-builder/builder-models.md +3 -3
  265. package/.docs/reference/editor/blob-store-provider.md +1 -1
  266. package/.docs/reference/editor/browser-provider.md +3 -3
  267. package/.docs/reference/editor/filesystem-provider.md +4 -4
  268. package/.docs/reference/editor/mastra-editor.md +5 -5
  269. package/.docs/reference/editor/processor-provider.md +3 -3
  270. package/.docs/reference/editor/sandbox-provider.md +4 -4
  271. package/.docs/reference/editor/storage-browser-ref.md +6 -6
  272. package/.docs/reference/editor/storage-workspace-ref.md +4 -4
  273. package/.docs/reference/editor/tool-provider.md +1 -1
  274. package/.docs/reference/evals/answer-relevancy.md +5 -5
  275. package/.docs/reference/evals/answer-similarity.md +1 -1
  276. package/.docs/reference/evals/bias.md +4 -4
  277. package/.docs/reference/evals/checks.md +3 -3
  278. package/.docs/reference/evals/completeness.md +5 -5
  279. package/.docs/reference/evals/content-similarity.md +5 -5
  280. package/.docs/reference/evals/context-precision.md +5 -5
  281. package/.docs/reference/evals/context-recall.md +11 -11
  282. package/.docs/reference/evals/context-relevance.md +15 -15
  283. package/.docs/reference/evals/create-scorer.md +1 -1
  284. package/.docs/reference/evals/faithfulness.md +4 -4
  285. package/.docs/reference/evals/filter-run.md +2 -2
  286. package/.docs/reference/evals/hallucination.md +11 -11
  287. package/.docs/reference/evals/keyword-coverage.md +6 -6
  288. package/.docs/reference/evals/mastra-scorer.md +2 -2
  289. package/.docs/reference/evals/noise-sensitivity.md +15 -15
  290. package/.docs/reference/evals/prompt-alignment.md +20 -20
  291. package/.docs/reference/evals/rubric.md +2 -2
  292. package/.docs/reference/evals/run-evals.md +3 -3
  293. package/.docs/reference/evals/scorer-utils.md +4 -4
  294. package/.docs/reference/evals/textual-difference.md +4 -4
  295. package/.docs/reference/evals/tool-call-accuracy.md +4 -4
  296. package/.docs/reference/evals/toxicity.md +5 -5
  297. package/.docs/reference/evals/trajectory-accuracy.md +10 -10
  298. package/.docs/reference/file-based-agents/config.md +3 -3
  299. package/.docs/reference/file-based-agents/instructions.md +3 -3
  300. package/.docs/reference/file-based-agents/logger.md +1 -1
  301. package/.docs/reference/file-based-agents/observability.md +1 -1
  302. package/.docs/reference/file-based-agents/processors.md +1 -1
  303. package/.docs/reference/file-based-agents/skills.md +1 -1
  304. package/.docs/reference/file-based-agents/storage.md +1 -1
  305. package/.docs/reference/file-based-agents/studio.md +1 -1
  306. package/.docs/reference/file-based-agents/subagents.md +4 -4
  307. package/.docs/reference/file-based-agents/tools.md +1 -1
  308. package/.docs/reference/file-based-agents/workspace.md +1 -1
  309. package/.docs/reference/index.md +2 -0
  310. package/.docs/reference/logging/pino-logger.md +3 -3
  311. package/.docs/reference/memory/clone-utilities.md +1 -1
  312. package/.docs/reference/memory/cloneThread.md +3 -3
  313. package/.docs/reference/memory/listThreads.md +1 -1
  314. package/.docs/reference/memory/memory-class.md +4 -4
  315. package/.docs/reference/memory/observational-memory.md +15 -15
  316. package/.docs/reference/memory/recall.md +2 -2
  317. package/.docs/reference/memory/serialized-memory-config.md +4 -4
  318. package/.docs/reference/memory/summarizeConversation.md +3 -3
  319. package/.docs/reference/memory/summarizeThread.md +3 -3
  320. package/.docs/reference/observability/feedback.md +1 -1
  321. package/.docs/reference/observability/metrics/automatic-metrics.md +7 -7
  322. package/.docs/reference/observability/tracing/bridges/datadog.md +2 -2
  323. package/.docs/reference/observability/tracing/exporters/cloud-exporter.md +3 -3
  324. package/.docs/reference/observability/tracing/exporters/default-exporter.md +1 -1
  325. package/.docs/reference/observability/tracing/exporters/langfuse.md +1 -1
  326. package/.docs/reference/observability/tracing/exporters/mastra-platform-exporter.md +4 -4
  327. package/.docs/reference/observability/tracing/exporters/mastra-storage-exporter.md +1 -1
  328. package/.docs/reference/observability/tracing/interfaces.md +1 -1
  329. package/.docs/reference/observability/tracing/processors/sensitive-data-filter.md +1 -1
  330. package/.docs/reference/observability/tracing/span-filtering.md +1 -1
  331. package/.docs/reference/processors/batch-parts-processor.md +1 -1
  332. package/.docs/reference/processors/cost-guard-processor.md +1 -1
  333. package/.docs/reference/processors/language-detector.md +1 -1
  334. package/.docs/reference/processors/message-history-processor.md +1 -1
  335. package/.docs/reference/processors/moderation-processor.md +2 -2
  336. package/.docs/reference/processors/pii-detector.md +3 -3
  337. package/.docs/reference/processors/processor-interface.md +13 -13
  338. package/.docs/reference/processors/prompt-injection-detector.md +2 -2
  339. package/.docs/reference/processors/provider-history-compat.md +1 -1
  340. package/.docs/reference/processors/regex-filter-processor.md +1 -1
  341. package/.docs/reference/processors/response-cache.md +8 -8
  342. package/.docs/reference/processors/semantic-recall-processor.md +1 -1
  343. package/.docs/reference/processors/skill-search-processor.md +1 -1
  344. package/.docs/reference/processors/system-prompt-scrubber.md +2 -2
  345. package/.docs/reference/processors/token-limiter-processor.md +4 -4
  346. package/.docs/reference/processors/tool-call-filter.md +2 -2
  347. package/.docs/reference/processors/tool-search-processor.md +9 -9
  348. package/.docs/reference/processors/unicode-normalizer.md +2 -2
  349. package/.docs/reference/processors/working-memory-processor.md +1 -1
  350. package/.docs/reference/project-structure.md +1 -1
  351. package/.docs/reference/pubsub/base.md +4 -4
  352. package/.docs/reference/pubsub/google-cloud-pubsub.md +2 -2
  353. package/.docs/reference/pubsub/lease-provider.md +4 -4
  354. package/.docs/reference/pubsub/redis-streams.md +1 -1
  355. package/.docs/reference/pubsub/unix-socket-pubsub.md +1 -1
  356. package/.docs/reference/rag/chunk.md +5 -5
  357. package/.docs/reference/rag/database-config.md +2 -2
  358. package/.docs/reference/rag/metadata-filters.md +2 -2
  359. package/.docs/reference/rag/rerank.md +1 -1
  360. package/.docs/reference/schedules/overview.md +1 -1
  361. package/.docs/reference/server/register-api-route.md +1 -1
  362. package/.docs/reference/server/routes.md +7 -7
  363. package/.docs/reference/signals/create-notification-inbox-tool.md +1 -1
  364. package/.docs/reference/signals/signal-provider.md +8 -8
  365. package/.docs/reference/storage/clickhouse.md +4 -4
  366. package/.docs/reference/storage/cloudflare-d1.md +4 -4
  367. package/.docs/reference/storage/convex.md +4 -4
  368. package/.docs/reference/storage/dsql.md +3 -3
  369. package/.docs/reference/storage/dynamodb.md +7 -7
  370. package/.docs/reference/storage/lance.md +1 -1
  371. package/.docs/reference/storage/mongodb.md +2 -2
  372. package/.docs/reference/storage/mssql.md +1 -1
  373. package/.docs/reference/storage/postgresql.md +2 -2
  374. package/.docs/reference/storage/redis.md +1 -1
  375. package/.docs/reference/storage/retention.md +33 -33
  376. package/.docs/reference/storage/spanner.md +8 -8
  377. package/.docs/reference/storage/upstash.md +1 -1
  378. package/.docs/reference/streaming/ChunkType.md +2 -2
  379. package/.docs/reference/streaming/agents/MastraModelOutput.md +1 -1
  380. package/.docs/reference/streaming/agents/stream.md +2 -2
  381. package/.docs/reference/streaming/agents/streamUntilIdle.md +2 -2
  382. package/.docs/reference/streaming/workflows/observeStream.md +1 -1
  383. package/.docs/reference/streaming/workflows/resumeStream.md +1 -1
  384. package/.docs/reference/streaming/workflows/stream.md +1 -1
  385. package/.docs/reference/streaming/workflows/timeTravelStream.md +2 -2
  386. package/.docs/reference/templates/overview.md +1 -1
  387. package/.docs/reference/tools/brightdata.md +1 -1
  388. package/.docs/reference/tools/create-code-mode.md +3 -3
  389. package/.docs/reference/tools/create-tool.md +1 -1
  390. package/.docs/reference/tools/graph-rag-tool.md +1 -1
  391. package/.docs/reference/tools/isolated-vm-transport.md +74 -0
  392. package/.docs/reference/tools/mcp-client.md +15 -15
  393. package/.docs/reference/tools/mcp-server.md +21 -21
  394. package/.docs/reference/tools/submit-plan-tool.md +1 -1
  395. package/.docs/reference/tools/tavily.md +1 -1
  396. package/.docs/reference/tools/vector-query-tool.md +5 -5
  397. package/.docs/reference/vectors/astra.md +1 -1
  398. package/.docs/reference/vectors/chroma.md +2 -2
  399. package/.docs/reference/vectors/convex.md +2 -2
  400. package/.docs/reference/vectors/couchbase.md +4 -4
  401. package/.docs/reference/vectors/libsql.md +2 -2
  402. package/.docs/reference/vectors/mongodb.md +3 -3
  403. package/.docs/reference/vectors/pg.md +5 -5
  404. package/.docs/reference/vectors/qdrant.md +2 -2
  405. package/.docs/reference/vectors/s3vectors.md +4 -4
  406. package/.docs/reference/vectors/turbopuffer.md +1 -1
  407. package/.docs/reference/vectors/upstash.md +1 -1
  408. package/.docs/reference/voice/aws-nova-sonic.md +1 -1
  409. package/.docs/reference/voice/azure.md +1 -1
  410. package/.docs/reference/voice/google-gemini-live.md +4 -4
  411. package/.docs/reference/voice/inworld-realtime.md +7 -7
  412. package/.docs/reference/voice/livekit.md +13 -13
  413. package/.docs/reference/voice/mistral.md +1 -1
  414. package/.docs/reference/voice/openai-realtime.md +1 -1
  415. package/.docs/reference/voice/sarvam.md +1 -1
  416. package/.docs/reference/voice/voice.addInstructions.md +1 -1
  417. package/.docs/reference/voice/voice.addTools.md +1 -1
  418. package/.docs/reference/voice/voice.events.md +1 -1
  419. package/.docs/reference/voice/voice.getSpeakers.md +2 -2
  420. package/.docs/reference/voice/voice.on.md +2 -2
  421. package/.docs/reference/voice/xai-realtime.md +2 -2
  422. package/.docs/reference/workers/overview.md +85 -0
  423. package/.docs/reference/workflows/run-methods/cancel.md +1 -1
  424. package/.docs/reference/workflows/run-methods/startAsync.md +1 -1
  425. package/.docs/reference/workflows/run-methods/timeTravel.md +1 -1
  426. package/.docs/reference/workflows/workflow-methods/foreach.md +1 -1
  427. package/.docs/reference/workflows/workflow-methods/sleep.md +1 -1
  428. package/.docs/reference/workflows/workflow-state-reader.md +2 -2
  429. package/.docs/reference/workspace/agentfs-filesystem.md +1 -1
  430. package/.docs/reference/workspace/apple-container-sandbox.md +2 -2
  431. package/.docs/reference/workspace/daytona-sandbox.md +3 -3
  432. package/.docs/reference/workspace/docker-sandbox.md +2 -2
  433. package/.docs/reference/workspace/e2b-sandbox.md +2 -2
  434. package/.docs/reference/workspace/files-sdk-filesystem.md +3 -3
  435. package/.docs/reference/workspace/google-drive-filesystem.md +4 -4
  436. package/.docs/reference/workspace/local-filesystem.md +3 -3
  437. package/.docs/reference/workspace/local-sandbox.md +3 -3
  438. package/.docs/reference/workspace/modal-sandbox.md +1 -1
  439. package/.docs/reference/workspace/platform-filesystem.md +3 -3
  440. package/.docs/reference/workspace/platform-sandbox.md +2 -2
  441. package/.docs/reference/workspace/process-manager.md +1 -1
  442. package/.docs/reference/workspace/railway-sandbox.md +4 -4
  443. package/.docs/reference/workspace/s3-filesystem.md +1 -1
  444. package/.docs/reference/workspace/sandbox.md +1 -1
  445. package/.docs/reference/workspace/vercel-sandbox.md +1 -1
  446. package/.docs/reference/workspace/workspace-class.md +10 -10
  447. package/CHANGELOG.md +21 -0
  448. package/package.json +3 -3
@@ -44,7 +44,7 @@ You're now ready to follow the integration guides and recipes below!
44
44
 
45
45
  ## Integration guides
46
46
 
47
- Typically, you'll set up API routes that stream Mastra content in AI SDK-compatible format, and then use those routes in AI SDK UI hooks like `useChat()`. Below you'll find two main approaches to achieve this:
47
+ Typically, you'll set up API routes that stream Mastra content in AI SDK-compatible format, and then use those routes in AI SDK UI hooks like `useChat()`. Choose one of these approaches:
48
48
 
49
49
  - [Mastra's server](#mastras-server)
50
50
  - [Framework-agnostic](#framework-agnostic)
@@ -298,7 +298,7 @@ export default function Page() {
298
298
  }
299
299
  ```
300
300
 
301
- Below are two approaches to implementing the backend:
301
+ Choose a backend implementation:
302
302
 
303
303
  **Mastra Server**:
304
304
 
@@ -380,7 +380,7 @@ export async function POST(req: Request) {
380
380
 
381
381
  ## Custom UI
382
382
 
383
- Custom UI (also known as Generative UI) allows you to render custom React components based on data streamed from Mastra. Instead of displaying raw text or JSON, you can create visual components for tool outputs, workflow progress, agent network execution, and custom events.
383
+ Custom UI (also known as Generative UI) allows you to render custom React components based on data streamed from Mastra. Instead of displaying raw text or JSON, you can create visual components for tool outputs and workflow progress, including agent network execution and custom events.
384
384
 
385
385
  Use Custom UI when you want to:
386
386
 
@@ -990,7 +990,7 @@ export function ChatAdditional() {
990
990
  }
991
991
  ```
992
992
 
993
- Two examples on how to implement the backend portion of it.
993
+ Implement the backend with either of these examples.
994
994
 
995
995
  **Mastra Server**:
996
996
 
@@ -1308,7 +1308,7 @@ import { nestedAgentTool } from '../tools/nested-agent-tool'
1308
1308
  export const forecastAgent = new Agent({
1309
1309
  id: 'forecast-agent',
1310
1310
  instructions: 'Use the nested-agent-stream tool when asked about weather.',
1311
- model: 'openai/gpt-5.5',
1311
+ model: 'openai/gpt-5.6-sol',
1312
1312
  tools: { nestedAgentTool },
1313
1313
  })
1314
1314
  ```
@@ -1545,7 +1545,7 @@ For a complete implementation, see the [workflow-agent-text-stream example](http
1545
1545
 
1546
1546
  ### Multi-stage progress with branching workflows
1547
1547
 
1548
- For workflows with conditional branching (e.g., express vs standard shipping), you can track progress across different branches by including a identifier in your custom events.
1548
+ For workflows with conditional branching (e.g., express vs standard delivery), you can track progress across different branches by including an identifier in your custom events.
1549
1549
 
1550
1550
  The UI Dojo example uses a `stage` field in the event data to identify which branch is executing (e.g., `"validation"`, `"standard-processing"`, `"express-processing"`). The frontend groups events by this field to show a pipeline-style progress UI.
1551
1551
 
@@ -2,23 +2,23 @@
2
2
 
3
3
  # CopilotKit generative UI
4
4
 
5
- Generative UI is the family of UI paradigms enabled by agents and useful for interacting with them. CopilotKit organizes these along a single axis, the **generative UI spectrum**, which runs from author-controlled (you decide every pixel) to agent-invented (the agent owns the rendered surface). Where you sit on the axis is a trade-off between predictability and breadth.
5
+ Generative UI describes interfaces that agents help create and that users can interact with. CopilotKit organizes these interfaces along a single axis, the **generative UI spectrum**, which runs from author-controlled (you decide every pixel) to agent-invented (the agent owns the rendered surface). Your position on the axis is a trade-off between predictability and breadth.
6
6
 
7
7
  The spectrum has three tiers:
8
8
 
9
9
  | Tier | Who controls the surface | Primitives |
10
10
  | --------------- | ------------------------------------------------------------------------------------------ | -------------------------------------------------------------------- |
11
- | **Controlled** | You wrote the component; the agent picks which one and what data to pass. | Tool call rendering, state rendering, reasoning, components as tools |
12
- | **Declarative** | The agent emits a structured spec; the frontend composes it from a catalog you registered. | A2UI (fixed schema and dynamic) |
11
+ | **Controlled** | You wrote the component. The agent picks which one to use and what data to pass. | Tool call rendering, state rendering, reasoning, components as tools |
12
+ | **Declarative** | The agent emits a structured spec. The frontend composes it from a catalog you registered. | A2UI (fixed-schema and flexible variants) |
13
13
  | **Open-ended** | The UI is invented elsewhere (an MCP server) and you sandbox it. | MCP Apps |
14
14
 
15
15
  Each tier is a Mastra agent exposed through `registerCopilotKit()` (see [CopilotKit overview](https://mastra.ai/guides/build-your-ui/copilotkit/overview)) plus the matching CopilotKit hook on the frontend. For the full concept, see CopilotKit's [generative UI spectrum](https://www.copilotkit.ai/generative-ui-spectrum) and [generative UI overview](https://docs.copilotkit.ai/concepts/generative-ui-overview).
16
16
 
17
- > **Tip:** Mastra's [UI Dojo](https://ui-dojo.mastra.ai/) has working CopilotKit examples; browse the source under `src/pages/copilot-kit`.
17
+ > **Tip:** Mastra's [UI Dojo](https://ui-dojo.mastra.ai/) has working CopilotKit examples. Browse the source under `src/pages/copilot-kit`.
18
18
 
19
19
  ## Controlled
20
20
 
21
- You ship a fixed set of components and the agent chooses which to render, with what data. This is the workhorse of the spectrum: predictable and brand-safe, the right tool for high-traffic surfaces. The Controlled primitives use CopilotKit's v2 API, imported from `@copilotkit/react-core/v2`.
21
+ You provide a fixed set of components. The agent chooses which component to render and supplies its data. This predictable, brand-safe approach works well for high-traffic surfaces. The Controlled primitives use CopilotKit's v2 API, imported from `@copilotkit/react-core/v2`.
22
22
 
23
23
  ### Tool call rendering
24
24
 
@@ -32,7 +32,7 @@ export const weatherAgent = new Agent({
32
32
  id: 'weather-agent',
33
33
  name: 'Weather Agent',
34
34
  instructions: 'Use the weatherTool to fetch current weather data.',
35
- model: 'openai/gpt-5.5',
35
+ model: 'openai/gpt-5.6-sol',
36
36
  tools: { weatherTool },
37
37
  })
38
38
  ```
@@ -125,7 +125,7 @@ Reasoning is zero-config: when your Mastra agent runs a reasoning-capable model,
125
125
 
126
126
  ## Declarative
127
127
 
128
- Instead of a fixed component per tool, you register a catalog of typed building blocks and the agent assembles them into a UI tree per request. CopilotKit calls this **A2UI** (Agent-to-UI), available in a fixed-schema and a dynamic variant. It suits the long tail of secondary interactions where breadth matters more than pixel-perfection.
128
+ Instead of a fixed component per tool, you register a catalog of typed building blocks and the agent assembles them into a UI tree per request. CopilotKit calls this **A2UI** (Agent-to-UI), which has fixed-schema and flexible variants. It suits the long tail of secondary interactions where breadth matters more than pixel-perfection.
129
129
 
130
130
  The path of least resistance is to pass your catalog to the `<CopilotKit>` provider. That single prop enables A2UI rendering and injects the A2UI tool into your agent, so no backend change is needed:
131
131
 
@@ -146,11 +146,11 @@ export default function Page() {
146
146
  }
147
147
  ```
148
148
 
149
- The catalog defines the primitives (their schemas) and the renderers (how each primitive displays). In the fixed-schema variant the components are pre-authored and the agent's tool only supplies data; the dynamic variant lets the agent compose the tree more freely. See CopilotKit's [A2UI documentation](https://docs.copilotkit.ai/a2a/generative-ui/a2ui).
149
+ The catalog defines the primitives (their schemas) and the renderers (how each primitive displays). In the fixed-schema variant, the components are pre-authored and the agent's tool only supplies data. The flexible variant lets the agent compose the tree more freely. See CopilotKit's [A2UI documentation](https://docs.copilotkit.ai/a2a/generative-ui/a2ui).
150
150
 
151
151
  ## Open-ended
152
152
 
153
- At the far end of the spectrum, the agent owns the entire surface: the UI is invented elsewhere and sandboxed in your app. CopilotKit supports this through **MCP Apps**, where an MCP server ships UI that renders inside your application. This tier trades determinism for novelty and is the most experimental point on the spectrum.
153
+ At the far end of the spectrum, the agent owns the entire surface: the UI is invented elsewhere and sandboxed in your app. CopilotKit supports this through **MCP Apps**, where an MCP server provides UI that renders inside your application. This tier trades determinism for novelty and is the most experimental point on the spectrum.
154
154
 
155
155
  The path of least resistance keeps the frontend untouched: your existing `<CopilotKit>` provider is enough. On the backend, point `registerCopilotKit()` at one or more MCP servers with the `mcpApps` option (it's forwarded to the CopilotKit runtime):
156
156
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Using CopilotKit
4
4
 
5
- [CopilotKit](https://www.copilotkit.ai/) provides React components to quickly integrate customizable AI copilots into your application. Combined with Mastra, you can build sophisticated AI apps featuring bidirectional state synchronization and interactive UIs.
5
+ [CopilotKit](https://www.copilotkit.ai/) provides React components to quickly integrate customizable AI copilots into your application. Combined with Mastra, you can build AI apps with bidirectional state synchronization and interactive UIs.
6
6
 
7
7
  CopilotKit talks to Mastra through the [AG-UI protocol](https://docs.ag-ui.com/). The `@ag-ui/mastra` package exposes your Mastra agents as an AG-UI endpoint, and CopilotKit's React hooks and components consume it. This unlocks a spectrum of experiences on top of ordinary chat: [generative UI, human-in-the-loop, and frontend tools](https://mastra.ai/guides/build-your-ui/copilotkit/generative-ui), plus deploying the same agent to [messaging channels like Slack](https://mastra.ai/guides/build-your-ui/copilotkit/channels).
8
8
 
@@ -266,7 +266,7 @@ Your CopilotKit frontend now communicates with a standalone Mastra agent server.
266
266
 
267
267
  ## Chat UI options
268
268
 
269
- `CopilotChat` renders an inline, full-height chat. CopilotKit ships two other drop-in surfaces that share the same props:
269
+ `CopilotChat` renders an inline, full-height chat. CopilotKit provides two other drop-in surfaces that share the same props:
270
270
 
271
271
  - `CopilotSidebar`: a collapsible panel docked to the side of your app.
272
272
  - `CopilotPopup`: a floating button that opens a chat window.
@@ -131,7 +131,7 @@ Embed Mastra in your Next.js API route and connect an OpenUI `<AgentInterface />
131
131
  name: 'OpenUI Agent',
132
132
  instructions: `You are a helpful assistant. Use tools when relevant.\n\n${systemPrompt}`,
133
133
  model: {
134
- id: 'openai/gpt-5.5',
134
+ id: 'openai/gpt-5.6-sol',
135
135
  apiKey: process.env.OPENAI_API_KEY,
136
136
  },
137
137
  tools: { getWeather },
@@ -253,7 +253,7 @@ OpenUI generates UI from a component library. The library defines which componen
253
253
 
254
254
  ### Built-in libraries
255
255
 
256
- `@openuidev/react-ui` ships two libraries you can use as-is:
256
+ `@openuidev/react-ui` provides two libraries you can use as-is:
257
257
 
258
258
  - `openuiChatLibrary`: components for chat interfaces (cards, forms, tables, charts).
259
259
  - `openuiDashboardLibrary`: components for dashboards and data-heavy surfaces.
@@ -4,7 +4,7 @@
4
4
 
5
5
  A multi-agent system distributes a task across multiple agents instead of asking one agent to do everything. In Mastra, this usually means combining agents, workflows, or both so each part of the system has a clear role.
6
6
 
7
- The goal is to assign the right context, tools, and responsibilities to the right component. When that split is clear, a multi-agent system can be easier to reason about than one agent with a long prompt, many tools, and too many responsibilities.
7
+ The goal is to assign the right context, tools, and responsibilities to the right component. When that split is clear, a multi-agent system can be easier to reason about than one agent burdened with a long prompt and too many tools or responsibilities.
8
8
 
9
9
  ## When to use multi-agent systems
10
10
 
@@ -34,9 +34,9 @@ In Mastra, implement this pattern by combining [agents](https://mastra.ai/docs/a
34
34
 
35
35
  A workflow pattern defines the execution path in code. Instead of asking an agent to decide what happens next, you define the sequence through steps, branches, loops, and parallel blocks.
36
36
 
37
- Use workflows when the task is well understood and the execution path is known in advance. The main advantage is predictability: The system is easier to debug, reason about, and audit because the structure is explicit. The tradeoff is flexibility, since workflows are less adaptive when the task changes as it unfolds.
37
+ Use workflows when the task is well understood and the execution path is known in advance. The main advantage is predictability: The explicit structure makes the system easier to debug and audit. The tradeoff is flexibility, since workflows are less adaptive when the task changes as it unfolds.
38
38
 
39
- In Mastra, [workflows](https://mastra.ai/docs/workflows/overview) can implement several coordination patterns, including handoffs and councils. What makes a workflow distinct isn't which agents it calls, but that the control logic lives in the workflow itself.
39
+ In Mastra, [workflows](https://mastra.ai/docs/workflows/overview) can implement coordination patterns such as handoffs and councils. A workflow is distinct because its control logic lives in the workflow itself, regardless of which agents it calls.
40
40
 
41
41
  ## Supervisors
42
42
 
@@ -54,7 +54,7 @@ A council pattern asks multiple agents to work on the same problem independently
54
54
 
55
55
  Use this pattern when the question is ambiguous, evaluative, or high-stakes and answer quality matters more than speed. The tradeoff is cost, since councils intentionally duplicate effort and usually take longer and use more tokens than other patterns.
56
56
 
57
- Mastra doesn't provide a dedicated council primitive. In Mastra, implement this pattern with [agents](https://mastra.ai/docs/agents/overview) and [workflows](https://mastra.ai/docs/workflows/overview): Run multiple agents in parallel, collect their outputs, and add a final synthesis or review step. Workflow control flow methods such as `.parallel()` provide the structure for this pattern.
57
+ Mastra doesn't provide a dedicated council primitive. In Mastra, implement this pattern with [agents](https://mastra.ai/docs/agents/overview) and [workflows](https://mastra.ai/docs/workflows/overview): Run multiple agents in parallel and collect their outputs. Then add a final synthesis or review step. Workflow control flow methods such as `.parallel()` provide the structure for this pattern.
58
58
 
59
59
  ## Choosing a pattern
60
60
 
@@ -64,7 +64,7 @@ These patterns differ mainly in how they distribute control:
64
64
  | ----------------- | -------------------- | ------------------------------------------------ | -------------------------------------------------------- | -------------------------------------------------------------------- |
65
65
  | Handoffs | Current specialist | Ownership should move between specialists | Context transfer becomes more important | Agents with workflows and memory |
66
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 | The task needs dynamic delegation | Results depend on good coordination and clear boundaries | [Supervisor agents](https://mastra.ai/docs/agents/supervisor-agents) |
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/agents/supervisor-agents) |
68
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:
@@ -46,7 +46,7 @@ Here are some questions to consider:
46
46
 
47
47
  ### Agent stream properties
48
48
 
49
- An agent stream provides access to various response properties:
49
+ An agent stream provides access to these response properties:
50
50
 
51
51
  - **`stream.textStream`**: A readable stream that emits text chunks.
52
52
  - **`stream.text`**: Promise that resolves to the full text response.
@@ -124,13 +124,13 @@ The event structure includes `runId` and `from` at the top level, making it easi
124
124
 
125
125
  ### Workflow stream properties
126
126
 
127
- A workflow stream provides access to various response properties:
127
+ A workflow stream provides access to these response properties:
128
128
 
129
129
  - **`stream.status`**: The status of the workflow run.
130
130
  - **`stream.result`**: The result of the workflow run.
131
131
  - **`stream.usage`**: The total token usage of the workflow run.
132
132
 
133
- Streaming from agents or workflows provides real-time visibility into either the LLM’s output or the status of a workflow run. This feedback can be passed directly to the user, or used within applications to handle workflow status more effectively, creating a smoother and more responsive experience.
133
+ Streaming from agents or workflows provides real-time visibility into either the LLM’s output or the status of a workflow run. Pass this feedback directly to the user, or use it in an application to display workflow status as it changes.
134
134
 
135
135
  Events emitted from agents or workflows represent different stages of generation and execution, such as when a run starts, when text is produced, or when a tool is invoked.
136
136
 
@@ -193,11 +193,11 @@ Below is an example of events that may be emitted. Each event always includes a
193
193
 
194
194
  ## Writer API
195
195
 
196
- The `writer` API is shared by tools and workflow steps see the Tools and Workflows docs for feature-specific examples.
196
+ The `writer` API is shared by tools and workflow steps. See the Tools and Workflows docs for feature-specific examples.
197
197
 
198
198
  ## Agent using tool
199
199
 
200
- Agent streaming can be combined with tool calls, allowing tool outputs to be written directly into the agent’s streaming response. This makes it possible to surface tool activity as part of the overall interaction.
200
+ Agent streaming can be combined with tool calls, allowing tool outputs to be written directly into the agent’s streaming response. This surfaces tool activity as part of the interaction.
201
201
 
202
202
  ```typescript
203
203
  import { Agent } from '@mastra/core/agent'
@@ -207,14 +207,14 @@ export const testAgent = new Agent({
207
207
  id: 'test-agent',
208
208
  name: 'Test Agent',
209
209
  instructions: 'You are a weather agent.',
210
- model: 'openai/gpt-5.5',
210
+ model: 'openai/gpt-5.6-sol',
211
211
  tools: { testTool },
212
212
  })
213
213
  ```
214
214
 
215
215
  ### Using `context.writer`
216
216
 
217
- The `context.writer` object is available in a tool's `execute()` function and can be used to emit custom events, data, or values into the active stream. This enables tools to provide intermediate results or status updates while execution is still in progress.
217
+ The `context.writer` object is available in a tool's `execute()` function and can emit custom events, data, or values into the active stream. Tools use these events to provide intermediate results or status updates during execution.
218
218
 
219
219
  > **Warning:** You must `await` the call to `writer.write()` or else you will lock the stream and get a `WritableStream is locked` error.
220
220
 
@@ -274,7 +274,7 @@ export const testTool = createTool({
274
274
 
275
275
  ### Transient data chunks
276
276
 
277
- By default, `data-*` chunks emitted with `writer.custom()` are persisted to storage as part of the message history. For chunks that are only needed during live streaming such as progress updates or verbose log output set `transient: true` to skip storage persistence. Transient chunks are still streamed to the client in real time but aren't saved to the database.
277
+ By default, `data-*` chunks emitted with `writer.custom()` are persisted to storage as part of the message history. For chunks that are only needed during live streaming, such as progress updates or verbose log output, set `transient: true` to skip storage persistence. Transient chunks are still streamed to the client in real time but aren't saved to the database.
278
278
 
279
279
  ```typescript
280
280
  await context?.writer?.custom({
@@ -284,11 +284,11 @@ await context?.writer?.custom({
284
284
  })
285
285
  ```
286
286
 
287
- Use transient chunks when the data is large or high-frequency and only relevant during the live session. After a page refresh, transient chunks are no longer available only the tool's return value and any non-transient chunks are loaded from storage.
287
+ Use transient chunks when the data is large or high-frequency and only relevant during the live session. After a page refresh, transient chunks are no longer available. Only the tool's return value and any non-transient chunks are loaded from storage.
288
288
 
289
289
  ## Using the `writer` argument
290
290
 
291
- The `writer` argument is passed to a workflow step's `execute` function and can be used to emit custom events, data, or values into the active stream. This enables workflow steps to provide intermediate results or status updates while execution is still in progress.
291
+ The `writer` argument is passed to a workflow step's `execute` function and can emit custom events, data, or values into the active stream. Workflow steps use these events to provide intermediate results or status updates during execution.
292
292
 
293
293
  > **Warning:** You must `await` the call to `writer.write(...)` or else you will lock the stream and get a `WritableStream is locked` error.
294
294
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Deploy Mastra to Amazon EC2
4
4
 
5
- Deploy your Mastra server to Amazon EC2. This gives you full control over your server environment and supports long-running agents and workflows.
5
+ Deploy your Mastra server to Amazon EC2. The server runs on infrastructure you manage and can support long-running agents and workflows.
6
6
 
7
7
  > **Info:** This guide covers deploying the [Mastra server](https://mastra.ai/docs/server/mastra-server). If you're using a [server adapter](https://mastra.ai/docs/server/server-adapters) or [web framework](https://mastra.ai/docs/deployment/web-framework), deploy the way you normally would for that framework.
8
8
 
@@ -12,7 +12,7 @@ You'll need:
12
12
 
13
13
  - A [Mastra application](https://mastra.ai/guides/getting-started/quickstart)
14
14
  - An [AWS account](https://aws.amazon.com/) with permissions for Lambda, ECR, and IAM
15
- - **[AWS CLI](https://aws.amazon.com/cli/)** installed run `aws configure` to authenticate
15
+ - **[AWS CLI](https://aws.amazon.com/cli/)** installed: Run `aws configure` to authenticate
16
16
  - **[Docker](https://www.docker.com/)** installed and running
17
17
 
18
18
  > **Warning:** On AWS Lambda, the filesystem is ephemeral, so any local database file will be lost between invocations. If you're using [LibSQLStore](https://mastra.ai/reference/storage/libsql) with a local file, configure it to use a remote LibSQL-compatible database (for example, [Turso](https://turso.tech/)) instead.
@@ -71,7 +71,7 @@ In these steps, you'll connect your Azure App Service to your GitHub repository
71
71
  run: (cd .mastra/output && zip ../../release.zip -r .)
72
72
  ```
73
73
 
74
- This ensures only the build outputs from `.mastra/output` are included in the deployment package.
74
+ The deployment package then contains only the build outputs from `.mastra/output`.
75
75
 
76
76
  5. Commit and push your workflow modifications. The build will be automatically triggered in the **Deployment Center** in your Azure dashboard. Monitor the deployment progress until it completes successfully.
77
77
 
@@ -56,7 +56,7 @@ export const mastra = new Mastra({
56
56
  })
57
57
  ```
58
58
 
59
- In order to test your Cloudflare Worker locally, also install the [`wrangler` CLI](https://developers.cloudflare.com/workers/wrangler/install-and-update/):
59
+ To test your Cloudflare Worker locally, also install the [`wrangler` CLI](https://developers.cloudflare.com/workers/wrangler/install-and-update/):
60
60
 
61
61
  **npm**:
62
62
 
@@ -8,11 +8,11 @@ For a complete example with advanced flow control features, see the [Inngest wor
8
8
 
9
9
  ## How Inngest works with Mastra
10
10
 
11
- Inngest and Mastra integrate by aligning their workflow models: Inngest organizes logic into functions composed of steps, and Mastra workflows defined using `createWorkflow()` and `createStep()` map directly onto this paradigm. Each Mastra workflow becomes an Inngest function with a unique identifier, and each step within the workflow maps to an Inngest step.
11
+ Inngest and Mastra integrate by aligning their workflow models: Inngest organizes logic into functions composed of steps, and Mastra workflows defined using `createWorkflow()` and `createStep()` map directly onto this structure. Each Mastra workflow becomes an Inngest function with a unique identifier, and each step within the workflow maps to an Inngest step.
12
12
 
13
13
  The `serve()` function bridges the two systems by registering Mastra workflows as Inngest functions and setting up the necessary event handlers for execution and monitoring.
14
14
 
15
- When an event triggers a workflow, Inngest executes it step by step, memoizing each step's result. This means if a workflow is retried or resumed, completed steps are skipped, ensuring efficient and reliable execution. Control flow primitives in Mastra, such as loops, conditionals, and nested workflows are seamlessly translated into the same Inngest's function/step model, preserving advanced workflow features like composition, branching, and suspension.
15
+ When an event triggers a workflow, Inngest executes it step by step and memoizes each result. On retry or resume, Inngest skips completed steps based on those saved results. Mastra control flow primitives, such as loops, conditionals, and nested workflows, map to the same Inngest function and step model while preserving composition, branching, and suspension.
16
16
 
17
17
  Real-time monitoring, suspend/resume, and step-level observability are enabled via Inngest's publish-subscribe system and dashboard. As each step executes, its state and output are tracked using Mastra storage and can be resumed as needed.
18
18
 
@@ -194,7 +194,7 @@ export const mastra = new Mastra({
194
194
 
195
195
  3. Open the Inngest Dashboard at <http://localhost:8288> and go to the **Apps** section in the sidebar to verify your Mastra workflow is registered
196
196
 
197
- 4. Invoke the workflow by going to **Functions**, selecting your workflow, and selecting **Invoke** with the following input:
197
+ 4. In **Functions**, open your workflow. Select **Invoke** and provide the following input:
198
198
 
199
199
  ```json
200
200
  {
@@ -256,7 +256,7 @@ Before you begin, make sure you have:
256
256
 
257
257
  > **Warning:** Inngest's auto-discover convention assumes `/api/inngest`. Because this guide uses `/inngest/api`, set the **URL** field on the Inngest app to your deployed origin plus `/inngest/api` (for example `https://your-app.vercel.app/inngest/api`). If you leave it on the default, the Inngest dashboard won't find your app's functions.
258
258
 
259
- 6. Invoke the workflow by going to **Functions**, selecting `workflow.increment-workflow`, selecting **All actions** > **Invoke**, and providing the following input:
259
+ 6. In **Functions**, open `workflow.increment-workflow`. Select **All actions** > **Invoke** and provide the following input:
260
260
 
261
261
  ```json
262
262
  {
@@ -496,7 +496,7 @@ When migrating an existing production app from `serve()` to `connect()`, test th
496
496
  - `functions`: Optional array of additional Inngest functions to register alongside Mastra workflows.
497
497
  - `instanceId`: Stable identifier for the worker, shown in the Inngest dashboard. Defaults to the machine hostname.
498
498
  - `maxWorkerConcurrency`: Maximum number of steps the worker runs at a time. Defaults to unlimited.
499
- - `registerOptions`: Forwarded to Inngest during app registration (for example `signingKey`). When a field is set both here and at the top level, `registerOptions` wins this matches the behavior of `serve()`.
499
+ - `registerOptions`: Forwarded to Inngest during app registration (for example `signingKey`). When a field is set both here and at the top level, `registerOptions` wins. This matches the behavior of `serve()`.
500
500
 
501
501
  `connect()` returns Inngest's `WorkerConnection`. The Inngest SDK handles `SIGINT` and `SIGTERM` by default. Store the returned connection and call `.close()` only when your worker needs custom shutdown control.
502
502
 
@@ -663,7 +663,7 @@ All flow control options are optional. If not specified, workflows run with Inng
663
663
 
664
664
  ## Cron scheduling
665
665
 
666
- Inngest workflows can be automatically triggered on a schedule using cron expressions. This allows you to run workflows at regular intervals, such as daily reports, hourly data syncs, or maintenance tasks.
666
+ Use cron expressions to trigger Inngest workflows on a schedule. Common uses include daily reports and hourly data syncs, as well as maintenance tasks.
667
667
 
668
668
  ### Basic cron scheduling
669
669
 
@@ -99,7 +99,7 @@ const agent = new Agent({
99
99
  id: 'assistant',
100
100
  name: 'Assistant',
101
101
  instructions: 'You are a helpful assistant.',
102
- model: 'openai/gpt-5.5',
102
+ model: 'openai/gpt-5.6-sol',
103
103
  })
104
104
 
105
105
  export const durableAssistant = createDurableAgent({ agent })
@@ -0,0 +1,232 @@
1
+ > Discover all available pages from the documentation index: https://mastra.ai/llms.txt
2
+
3
+ # Deploy Mastra workers
4
+
5
+ Run [Mastra workers](https://mastra.ai/docs/deployment/workers) as separate processes so you can scale orchestration, scheduling, and background tasks independently from the API. This guide walks through a fully split deployment using Docker Compose.
6
+
7
+ > **Info:** This guide covers splitting workers into their own containers. If you only need workers to run in-process alongside the API, see [Workers](https://mastra.ai/docs/deployment/workers). No extra setup is required.
8
+
9
+ ## Before you begin
10
+
11
+ You'll need:
12
+
13
+ - A [Mastra application](https://mastra.ai/guides/getting-started/quickstart)
14
+ - [Docker](https://docs.docker.com/get-docker/) and [Docker Compose](https://docs.docker.com/compose/)
15
+ - A distributed PubSub backend: [Redis](https://redis.io/) for [`RedisStreamsPubSub`](https://mastra.ai/reference/pubsub/redis-streams), or a [Google Cloud](https://cloud.google.com/) project for [`GoogleCloudPubSub`](https://mastra.ai/reference/pubsub/google-cloud-pubsub)
16
+ - A shared database reachable from every container. See [supported storage backends](https://mastra.ai/reference/workers/overview) for the full list.
17
+
18
+ > **Warning:** The default in-memory PubSub can't deliver events across processes. You must configure a distributed PubSub backend before splitting workers into separate containers.
19
+
20
+ ## Configure shared infrastructure
21
+
22
+ Point the `Mastra` instance at a distributed PubSub backend and a shared database. Use environment variables so the same image runs in every container.
23
+
24
+ **Redis Streams + PostgreSQL**:
25
+
26
+ ```typescript
27
+ import { Mastra } from '@mastra/core/mastra'
28
+ import { RedisStreamsPubSub } from '@mastra/redis-streams'
29
+ import { PostgresStore } from '@mastra/pg'
30
+
31
+ export const mastra = new Mastra({
32
+ storage: new PostgresStore({
33
+ connectionString: process.env.DATABASE_URL!,
34
+ }),
35
+ pubsub: new RedisStreamsPubSub({
36
+ url: process.env.REDIS_URL!,
37
+ }),
38
+ })
39
+ ```
40
+
41
+ **Google Cloud Pub/Sub + LibSQL**:
42
+
43
+ ```typescript
44
+ import { Mastra } from '@mastra/core/mastra'
45
+ import { GoogleCloudPubSub } from '@mastra/google-cloud-pubsub'
46
+ import { LibSQLStore } from '@mastra/libsql'
47
+
48
+ export const mastra = new Mastra({
49
+ storage: new LibSQLStore({
50
+ url: process.env.DATABASE_URL!,
51
+ }),
52
+ pubsub: new GoogleCloudPubSub({
53
+ projectId: process.env.GCP_PROJECT_ID!,
54
+ }),
55
+ })
56
+ ```
57
+
58
+ Any [supported storage backend](https://mastra.ai/reference/workers/overview) works. Swap the storage adapter for your preferred database.
59
+
60
+ ## Deploy
61
+
62
+ 1. Build your Mastra application. The output runs in every container.
63
+
64
+ ```bash
65
+ mastra build
66
+ ```
67
+
68
+ This produces a self-contained `.mastra/output/` directory. See [Deploy a Mastra server](https://mastra.ai/docs/deployment/mastra-server) for details on the build output.
69
+
70
+ 2. Create a Dockerfile that copies the pre-built output and installs production dependencies:
71
+
72
+ ```dockerfile
73
+ FROM node:22-alpine
74
+
75
+ WORKDIR /app
76
+
77
+ COPY .mastra/output/package.json .mastra/output/.npmrc* ./
78
+ RUN npm install --omit=dev
79
+
80
+ COPY .mastra/output/ .
81
+
82
+ EXPOSE 4111
83
+ CMD ["node", "index.mjs"]
84
+ ```
85
+
86
+ 3. Create a `docker-compose.yml` that runs the fully split topology. The file defines six services: a database, a PubSub backend, the API server, and three workers. Each worker container runs the same image with a different `MASTRA_WORKERS` value to control which worker starts.
87
+
88
+ The API container sets `MASTRA_WORKERS: "false"` to disable all event processing. The orchestration worker sets `MASTRA_STEP_EXECUTION_URL` to point step execution requests at the API's internal URL. See [step execution URL](#step-execution-url) for details.
89
+
90
+ ```yaml
91
+ services:
92
+ postgres:
93
+ image: postgres:16-alpine
94
+ environment:
95
+ POSTGRES_USER: mastra
96
+ POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
97
+ POSTGRES_DB: mastra
98
+ ports:
99
+ - '5432:5432'
100
+ volumes:
101
+ - pgdata:/var/lib/postgresql/data
102
+ healthcheck:
103
+ test: ['CMD-SHELL', 'pg_isready -U mastra']
104
+ interval: 5s
105
+ timeout: 3s
106
+ retries: 5
107
+
108
+ redis:
109
+ image: redis:7-alpine
110
+ ports:
111
+ - '6379:6379'
112
+ healthcheck:
113
+ test: ['CMD', 'redis-cli', 'ping']
114
+ interval: 5s
115
+ timeout: 3s
116
+ retries: 5
117
+
118
+ api:
119
+ build: ./app
120
+ ports:
121
+ - '4111:4111'
122
+ environment:
123
+ DATABASE_URL: postgres://mastra:${POSTGRES_PASSWORD}@postgres:5432/mastra
124
+ REDIS_URL: redis://redis:6379
125
+ MASTRA_WORKERS: 'false'
126
+ depends_on:
127
+ postgres:
128
+ condition: service_healthy
129
+ redis:
130
+ condition: service_healthy
131
+ healthcheck:
132
+ test: ['CMD', 'wget', '-qO-', 'http://localhost:4111/api/agents']
133
+ interval: 5s
134
+ timeout: 3s
135
+ retries: 5
136
+
137
+ orchestration-worker:
138
+ build: ./app
139
+ environment:
140
+ DATABASE_URL: postgres://mastra:${POSTGRES_PASSWORD}@postgres:5432/mastra
141
+ REDIS_URL: redis://redis:6379
142
+ MASTRA_WORKERS: orchestration
143
+ MASTRA_STEP_EXECUTION_URL: http://api:4111/api
144
+ depends_on:
145
+ api:
146
+ condition: service_healthy
147
+
148
+ scheduler-worker:
149
+ build: ./app
150
+ environment:
151
+ DATABASE_URL: postgres://mastra:${POSTGRES_PASSWORD}@postgres:5432/mastra
152
+ REDIS_URL: redis://redis:6379
153
+ MASTRA_WORKERS: scheduler
154
+ depends_on:
155
+ api:
156
+ condition: service_healthy
157
+
158
+ background-task-worker:
159
+ build: ./app
160
+ environment:
161
+ DATABASE_URL: postgres://mastra:${POSTGRES_PASSWORD}@postgres:5432/mastra
162
+ REDIS_URL: redis://redis:6379
163
+ MASTRA_WORKERS: backgroundTasks
164
+ depends_on:
165
+ api:
166
+ condition: service_healthy
167
+
168
+ volumes:
169
+ pgdata:
170
+ ```
171
+
172
+ Create a `.env` file next to your `docker-compose.yml`:
173
+
174
+ ```bash
175
+ POSTGRES_PASSWORD=your-secure-password
176
+ ```
177
+
178
+ > **Note:** Remember to set any other environment variables your application needs (e.g., your [model provider](https://mastra.ai/models/providers) API key).
179
+
180
+ 4. Start the stack and verify the API responds:
181
+
182
+ ```bash
183
+ docker compose up -d
184
+ docker compose ps
185
+ curl http://localhost:4111/api/agents
186
+ ```
187
+
188
+ ## Step execution URL
189
+
190
+ In a fully split deployment, the orchestration worker runs in a separate container from the API. When it processes a workflow event, it delegates step execution to the API over HTTP.
191
+
192
+ Set `MASTRA_STEP_EXECUTION_URL` to the API's internal URL, including the `/api` prefix:
193
+
194
+ ```bash
195
+ MASTRA_STEP_EXECUTION_URL=http://api:4111/api
196
+ ```
197
+
198
+ The orchestration worker sends a `POST` request to `${MASTRA_STEP_EXECUTION_URL}/workflows/:workflowId/runs/:runId/steps/execute` for each step. The API resolves the workflow and executes the step locally.
199
+
200
+ Without this variable, the orchestration worker attempts to execute steps in-process. That works when the worker runs alongside the API, but fails in split deployments where the worker doesn't have access to the full Mastra runtime.
201
+
202
+ ## Scaling
203
+
204
+ The orchestration and background task workers are safe to scale horizontally. PubSub consumer groups distribute events across instances, so each event is processed once:
205
+
206
+ ```bash
207
+ docker compose up -d --scale orchestration-worker=3
208
+ docker compose up -d --scale background-task-worker=2
209
+ ```
210
+
211
+ The API can also scale horizontally behind a load balancer.
212
+
213
+ **Don't scale the scheduler worker.** Run exactly one instance. Multiple schedulers polling the same storage fire duplicate events for the same schedule.
214
+
215
+ ## Crash recovery
216
+
217
+ Workers recover from crashes because the distributed PubSub backend persists unacknowledged events:
218
+
219
+ - **Orchestration worker**: Pending events stay in the PubSub backend. When the worker restarts, it picks up where it left off.
220
+ - **Scheduler worker**: No events are missed permanently. The scheduler computes the next fire time from the current time on restart, not from where it left off.
221
+ - **API during step execution**: The orchestration worker's HTTP request fails. The event is nacked and redelivered on the next attempt.
222
+
223
+ > **Warning:** If the API crashes while a step is already executing (e.g., mid-sleep), that step's work is lost. The workflow run may remain stuck in a `running` state. Mastra doesn't yet have automatic timeout-based recovery for this scenario.
224
+
225
+ ## Related
226
+
227
+ - [Workers](https://mastra.ai/docs/deployment/workers): What workers are and when to use them
228
+ - [Worker authentication](https://mastra.ai/docs/server/auth/workers): Secure worker-to-API communication
229
+ - [Workers reference](https://mastra.ai/reference/workers/overview): Configuration details for all worker types
230
+ - [CLI reference](https://mastra.ai/reference/cli/mastra): `mastra worker build` and `mastra worker start`
231
+ - [PubSub](https://mastra.ai/docs/server/pubsub): Event delivery backends
232
+ - [Deploy a Mastra server](https://mastra.ai/docs/deployment/mastra-server): Build output and server configuration
@@ -171,7 +171,7 @@ await worker.run()
171
171
 
172
172
  2. Open the Temporal UI at <http://localhost:8080> to inspect namespaces, workflows, and activities.
173
173
 
174
- 3. Start the worker. In a new terminal, run:
174
+ 3. In a new terminal, start the worker by running:
175
175
 
176
176
  ```bash
177
177
  npx tsx src/mastra/worker.ts
@@ -84,7 +84,7 @@ export const mastra = new Mastra({
84
84
  })
85
85
  ```
86
86
 
87
- After deploying, Studio is available at the root URL (`https://<your-project>.vercel.app/`) and the API remains at `/api/*`. Studio automatically connects to the API on the same origin no additional environment variables are needed.
87
+ After deploying, Studio is available at the root URL (`https://<your-project>.vercel.app/`) and the API remains at `/api/*`. Studio automatically connects to the API on the same origin, so you don't need additional environment variables.
88
88
 
89
89
  > **Warning:** Once Studio is connected to your Mastra server, it has full access to your agents, workflows, and tools. Be sure to secure it properly in production (e.g. behind authentication, VPN, etc.) to prevent unauthorized access.
90
90