@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
@@ -14,7 +14,7 @@ import { StagehandBrowser } from '@mastra/stagehand'
14
14
 
15
15
  const browser = new StagehandBrowser({
16
16
  headless: true,
17
- model: 'openai/gpt-5.5',
17
+ model: 'openai/gpt-5.6-sol',
18
18
  selfHeal: true,
19
19
  })
20
20
 
@@ -24,7 +24,7 @@ export const browserAgent = new Agent({
24
24
  instructions: `You can browse the web using natural language.
25
25
  Use stagehand_act to perform actions like "click the login button".
26
26
  Use stagehand_extract to get data from pages.`,
27
- model: 'openai/gpt-5.5',
27
+ model: 'openai/gpt-5.6-sol',
28
28
  browser,
29
29
  })
30
30
  ```
@@ -79,7 +79,7 @@ Core tools:
79
79
  | ---------------------- | ------------------------------------------------------------------------------------- |
80
80
  | `stagehand_act` | Perform actions using natural language instructions |
81
81
  | `stagehand_extract` | Extract structured data from pages |
82
- | `stagehand_observe` | Discover actionable elements on a page |
82
+ | `stagehand_observe` | Discover useful elements on a page |
83
83
  | `stagehand_navigate` | Navigate to a URL |
84
84
  | `stagehand_tabs` | Manage browser tabs |
85
85
  | `stagehand_screenshot` | Capture a screenshot as PNG (viewport by default; set `fullPage: true` for full page) |
@@ -171,7 +171,7 @@ interface ExtractResult<T = unknown> {
171
171
 
172
172
  ### `stagehand_observe`
173
173
 
174
- Discover actionable elements on a page. Returns a list of elements with their selectors and descriptions.
174
+ Discover useful elements on a page. Returns a list of elements with their selectors and descriptions.
175
175
 
176
176
  ```text
177
177
  // Find specific elements
@@ -222,7 +222,7 @@ Navigate to a URL.
222
222
 
223
223
  | Parameter | Type | Description |
224
224
  | ----------- | ----------------------------------------------- | ----------------------------------------------- |
225
- | `url` | `string` | URL to navigate to (required) |
225
+ | `url` | `string` | URL to open (required) |
226
226
  | `waitUntil` | `"load" \| "domcontentloaded" \| "networkidle"` | When to consider navigation complete (optional) |
227
227
 
228
228
  ### `stagehand_tabs`
@@ -245,7 +245,7 @@ Manage browser tabs.
245
245
 
246
246
  ### `stagehand_screenshot`
247
247
 
248
- Capture a screenshot of the current page as PNG (viewport by default; set `fullPage: true` for full-page capture). Returns image content that vision-capable models can interpret directly. Use `stagehand_observe` or `stagehand_extract` when you only need text or structured data.
248
+ Capture a screenshot of the current page as PNG (viewport by default. Set `fullPage: true` for full-page capture). Returns image content that vision-capable models can interpret directly. Use `stagehand_observe` or `stagehand_extract` when you only need text or structured data.
249
249
 
250
250
  ```text
251
251
  // Viewport only (default)
@@ -276,7 +276,7 @@ const browser = new StagehandBrowser({
276
276
  env: 'BROWSERBASE',
277
277
  apiKey: process.env.BROWSERBASE_API_KEY,
278
278
  projectId: process.env.BROWSERBASE_PROJECT_ID,
279
- model: 'openai/gpt-5.5',
279
+ model: 'openai/gpt-5.6-sol',
280
280
  })
281
281
  ```
282
282
 
@@ -287,7 +287,7 @@ Configure the AI model for Stagehand operations:
287
287
  ```typescript
288
288
  // String format: "provider/model"
289
289
  const browser = new StagehandBrowser({
290
- model: 'openai/gpt-5.5',
290
+ model: 'openai/gpt-5.6-sol',
291
291
  })
292
292
 
293
293
  // Object format for custom configuration
@@ -6,7 +6,7 @@
6
6
 
7
7
  ## Usage example
8
8
 
9
- Register the provider on the `Mastra` constructor. The refresh token is single-use and rotates on startup; the resulting access tokens are persisted to `Mastra.storage`.
9
+ Register the provider on the `Mastra` constructor. The refresh token is single-use and rotates on startup. The resulting access tokens are persisted to `Mastra.storage`.
10
10
 
11
11
  ```typescript
12
12
  import { Mastra } from '@mastra/core/mastra'
@@ -171,7 +171,7 @@ slack.setBaseUrl('https://abc123.trycloudflare.com')
171
171
 
172
172
  #### `initialize()`
173
173
 
174
- Recreates a `SlackAdapter` for each active installation in storage and injects `AgentChannels` into the corresponding agent so it receives Slack events on startup. Doesn't auto-provision new apps; use `connect()` to create one. Mastra calls this automatically, so you rarely call it directly.
174
+ Recreates a `SlackAdapter` for each active installation in storage and injects `AgentChannels` into the corresponding agent so it receives Slack events on startup. Doesn't auto-provision new apps. Use `connect()` to create one. Mastra calls this automatically, so you rarely call it directly.
175
175
 
176
176
  ```typescript
177
177
  await slack.initialize()
@@ -60,7 +60,7 @@ yarn dlx create-mastra@latest my-mastra-project --llm anthropic
60
60
  bun x create-mastra@latest my-mastra-project --llm anthropic
61
61
  ```
