@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
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Sentry exporter
4
4
 
5
- [Sentry](https://sentry.io/) is an application monitoring platform with AI-specific tracing capabilities. The Sentry exporter sends your traces to Sentry using OpenTelemetry semantic conventions, providing insights into model performance, token usage, and tool executions.
5
+ [Sentry](https://sentry.io/) is an application monitoring platform with AI-specific tracing capabilities. The Sentry exporter sends your traces to Sentry using OpenTelemetry semantic conventions, providing insights into model performance and token usage, plus tool executions.
6
6
 
7
7
  ## Installation
8
8
 
@@ -31,7 +31,7 @@ Exporters send observability data to a destination:
31
31
  Bridges connect Mastra to an existing distributed tracing context:
32
32
 
33
33
  - [OpenTelemetry bridge](https://mastra.ai/docs/observability/integrations/bridges/otel): Integrate Mastra with an existing OpenTelemetry trace.
34
- - [Datadog bridge](https://mastra.ai/docs/observability/integrations/bridges/datadog): Integrate Mastra with Datadog tracing and LLM Observability flows.
34
+ - [Datadog bridge](https://mastra.ai/docs/observability/integrations/bridges/datadog): Send Mastra traces to Datadog and its LLM Observability product.
35
35
 
36
36
  ## Processors
37
37
 
@@ -295,7 +295,7 @@ If the filter encounters an error while processing a field, it replaces the fiel
295
295
  }
296
296
  ```
297
297
 
298
- This ensures that processing errors don't prevent traces from being exported or cause application crashes.
298
+ As a result, processing errors don't prevent traces from being exported or cause application crashes.
299
299
 
300
300
  ## Related
301
301
 
@@ -89,7 +89,7 @@ Mastra provides access to a logger instance via the `mastra.getLogger()` method,
89
89
 
90
90
  ### Logging from workflow steps
91
91
 
92
- Within a workflow step, access the logger via the `mastra` parameter inside the `execute` function. This allows you to log messages relevant to the step's execution.
92
+ Within a workflow step, access the logger via the `mastra` parameter inside the `execute` function. You can log messages relevant to the step's execution.
93
93
 
94
94
  ```typescript
95
95
  import { createWorkflow, createStep } from "@mastra/core/workflows";
@@ -4,7 +4,7 @@
4
4
 
5
5
  Mastra automatically emits performance and usage metrics from traced execution. There's no manual instrumentation needed. Metrics are derived from spans as they complete.
6
6
 
7
- Three categories of metrics are emitted automatically:
7
+ These categories of metrics are emitted automatically:
8
8
 
9
9
  - **Duration metrics**: Execution time for agents, workflows, tools, model calls, and processors.
10
10
  - **Token usage metrics**: Input and output token counts broken down by type (text, cache, audio, image, reasoning).
@@ -91,7 +91,7 @@ By default the CLI targets hosted Mastra observability (`https://observability.m
91
91
 
92
92
  ### `getMetricAggregate`
93
93
 
94
- Returns a single scalar the building block for KPI cards.
94
+ Returns a single scalar, the building block for KPI cards.
95
95
 
96
96
  Inputs:
97
97
 
@@ -119,7 +119,7 @@ console.log(cost.value, cost.estimatedCost, cost.costUnit, cost.changePercent)
119
119
 
120
120
  ### `getMetricBreakdown`
121
121
 
122
- Groups rows by one or more dimensions and aggregates each group the building block for top-N tables (e.g. "tokens by agent").
122
+ Groups rows by one or more dimensions and aggregates each group, the building block for top-N tables (e.g. "tokens by agent").
123
123
 
124
124
  Inputs:
125
125
 
@@ -144,14 +144,14 @@ const byAgent = await observability!.getMetricBreakdown({
144
144
 
145
145
  ### `getMetricTimeSeries`
146
146
 
147
- Buckets values by a fixed interval the building block for line and bar charts.
147
+ Buckets values by a fixed interval, the building block for line and bar charts.
148
148
 
149
149
  Inputs:
150
150
 
151
151
  - `name`: Array of metric names.
152
152
  - `interval`: One of `'1m' | '5m' | '15m' | '1h' | '1d'`.
153
153
  - `aggregation`: Same enum.
154
- - `groupBy`: Optional. When omitted, multiple metric names are summed into one series; use one call per metric to keep them separate.
154
+ - `groupBy`: Optional. When omitted, multiple metric names are summed into one series. Use one call per metric to keep them separate.
155
155
  - `filters`: Optional.
156
156
 
157
157
  Response: `series[]`, each with `name`, `costUnit`, and `points[]` of `{ timestamp, value, estimatedCost }`.
@@ -169,7 +169,7 @@ const inputTokens = await observability!.getMetricTimeSeries({
169
169
 
170
170
  ### `getMetricPercentiles`
171
171
 
172
- Returns percentile values bucketed by time the building block for latency charts.
172
+ Returns percentile values bucketed by time, the building block for latency charts.
173
173
 
174
174
  Inputs:
175
175
 
@@ -214,8 +214,8 @@ Use these endpoints to populate dropdowns or to give an agent the menu of values
214
214
 
215
215
  Every query accepts the same `filters` object. The most useful fields:
216
216
 
217
- - `name`: Restrict to specific metric names. (Top-level `name` already does this for aggregate/breakdown/timeseries; use `filters.name` when you want to mix multiple metrics under a single query.)
218
- - `timestamp`: `{ start, end, startExclusive, endExclusive }`. Both bounds are optional; omit `end` for "until now".
217
+ - `name`: Restrict to specific metric names. (Top-level `name` already does this for aggregate/breakdown/timeseries. Use `filters.name` when you want to mix multiple metrics under a single query.)
218
+ - `timestamp`: `{ start, end, startExclusive, endExclusive }`. Both bounds are optional. Omit `end` for "until now".
219
219
  - `provider`, `model`, `costUnit`: For token and cost metrics.
220
220
  - `labels`: Exact key-value match on metric labels, for example `{ status: 'error' }` for duration metrics.
221
221
  - Correlation fields: `entityType`, `entityName`, `parentEntityName`, `rootEntityName`, `userId`, `organizationId`, `resourceId`, `runId`, `sessionId`, `threadId`, `requestId`, `executionSource`, `environment`, `serviceName`, `experimentId`, `tags`.
@@ -247,7 +247,7 @@ curl -sS -X POST http://localhost:4111/api/observability/metrics/aggregate \
247
247
 
248
248
  ### Always provide a time range
249
249
 
250
- `filters.timestamp` is optional, but you should treat it as required for any query that runs against a production store. Observability tables are typically partitioned (or chunked, for TimescaleDB) by event time. When you supply `timestamp.start` (and ideally `end`), the backend can prune to the partitions that overlap the range usually one or two. Without a time range, the planner has to scan every partition, which can be hundreds of segments over a year of retention and is the most common cause of slow OLAP queries on Postgres-backed stores.
250
+ `filters.timestamp` is optional, but you should treat it as required for any query that runs against a production store. Observability tables are typically partitioned (or chunked, for TimescaleDB) by event time. When you supply `timestamp.start` (and ideally `end`), the backend can prune to the partitions that overlap the range, usually one or two. Without a time range, the planner has to scan every partition, which can be hundreds of segments over a year of retention and is the most common cause of slow OLAP queries on Postgres-backed stores.
251
251
 
252
252
  A safe default for ad-hoc queries is the last 24 hours; alerts and dashboards should match their actual evaluation window:
253
253
 
@@ -8,7 +8,7 @@ Mastra's observability system gives you visibility into every agent run, workflo
8
8
  - [**Storage**](https://mastra.ai/docs/observability/storage): Choose storage backends for persisted traces, logs, metrics aggregation, and feedback queries.
9
9
  - [**Tracing**](https://mastra.ai/docs/observability/tracing/overview): Records every operation as a hierarchical timeline of spans, capturing inputs, outputs, token usage, and timing.
10
10
  - [**Logging**](https://mastra.ai/docs/observability/logging): Forwards structured log entries from your application and Mastra internals to observability storage, correlated to traces automatically.
11
- - [**Metrics**](https://mastra.ai/docs/observability/metrics/overview): Extracts duration, token usage, and cost data from traces automatically, with no additional instrumentation required.
11
+ - [**Metrics**](https://mastra.ai/docs/observability/metrics/overview): Extracts trace usage and cost data. No additional instrumentation is required.
12
12
  - [**Feedback**](https://mastra.ai/docs/observability/feedback): Stores ratings, comments, corrections, and other review signals linked to traces and spans.
13
13
  - [**Integrations**](https://mastra.ai/docs/observability/integrations/overview): Choose exporters, bridges, and span processors for Studio, hosted, or external observability workflows.
14
14
 
@@ -26,11 +26,11 @@ Tracing is the foundation. When observability is configured, every agent run, wo
26
26
 
27
27
  Metrics are derived from traces automatically. When a span ends, Mastra extracts duration, token counts, and cost estimates without any extra code. These metrics power the dashboards in [Studio](https://mastra.ai/docs/studio/observability).
28
28
 
29
- Logs are correlated to traces automatically. Every `logger.info()`, `logger.warn()`, or `logger.error()` call within a traced context is tagged with the current trace and span IDs. You can navigate from a log entry directly to the trace that produced it.
29
+ Logs are correlated to traces automatically. Every `logger.info()`, `logger.warn()`, or `logger.error()` call within a traced context is tagged with the current trace and span IDs. You can move through from a log entry directly to the trace that produced it.
30
30
 
31
31
  Feedback records human review signals such as ratings, comments, and corrections. Feedback can be linked to traces and spans, then queried with the same observability store used for metrics.
32
32
 
33
- These signals share correlation IDs (trace ID, span ID, entity type, entity name), so you can jump between a metric spike, the traces behind it, logs within those traces, and related feedback.
33
+ These signals share correlation IDs such as trace ID, span ID, entity type, and entity name. You can use them to move from a metric spike to its traces, logs, and related feedback.
34
34
 
35
35
  ## Quickstart
36
36
 
@@ -102,7 +102,7 @@ export const mastra = new Mastra({
102
102
  })
103
103
  ```
104
104
 
105
- This enables tracing, log forwarding, and metrics. Mastra also supports external tracing providers like Langfuse, Datadog, and any OpenTelemetry-compatible platform. Use [Configuration](https://mastra.ai/docs/observability/config), [Storage](https://mastra.ai/docs/observability/storage), and [Integrations overview](https://mastra.ai/docs/observability/integrations/overview) to set up observability.
105
+ It enables tracing, log forwarding, and metrics. Mastra also supports external tracing providers like Langfuse, Datadog, and any OpenTelemetry-compatible platform. Use [Configuration](https://mastra.ai/docs/observability/config), [Storage](https://mastra.ai/docs/observability/storage), and [Integrations overview](https://mastra.ai/docs/observability/integrations/overview) to set up observability.
106
106
 
107
107
  ## Mastra platform
108
108
 
@@ -19,13 +19,17 @@ This page focuses on trace-specific concepts: span hierarchy, sampling, metadata
19
19
 
20
20
  To get started with tracing, configure observability in your Mastra instance and run an agent or workflow. You can configure behavior through the following features:
21
21
 
22
- - [Configuration](https://mastra.ai/docs/observability/config): Base observability config, multiple configs, and serverless flushing
22
+ - [Configuration](https://mastra.ai/docs/observability/config): Base observability config and multiple configs, plus serverless flushing
23
23
  - [Storage](https://mastra.ai/docs/observability/storage): Storage routing for traces, logs, and metrics
24
24
  - [Integrations overview](https://mastra.ai/docs/observability/integrations/overview): Exporters, bridges, and processors
25
25
 
26
26
  ## Sampling strategies
27
27
 
28
- Sampling allows you to control which traces are collected, helping you balance between observability needs and resource costs. In production environments with high traffic, collecting every trace can be expensive and unnecessary. Sampling strategies let you capture a representative subset of traces while ensuring you don't miss critical information about errors or important operations.
28
+ Sampling allows you to control which traces are collected, helping you balance between observability needs and resource costs.
29
+
30
+ In production environments with high traffic, collecting every trace can be expensive and unnecessary.
31
+
32
+ Sampling strategies let you capture a representative subset of traces while ensuring you don't miss critical information about errors or important operations.
29
33
 
30
34
  You can configure sampling at the observability config level:
31
35
 
@@ -93,7 +97,9 @@ The `sampling` option allows you to control which traces are collected, helping
93
97
 
94
98
  ## Adding custom metadata
95
99
 
96
- Custom metadata allows you to attach additional context to your traces, making it easier to debug issues and understand system behavior in production. Metadata can include business logic details, performance metrics, user context, or any information that helps you understand what happened during execution.
100
+ Custom metadata allows you to attach additional context to your traces, making it easier to debug issues and understand system behavior in production.
101
+
102
+ Metadata can include business logic and performance metrics. It can also carry user context or any other information that explains what happened during execution.
97
103
 
98
104
  You can add metadata to any span using the tracing context:
99
105
 
@@ -312,7 +318,7 @@ const result = await agent.generate([{ role: 'user', content: 'Handle confidenti
312
318
 
313
319
  #### How it works
314
320
 
315
- - **Trace-wide effect**: When set on the root span, these options apply to all child spans in the trace (tool calls, model generations, etc.)
321
+ - **Trace-wide effect**: When set on the root span and these options apply to all child spans in the trace (tool calls, plus model generations, etc.)
316
322
  - **Export-time filtering**: The data remains available internally during execution but is excluded when spans are exported to observability platforms
317
323
  - **Combinable with other options**: You can use `hideInput`/`hideOutput` alongside `tags`, `metadata`, and other `tracingOptions`
318
324
 
@@ -327,7 +333,7 @@ const result = await agent.generate([{ role: 'user', content: 'Sensitive operati
327
333
  })
328
334
  ```
329
335
 
330
- For more granular control over sensitive data, consider using the [Sensitive Data Filter](https://mastra.ai/docs/observability/integrations/processors/sensitive-data-filter) processor, which can redact specific fields (like passwords, tokens, and keys) while preserving the rest of the input/output.
336
+ For more fine-grained control over sensitive data, consider using the [Sensitive Data Filter](https://mastra.ai/docs/observability/integrations/processors/sensitive-data-filter) processor, which can redact specific fields (like passwords, tokens, and keys) while preserving the rest of the input/output.
331
337
 
332
338
  #### Child spans and metadata extraction
333
339
 
@@ -356,7 +362,7 @@ execute: async (inputData, context) => {
356
362
  }
357
363
  ```
358
364
 
359
- This gives you fine-grained control over which child spans include RequestContext metadata. Root spans (agent/workflow executions) always extract metadata automatically, while child spans only extract when you explicitly pass `requestContext`.
365
+ You get fine-grained control over which child spans include RequestContext metadata. Root spans (agent/workflow executions) always extract metadata automatically, while child spans only extract when you explicitly pass `requestContext`.
360
366
 
361
367
  ## Creating child spans
362
368
 
@@ -699,11 +705,11 @@ serializationOptions: {
699
705
  }
700
706
  ```
701
707
 
702
- All options are optional if not specified, they fall back to the defaults shown above.
708
+ All options are optional, if not specified, they fall back to the defaults shown above.
703
709
 
704
710
  ## Retrieving trace IDs
705
711
 
706
- When you execute agents or workflows with tracing enabled, the response includes a `traceId` that you can use to look up the full trace in your observability platform. This is useful for debugging, customer support, or correlating traces with other events in your system.
712
+ When you execute agents or workflows with tracing enabled, the response includes a `traceId` that you can use to look up the full trace in your observability platform. This is useful for debugging or customer support, or alternatively correlating traces with other events in your system.
707
713
 
708
714
  ### Agent trace IDs
709
715
 
@@ -783,7 +789,7 @@ const result = await agent.generate('Analyze this data', {
783
789
 
784
790
  ### OpenTelemetry integration
785
791
 
786
- Integration with OpenTelemetry allows Mastra traces to appear seamlessly in your existing observability platform:
792
+ Integration with OpenTelemetry allows Mastra traces to appear directly in your existing observability platform:
787
793
 
788
794
  ```ts
789
795
  import { trace } from '@opentelemetry/api'
@@ -826,12 +832,12 @@ Mastra validates trace and span IDs to ensure compatibility:
826
832
  - **Trace IDs**: 1-32 hexadecimal characters (OpenTelemetry uses 32)
827
833
  - **Span IDs**: 1-16 hexadecimal characters (OpenTelemetry uses 16)
828
834
 
829
- Invalid IDs are handled gracefully Mastra logs an error and continues:
835
+ Invalid IDs are handled gracefully, Mastra logs an error and continues:
830
836
 
831
837
  - Invalid trace ID → generates a new trace ID
832
838
  - Invalid parent span ID → ignores the parent relationship
833
839
 
834
- This ensures tracing never crashes your application, even with malformed input.
840
+ As a result, tracing never crashes your application, even with malformed input.
835
841
 
836
842
  ### Example: Express middleware
837
843
 
@@ -889,4 +895,4 @@ Mastra automatically creates spans for:
889
895
  - [Tracing Classes](https://mastra.ai/reference/observability/tracing/instances): Core classes and methods
890
896
  - [Span Interfaces](https://mastra.ai/reference/observability/tracing/spans): Span types and lifecycle
891
897
  - [Type Definitions](https://mastra.ai/reference/observability/tracing/interfaces): Complete interface reference
892
- - [Span filtering](https://mastra.ai/reference/observability/tracing/span-filtering): Filtering behavior, span types, and examples
898
+ - [Span filtering](https://mastra.ai/reference/observability/tracing/span-filtering): Filtering behavior and span types, plus examples
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Chunking and embedding documents
4
4
 
5
- Before processing, create a MDocument instance from your content. You can initialize it from various formats:
5
+ Before processing, create a MDocument instance from your content. You can initialize it from different formats:
6
6
 
7
7
  ```ts
8
8
  const docFromText = MDocument.fromText('Your plain text content...')
@@ -49,7 +49,7 @@ const graphQueryTool = createGraphRAGTool({
49
49
 
50
50
  The `graphOptions` parameter controls how the knowledge graph is built and traversed:
51
51
 
52
- - `threshold`: Similarity threshold (0-1) for determining which chunks are related. Higher values create sparser graphs with stronger connections; lower values create denser graphs with more potential relationships.
52
+ - `threshold`: Similarity threshold (0-1) for determining which chunks are related. Higher values create sparser graphs with stronger connections. Lower values create denser graphs with more potential relationships.
53
53
  - `dimension`: Vector embedding dimension. Must match the embedding model's output dimension (e.g., 1536 for OpenAI's text-embedding-3-small).
54
54
 
55
55
  ```ts
@@ -77,7 +77,7 @@ const ragAgent = new Agent({
77
77
  instructions: `You are a helpful assistant that answers questions based on the provided context.
78
78
  When answering questions, use the graph query tool to find relevant information and relationships.
79
79
  Base your answers on the context provided by the tool, and clearly state if the context doesn't contain enough information.`,
80
- model: 'openai/gpt-5.5',
80
+ model: 'openai/gpt-5.6-sol',
81
81
  tools: {
82
82
  graphQueryTool,
83
83
  },
@@ -138,15 +138,15 @@ The agent uses the graph query tool to:
138
138
  2. Find semantically similar chunks in the vector store
139
139
  3. Build a knowledge graph from related chunks
140
140
  4. Traverse the graph to find connected information
141
- 5. Return comprehensive context for generating the response
141
+ 5. Return complete context for generating the response
142
142
 
143
143
  ## Choosing the right threshold
144
144
 
145
- The threshold parameter significantly impacts retrieval quality:
145
+ The threshold parameter substantially impacts retrieval quality:
146
146
 
147
- - **High threshold (0.8-0.9)**: Strict connections, fewer relationships, more precise but potentially incomplete results
147
+ - **High threshold (0.8-0.9)**: Strict connections and fewer relationships, plus more precise but potentially incomplete results
148
148
  - **Medium threshold (0.6-0.8)**: Balanced approach, good for most use cases
149
- - **Low threshold (0.4-0.6)**: More connections, broader context, risk of including less relevant information
149
+ - **Low threshold (0.4-0.6)**: More connections and broader context, plus risk of including less relevant information
150
150
 
151
151
  Start with 0.7 and adjust based on your specific use case:
152
152
 
@@ -199,7 +199,7 @@ const agent = new Agent({
199
199
  name: 'RAG Agent',
200
200
  instructions: `Use vector search for simple fact-finding queries.
201
201
  Use graph search when you need to understand relationships or find connected information.`,
202
- model: 'openai/gpt-5.5',
202
+ model: 'openai/gpt-5.6-sol',
203
203
  tools: {
204
204
  vectorQueryTool,
205
205
  graphQueryTool,
@@ -59,11 +59,11 @@ const results = await pgVector.query({
59
59
  console.log('Similar chunks:', results)
60
60
  ```
61
61
 
62
- This example shows the essentials: initialize a document, create chunks, generate embeddings, store them, and query for similar content.
62
+ This example shows the essentials. Initialize a document and create chunks, then generate and store embeddings before querying for similar content.
63
63
 
64
64
  ## Document processing
65
65
 
66
- The basic building block of RAG is document processing. Documents can be chunked using various strategies (recursive, sliding window, etc.) and enriched with metadata. See the [chunking and embedding doc](https://mastra.ai/docs/rag/chunking-and-embedding).
66
+ The basic building block of RAG is document processing. Documents can be chunked using strategies (recursive, sliding window, etc.) and enriched with metadata. See the [chunking and embedding doc](https://mastra.ai/docs/rag/chunking-and-embedding).
67
67
 
68
68
  ## Vector storage
69
69
 
@@ -160,15 +160,15 @@ When creating the tool, pay special attention to the tool's name and description
160
160
 
161
161
  This is particularly useful when:
162
162
 
163
- - Your agent needs to dynamically decide what information to retrieve
163
+ - Your agent needs to decide at runtime what information to retrieve
164
164
  - The retrieval process requires complex decision-making
165
165
  - You want the agent to combine multiple retrieval strategies based on context
166
166
 
167
167
  #### Database-Specific Configurations
168
168
 
169
- The Vector Query Tool supports database-specific configurations that enable you to leverage unique features and optimizations of different vector stores.
169
+ The Vector Query Tool supports database-specific configurations that enable you to use unique features and optimizations of different vector stores.
170
170
 
171
- > **Note:** These configurations are for **query-time options** like namespaces, performance tuning, and filteringnot for database connection setup.
171
+ > **Note:** These configurations are for **query-time options** like namespaces, performance tuning, and filtering, not for database connection setup.
172
172
  >
173
173
  > Connection credentials (URLs, auth tokens) are configured when you instantiate the vector store class (e.g., `new LibSQLVector({ url: '...' })`).
174
174
 
@@ -235,7 +235,7 @@ const lanceQueryTool = createVectorQueryTool({
235
235
  - **pgVector optimization**: Control search accuracy and speed with ef/probes parameters
236
236
  - **Quality filtering**: Set minimum similarity thresholds to improve result relevance
237
237
  - **LanceDB tables**: Separate data into tables for better organization and performance
238
- - **Runtime flexibility**: Override configurations dynamically based on context
238
+ - **Runtime flexibility**: Override configurations at runtime based on context
239
239
 
240
240
  **Common Use Cases:**
241
241
 
@@ -274,7 +274,7 @@ import { PGVECTOR_PROMPT } from '@mastra/pg'
274
274
  export const ragAgent = new Agent({
275
275
  id: 'rag-agent',
276
276
  name: 'RAG Agent',
277
- model: 'openai/gpt-5.5',
277
+ model: 'openai/gpt-5.6-sol',
278
278
  instructions: `
279
279
  Process queries using the provided context. Structure responses to be concise and relevant.
280
280
  ${PGVECTOR_PROMPT}
@@ -291,7 +291,7 @@ import { PINECONE_PROMPT } from '@mastra/pinecone'
291
291
  export const ragAgent = new Agent({
292
292
  id: 'rag-agent',
293
293
  name: 'RAG Agent',
294
- model: 'openai/gpt-5.5',
294
+ model: 'openai/gpt-5.6-sol',
295
295
  instructions: `
296
296
  Process queries using the provided context. Structure responses to be concise and relevant.
297
297
  ${PINECONE_PROMPT}
@@ -308,7 +308,7 @@ import { QDRANT_PROMPT } from '@mastra/qdrant'
308
308
  export const ragAgent = new Agent({
309
309
  id: 'rag-agent',
310
310
  name: 'RAG Agent',
311
- model: 'openai/gpt-5.5',
311
+ model: 'openai/gpt-5.6-sol',
312
312
  instructions: `
313
313
  Process queries using the provided context. Structure responses to be concise and relevant.
314
314
  ${QDRANT_PROMPT}
@@ -325,7 +325,7 @@ import { CHROMA_PROMPT } from '@mastra/chroma'
325
325
  export const ragAgent = new Agent({
326
326
  id: 'rag-agent',
327
327
  name: 'RAG Agent',
328
- model: 'openai/gpt-5.5',
328
+ model: 'openai/gpt-5.6-sol',
329
329
  instructions: `
330
330
  Process queries using the provided context. Structure responses to be concise and relevant.
331
331
  ${CHROMA_PROMPT}
@@ -342,7 +342,7 @@ import { ASTRA_PROMPT } from '@mastra/astra'
342
342
  export const ragAgent = new Agent({
343
343
  id: 'rag-agent',
344
344
  name: 'RAG Agent',
345
- model: 'openai/gpt-5.5',
345
+ model: 'openai/gpt-5.6-sol',
346
346
  instructions: `
347
347
  Process queries using the provided context. Structure responses to be concise and relevant.
348
348
  ${ASTRA_PROMPT}
@@ -359,7 +359,7 @@ import { LIBSQL_PROMPT } from '@mastra/libsql'
359
359
  export const ragAgent = new Agent({
360
360
  id: 'rag-agent',
361
361
  name: 'RAG Agent',
362
- model: 'openai/gpt-5.5',
362
+ model: 'openai/gpt-5.6-sol',
363
363
  instructions: `
364
364
  Process queries using the provided context. Structure responses to be concise and relevant.
365
365
  ${LIBSQL_PROMPT}
@@ -376,7 +376,7 @@ import { UPSTASH_PROMPT } from '@mastra/upstash'
376
376
  export const ragAgent = new Agent({
377
377
  id: 'rag-agent',
378
378
  name: 'RAG Agent',
379
- model: 'openai/gpt-5.5',
379
+ model: 'openai/gpt-5.6-sol',
380
380
  instructions: `
381
381
  Process queries using the provided context. Structure responses to be concise and relevant.
382
382
  ${UPSTASH_PROMPT}
@@ -393,7 +393,7 @@ import { VECTORIZE_PROMPT } from '@mastra/vectorize'
393
393
  export const ragAgent = new Agent({
394
394
  id: 'rag-agent',
395
395
  name: 'RAG Agent',
396
- model: 'openai/gpt-5.5',
396
+ model: 'openai/gpt-5.6-sol',
397
397
  instructions: `
398
398
  Process queries using the provided context. Structure responses to be concise and relevant.
399
399
  ${VECTORIZE_PROMPT}
@@ -410,7 +410,7 @@ import { MONGODB_PROMPT } from '@mastra/mongodb'
410
410
  export const ragAgent = new Agent({
411
411
  id: 'rag-agent',
412
412
  name: 'RAG Agent',
413
- model: 'openai/gpt-5.5',
413
+ model: 'openai/gpt-5.6-sol',
414
414
  instructions: `
415
415
  Process queries using the provided context. Structure responses to be concise and relevant.
416
416
  ${MONGODB_PROMPT}
@@ -427,7 +427,7 @@ import { OPENSEARCH_PROMPT } from '@mastra/opensearch'
427
427
  export const ragAgent = new Agent({
428
428
  id: 'rag-agent',
429
429
  name: 'RAG Agent',
430
- model: 'openai/gpt-5.5',
430
+ model: 'openai/gpt-5.6-sol',
431
431
  instructions: `
432
432
  Process queries using the provided context. Structure responses to be concise and relevant.
433
433
  ${OPENSEARCH_PROMPT}
@@ -444,7 +444,7 @@ import { S3VECTORS_PROMPT } from '@mastra/s3vectors'
444
444
  export const ragAgent = new Agent({
445
445
  id: 'rag-agent',
446
446
  name: 'RAG Agent',
447
- model: 'openai/gpt-5.5',
447
+ model: 'openai/gpt-5.6-sol',
448
448
  instructions: `
449
449
  Process queries using the provided context. Structure responses to be concise and relevant.
450
450
  ${S3VECTORS_PROMPT}
@@ -455,10 +455,10 @@ export const ragAgent = new Agent({
455
455
 
456
456
  ### Re-ranking
457
457
 
458
- Initial vector similarity search can sometimes miss nuanced relevance. Re-ranking is a more computationally expensive process, but more accurate algorithm that improves results by:
458
+ Initial vector similarity search can sometimes miss detailed relevance. Re-ranking is a more computationally expensive process, but more accurate algorithm that improves results by:
459
459
 
460
460
  - Considering word order and exact matches
461
- - Applying more sophisticated relevance scoring
461
+ - Applying more advanced relevance scoring
462
462
  - Using a method called cross-attention between query and documents
463
463
 
464
464
  Here's how to use re-ranking:
@@ -476,7 +476,7 @@ const initialResults = await pgVector.query({
476
476
  // Create a relevance scorer
477
477
  const relevanceProvider = new MastraAgentRelevanceScorer(
478
478
  'relevance-scorer',
479
- 'openai/gpt-5.5',
479
+ 'openai/gpt-5.6-sol',
480
480
  )
481
481
 
482
482
  // Re-rank the results
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Storing embeddings in a vector database
4
4
 
5
- After generating embeddings, you need to store them in a database that supports vector similarity search. Mastra provides a consistent interface for storing and querying embeddings across various vector databases.
5
+ After generating embeddings, you need to store them in a database that supports vector similarity search. Mastra provides a consistent interface for storing and querying embeddings across vector databases.
6
6
 
7
7
  ## Supported databases
8
8
 
@@ -571,7 +571,7 @@ The upsert operation:
571
571
 
572
572
  Vector stores support rich metadata (any JSON-serializable fields) for filtering and organization. Since metadata is stored with no fixed schema, use consistent field naming to avoid unexpected query results.
573
573
 
574
- > **Warning:** Metadata is crucial for vector storage - without it, you'd only have numerical embeddings with no way to return the original text or filter results. Always store at least the source text as metadata.
574
+ > **Warning:** Metadata is important for vector storage. Without it, you'd only have numerical embeddings with no way to return the original text or filter results. Always store at least the source text as metadata.
575
575
 
576
576
  ```ts
577
577
  // Store embeddings with rich metadata for better organization and filtering
@@ -13,7 +13,7 @@ The `CompositeAuth` class allows you to combine multiple authentication provider
13
13
 
14
14
  ## Installation
15
15
 
16
- CompositeAuth is included in `@mastra/core`, no additional packages required.
16
+ CompositeAuth is included in `@mastra/core` and requires no additional packages.
17
17
 
18
18
  ```typescript
19
19
  import { CompositeAuth } from '@mastra/core/server'
@@ -83,7 +83,7 @@ async authenticateToken(token, request) {
83
83
 
84
84
  ## Provider order
85
85
 
86
- The order of providers matters. Place the most common authentication method first for better performance:
86
+ Place the most common authentication method first because provider order affects performance:
87
87
 
88
88
  ```typescript
89
89
  // If most requests use Clerk, put it first
@@ -74,10 +74,10 @@ resourceMapping: {
74
74
 
75
75
  `deriveId()` receives:
76
76
 
77
- - `user` the authenticated user
78
- - `resourceId` the owning Mastra resource ID when available (for example, a thread's `resourceId`)
79
- - `requestContext` the current request context for advanced tenant resolution
80
- - `metadata` provider-specific metadata for the attempted action
77
+ - `user`: the authenticated user
78
+ - `resourceId`: the owning Mastra resource ID when available (for example, a thread's `resourceId`)
79
+ - `requestContext`: the current request context for advanced tenant resolution
80
+ - `metadata`: provider-specific metadata for the attempted action
81
81
 
82
82
  Return `undefined` from `deriveId()` to fall back to the original Mastra resource ID.
83
83
 
@@ -263,7 +263,7 @@ Autonomous and scheduled agents run without an end user. Mark these calls with a
263
263
  - `true` or `{ actorKind: 'system' }` identifies an anonymous system actor.
264
264
  - The object form can also carry `agentId`, `permissions`, and `scope` to identify and constrain the acting agent.
265
265
 
266
- By default, a trusted actor skips the user-centric `require()` check after a tenant-scope check. To enforce per-agent least privilege, implement the optional `requireActor` method on your provider. It receives the actor and the same `FGACheckParams` as `require`, and throws `FGADeniedError` to deny. When your provider doesn't implement `requireActor`, the trusted-actor bypass is preserved, so adding it is backward compatible.
266
+ By default, a trusted actor skips the user-centric `require()` check after a tenant-scope check. To enforce per-agent least privilege, implement the optional `requireActor` method on your provider. It receives the actor and the same `FGACheckParams` as `require`, and throws `FGADeniedError` to deny. When your provider doesn't implement `requireActor`, the trusted-actor bypass is preserved, so adding it's backward compatible.
267
267
 
268
268
  ```typescript
269
269
  import { FGADeniedError } from '@mastra/core/auth/ee'
@@ -293,7 +293,7 @@ The actor signal is trusted input, so construct it server-side:
293
293
  - Establish tenant scope server-side. Built-in agent HTTP routes ignore a client-supplied `organizationId` in the request context, and the trusted-actor path requires an `organizationId` to be set.
294
294
  - Durable resume keeps its existing request-context recovery and merge behavior. This doesn't make a persisted actor trusted for a later workflow segment.
295
295
  - The tenant-scope check confirms that a trusted `organizationId` exists. It doesn't verify that `actor.agentId` belongs to that organization. When that relationship matters, verify it in `requireActor` using authoritative provider data.
296
- - Treat `actor.permissions` as a claim, not a grant. A provider that enforces least privilege resolves the agent's authoritative permissions from a trusted source, for example a manifest or your FGA backend keyed by `agentId`, rather than trusting the inline values.
296
+ - Treat `actor.permissions` as an unverified claim. Resolve authoritative grants from a trusted source. A provider that enforces least privilege resolves the agent's authoritative permissions from a trusted source, for example a manifest or your FGA backend keyed by `agentId`, rather than trusting the inline values.
297
297
  - Once a provider implements `requireActor`, errors from that method stop execution. Mastra doesn't fall back to organization-only authorization.
298
298
 
299
299
  ## Related
@@ -93,11 +93,11 @@ The `MastraAuthFirebase` class can be configured through constructor options or
93
93
  - `FIREBASE_SERVICE_ACCOUNT`: Path to Firebase service account JSON file
94
94
  - `FIRESTORE_DATABASE_ID` or `FIREBASE_DATABASE_ID`: Firestore database ID
95
95
 
96
- > **Note:** When constructor options aren't provided, the class automatically reads these environment variables. This means you can call `new MastraAuthFirebase()` without any arguments if your environment variables are properly configured.
96
+ > **Note:** When constructor options aren't provided, the class automatically reads these environment variables. As a result, you can call `new MastraAuthFirebase()` without any arguments if your environment variables are properly configured.
97
97
 
98
98
  ### User Authorization
99
99
 
100
- By default, `MastraAuthFirebase` uses Firestore to manage user access. It expects a collection named `user_access` with documents keyed by user UIDs. The presence of a document in this collection determines whether a user is authorized.
100
+ By default, `MastraAuthFirebase` uses Firestore to manage user access. It expects a `user_access` collection with documents keyed by user UIDs. The presence of a document in this collection determines whether a user is authorized.
101
101
 
102
102
  ```text
103
103
  user_access/
@@ -13,7 +13,7 @@ The `SimpleAuth` class provides token-based authentication using a basic token-t
13
13
 
14
14
  ## Installation
15
15
 
16
- `SimpleAuth` is included in `@mastra/core`, no additional packages required.
16
+ `SimpleAuth` is included in `@mastra/core` and requires no additional packages.
17
17
 
18
18
  ```typescript
19
19
  import { SimpleAuth } from '@mastra/core/server'