62
62
 
63
- Omit `--llm` to select the provider and optionally enter its API key interactively. The interactive setup also offers to connect your project to the Mastra platform. If enabled, the command opens the browser authentication flow, creates a platform project with the same name as the local project, and writes `MASTRA_PLATFORM_ACCESS_TOKEN` and `MASTRA_PROJECT_ID` to `.env`.
63
+ Omit `--llm` to select the provider and optionally enter its API key interactively. The interactive setup also offers to connect your project to the Mastra platform. If enabled, the command opens the browser authentication flow and creates a platform project with the same name as the local project. It then writes `MASTRA_PLATFORM_ACCESS_TOKEN` and `MASTRA_PROJECT_ID` to `.env`.
64
64
 
65
65
  ### Template
66
66
 
@@ -32,7 +32,7 @@ Comma-separated list of custom arguments to pass to the Node.js process, e.g. `-
32
32
 
33
33
  #### `--request-context-presets`
34
34
 
35
- Path to a JSON file containing named [request context](https://mastra.ai/docs/server/request-context) presets. When provided, a dropdown displays in Studio's request context editor, letting you quickly switch between preset configurations.
35
+ Path to a JSON file containing [request context](https://mastra.ai/docs/server/request-context) presets. When provided, a dropdown displays in Studio's request context editor, letting you quickly switch between preset configurations.
36
36
 
37
37
  ```bash
38
38
  mastra dev --request-context-presets ./presets.json
@@ -49,7 +49,7 @@ The file must be a JSON object where each key is a preset name and each value is
49
49
 
50
50
  ### Configs
51
51
 
52
- You can set certain environment variables to modify the behavior of `mastra dev`.
52
+ You can set environment variables to modify the behavior of `mastra dev`.
53
53
 
54
54
  #### Skip peer dependency check
55
55
 
@@ -121,7 +121,7 @@ Under the hood Mastra's Rollup server locates your Mastra entry file and bundles
121
121
 
122
122
  The output in `.mastra` can be deployed to any cloud server using [`mastra start`](#mastra-start).
123
123
 
124
- If you're deploying to a [serverless platform](https://mastra.ai/docs/deployment/cloud-providers) you need to install the correct deployer in order to receive the correct output in `.mastra`.
124
+ If you're deploying to a [serverless platform](https://mastra.ai/docs/deployment/cloud-providers) you need to install the correct deployer to receive the correct output in `.mastra`.
125
125
 
126
126
  It accepts [common flags](#common-flags).
127
127
 
@@ -133,7 +133,7 @@ Bundle the Studio UI with the build.
133
133
 
134
134
  ### Configs
135
135
 
136
- You can set certain environment variables to modify the behavior of `mastra build`.
136
+ You can set environment variables to modify the behavior of `mastra build`.
137
137
 
138
138
  #### Skip peer dependency check
139
139
 
@@ -169,6 +169,55 @@ The path to your built Mastra output directory. Defaults to `.mastra/output`.
169
169
 
170
170
  Comma-separated list of custom arguments to pass to the Node.js process, e.g. `--require=newrelic` or `--experimental-transform-types`.
171
171
 
172
+ ## `mastra worker build`
173
+
174
+ Bundles your Mastra application for worker deployment. Produces the same output as `mastra build` — a self-contained `.mastra/output/` directory.
175
+
176
+ ```bash
177
+ mastra worker build [options]
178
+ ```
179
+
180
+ ### Flags
181
+
182
+ | Flag | Description |
183
+ | --------------------- | ------------------------------------------------------------ |
184
+ | `--dir <path>` | Path to your Mastra source directory (default: `src/mastra`) |
185
+ | `--root <path>` | Project root directory (default: current directory) |
186
+ | `--tools <paths>` | Comma-separated tool paths to include |
187
+ | `--output-dir <path>` | Custom output directory (default: `.mastra/output`) |
188
+ | `--debug` | Enable debug logging |
189
+
190
+ ## `mastra worker start`
191
+
192
+ > **Info:** You need to run `mastra worker build` or `mastra build` before using `mastra worker start`.
193
+
194
+ Starts a worker process from a previously built bundle.
195
+
196
+ ```bash
197
+ mastra worker start [name] [options]
198
+ ```
199
+
200
+ | Argument/Flag | Description |
201
+ | -------------- | ------------------------------------------------------------------- |
202
+ | `name` | Worker name to start. Sets `MASTRA_WORKERS` in the spawned process. |
203
+ | `--dir <path>` | Path to the build output (default: `.mastra/output`) |
204
+ | `--env <path>` | Path to environment file (default: `.env.production`, then `.env`) |
205
+
206
+ ### Examples
207
+
208
+ ```bash
209
+ # Start only the orchestration worker
210
+ mastra worker start orchestration
211
+
212
+ # Start only the scheduler
213
+ mastra worker start scheduler
214
+
215
+ # Start from a custom build directory
216
+ mastra worker start orchestration --dir ./dist
217
+ ```
218
+
219
+ See [Workers](https://mastra.ai/docs/deployment/workers) for deployment topologies and configuration.
220
+
172
221
  ## `mastra studio`
173
222
 
174
223
  Starts [Studio](https://mastra.ai/docs/studio/overview) as a static server. After starting, you can enter your Mastra instance URL (e.g. `http://localhost:4111`) to connect Studio to your Mastra backend. Looks for `.env` and `.env.production` files in the current working directory for configuration.
@@ -199,7 +248,7 @@ The API route prefix of the Mastra API server. Defaults to `/api`.
199
248
 
200
249
  #### `--request-context-presets`
201
250
 
202
- Path to a JSON file containing named [request context](https://mastra.ai/docs/server/request-context) presets. Works the same as the [`mastra dev` flag](#--request-context-presets).
251
+ Path to a JSON file containing [request context](https://mastra.ai/docs/server/request-context) presets. Works the same as the [`mastra dev` flag](#--request-context-presets).
203
252
 
204
253
  ```bash
205
254
  mastra studio --request-context-presets ./presets.json
@@ -207,7 +256,7 @@ mastra studio --request-context-presets ./presets.json
207
256
 
208
257
  ## `mastra deploy`
209
258
 
210
- Builds and deploys your project to a named environment on Mastra platform. This is the recommended command for all new deploys and replaces both [`mastra studio deploy`](#mastra-studio-deploy) and [`mastra server deploy`](#mastra-server-deploy), which continue to work but should no longer be used for new setups.
259
+ Builds and deploys your project to the Mastra platform environment selected by `--env`. This is the recommended command for all new deploys and replaces both [`mastra studio deploy`](#mastra-studio-deploy) and [`mastra server deploy`](#mastra-server-deploy), which continue to work but should no longer be used for new setups.
211
260
 
212
261
  Requires authentication via [`mastra auth login`](#mastra-auth-login) or a `MASTRA_API_TOKEN` environment variable.
213
262
 
@@ -217,7 +266,7 @@ mastra deploy --env staging
217
266
  mastra deploy --env production --region eu
218
267
  ```
219
268
 
220
- The command runs `mastra build`, zips the output, uploads it to the selected environment, and then polls the deploy status while streaming build logs until the deploy reaches a terminal state.
269
+ The command runs `mastra build` and zips the output before uploading it to the selected environment. It then polls the deploy status while streaming build logs until the deploy reaches a terminal state.
221
270
 
222
271
  Organization, project, and environment are resolved in order from: environment variable (`MASTRA_ORG_ID`, `MASTRA_PROJECT_ID`), CLI flag (`--org`, `--project`, `--env`), `.mastra-project.json` config file, current org from credentials, and lastly interactive prompt. On first deploy, the CLI saves the resolved org and project IDs to `.mastra-project.json` so subsequent deploys skip the prompts.
223
272
 
@@ -294,9 +343,9 @@ mastra deploy --env staging --yes
294
343
 
295
344
  ## `mastra env`
296
345
 
297
- Manages environments on Mastra platform. Environments are named deploy targets (for example `production`, `staging`, `preview-42`) that belong to a project. The current organization is resolved from stored credentials.
346
+ Manages environments on Mastra platform. Environments are deploy targets (for example `production`, `staging`, `preview-42`) that belong to a project. The current organization is resolved from stored credentials.
298
347
 
299
- Every subcommand resolves its project from, in order: the `MASTRA_PROJECT_ID` environment variable, the `--project <name|slug|id>` flag, or the `.mastra-project.json` file written by [`mastra deploy`](#mastra-deploy) in the current directory. Run from your project directory and you never need to name the project.
348
+ Every subcommand resolves its project in a fixed order. It first checks the `MASTRA_PROJECT_ID` environment variable and the `--project <name|slug|id>` flag. It then reads the `.mastra-project.json` file written by [`mastra deploy`](#mastra-deploy) in the current directory. Run from your project directory and you never need to name the project.
300
349
 
301
350
  ### `mastra env list`
302
351
 
@@ -356,7 +405,7 @@ mastra env restart <env>
356
405
 
357
406
  ### `mastra env vars pull`
358
407
 
359
- Pulls an environment's env vars into a local env file (default: `.env`). The file contains the merged set a deploy actually runs with: vars stored on the environment (for example, added in the dashboard's environment editor) plus project-level vars, with project values winning on conflict. Managed vars injected by attached databases are listed as comments (names only) since their values are platform-managed secrets.
408
+ Pulls an environment's env vars into a local env file (default: `.env`). The file contains the merged set used by a deploy. It combines vars stored on the environment (for example, added in the dashboard's environment editor) with project-level vars. Project values win on conflict. Managed vars injected by attached databases are listed as comments (names only) since their values are platform-managed secrets.
360
409
 
361
410
  ```bash
362
411
  mastra env vars pull
@@ -373,7 +422,7 @@ File to write. Defaults to `.env`.
373
422
 
374
423
  Manages databases attached to a project on Mastra platform. Databases are provisioned from a managed provider (for example Turso or Neon) and inject their connection env vars into deploys automatically.
375
424
 
376
- A database is either **environment-scoped** (its env vars only go to one environment) or **shared** (project-scoped: its env vars go to all environments). Environment-scoped is the default for `mastra env db create` pass an environment argument, or let the CLI pick or prompt for one. Pass `--shared` on create to attach a shared database instead. For other subcommands (`list`, `delete`, `keys`), pass the environment argument to work with environment-scoped databases and omit it for shared databases.
425
+ A database is either **environment-scoped** (its env vars only go to one environment) or **shared** (project-scoped: its env vars go to all environments). Environment-scoped is the default for `mastra env db create`: pass an environment argument, or let the CLI pick or prompt for one. Pass `--shared` on create to attach a shared database instead. For other subcommands (`list`, `delete`, `keys`), pass the environment argument to work with environment-scoped databases and omit it for shared databases.
377
426
 
378
427
  Creating and deleting databases requires the `admin` role in the organization.
379
428
 
@@ -392,7 +441,7 @@ Emit machine-readable JSON.
392
441
 
393
442
  ### `mastra env db create`
394
443
 
395
- Provisions a managed database, attaches it, and polls until it's ready. Provisioning errors are printed with the provider's error detail.
444
+ Provisions and attaches a managed database, then polls until it's ready. Provisioning errors are printed with the provider's error detail.
396
445
 
397
446
  By default the database is scoped to a single environment: pass an environment argument to pick it, or omit the argument to have the CLI pick for you. When the project has one environment, that environment is used. When it has several, the CLI prompts you to select one interactively; in non-interactive contexts (CI, `--json`) an environment argument is required. Pass `--shared` to attach a project-scoped database that's shared by every environment instead.
398
447
 
@@ -419,7 +468,7 @@ Provider region ID for shared databases. Ignored for environment-scoped database
419
468
 
420
469
  #### `--shared`
421
470
 
422
- Attach as a project-scoped database that's shared by every environment. Cannot be combined with an environment argument.
471
+ Attach as a project-scoped database that's shared by every environment. Can't be combined with an environment argument.
423
472
 
424
473
  #### `--no-wait`
425
474
 
@@ -475,7 +524,7 @@ Emit machine-readable JSON.
475
524
 
476
525
  ## `mastra studio deploy`
477
526
 
478
- > **Info:** `mastra studio deploy` continues to work but is superseded by [`mastra deploy`](#mastra-deploy), which supports named environments (`--env staging`, `--env production`) on a single project. New setups should use `mastra deploy`.
527
+ > **Info:** `mastra studio deploy` continues to work but is superseded by [`mastra deploy`](#mastra-deploy), which supports environments (`--env staging`, `--env production`) on a single project. New setups should use `mastra deploy`.
479
528
 
480
529
  Builds and deploys your project to Mastra platform. Requires authentication via [`mastra auth login`](#mastra-auth-login) or a `MASTRA_API_TOKEN` environment variable.
481
530
 
@@ -483,11 +532,11 @@ Builds and deploys your project to Mastra platform. Requires authentication via
483
532
  mastra studio deploy
484
533
  ```
485
534
 
486
- The command runs `mastra build`, zips the output, reads an env file from the project directory, and uploads everything to the platform. After uploading, it polls the deploy status and streams build logs until the deploy reaches a terminal state.
535
+ The command runs `mastra build` and zips the output. It reads an env file from the project directory before uploading everything to the platform. After uploading, it polls the deploy status and streams build logs until the deploy reaches a terminal state.
487
536
 
488
537
  The deploy command auto-loads the project's `.env` file. If `MASTRA_PROJECT_ID` points to a project that was provisioned for Observability, the deploy links to that project instead of creating a new one. Deploying Studio to an observability-only project converts it into a Studio project on the platform side.
489
538
 
490
- The CLI requires at least one `.env` or `.env.*` file (excluding `.env.example`) in the project directory and fails with `Error: No env file found for deploy.` if none exists. When multiple env files are present, the CLI prompts you to pick one (defaulting to `.env.production`); pass `--env-file` to choose explicitly. With `--yes` and multiple env files, you must pass `--env-file` or the deploy errors.
539
+ The CLI requires at least one `.env` or `.env.*` file (excluding `.env.example`) in the project directory and fails with `Error: No env file found for deploy.` if none exists. When multiple env files are present, the CLI prompts you to pick one (defaulting to `.env.production`). Pass `--env-file` to choose explicitly. With `--yes` and multiple env files, you must pass `--env-file` or the deploy errors.
491
540
 
492
541
  Organization and project are resolved in order from: Environment variable flag, `.mastra-project.json` config file, current org from credentials, and lastly interactive prompt. On first deploy, the CLI saves the resolved IDs to `.mastra-project.json` so subsequent deploys skip the prompts.
493
542
 
@@ -581,7 +630,7 @@ Shows diagnosis results and suggested fixes for a failed Studio deploy.
581
630
  mastra studio deploy suggestions [deploy-id]
582
631
  ```
583
632
 
584
- If you omit `deploy-id`, the command uses the latest deploy for the linked project. If a diagnosis doesn't exist yet, the command starts one and polls until results are ready. If the deploy is healthy, no suggestions are shown.
633
+ If you omit `deploy-id`, the command uses the latest deploy for the linked project. If a diagnosis doesn't exist yet, the command starts one and polls until results are ready. Suggestions appear only when the diagnosis finds a problem.
585
634
 
586
635
  ### `mastra studio projects`
587
636
 
@@ -593,7 +642,7 @@ Creates a new project through an interactive prompt. This command doesn't accept
593
642
 
594
643
  ## `mastra server deploy`
595
644
 
596
- > **Info:** `mastra server deploy` continues to work but is superseded by [`mastra deploy`](#mastra-deploy), which deploys a single project to multiple named environments instead of separate Studio and Server commands. New setups should use `mastra deploy`.
645
+ > **Info:** `mastra server deploy` continues to work but is superseded by [`mastra deploy`](#mastra-deploy), which deploys a single project to multiple environments instead of separate Studio and Server commands. New setups should use `mastra deploy`.
597
646
 
598
647
  Builds and deploys your project to Server on Mastra platform. Works the same as [`mastra studio deploy`](#mastra-studio-deploy) with the same flags, arguments, and resolution logic.
599
648
 
@@ -611,7 +660,7 @@ Shows diagnosis results and suggested fixes for a failed Server deploy.
611
660
  mastra server deploy suggestions [deploy-id]
612
661
  ```
613
662
 
614
- If you omit `deploy-id`, the command uses the latest deploy for the linked project. If a diagnosis doesn't exist yet, the command starts one and polls until results are ready. If the deploy is healthy, no suggestions are shown.
663
+ If you omit `deploy-id`, the command uses the latest deploy for the linked project. If a diagnosis doesn't exist yet, the command starts one and polls until results are ready. Suggestions appear only when the diagnosis finds a problem.
615
664
 
616
665
  ## `mastra server pause`
617
666
 
@@ -649,7 +698,7 @@ Same flags as [`mastra server pause`](#mastra-server-pause): **`--org`**, **`--p
649
698
  mastra server restart
650
699
  ```
651
700
 
652
- Fails if a deployment is still active for this project (running, building, deploying, etc.); that's a platform restriction so you can't restart while another deploy is in progress.
701
+ Fails if a deployment is still active for this project (running, building, deploying, etc.). That's a platform restriction so you can't restart while another deploy is in progress.
653
702
 
654
703
  ## `mastra server env`
655
704
 
@@ -892,7 +941,7 @@ Configure your code editor with Mastra's MCP server. Choose from: `"cursor" | "c
892
941
 
893
942
  #### `--observability`
894
943
 
895
- Enable Observability on the Mastra platform. The CLI prompts you to select an existing platform project or create a new one, writes the required environment variables, and configures the observability exporters.
944
+ Enable Observability on the Mastra platform. The CLI prompts you to select an existing platform project or create a new one. It then writes the required environment variables and configures the observability exporters.
896
945
 
897
946
  #### `--no-observability`
898
947
 
@@ -906,7 +955,7 @@ Set the platform project name to use when Mastra Observability is enabled.
906
955
 
907
956
  Runs database migrations to update your storage schema. This command is useful when upgrading Mastra versions that include storage schema changes.
908
957
 
909
- The command bundles your project, connects to your configured storage backend, and executes any pending migrations. Currently supports:
958
+ The command bundles your project and connects to your configured storage backend. It then executes any pending migrations. Currently supports:
910
959
 
911
960
  - **Duplicate spans migration**: Removes duplicate `(traceId, spanId)` entries and adds a unique constraint to ensure data integrity.
912
961
  - **ClickHouse legacy-to-vNext span migration**: Copies historical spans from the legacy `mastra_ai_spans` table to the vNext `mastra_span_events` schema. Runs in batches to stay within memory limits. See the [ClickHouse storage reference](https://mastra.ai/reference/storage/clickhouse) for details.
@@ -968,13 +1017,15 @@ For runtime commands, the command resolves the target server in this order:
968
1017
 
969
1018
  Automatic platform auth is only used when the CLI resolves a Mastra platform target from `.mastra-project.json`. Localhost targets and explicit `--url` targets don't receive automatic credentials. Headers passed with `--header` are sent to any target, including localhost.
970
1019
 
971
- For observability commands (`trace`, `log`, `score`, and `metric`), the CLI targets `https://observability.mastra.ai` by default instead of a project deployment URL. It resolves credentials in this order:
1020
+ For observability commands (`trace`, `log`, `score`, and `metric`), the CLI targets `https://observability.mastra.ai` by default instead of a project deployment URL. Trace Intelligence commands (`learning`) work the same way but target `https://output.signals.mastra.ai`. Both resolve credentials in this order:
972
1021
 
973
1022
  1. Explicit `Authorization` and `X-Mastra-Project-Id` headers passed with `--header`.
974
1023
  2. `MASTRA_PLATFORM_ACCESS_TOKEN` and `MASTRA_PROJECT_ID` from your environment.
975
1024
  3. Project metadata from `.mastra-project.json` for the project ID.
976
1025
  4. Your Mastra CLI login token as an auth fallback.
977
1026
 
1027
+ Learning commands also send `X-Mastra-Organization-Id`, resolved from an explicit `--header`, `MASTRA_ORGANIZATION_ID` in your environment, or `.mastra-project.json`, in that order.
1028
+
978
1029
  Use `--url` and `--header` when you need to override the default hosted observability target or credentials.
979
1030
 
980
1031
  ### Flags
@@ -1417,7 +1468,7 @@ curl -sS "https://observability.mastra.ai/api/observability/traces/<trace-id>/sp
1417
1468
 
1418
1469
  #### `mastra api score create`
1419
1470
 
1420
- Creates an observability score. The input uses the server score body shape; inspect it with `--schema`.
1471
+ Creates an observability score. The input uses the server score body shape. Inspect it with `--schema`.
1421
1472
 
1422
1473
  ```bash
1423
1474
  mastra api score create <input>
@@ -1503,6 +1554,86 @@ Lists results for an experiment. Pass optional JSON input for route-supported fi
1503
1554
  mastra api experiment results <datasetId> <experimentId> [input]
1504
1555
  ```
1505
1556
 
1557
+ #### `mastra api learning entities`
1558
+
1559
+ Lists entities (agents) with Trace Intelligence output, including which trace signals are available per entity. Requires enrollment in the Trace Intelligence private beta.
1560
+
1561
+ ```bash
1562
+ mastra api learning entities '{"entityType":"agent"}'
1563
+ ```
1564
+
1565
+ #### `mastra api learning snapshots`
1566
+
1567
+ Lists analysis snapshots for an entity and an ordered, comma-separated list of trace signals. Later commands need a `snapshotId` from this list.
1568
+
1569
+ ```bash
1570
+ mastra api learning snapshots <entityId> '{"entityType":"agent","signalNames":"goal,outcome,behavior,sentiment","limit":10}'
1571
+ ```
1572
+
1573
+ #### `mastra api learning flow`
1574
+
1575
+ Gets the cross-signal theme flow for one snapshot: stages and links for a Sankey-style view where counts are distinct traces.
1576
+
1577
+ ```bash
1578
+ mastra api learning flow <entityId> '{"entityType":"agent","signalNames":"goal,outcome","snapshotId":"<snapshotId>"}'
1579
+ ```
1580
+
1581
+ #### `mastra api learning paths`
1582
+
1583
+ Gets per-trace theme assignments across the ordered trace signals in one snapshot. Paginate with `limit` and `offset`.
1584
+
1585
+ ```bash
1586
+ mastra api learning paths <entityId> '{"entityType":"agent","signalNames":"goal,outcome","snapshotId":"<snapshotId>","limit":100}'
1587
+ ```
1588
+
1589
+ #### `mastra api learning theme list`
1590
+
1591
+ Lists themes for one trace signal in one snapshot.
1592
+
1593
+ ```bash
1594
+ mastra api learning theme list <entityId> '{"entityType":"agent","signalName":"goal","snapshotId":"<snapshotId>"}'
1595
+ ```
1596
+
1597
+ #### `mastra api learning theme get`
1598
+
1599
+ Gets one theme in one snapshot by its numeric theme ID.
1600
+
1601
+ ```bash
1602
+ mastra api learning theme get <entityId> <themeId> '{"entityType":"agent","signalName":"goal","snapshotId":"<snapshotId>"}'
1603
+ ```
1604
+
1605
+ #### `mastra api learning theme examples`
1606
+
1607
+ Lists trace examples for one theme in one snapshot. Paginate with `limit` and `offset`.
1608
+
1609
+ ```bash
1610
+ mastra api learning theme examples <entityId> <themeId> '{"entityType":"agent","signalName":"goal","snapshotId":"<snapshotId>","limit":10}'
1611
+ ```
1612
+
1613
+ #### `mastra api learning theme history`
1614
+
1615
+ Gets the lifecycle history for one durable theme across snapshots, including split and merge relationships. Takes no `snapshotId`.
1616
+
1617
+ ```bash
1618
+ mastra api learning theme history <entityId> <themeId> '{"entityType":"agent","signalName":"goal"}'
1619
+ ```
1620
+
1621
+ #### `mastra api learning noise get`
1622
+
1623
+ Gets the unclustered (noise) bucket for one trace signal in one snapshot.
1624
+
1625
+ ```bash
1626
+ mastra api learning noise get <entityId> '{"entityType":"agent","signalName":"goal","snapshotId":"<snapshotId>"}'
1627
+ ```
1628
+
1629
+ #### `mastra api learning noise examples`
1630
+
1631
+ Lists trace examples for the noise bucket in one snapshot. Paginate with `limit` and `offset`.
1632
+
1633
+ ```bash
1634
+ mastra api learning noise examples <entityId> '{"entityType":"agent","signalName":"goal","snapshotId":"<snapshotId>","limit":10}'
1635
+ ```
1636
+
1506
1637
  ## Common flags
1507
1638
 
1508
1639
  ### `--dir`
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Agents API
4
4
 
5
- The Agents API provides methods to interact with Mastra AI agents, including generating responses, streaming interactions, and managing agent tools.
5
+ The Agents API provides methods to interact with Mastra AI agents, including generating responses and streaming interactions. It also provides methods for managing agent tools.
6
6
 
7
7
  ## Getting all agents
8
8
 
@@ -155,7 +155,7 @@ for await (const part of uiMessageStream) {
155
155
 
156
156
  ### `sendMessage()`
157
157
 
158
- Send user-authored input to an active agent run or idle memory thread. Use this with `subscribeToThread()` so the client can render the stream that wakes from, or receives, the message.
158
+ Send user-authored input to an active agent run or idle memory thread. Use this with `subscribeToThread()` so the client can render the stream that wakes from, or receives the message.
159
159
 
160
160
  ```typescript
161
161
  const agent = mastraClient.getAgent('support-agent')
@@ -285,7 +285,7 @@ await subscription.processDataStream({
285
285
 
286
286
  ### `streamUntilIdle()`
287
287
 
288
- Stream a response and keep the stream open until every [background task](https://mastra.ai/docs/long-running-agents/background-tasks) dispatched during the run completes. The server re-enters the agentic loop on each task completion so the LLM can react to results in the same call. Requires background tasks to be [enabled on the Mastra instance](https://mastra.ai/reference/configuration) and a memory thread; otherwise the call falls through to a plain `stream()`.
288
+ Stream a response and keep the stream open until every [background task](https://mastra.ai/docs/long-running-agents/background-tasks) dispatched during the run completes. The server re-enters the agentic loop on each task completion so the LLM can react to results in the same call. Requires background tasks to be [enabled on the Mastra instance](https://mastra.ai/reference/configuration) and a memory thread; otherwise the call uses a plain `stream()`.
289
289
 
290
290
  ```typescript
291
291
  const response = await agent.streamUntilIdle('Research solana for me', {
@@ -307,7 +307,7 @@ response.processDataStream({
307
307
 
308
308
  ### `resumeStreamUntilIdle()`
309
309
 
310
- Resume a suspended agent stream with custom data and keep the stream open until every [background task](https://mastra.ai/docs/long-running-agents/background-tasks) dispatched during the run completes. Use this to continue execution after a suspension point, such as a workflow suspend within an agent. Requires background tasks to be [enabled on the Mastra instance](https://mastra.ai/reference/configuration) and a memory thread; otherwise the call falls through to a plain `resumeStream()`:
310
+ Resume a suspended agent stream with custom data and keep the stream open until every [background task](https://mastra.ai/docs/long-running-agents/background-tasks) dispatched during the run completes. Use this to continue execution after a suspension point, such as a workflow suspend within an agent. Requires background tasks to be [enabled on the Mastra instance](https://mastra.ai/reference/configuration) and a memory thread; otherwise the call uses a plain `resumeStream()`:
311
311
 
312
312
  ```typescript
313
313
  const response = await agent.resumeStreamUntilIdle(
@@ -366,7 +366,7 @@ response.processDataStream({
366
366
 
367
367
  ### `listSuspendedRuns()`
368
368
 
369
- List suspended runs for the agent from storage runs waiting on a tool-call approval or on a tool that suspended. Discovery is backed by storage, so it works after a server restart and across server instances. Pass the returned `runId` to `approveToolCall()`, `declineToolCall()`, or `resumeStream()`.
369
+ List suspended runs for the agent from storage: runs waiting on a tool-call approval or on a tool that suspended. Discovery is backed by storage, so it works after a server restart and across server instances. Pass the returned `runId` to `approveToolCall()`, `declineToolCall()`, or `resumeStream()`.
370
370
 
371
371
  ```typescript
372
372
  const { runs, total } = await agent.listSuspendedRuns({
@@ -655,9 +655,9 @@ const screenshotTool = createTool({
655
655
 
656
656
  ### Tracing client tools
657
657
 
658
- When `@mastra/observability` is installed and configured on the server, a client-side tool records a `CLIENT_TOOL_CALL` span as a child of the current `AGENT_RUN` span. The server creates that span when the model emits the client tool call, injects a W3C trace carrier into the outgoing tool-call chunk, and ends the span once the tool arguments are available. Without server-side observability configured, client tool tracing is a no-op.
658
+ When `@mastra/observability` is installed and configured on the server, a client-side tool records a `CLIENT_TOOL_CALL` span as a child of the current `AGENT_RUN` span. The server creates that span when the model emits the client tool call and injects a W3C trace carrier into the outgoing tool-call chunk. It ends the span once the tool arguments are available. Without server-side observability configured, client tool tracing is a no-op.
659
659
 
660
- The client SDK also measures the wall-clock duration of each client tool's `execute` function and ships it back to the server, where it's emitted as a `mastra_tool_duration_ms` metric with `toolType: "client"`.
660
+ The client SDK also measures the wall-clock duration of each client tool's `execute` function and sends it back to the server, where it's emitted as a `mastra_tool_duration_ms` metric with `toolType: "client"`.
661
661
 
662
662
  For richer telemetry from inside your tool's `execute` function, use the `observe` helper on the execution context to add child spans and structured logs:
663
663
 
@@ -680,9 +680,9 @@ const fetchUserTool = createTool({
680
680
  })
681
681
  ```
682
682
 
683
- `observe` is always available when no tracing context is active (e.g. running outside a traced agent), `span` runs the function directly and `log` is a no-op. No null-checking needed.
683
+ `observe` is always available: when no tracing context is active (e.g. running outside a traced agent), `span` runs the function directly and `log` is a no-op. No null-checking needed.
684
684
 
685
- The SDK serializes everything the collector buffered as OTLP/JSON and ships it back in the next request body. The server's `@mastra/observability` package validates that the spans belong to the correct trace (preventing cross-trace injection) and forwards each span/log into the same observability bus that server-side telemetry uses. Your existing exporters pick them up automatically after observability is configured.
685
+ The SDK serializes everything the collector buffered as OTLP/JSON and sends it back in the next request body. The server's `@mastra/observability` package validates that the spans belong to the correct trace (preventing cross-trace injection) and forwards each span/log into the same observability bus that server-side telemetry uses. Your existing exporters pick them up automatically after observability is configured.
686
686
 
687
687
  ## Stored agents
688
688
 
@@ -727,6 +727,23 @@ const agent = await mastraClient.createStoredAgent({
727
727
  })
728
728
  ```
729
729
 
730
+ By default, `createStoredAgent()` publishes the initial version immediately. Set `autoPublish` to `false` to create an unpublished draft that you can review before calling [`activateVersion()`](#activateversion):
731
+
732
+ ```typescript
733
+ const draft = await mastraClient.createStoredAgent({
734
+ id: 'draft-agent',
735
+ name: 'Draft Assistant',
736
+ instructions: 'You are a helpful assistant.',
737
+ model: {
738
+ provider: 'openai',
739
+ name: 'gpt-5',
740
+ },
741
+ autoPublish: false,
742
+ })
743
+ ```
744
+
745
+ Editors configured with the `code` source always publish the initial version because saving writes the agent configuration to the file system.
746
+
730
747
  With all options:
731
748
 
732
749
  ```typescript
@@ -168,7 +168,7 @@ const result = await thread.listMessages({
168
168
  })
169
169
  ```
170
170
 
171
- Metadata filters match shallow scalar values only: `string`, finite `number`, `boolean`, and `null`. Every key-value pair must match with AND semantics. `null` matches an explicit `null` value, not a missing metadata key. Metadata keys must start with a letter or underscore, may contain only alphanumeric characters and underscores, must be 128 characters or fewer, and can't use reserved prototype keys such as `__proto__`, `constructor`, or `prototype`. Performance depends on the server storage backend, and arbitrary metadata filters may scan candidate messages.
171
+ Metadata filters match shallow scalar values only: `string`, finite `number`, `boolean`, and `null`. Every key-value pair must match with AND semantics. `null` matches only keys explicitly set to `null`. Metadata keys must start with a letter or underscore and contain only alphanumeric or underscore characters. The limit is 128 characters. Reserved prototype keys such as `__proto__`, `constructor`, and `prototype` aren't allowed. Performance depends on the server storage backend, and arbitrary metadata filters may scan candidate messages.
172
172
 
173
173
  ### Delete Messages
174
174
 
@@ -226,7 +226,7 @@ await mastraClient.updateWorkingMemory({
226
226
  // Returns: { success: true }
227
227
  ```
228
228
 
229
- **Note:** For resource-scoped working memory, you must provide the `resourceId` parameter. This allows the memory to persist across all conversation threads for that user.
229
+ For resource-scoped working memory, you must provide the `resourceId` parameter. It allows the memory to persist across all conversation threads for that user.
230
230
 
231
231
  ### Get Memory Status
232
232
 
@@ -142,7 +142,7 @@ await run.resume({
142
142
  })
143
143
  ```
144
144
 
145
- When a [`.foreach()`](https://mastra.ai/reference/workflows/workflow-methods/foreach) step suspends across multiple iterations, pass `forEachIndex` (zero-based; `0` targets the first iteration) to resume one iteration at a time. Iterations you don't target remain suspended.
145
+ When a [`.foreach()`](https://mastra.ai/reference/workflows/workflow-methods/foreach) step suspends across multiple iterations, pass `forEachIndex` (zero-based. `0` targets the first iteration) to resume one iteration at a time. Iterations you don't target remain suspended.
146
146
 
147
147
  ```typescript
148
148
  await run.resume({
@@ -2,11 +2,11 @@
2
2
 
3
3
  # buildBasePrompt()
4
4
 
5
- `buildBasePrompt()` builds the shared base system prompt for a coding agent the behavioral instructions that make the agent a good coding assistant. It takes a `PromptContext` describing the current environment (project, platform, git branch, mode, model) and returns the prompt as a string.
5
+ `buildBasePrompt()` builds the shared base system prompt for a coding agent: the behavioral instructions that make the agent a good coding assistant. It takes a `PromptContext` describing the current environment (project, platform, git branch, mode, model) and returns the prompt as a string.
6
6
 
7
7
  Product-specific strings are parameterized through `productName`, `coAuthorName`, and `coAuthorEmail`, so you can rebrand the prompt and commit trailer without forking it. They default to `"Mastra Code"` / `"noreply@mastra.ai"`, so existing callers keep identical output.
8
8
 
9
- Use this with [`createCodingAgent()`](https://mastra.ai/reference/coding-agent/create-coding-agent) when you build dynamic instructions for the agent.
9
+ Use this with [`createCodingAgent()`](https://mastra.ai/reference/coding-agent/create-coding-agent) when you build runtime-defined instructions for the agent.
10
10
 
11
11
  ## Usage example
12
12
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  `createCodingAgent()` builds a coding [`Agent`](https://mastra.ai/reference/agents/agent) with portable defaults for the pieces a coding agent always needs: a local workspace, the task-list signal provider, network-retry error processors, and the goal judge prompt. Supply only `model`, `instructions`, and `tools` to get a working agent, or override any default.
6
6
 
7
- The returned value is a standard `Agent`, so it works anywhere an `Agent` does including as the agent passed to an [`AgentController`](https://mastra.ai/reference/agent-controller/agent-controller-class).
7
+ The returned value is a standard `Agent`, so it works anywhere an `Agent` does: including as the agent passed to an [`AgentController`](https://mastra.ai/reference/agent-controller/agent-controller-class).
8
8
 
9
9
  ## Usage example
10
10
 
@@ -70,7 +70,7 @@ new Workspace({
70
70
  })
71
71
  ```
72
72
 
73
- To opt out for example when the workspace is injected at the [`AgentController`](https://mastra.ai/reference/agent-controller/agent-controller-class) level pass `workspace: undefined` explicitly:
73
+ To opt out (for example, when the workspace is injected at the [`AgentController`](https://mastra.ai/reference/agent-controller/agent-controller-class) level), pass `workspace: undefined` explicitly:
74
74
 
75
75
  ```typescript
76
76
  const agent = createCodingAgent({