@mastra/mcp-docs-server 1.3.10-alpha.6 → 1.3.10-alpha.8

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 (440) hide show
  1. package/.docs/docs/agents/guardrails.md +8 -0
  2. package/.docs/docs/agents/human-in-the-loop.md +9 -0
  3. package/.docs/docs/agents/processors.md +3 -0
  4. package/.docs/docs/agents/tools.md +5 -0
  5. package/.docs/docs/channels.md +15 -0
  6. package/.docs/docs/deployment/mastra-server.md +2 -0
  7. package/.docs/docs/deployment/monorepo.md +2 -0
  8. package/.docs/docs/evals/overview.md +2 -0
  9. package/.docs/docs/harness/background-tasks.md +4 -0
  10. package/.docs/docs/harness/durable-agents.md +5 -0
  11. package/.docs/docs/harness/goals.md +2 -0
  12. package/.docs/docs/harness/schedules.md +5 -0
  13. package/.docs/docs/mastra-platform/connect/providers.md +27 -26
  14. package/.docs/docs/mastra-platform/deploy.md +2 -0
  15. package/.docs/docs/mastra-platform/server.md +10 -6
  16. package/.docs/docs/mastra-platform/studio.md +1 -1
  17. package/.docs/docs/mastra-platform/system-environment-variables.md +3 -0
  18. package/.docs/docs/mastra-platform/workspaces.md +1 -1
  19. package/.docs/docs/memory/message-history.md +3 -0
  20. package/.docs/docs/memory/observational-memory.md +10 -0
  21. package/.docs/docs/memory/overview.md +6 -0
  22. package/.docs/docs/memory/semantic-recall.md +5 -1
  23. package/.docs/docs/observability/integrations/exporters/mastra-storage.md +2 -1
  24. package/.docs/docs/observability/logging.md +3 -0
  25. package/.docs/docs/observability/tracing/overview.md +16 -0
  26. package/.docs/docs/sandbox/search.md +11 -0
  27. package/.docs/docs/server/custom-adapters.md +53 -1
  28. package/.docs/docs/server/custom-api-routes.md +2 -0
  29. package/.docs/docs/server/request-context.md +6 -0
  30. package/.docs/docs/subagents.md +7 -1
  31. package/.docs/docs/workflows/agents-and-tools.md +16 -1
  32. package/.docs/docs/workflows/control-flow.md +57 -0
  33. package/.docs/docs/workflows/human-in-the-loop.md +3 -0
  34. package/.docs/docs/workflows/overview.md +9 -1
  35. package/.docs/docs/workflows/scheduled-workflows.md +10 -2
  36. package/.docs/docs/workflows/suspend-and-resume.md +6 -0
  37. package/.docs/docs/workflows/workflow-state.md +12 -0
  38. package/.docs/integrations/agentic-ui/copilotkit.md +2 -0
  39. package/.docs/integrations/auth/better-auth.md +2 -0
  40. package/.docs/integrations/auth/google.md +2 -0
  41. package/.docs/integrations/auth/okta.md +2 -0
  42. package/.docs/integrations/databases/aurora-dsql.md +2 -2
  43. package/.docs/integrations/databases/dynamodb.md +4 -4
  44. package/.docs/integrations/databases/postgresql.md +4 -4
  45. package/.docs/integrations/deploy/inngest.md +1 -0
  46. package/.docs/integrations/file-storage/archil.md +3 -3
  47. package/.docs/integrations/file-storage/mesa.md +1 -1
  48. package/.docs/integrations/observability/datadog.md +5 -0
  49. package/.docs/integrations/observability/langsmith.md +33 -0
  50. package/.docs/integrations/observability/sentry.md +22 -22
  51. package/.docs/integrations/sandboxes/cloudflare-sandbox.md +1 -1
  52. package/.docs/integrations/sandboxes/daytona.md +3 -3
  53. package/.docs/integrations/sandboxes/docker.md +1 -1
  54. package/.docs/integrations/sandboxes/e2b.md +5 -5
  55. package/.docs/integrations/sandboxes/modal.md +3 -3
  56. package/.docs/integrations/sandboxes/railway.md +3 -3
  57. package/.docs/integrations/sandboxes/vercel.md +4 -4
  58. package/.docs/integrations/tools/brightdata.md +1 -1
  59. package/.docs/integrations/tools/parallel.md +3 -3
  60. package/.docs/integrations/tools/perplexity.md +1 -1
  61. package/.docs/integrations/tools/tavily.md +1 -1
  62. package/.docs/integrations/voice/azure.md +4 -4
  63. package/.docs/integrations/voice/cloudflare.md +3 -3
  64. package/.docs/integrations/voice/deepgram.md +2 -2
  65. package/.docs/integrations/voice/elevenlabs.md +4 -4
  66. package/.docs/integrations/voice/gladia.md +10 -10
  67. package/.docs/integrations/voice/google.md +11 -11
  68. package/.docs/integrations/voice/inworld.md +23 -23
  69. package/.docs/integrations/voice/livekit.md +9 -6
  70. package/.docs/integrations/voice/mistral.md +2 -2
  71. package/.docs/integrations/voice/modelslab.md +1 -1
  72. package/.docs/integrations/voice/murf.md +1 -1
  73. package/.docs/integrations/voice/openai.md +5 -5
  74. package/.docs/integrations/voice/sarvam.md +6 -6
  75. package/.docs/integrations/voice/speechify.md +25 -12
  76. package/.docs/integrations/voice/xai.md +3 -3
  77. package/.docs/models/gateways/merge-gateway.md +2 -1
  78. package/.docs/models/gateways/neon.md +2 -1
  79. package/.docs/models/gateways/netlify.md +2 -5
  80. package/.docs/models/gateways/openrouter.md +3 -4
  81. package/.docs/models/gateways/vercel.md +3 -1
  82. package/.docs/models/index.md +7 -1
  83. package/.docs/models/providers/302ai.md +4 -0
  84. package/.docs/models/providers/abacus.md +4 -0
  85. package/.docs/models/providers/abliteration-ai.md +4 -0
  86. package/.docs/models/providers/above.md +4 -0
  87. package/.docs/models/providers/agentrouter.md +4 -0
  88. package/.docs/models/providers/agnes.md +4 -0
  89. package/.docs/models/providers/ai-router.md +4 -0
  90. package/.docs/models/providers/ai21.md +4 -0
  91. package/.docs/models/providers/aiand.md +8 -7
  92. package/.docs/models/providers/aimlapi.md +8 -10
  93. package/.docs/models/providers/ainetcafe.md +4 -0
  94. package/.docs/models/providers/aixy.md +4 -0
  95. package/.docs/models/providers/aki-io.md +4 -0
  96. package/.docs/models/providers/alibaba-cn.md +4 -0
  97. package/.docs/models/providers/alibaba-coding-plan-cn.md +4 -0
  98. package/.docs/models/providers/alibaba-coding-plan.md +4 -0
  99. package/.docs/models/providers/alibaba-token-plan-cn.md +4 -0
  100. package/.docs/models/providers/alibaba-token-plan.md +4 -0
  101. package/.docs/models/providers/alibaba.md +4 -0
  102. package/.docs/models/providers/ambient.md +4 -0
  103. package/.docs/models/providers/amd.md +4 -0
  104. package/.docs/models/providers/anthropic.md +4 -0
  105. package/.docs/models/providers/anyapi.md +4 -0
  106. package/.docs/models/providers/arcee.md +4 -0
  107. package/.docs/models/providers/atomic-chat.md +4 -0
  108. package/.docs/models/providers/auriko.md +4 -0
  109. package/.docs/models/providers/bailing.md +4 -0
  110. package/.docs/models/providers/baseten.md +4 -0
  111. package/.docs/models/providers/bee.md +4 -0
  112. package/.docs/models/providers/berget.md +4 -0
  113. package/.docs/models/providers/blueclaw.md +4 -0
  114. package/.docs/models/providers/bothub.md +4 -0
  115. package/.docs/models/providers/boundless.md +4 -0
  116. package/.docs/models/providers/cerebras.md +4 -0
  117. package/.docs/models/providers/chutes.md +16 -11
  118. package/.docs/models/providers/clarifai.md +4 -0
  119. package/.docs/models/providers/claudinio.md +4 -0
  120. package/.docs/models/providers/cline-pass.md +4 -0
  121. package/.docs/models/providers/cloudferro-sherlock.md +4 -0
  122. package/.docs/models/providers/cloudflare-workers-ai.md +4 -0
  123. package/.docs/models/providers/commandcode.md +6 -1
  124. package/.docs/models/providers/coralbricks.md +4 -0
  125. package/.docs/models/providers/cortecs.md +4 -0
  126. package/.docs/models/providers/crof.md +4 -0
  127. package/.docs/models/providers/crossmodel.md +4 -0
  128. package/.docs/models/providers/crusoe.md +4 -0
  129. package/.docs/models/providers/daoxe.md +4 -0
  130. package/.docs/models/providers/databricks.md +4 -0
  131. package/.docs/models/providers/deepinfra.md +4 -0
  132. package/.docs/models/providers/deepseek.md +4 -0
  133. package/.docs/models/providers/digitalocean.md +4 -0
  134. package/.docs/models/providers/dinference.md +4 -0
  135. package/.docs/models/providers/drun.md +4 -0
  136. package/.docs/models/providers/ebcloud.md +4 -0
  137. package/.docs/models/providers/echo.md +4 -0
  138. package/.docs/models/providers/edenai.md +11 -8
  139. package/.docs/models/providers/empiriolabs.md +8 -4
  140. package/.docs/models/providers/engy.md +4 -0
  141. package/.docs/models/providers/evroc.md +4 -0
  142. package/.docs/models/providers/fastrouter.md +4 -0
  143. package/.docs/models/providers/firepass.md +4 -0
  144. package/.docs/models/providers/fireworks-ai.md +4 -0
  145. package/.docs/models/providers/firmware.md +4 -0
  146. package/.docs/models/providers/freemodel.md +4 -0
  147. package/.docs/models/providers/friendli.md +4 -0
  148. package/.docs/models/providers/frogbot.md +4 -0
  149. package/.docs/models/providers/github-models.md +4 -0
  150. package/.docs/models/providers/gmicloud.md +4 -0
  151. package/.docs/models/providers/google.md +4 -0
  152. package/.docs/models/providers/greenpt.md +4 -0
  153. package/.docs/models/providers/groq.md +4 -0
  154. package/.docs/models/providers/helicone.md +4 -0
  155. package/.docs/models/providers/hetzner.md +4 -0
  156. package/.docs/models/providers/hpc-ai.md +4 -0
  157. package/.docs/models/providers/huggingface.md +6 -1
  158. package/.docs/models/providers/hyper.md +4 -0
  159. package/.docs/models/providers/iflowcn.md +4 -0
  160. package/.docs/models/providers/impossibl.md +4 -0
  161. package/.docs/models/providers/inception.md +4 -0
  162. package/.docs/models/providers/inceptron.md +10 -6
  163. package/.docs/models/providers/inco.md +4 -0
  164. package/.docs/models/providers/infer.md +4 -0
  165. package/.docs/models/providers/inference.md +4 -0
  166. package/.docs/models/providers/inferx.md +4 -0
  167. package/.docs/models/providers/infomaniak.md +4 -0
  168. package/.docs/models/providers/io-net.md +4 -0
  169. package/.docs/models/providers/iteracompute.md +4 -0
  170. package/.docs/models/providers/jalapeno.md +4 -0
  171. package/.docs/models/providers/jiekou.md +4 -0
  172. package/.docs/models/providers/kenari.md +4 -0
  173. package/.docs/models/providers/kilo.md +21 -18
  174. package/.docs/models/providers/kimi-code-plan-cn.md +4 -0
  175. package/.docs/models/providers/kimi-code-plan-global.md +4 -0
  176. package/.docs/models/providers/kimi-for-coding.md +4 -0
  177. package/.docs/models/providers/kiro.md +4 -0
  178. package/.docs/models/providers/klokintegration.md +4 -0
  179. package/.docs/models/providers/kosmik.md +4 -0
  180. package/.docs/models/providers/kuae-cloud-coding-plan.md +4 -0
  181. package/.docs/models/providers/lilac.md +4 -0
  182. package/.docs/models/providers/liquid.md +4 -0
  183. package/.docs/models/providers/llama.md +4 -0
  184. package/.docs/models/providers/llmgateway-providers.md +8 -3
  185. package/.docs/models/providers/llmgateway.md +7 -2
  186. package/.docs/models/providers/llmtech.md +4 -0
  187. package/.docs/models/providers/llmtr.md +4 -0
  188. package/.docs/models/providers/lmstudio.md +4 -0
  189. package/.docs/models/providers/longcat.md +4 -0
  190. package/.docs/models/providers/lowrouter.md +6 -1
  191. package/.docs/models/providers/lucidquery.md +4 -0
  192. package/.docs/models/providers/lynkr.md +4 -0
  193. package/.docs/models/providers/meganova.md +4 -0
  194. package/.docs/models/providers/melious.md +4 -0
  195. package/.docs/models/providers/meta.md +4 -0
  196. package/.docs/models/providers/minimax-cn-coding-plan.md +4 -0
  197. package/.docs/models/providers/minimax-cn.md +4 -0
  198. package/.docs/models/providers/minimax-coding-plan.md +4 -0
  199. package/.docs/models/providers/minimax.md +4 -0
  200. package/.docs/models/providers/mistral.md +4 -0
  201. package/.docs/models/providers/mixlayer.md +4 -0
  202. package/.docs/models/providers/moark.md +4 -0
  203. package/.docs/models/providers/modal.md +4 -0
  204. package/.docs/models/providers/model-oracle-ai.md +4 -0
  205. package/.docs/models/providers/modelis.md +4 -0
  206. package/.docs/models/providers/modelscope.md +4 -0
  207. package/.docs/models/providers/moonshotai-cn.md +4 -0
  208. package/.docs/models/providers/moonshotai.md +4 -0
  209. package/.docs/models/providers/morph.md +18 -6
  210. package/.docs/models/providers/munito-eu.md +4 -0
  211. package/.docs/models/providers/munito.md +4 -0
  212. package/.docs/models/providers/nan.md +4 -0
  213. package/.docs/models/providers/nano-gpt.md +41 -34
  214. package/.docs/models/providers/nearai.md +5 -1
  215. package/.docs/models/providers/nebius.md +4 -0
  216. package/.docs/models/providers/neosmith.md +4 -0
  217. package/.docs/models/providers/neuralwatt.md +4 -0
  218. package/.docs/models/providers/nova.md +4 -0
  219. package/.docs/models/providers/novita-ai.md +4 -0
  220. package/.docs/models/providers/nvidia.md +4 -0
  221. package/.docs/models/providers/oci.md +4 -0
  222. package/.docs/models/providers/ofox.md +4 -0
  223. package/.docs/models/providers/ollama-cloud.md +4 -0
  224. package/.docs/models/providers/openai.md +6 -1
  225. package/.docs/models/providers/opencode-go.md +4 -0
  226. package/.docs/models/providers/opencode.md +4 -1
  227. package/.docs/models/providers/openreason.md +4 -0
  228. package/.docs/models/providers/opper.md +4 -0
  229. package/.docs/models/providers/orcarouter.md +4 -0
  230. package/.docs/models/providers/ovhcloud.md +4 -0
  231. package/.docs/models/providers/pareto.md +4 -0
  232. package/.docs/models/providers/pendra.md +4 -0
  233. package/.docs/models/providers/perplexity-agent.md +4 -0
  234. package/.docs/models/providers/perplexity.md +4 -0
  235. package/.docs/models/providers/pioneer.md +4 -0
  236. package/.docs/models/providers/poe.md +4 -0
  237. package/.docs/models/providers/poolside.md +4 -0
  238. package/.docs/models/providers/prime.md +4 -0
  239. package/.docs/models/providers/privatemode-ai.md +4 -0
  240. package/.docs/models/providers/qihang-ai.md +4 -0
  241. package/.docs/models/providers/qiniu-ai.md +4 -0
  242. package/.docs/models/providers/reflection.md +4 -0
  243. package/.docs/models/providers/regolo-ai.md +4 -0
  244. package/.docs/models/providers/requesty.md +8 -1
  245. package/.docs/models/providers/routing-run.md +4 -0
  246. package/.docs/models/providers/runinfra.md +4 -0
  247. package/.docs/models/providers/sakana.md +4 -0
  248. package/.docs/models/providers/sambanova.md +4 -0
  249. package/.docs/models/providers/sarvam.md +4 -0
  250. package/.docs/models/providers/scaleway.md +4 -0
  251. package/.docs/models/providers/scnet-token-plan.md +4 -0
  252. package/.docs/models/providers/scx-ai.md +4 -0
  253. package/.docs/models/providers/scx.md +4 -0
  254. package/.docs/models/providers/sensenova.md +4 -0
  255. package/.docs/models/providers/siliconflow-cn.md +4 -0
  256. package/.docs/models/providers/siliconflow.md +4 -0
  257. package/.docs/models/providers/snowflake-cortex.md +4 -0
  258. package/.docs/models/providers/stackit.md +4 -0
  259. package/.docs/models/providers/standardcompute.md +4 -0
  260. package/.docs/models/providers/stepfun-ai-step-plan.md +4 -0
  261. package/.docs/models/providers/stepfun-ai.md +4 -0
  262. package/.docs/models/providers/stepfun-step-plan.md +4 -0
  263. package/.docs/models/providers/stepfun.md +4 -0
  264. package/.docs/models/providers/subconscious.md +4 -0
  265. package/.docs/models/providers/submodel.md +4 -0
  266. package/.docs/models/providers/synthetic.md +4 -0
  267. package/.docs/models/providers/tempr.md +4 -0
  268. package/.docs/models/providers/tencent-coding-plan.md +4 -0
  269. package/.docs/models/providers/tencent-token-plan.md +4 -0
  270. package/.docs/models/providers/tencent-tokenhub.md +4 -0
  271. package/.docs/models/providers/tensorx.md +4 -0
  272. package/.docs/models/providers/the-grid-ai.md +4 -0
  273. package/.docs/models/providers/thinkingmachines.md +4 -0
  274. package/.docs/models/providers/tinfoil.md +4 -0
  275. package/.docs/models/providers/togetherai.md +4 -0
  276. package/.docs/models/providers/tokengo.md +4 -0
  277. package/.docs/models/providers/tokenrouter.md +4 -0
  278. package/.docs/models/providers/trustedrouter.md +4 -0
  279. package/.docs/models/providers/umans-ai-coding-plan.md +4 -0
  280. package/.docs/models/providers/umans-ai.md +4 -0
  281. package/.docs/models/providers/unorouter.md +4 -0
  282. package/.docs/models/providers/upstage.md +4 -0
  283. package/.docs/models/providers/vancine.md +4 -0
  284. package/.docs/models/providers/vispark.md +4 -0
  285. package/.docs/models/providers/vivgrid.md +4 -0
  286. package/.docs/models/providers/volcengine-coding-plan.md +4 -0
  287. package/.docs/models/providers/volcengine.md +4 -0
  288. package/.docs/models/providers/vultr.md +4 -0
  289. package/.docs/models/providers/wafer.ai.md +4 -0
  290. package/.docs/models/providers/wallaby.md +4 -0
  291. package/.docs/models/providers/wandb.md +9 -5
  292. package/.docs/models/providers/xai.md +4 -0
  293. package/.docs/models/providers/xiaomi-token-plan-ams.md +4 -0
  294. package/.docs/models/providers/xiaomi-token-plan-cn.md +4 -0
  295. package/.docs/models/providers/xiaomi-token-plan-sgp.md +4 -0
  296. package/.docs/models/providers/xiaomi.md +4 -0
  297. package/.docs/models/providers/xpersona.md +4 -0
  298. package/.docs/models/providers/zai-coding-plan.md +4 -0
  299. package/.docs/models/providers/zai.md +4 -0
  300. package/.docs/models/providers/zeldoc.md +4 -0
  301. package/.docs/models/providers/zenifra.md +4 -0
  302. package/.docs/models/providers/zenmux.md +4 -0
  303. package/.docs/models/providers/zhipuai-coding-plan.md +4 -0
  304. package/.docs/models/providers/zhipuai.md +4 -0
  305. package/.docs/reference/acp/acp-agent.md +1 -1
  306. package/.docs/reference/acp/create-acp-tool.md +1 -1
  307. package/.docs/reference/agent-controller/agent-controller-class.md +1 -1
  308. package/.docs/reference/agents/agent.md +3 -1
  309. package/.docs/reference/agents/channels.md +23 -4
  310. package/.docs/reference/agents/createSkill.md +1 -1
  311. package/.docs/reference/agents/durable-agent.md +1 -1
  312. package/.docs/reference/agents/generate.md +4 -1
  313. package/.docs/reference/agents/generateLegacy.md +2 -2
  314. package/.docs/reference/ai-sdk/to-ai-sdk-v4-messages.md +1 -1
  315. package/.docs/reference/auth/auth0.md +2 -2
  316. package/.docs/reference/auth/better-auth.md +7 -3
  317. package/.docs/reference/auth/clerk.md +1 -1
  318. package/.docs/reference/auth/firebase.md +4 -4
  319. package/.docs/reference/auth/google.md +6 -6
  320. package/.docs/reference/auth/jwt.md +1 -1
  321. package/.docs/reference/auth/neon.md +6 -6
  322. package/.docs/reference/auth/okta.md +9 -8
  323. package/.docs/reference/auth/workos.md +3 -3
  324. package/.docs/reference/browser/agent-browser.md +1 -1
  325. package/.docs/reference/browser/firecrawl-browser.md +1 -1
  326. package/.docs/reference/browser/stagehand-browser.md +1 -1
  327. package/.docs/reference/channels/slack-provider.md +4 -2
  328. package/.docs/reference/channels/teams-provider.md +2 -2
  329. package/.docs/reference/channels/telegram-provider.md +2 -2
  330. package/.docs/reference/client-js/agent-controller.md +3 -0
  331. package/.docs/reference/client-js/agents.md +2 -0
  332. package/.docs/reference/client-js/conversations.md +3 -3
  333. package/.docs/reference/client-js/observability.md +13 -14
  334. package/.docs/reference/client-js/responses.md +4 -4
  335. package/.docs/reference/client-js/workflows.md +2 -0
  336. package/.docs/reference/code-sdk/mount-agent-controller.md +2 -2
  337. package/.docs/reference/coding-agent/create-coding-agent.md +1 -1
  338. package/.docs/reference/connect/channels.md +1 -1
  339. package/.docs/reference/connect/providers.md +166 -112
  340. package/.docs/reference/connect/tools.md +9 -9
  341. package/.docs/reference/core/mastra-class.md +4 -2
  342. package/.docs/reference/core/mastra-model-gateway.md +6 -1
  343. package/.docs/reference/datasets/startExperiment.md +2 -2
  344. package/.docs/reference/deployer.md +6 -3
  345. package/.docs/reference/editor/blob-store-provider.md +2 -2
  346. package/.docs/reference/editor/tool-provider.md +1 -1
  347. package/.docs/reference/evals/answer-relevancy.md +2 -2
  348. package/.docs/reference/evals/answer-similarity.md +4 -2
  349. package/.docs/reference/evals/bias.md +2 -2
  350. package/.docs/reference/evals/content-similarity.md +2 -2
  351. package/.docs/reference/evals/hallucination.md +3 -3
  352. package/.docs/reference/evals/noise-sensitivity.md +1 -1
  353. package/.docs/reference/evals/prompt-alignment.md +10 -9
  354. package/.docs/reference/evals/scorer-utils.md +6 -4
  355. package/.docs/reference/evals/tone-consistency.md +5 -5
  356. package/.docs/reference/evals/tool-call-accuracy.md +4 -4
  357. package/.docs/reference/evals/trajectory-accuracy.md +1 -1
  358. package/.docs/reference/file-based-agents/schedules.md +1 -1
  359. package/.docs/reference/logging/pino-logger.md +1 -1
  360. package/.docs/reference/memory/memory-class.md +2 -2
  361. package/.docs/reference/memory/observational-memory.md +10 -10
  362. package/.docs/reference/memory/summarizeConversation.md +1 -1
  363. package/.docs/reference/memory/summarizeThread.md +1 -1
  364. package/.docs/reference/migrations/upgrade-to-v1/storage.md +1 -1
  365. package/.docs/reference/migrations/upgrade-to-v1/tools.md +7 -1
  366. package/.docs/reference/migrations/vnext-to-standard-apis.md +1 -1
  367. package/.docs/reference/observability/metrics/automatic-metrics.md +10 -8
  368. package/.docs/reference/observability/tracing/exporters/confident-ai.md +2 -2
  369. package/.docs/reference/observability/tracing/exporters/console-exporter.md +3 -3
  370. package/.docs/reference/observability/tracing/exporters/default-exporter.md +1 -1
  371. package/.docs/reference/observability/tracing/exporters/langsmith.md +8 -0
  372. package/.docs/reference/observability/tracing/exporters/mastra-platform-exporter.md +4 -0
  373. package/.docs/reference/observability/tracing/exporters/mastra-storage-exporter.md +5 -1
  374. package/.docs/reference/observability/tracing/exporters/sentry.md +5 -5
  375. package/.docs/reference/observability/tracing/interfaces.md +21 -1
  376. package/.docs/reference/processors/batch-parts-processor.md +1 -1
  377. package/.docs/reference/processors/classifier-processor.md +1 -1
  378. package/.docs/reference/processors/file-upload-processor.md +4 -4
  379. package/.docs/reference/processors/processor-interface.md +5 -5
  380. package/.docs/reference/processors/response-cache.md +1 -1
  381. package/.docs/reference/processors/stream-error-retry-processor.md +9 -5
  382. package/.docs/reference/processors/tool-search-processor.md +2 -2
  383. package/.docs/reference/processors/unicode-normalizer.md +1 -1
  384. package/.docs/reference/rag/chunking-and-embedding.md +1 -1
  385. package/.docs/reference/rag/database-config.md +20 -15
  386. package/.docs/reference/rag/extract-params.md +2 -2
  387. package/.docs/reference/rag/retrieval.md +11 -0
  388. package/.docs/reference/schedules/overview.md +17 -1
  389. package/.docs/reference/server/koa-adapter.md +2 -0
  390. package/.docs/reference/storage/overview.md +30 -13
  391. package/.docs/reference/streaming/agents/MastraModelOutput.md +3 -3
  392. package/.docs/reference/streaming/agents/stream.md +1 -1
  393. package/.docs/reference/streaming/agents/streamLegacy.md +2 -2
  394. package/.docs/reference/streaming/workflows/resumeStream.md +1 -1
  395. package/.docs/reference/tools/ask-user-tool.md +1 -1
  396. package/.docs/reference/tools/bedrock-kb-tool.md +2 -2
  397. package/.docs/reference/tools/create-code-mode.md +1 -1
  398. package/.docs/reference/tools/document-chunker-tool.md +1 -1
  399. package/.docs/reference/tools/mcp-client.md +5 -5
  400. package/.docs/reference/tools/mcp-server.md +2 -2
  401. package/.docs/reference/tools/task-tools.md +3 -1
  402. package/.docs/reference/tools/vector-query-tool.md +1 -0
  403. package/.docs/reference/vectors/astra.md +3 -1
  404. package/.docs/reference/vectors/azure-ai-search.md +2 -2
  405. package/.docs/reference/vectors/chroma.md +2 -2
  406. package/.docs/reference/vectors/convex.md +1 -1
  407. package/.docs/reference/vectors/couchbase.md +12 -5
  408. package/.docs/reference/vectors/duckdb.md +5 -5
  409. package/.docs/reference/vectors/mongodb.md +6 -6
  410. package/.docs/reference/vectors/pg.md +1 -1
  411. package/.docs/reference/vectors/pinecone.md +1 -1
  412. package/.docs/reference/vectors/qdrant.md +1 -1
  413. package/.docs/reference/vectors/s3vectors.md +3 -0
  414. package/.docs/reference/vectors/upstash.md +8 -4
  415. package/.docs/reference/vectors/vectorize.md +4 -2
  416. package/.docs/reference/vectors/weaviate.md +1 -1
  417. package/.docs/reference/voice/voice.send.md +1 -1
  418. package/.docs/reference/voice/voice.speak.md +1 -1
  419. package/.docs/reference/voice/voice.updateConfig.md +1 -1
  420. package/.docs/reference/workflows/run-methods/restart.md +1 -1
  421. package/.docs/reference/workflows/run-methods/resume.md +1 -1
  422. package/.docs/reference/workflows/run-methods/start.md +1 -1
  423. package/.docs/reference/workflows/run.md +2 -2
  424. package/.docs/reference/workflows/step.md +4 -0
  425. package/.docs/reference/workflows/workflow-methods/agent.md +2 -0
  426. package/.docs/reference/workflows/workflow-methods/classifier.md +5 -0
  427. package/.docs/reference/workflows/workflow-methods/dountil.md +1 -1
  428. package/.docs/reference/workflows/workflow-methods/map.md +2 -0
  429. package/.docs/reference/workflows/workflow.md +2 -2
  430. package/.docs/reference/workspace/factory-sandbox.md +11 -2
  431. package/.docs/reference/workspace/filesystem.md +2 -2
  432. package/.docs/reference/workspace/local-sandbox.md +3 -3
  433. package/.docs/reference/workspace/platform-filesystem.md +3 -3
  434. package/.docs/reference/workspace/platform-sandbox.md +10 -8
  435. package/.docs/reference/workspace/workspace-class.md +12 -12
  436. package/dist/index.js +1 -1
  437. package/dist/{src-DnH_jHt9.js → src-Cv7bX2-6.js} +10 -19
  438. package/dist/{src-DnH_jHt9.js.map → src-Cv7bX2-6.js.map} +1 -1
  439. package/dist/stdio.js +2 -3
  440. package/package.json +10 -10
@@ -55,7 +55,7 @@ type TracingStorageStrategy = 'realtime' | 'batch-with-updates' | 'insert-only'
55
55
 
56
56
  - **realtime**: Immediately persists each event to storage
57
57
  - **batch-with-updates**: Batches creates and updates separately, applies in order
58
- - **insert-only**: Only processes SPAN\_ENDED events, ignores updates
58
+ - **insert-only**: Only processes SPAN_ENDED events, ignores updates
59
59
 
60
60
  ## Properties
61
61
 
@@ -86,6 +86,14 @@ const exporter = new LangSmithExporter({
86
86
  | `PROVIDER_TOOL_CALL` | `tool` |
87
87
  | All others | `chain` |
88
88
 
89
+ ## `langsmithRunIdFor`
90
+
91
+ ```typescript
92
+ function langsmithRunIdFor(spanId: string): string
93
+ ```
94
+
95
+ Returns the LangSmith run id the exporter uses for a Mastra span id. Scores submitted with `mastra.observability.addScore()` are attached to these runs as feedback, so no in-process state is needed.
96
+
89
97
  ## `withLangsmithMetadata`
90
98
 
91
99
  Helper function to add LangSmith-specific metadata to tracing options.
@@ -10,6 +10,10 @@ Sends tracing spans, logs, metrics, scores, and feedback to the Mastra platform
10
10
 
11
11
  > **Note:** `MastraPlatformExporter` was previously called `CloudExporter`. The original `CloudExporter` class is still exported from `@mastra/observability` so existing imports keep working, but it's deprecated and will be removed in a future major version. New code should use `MastraPlatformExporter`.
12
12
 
13
+ ## Span previews
14
+
15
+ `MastraPlatformExporter` automatically generates short, readable `inputPreview`, `outputPreview`, and `errorPreview` summaries based on the span type. Each preview contains up to 100 characters plus an ellipsis when truncated. Full payloads remain available separately.
16
+
13
17
  ## Constructor
14
18
 
15
19
  ```typescript
@@ -8,6 +8,10 @@ Persists traces to Mastra's configured storage with automatic batching and retry
8
8
 
9
9
  > **Note:** `MastraStorageExporter` was previously called `DefaultExporter`. The original `DefaultExporter` class is still exported from `@mastra/observability` so existing imports keep working, but it's deprecated and will be removed in a future major version. New code should use `MastraStorageExporter`.
10
10
 
11
+ ## Span previews
12
+
13
+ `MastraStorageExporter` automatically generates short, readable `inputPreview`, `outputPreview`, and `errorPreview` summaries based on the span type. Each preview contains up to 100 characters plus an ellipsis when truncated. Full payloads remain available separately.
14
+
11
15
  ## Constructor
12
16
 
13
17
  ```typescript
@@ -53,7 +57,7 @@ type TracingStorageStrategy = 'realtime' | 'batch-with-updates' | 'insert-only'
53
57
 
54
58
  - **realtime**: Immediately persists each event to storage
55
59
  - **batch-with-updates**: Batches creates and updates separately, applies in order
56
- - **insert-only**: Only processes SPAN\_ENDED events, ignores updates
60
+ - **insert-only**: Only processes SPAN_ENDED events, ignores updates
57
61
 
58
62
  ## Properties
59
63
 
@@ -37,7 +37,7 @@ Extends `BaseExporterConfig`, which includes:
37
37
  async exportTracingEvent(event: TracingEvent): Promise<void>
38
38
  ```
39
39
 
40
- Exports a tracing event to Sentry. Handles SPAN\_STARTED, SPAN\_UPDATED, and SPAN\_ENDED events.
40
+ Exports a tracing event to Sentry. Handles SPAN_STARTED, SPAN_UPDATED, and SPAN_ENDED events.
41
41
 
42
42
  ### flush
43
43
 
@@ -131,7 +131,7 @@ Mastra span types are mapped to Sentry operations:
131
131
  | `PROCESSOR_RUN` | `ai.processor` |
132
132
  | `GENERIC` | `ai.span` |
133
133
 
134
- MODEL\_STEP and MODEL\_CHUNK spans are skipped to simplify trace hierarchy. Their data is aggregated into MODEL\_GENERATION spans.
134
+ MODEL_STEP and MODEL_CHUNK spans are skipped to simplify trace hierarchy. Their data is aggregated into MODEL_GENERATION spans.
135
135
 
136
136
  ## Environment variables
137
137
 
@@ -153,7 +153,7 @@ The exporter sets these standard OpenTelemetry attributes:
153
153
  - `ai.span.type`: Mastra span type
154
154
  - `gen_ai.conversation.id`: Chat thread identifier, set from `metadata.threadId` to group spans in Sentry's Conversations view
155
155
 
156
- **MODEL\_GENERATION spans:**
156
+ **MODEL_GENERATION spans:**
157
157
 
158
158
  - `gen_ai.operation.name`: `chat`
159
159
  - `gen_ai.system`: Model provider
@@ -169,7 +169,7 @@ The exporter sets these standard OpenTelemetry attributes:
169
169
  - `gen_ai.request.temperature`: Temperature parameter
170
170
  - `gen_ai.completion_start_time`: First token time
171
171
 
172
- **TOOL\_CALL spans:**
172
+ **TOOL_CALL spans:**
173
173
 
174
174
  - `gen_ai.operation.name`: `execute_tool`
175
175
  - `gen_ai.tool.name`: Tool identifier
@@ -179,7 +179,7 @@ The exporter sets these standard OpenTelemetry attributes:
179
179
  - `gen_ai.tool.output`: Tool output
180
180
  - `tool.success`: Success flag
181
181
 
182
- **AGENT\_RUN spans:**
182
+ **AGENT_RUN spans:**
183
183
 
184
184
  - `gen_ai.operation.name`: `invoke_agent`
185
185
  - `gen_ai.agent.name`: Agent identifier
@@ -362,7 +362,7 @@ Structured event emitted when the exporter pipeline drops observability events.
362
362
  ```typescript
363
363
  type ObservabilityDropSignal = 'tracing' | 'log' | 'metric' | 'score' | 'feedback'
364
364
 
365
- type ObservabilityDropReason = 'unsupported-storage' | 'retry-exhausted'
365
+ type ObservabilityDropReason = 'unsupported-storage' | 'retry-exhausted' | 'span-not-updatable'
366
366
 
367
367
  interface ObservabilityDropEvent {
368
368
  type: 'drop'
@@ -543,6 +543,16 @@ interface AgentRunAttributes {
543
543
  /** Maximum steps allowed */
544
544
  maxSteps?: number
545
545
 
546
+ /**
547
+ * Model the run was configured with, resolved at run preparation (call-time
548
+ * override, then agent config). The first enabled candidate of a fallback list.
549
+ * Never updated by later steps; see MODEL_STEP `model` for what each step ran.
550
+ */
551
+ model?: string
552
+
553
+ /** Provider of `model`, taken from the same model object */
554
+ provider?: string
555
+
546
556
  /** When the run's model streamed its first chunk, copied from the agent's own first generation */
547
557
  completionStartTime?: Date
548
558
  }
@@ -631,6 +641,16 @@ interface ModelStepAttributes {
631
641
  /** Index of this step in the generation (0, 1, 2, ...) */
632
642
  stepIndex?: number
633
643
 
644
+ /**
645
+ * Model actually invoked for this step, after per-step overrides (input
646
+ * processors, fallback). Recorded at invocation, so a failed provider call
647
+ * still carries it. Absent when no model was invoked, e.g. a cached response.
648
+ */
649
+ model?: string
650
+
651
+ /** Provider of `model`, taken from the same model object */
652
+ provider?: string
653
+
634
654
  /** Token usage statistics */
635
655
  usage?: UsageStats
636
656
 
@@ -34,7 +34,7 @@ const processor = new BatchPartsProcessor({
34
34
 
35
35
  **name** (`string`): Processor display name. Always Batch Parts.
36
36
 
37
- **processOutputStream** (`(args: { part: ChunkType; streamParts: ChunkType[]; state: Record<string, any>; abort: (reason?: string) => never }) => Promise<ChunkType | null>`): Processes streaming output parts to batch them together
37
+ **processOutputStream** (`(args: { part: ChunkType; streamParts: ChunkType[]; state: Record<string, any>; abort: (reason?: string) => never; writer?: { custom: (data: ChunkType) => Promise<void> } }) => Promise<ChunkType | null>`): Processes streaming output parts to batch them together
38
38
 
39
39
  **flush** (`(state?: BatchPartsState) => ChunkType | null`): Force flush any remaining batched parts when the stream ends
40
40
 
@@ -72,7 +72,7 @@ inputProcessors: [
72
72
 
73
73
  **options.lastMessageOnly** (`boolean`): When true, only the last message is classified in the input and output phases.
74
74
 
75
- **options.chunkWindow** (`number`): Non-negative integer number of trailing stream chunks to classify together, including the current text-delta chunk. A value of 0 classifies only the current chunk. Each text chunk triggers a classifier call, so larger windows increase cost.
75
+ **options.chunkWindow** (`number`): Non-negative integer number of trailing stream chunks to classify together, including the current text-delta chunk. A value of 0 classifies only the current chunk. Each text chunk triggers a classifier call unless the windowed text is whitespace-only, so larger windows increase cost.
76
76
 
77
77
  **options.maxInputLength** (`number`): Non-negative integer maximum number of characters sent to the classifier. Longer text is truncated.
78
78
 
@@ -186,19 +186,19 @@ The tripwire metadata has this shape:
186
186
 
187
187
  **processorId** (`'file-upload'`): Processor identifier.
188
188
 
189
- **code** (`FileUploadErrorCode`): One of the values of FILE\_UPLOAD\_ERROR\_CODES.
189
+ **code** (`FileUploadErrorCode`): One of the values of FILE_UPLOAD_ERROR_CODES.
190
190
 
191
191
  **fileName** (`string`): Name of the file that caused the stop, when a file did and it has a name.
192
192
 
193
193
  **mimeType** (`string`): MIME type of that file.
194
194
 
195
- **size** (`number`): Size of the file in bytes. Set with FILE\_TOO\_LARGE.
195
+ **size** (`number`): Size of the file in bytes. Set with FILE_TOO_LARGE.
196
196
 
197
- **maxFileSize** (`number`): Limit the file was checked against, in bytes. Set with FILE\_TOO\_LARGE.
197
+ **maxFileSize** (`number`): Limit the file was checked against, in bytes. Set with FILE_TOO_LARGE.
198
198
 
199
199
  **cause** (`string`): Message of the underlying error, or the invalid value returned by maxFileSize.
200
200
 
201
- **orphanPaths** (`string[]`): Sandbox paths that may still exist because cleanup after a failed upload did not succeed. Set with UPLOAD\_FAILED.
201
+ **orphanPaths** (`string[]`): Sandbox paths that may still exist because cleanup after a failed upload did not succeed. Set with UPLOAD_FAILED.
202
202
 
203
203
  `FILE_UPLOAD_ERROR_CODES` lists every code:
204
204
 
@@ -111,11 +111,11 @@ interface Processor<TId extends string = string, TTripwireMetadata = unknown> {
111
111
 
112
112
  **processDataParts** (`boolean`): When true, the processOutputStream method also receives data-\* chunks emitted by tools via writer.custom(). Defaults to false.
113
113
 
114
- **spanType** (`ProcessorSpanType`): Span type to trace this processor as, instead of the default PROCESSOR\_RUN. Use it when a processor belongs to a subsystem the user configured directly, so the trace names that subsystem rather than a pipeline phase. Restricted to span types whose attributes extend ProcessorPipelineAttributes, so the runtime can always record the processor position and message-list mutations on the span.
114
+ **spanType** (`ProcessorSpanType`): Span type to trace this processor as, instead of the default PROCESSOR_RUN. Use it when a processor belongs to a subsystem the user configured directly, so the trace names that subsystem rather than a pipeline phase. Restricted to span types whose attributes extend ProcessorPipelineAttributes, so the runtime can always record the processor position and message-list mutations on the span.
115
115
 
116
116
  **spanName** (`string | ((phase: ProcessorSpanPhase) => string)`): Span name, instead of the default \<phase> processor: \<id>. Pass a function to name each phase separately, which a processor that runs in more than one phase usually needs.
117
117
 
118
- **spanAttributes** (`Partial<SpanTypeMap[ProcessorSpanType]> | ((phase: ProcessorSpanPhase) => Partial<SpanTypeMap[ProcessorSpanType]>)`): Attributes set when the span is created. Needed when the declared span type has required attributes of its own, such as WORKSPACE\_ACTION.category. The pairing with spanType is not enforced by the type system.
118
+ **spanAttributes** (`Partial<SpanTypeMap[ProcessorSpanType]> | ((phase: ProcessorSpanPhase) => Partial<SpanTypeMap[ProcessorSpanType]>)`): Attributes set when the span is created. Needed when the declared span type has required attributes of its own, such as WORKSPACE_ACTION.category. The pairing with spanType is not enforced by the type system.
119
119
 
120
120
  **onViolation** (`(violation: ProcessorViolation) => void | Promise<void>`): Optional callback invoked when the processor detects a policy violation, regardless of strategy (block or warn). Use for side effects like alerting, logging to external systems, or emailing users. Errors thrown by this callback are silently caught to prevent interfering with processor logic. The violation object contains processorId, message, and a processor-specific detail field.
121
121
 
@@ -794,9 +794,9 @@ processToolResult?(args: ProcessToolResultArgs): ProcessorMessageResult;
794
794
 
795
795
  **args** (`unknown`): Arguments the LLM passed to the tool.
796
796
 
797
- **result** (`unknown`): Value returned by the tool. For client-executed tools this is the output of tool.execute() after it has passed through ensureSerializable. For provider-executed tools (e.g. Anthropic web\_search) it is the raw result from the provider stream, which is not run through ensureSerializable.
797
+ **result** (`unknown`): Value returned by the tool. For client-executed tools this is the output of tool.execute() after it has passed through ensureSerializable. For provider-executed tools (e.g. Anthropic web_search) it is the raw result from the provider stream, which is not run through ensureSerializable.
798
798
 
799
- **providerExecuted** (`boolean`): Whether this result came from a provider-executed tool such as Anthropic web\_search. Defaults to undefined for client-executed tools.
799
+ **providerExecuted** (`boolean`): Whether this result came from a provider-executed tool such as Anthropic web_search. Defaults to undefined for client-executed tools.
800
800
 
801
801
  **systemMessages** (`CoreMessage[]`): All system messages for read access.
802
802
 
@@ -1212,7 +1212,7 @@ await agent.stream('Summarize this', {
1212
1212
  })
1213
1213
  ```
1214
1214
 
1215
- `maxProcessorRetries` passed on the call overrides the agent default. If neither is set, processor-requested retries are treated as aborts.
1215
+ `maxProcessorRetries` passed on the call overrides the agent default. If neither is set, retries requested by input and output processors are treated as aborts, while error processors (such as [`StreamErrorRetryProcessor`](https://mastra.ai/reference/processors/stream-error-retry-processor)) are capped at 3 retries.
1216
1216
 
1217
1217
  ## Related
1218
1218
 
@@ -49,7 +49,7 @@ See [Response caching](https://mastra.ai/docs/agents/processors) for the concept
49
49
 
50
50
  **ttl** (`number`): Time-to-live (seconds) for entries written by this processor. Defaults to 300 seconds (5 minutes), matching OpenRouter's reference implementation. (Default: `300`)
51
51
 
52
- **scope** (`string | null`): Tenant scope appended to the cache key. null opts out of scoping. When omitted, the processor falls back to the resource id resolved from the request context (MASTRA\_RESOURCE\_ID\_KEY) for automatic per-user isolation.
52
+ **scope** (`string | null`): Tenant scope appended to the cache key. null opts out of scoping. When omitted, the processor falls back to the resource id resolved from the request context (MASTRA_RESOURCE_ID_KEY) for automatic per-user isolation.
53
53
 
54
54
  **key** (`string | (inputs: ResponseCacheKeyInputs) => string | Promise<string>`): Override the auto-derived cache key. Pass a string to pin a key, or a function that receives { agentId, scope, model, prompt, stepNumber } and returns a key. If the function throws, the processor falls back to the deterministic hash so the call still benefits from caching.
55
55
 
@@ -32,14 +32,18 @@ To run only the processors you configure, with none of the defaults merged in, s
32
32
 
33
33
  ## How it works
34
34
 
35
- The processor checks the error and its cause chain for:
35
+ The processor checks the error and its cause chain, in this order, for:
36
36
 
37
- - Provider retry metadata: `isRetryable === true`
38
- - Built-in OpenAI Responses stream error matching
39
37
  - Matcher results: Any configured matcher that returns `true`
38
+ - Built-in OpenAI Responses stream error matching
39
+ - Provider retry metadata: `isRetryable === true`
40
+
41
+ The first match decides the retry policy, so a configured matcher's `maxRetries`, `delayMs` and `onRetry` apply even when the built-in matcher would also match.
40
42
 
41
43
  When the error is retryable, the processor returns `{ retry: true }`. It doesn't mutate messages.
42
44
 
45
+ Unless one of your own matchers matches it, the processor never retries a credential or quota refusal, even when provider metadata marks it retryable. The AI SDK marks every `429` retryable, including an exhausted quota.
46
+
43
47
  When `delayMs` is set, the processor waits before signaling a retry. This is useful for transient network errors like `ECONNRESET` where immediately retrying is likely to fail again. The delay can be a fixed number of milliseconds or a function evaluated with the error args (for example, to implement exponential backoff).
44
48
 
45
49
  ### Retry limits
@@ -56,7 +60,7 @@ For retryable errors with a `Retry-After` response header, the processor reads c
56
60
 
57
61
  ## Retry unknown errors
58
62
 
59
- Set `retryUnknownErrors` to retry errors that don't match provider metadata or the built-in OpenAI matcher, including a custom matcher. Unknown-error retries use the processor-level `maxRetries` and `delayMs` values. Known authorization failures, including HTTP `401` and `403` responses, aren't retried:
63
+ Set `retryUnknownErrors` to retry errors that don't match provider metadata or the built-in OpenAI matcher, including a custom matcher. Unknown-error retries use the processor-level `maxRetries` and `delayMs` values. Known credential and quota refusals, including HTTP `401` and `403` responses, aren't retried:
60
64
 
61
65
  ```typescript
62
66
  import { Agent } from '@mastra/core/agent'
@@ -112,7 +116,7 @@ export const agent = new Agent({
112
116
 
113
117
  ## Default OpenAI Responses matcher
114
118
 
115
- `isRetryableOpenAIResponsesStreamError` matches OpenAI Responses stream error chunks with `type: 'error'` or `type: 'response.failed'`. It retries known transient OpenAI error codes. As a fallback, it retries errors with explicit retry guidance such as `You can retry your request`.
119
+ `isRetryableOpenAIResponsesStreamError` matches OpenAI Responses stream error chunks with `type: 'error'` or `type: 'response.failed'`. It reads each chunk with the shared provider-failure reader from `@mastra/core/error` and retries chunks that report a rate limit, a provider outage, or a timeout. As a fallback, it retries errors with explicit retry guidance such as `You can retry your request`. It never retries a credential or quota refusal.
116
120
 
117
121
  `StreamErrorRetryProcessor` includes this matcher by default. You can also import it and reuse it in custom retry logic.
118
122
 
@@ -39,9 +39,9 @@ const toolSearch = new ToolSearchProcessor({
39
39
 
40
40
  **options.search.minScore** (`number`): Minimum relevance score for including a tool in search results. Scores are raw BM25 relevance plus name-match boosts (+5 when a query term equals the tool ID, +2 when it appears in the ID). They are not normalized and often exceed 1. Scores depend on the tools in the catalog and their descriptions, so a threshold tuned for one tool set may not carry over to another. Tools scoring less than or equal to this value are excluded. Use small values such as 0 to 0.5 to require some term overlap.
41
41
 
42
- **options.search.autoLoad** (`boolean`): When true, tools returned by search\_tools are activated immediately as part of the search. The load\_tool meta-tool is not exposed, collapsing the two-step search then load flow into a single search step. Discovered tools become available on the next turn. Keep topK conservative since every match is activated.
42
+ **options.search.autoLoad** (`boolean`): When true, tools returned by search_tools are activated immediately as part of the search. The load_tool meta-tool is not exposed, collapsing the two-step search then load flow into a single search step. Discovered tools become available on the next turn. Keep topK conservative since every match is activated.
43
43
 
44
- **options.storage** (`'in-memory' | 'context'`): Where loaded-tool state lives. 'in-memory' (default) tracks loaded tools in an in-memory map per thread with TTL cleanup (see ttl); state is lost on restart and anonymous requests share a 'default' entry. 'context' derives loaded state from the conversation messages — a tool is loaded while a search\_tools/load\_tool result naming it remains in the messages; it works without memory (same-process only, and only for requests with a real thread ID), survives a restart whenever the messages are available again (memory with message history, or the caller resending the conversation), and de-loads automatically once that result is no longer present in the messages. The 'context' store is opt-in.
44
+ **options.storage** (`'in-memory' | 'context'`): Where loaded-tool state lives. 'in-memory' (default) tracks loaded tools in an in-memory map per thread with TTL cleanup (see ttl); state is lost on restart and anonymous requests share a 'default' entry. 'context' derives loaded state from the conversation messages — a tool is loaded while a search_tools/load_tool result naming it remains in the messages; it works without memory (same-process only, and only for requests with a real thread ID), survives a restart whenever the messages are available again (memory with message history, or the caller resending the conversation), and de-loads automatically once that result is no longer present in the messages. The 'context' store is opt-in.
45
45
 
46
46
  **options.ttl** (`number`): Time-to-live for in-memory thread state, in milliseconds. Only applies to the default storage: 'in-memory' store; after this duration of inactivity thread state is cleaned up. Set to 0 to disable cleanup. Ignored by the 'context' store.
47
47
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  # UnicodeNormalizer
6
6
 
7
- The `UnicodeNormalizer` is an **input processor** that normalizes Unicode text to ensure consistent formatting and remove potentially problematic characters before messages are sent to the language model. This processor handles Unicode representations and removes control characters. It also standardizes whitespace formatting.
7
+ The `UnicodeNormalizer` is an **input processor** that normalizes Unicode text to ensure consistent formatting and remove potentially problematic characters before messages are sent to the language model. This processor always normalizes text to Unicode NFKC form. The normalization form isn't configurable. It also standardizes whitespace formatting. Control character removal is opt-in: set `stripControlChars` to `true` to enable it.
8
8
 
9
9
  ## Usage example
10
10
 
@@ -118,7 +118,7 @@ const { embeddings } = await embedMany({
118
118
  })
119
119
  ```
120
120
 
121
- Google (text-embedding-001):
121
+ Google (gemini-embedding-001):
122
122
 
123
123
  ```ts
124
124
  const { embeddings } = await embedMany({
@@ -67,7 +67,7 @@ Configuration options specific to Chroma vector store.
67
67
 
68
68
  **where** (`Where`): Metadata filtering conditions. Each field maps to a literal value or an operator expression ($gt, $gte, $lt, $lte, $ne, $eq, $in, $nin). Combine conditions with $and and $or.
69
69
 
70
- **whereDocument** (`WhereDocument`): Document content filtering conditions using $contains and $not\_contains. Combine conditions with $and and $or.
70
+ **whereDocument** (`WhereDocument`): Document content filtering conditions using $contains and $not_contains. Combine conditions with $and and $or.
71
71
 
72
72
  **Filter Syntax Examples:**
73
73
 
@@ -172,26 +172,31 @@ await vectorTool.execute({ queryText: 'search query' }, { mastra, requestContext
172
172
  ### Multi-Database Configuration
173
173
 
174
174
  ```typescript
175
+ import { RequestContext } from '@mastra/core/request-context'
176
+
175
177
  const vectorTool = createVectorQueryTool({
176
- vectorStoreName: 'dynamic', // Will be determined at runtime
178
+ vectorStoreName: 'pinecone',
177
179
  indexName: 'documents',
178
180
  model: embedModel,
179
- databaseConfig: {
180
- pinecone: {
181
- namespace: 'default',
182
- },
183
- pgvector: {
184
- minScore: 0.8,
185
- ef: 150,
186
- },
187
- chroma: {
188
- where: { type: 'documentation' },
189
- },
190
- },
191
181
  })
182
+
183
+ // Select the store per request and pass only its matching config block
184
+ const pineconeContext = new RequestContext()
185
+ pineconeContext.set('vectorStoreName', 'pinecone')
186
+ pineconeContext.set('databaseConfig', {
187
+ pinecone: { namespace: 'default' },
188
+ })
189
+
190
+ const pgVectorContext = new RequestContext()
191
+ pgVectorContext.set('vectorStoreName', 'pgVector')
192
+ pgVectorContext.set('databaseConfig', {
193
+ pgvector: { minScore: 0.8, ef: 150 },
194
+ })
195
+
196
+ await vectorTool.execute({ queryText: 'search query' }, { mastra, requestContext: pgVectorContext })
192
197
  ```
193
198
 
194
- > **Note:** **Multi-Database Support**: When you configure multiple databases, only the configuration matching the actual vector store being used will be applied.
199
+ > **Note:** **Multi-Database Support**: Settings from every database block you configure are merged into the query parameters, regardless of which vector store is queried. Shared keys apply to whichever store runs the query. For example, `pgvector.minScore` is passed as `minScore`, which other stores such as LibSQL also read to filter results. Pass only the block for the vector store you query.
195
200
 
196
201
  **Performance Tuning**:
197
202
 
@@ -70,7 +70,7 @@ The `extract` parameter accepts the following fields:
70
70
 
71
71
  **promptTemplate** (`string`): Custom prompt template for question generation. Must include both {context} and {numQuestions} placeholders
72
72
 
73
- **embeddingOnly** (`boolean`): If true, only generate embeddings without actual questions
73
+ **embeddingOnly** (`boolean`): Accepted but currently has no effect. Questions are still generated and returned in questionsThisExcerptCanAnswer
74
74
 
75
75
  ### `KeywordExtractArgs`
76
76
 
@@ -84,7 +84,7 @@ The `extract` parameter accepts the following fields:
84
84
 
85
85
  **schema** (`ZodType`): Zod schema defining the structure of the data to extract.
86
86
 
87
- **llm** (`MastraLanguageModel`): AI SDK language model to use for extraction.
87
+ **llm** (`MastraLanguageModel | MastraLegacyLanguageModel`): AI SDK language model to use for extraction.
88
88
 
89
89
  **instructions** (`string`): Instructions for the LLM on what to extract.
90
90
 
@@ -382,6 +382,7 @@ Vector store prompts define query patterns and filtering capabilities for each v
382
382
 
383
383
  ```ts
384
384
  import { MONGODB_PROMPT } from '@mastra/mongodb'
385
+ import { Agent } from '@mastra/core/agent'
385
386
 
386
387
  export const ragAgent = new Agent({
387
388
  id: 'rag-agent',
@@ -416,6 +417,7 @@ export const ragAgent = new Agent({
416
417
 
417
418
  ```ts
418
419
  import { PINECONE_PROMPT } from '@mastra/pinecone'
420
+ import { Agent } from '@mastra/core/agent'
419
421
 
420
422
  export const ragAgent = new Agent({
421
423
  id: 'rag-agent',
@@ -433,6 +435,7 @@ export const ragAgent = new Agent({
433
435
 
434
436
  ```ts
435
437
  import { QDRANT_PROMPT } from '@mastra/qdrant'
438
+ import { Agent } from '@mastra/core/agent'
436
439
 
437
440
  export const ragAgent = new Agent({
438
441
  id: 'rag-agent',
@@ -450,6 +453,7 @@ export const ragAgent = new Agent({
450
453
 
451
454
  ```ts
452
455
  import { CHROMA_PROMPT } from '@mastra/chroma'
456
+ import { Agent } from '@mastra/core/agent'
453
457
 
454
458
  export const ragAgent = new Agent({
455
459
  id: 'rag-agent',
@@ -467,6 +471,7 @@ export const ragAgent = new Agent({
467
471
 
468
472
  ```ts
469
473
  import { ASTRA_PROMPT } from '@mastra/astra'
474
+ import { Agent } from '@mastra/core/agent'
470
475
 
471
476
  export const ragAgent = new Agent({
472
477
  id: 'rag-agent',
@@ -484,6 +489,7 @@ export const ragAgent = new Agent({
484
489
 
485
490
  ```ts
486
491
  import { LIBSQL_PROMPT } from '@mastra/libsql'
492
+ import { Agent } from '@mastra/core/agent'
487
493
 
488
494
  export const ragAgent = new Agent({
489
495
  id: 'rag-agent',
@@ -501,6 +507,7 @@ export const ragAgent = new Agent({
501
507
 
502
508
  ```ts
503
509
  import { UPSTASH_PROMPT } from '@mastra/upstash'
510
+ import { Agent } from '@mastra/core/agent'
504
511
 
505
512
  export const ragAgent = new Agent({
506
513
  id: 'rag-agent',
@@ -518,6 +525,7 @@ export const ragAgent = new Agent({
518
525
 
519
526
  ```ts
520
527
  import { VECTORIZE_PROMPT } from '@mastra/vectorize'
528
+ import { Agent } from '@mastra/core/agent'
521
529
 
522
530
  export const ragAgent = new Agent({
523
531
  id: 'rag-agent',
@@ -535,6 +543,7 @@ export const ragAgent = new Agent({
535
543
 
536
544
  ```ts
537
545
  import { OPENSEARCH_PROMPT } from '@mastra/opensearch'
546
+ import { Agent } from '@mastra/core/agent'
538
547
 
539
548
  export const ragAgent = new Agent({
540
549
  id: 'rag-agent',
@@ -552,6 +561,7 @@ export const ragAgent = new Agent({
552
561
 
553
562
  ```ts
554
563
  import { ORACLEDB_PROMPT } from '@mastra/oracledb'
564
+ import { Agent } from '@mastra/core/agent'
555
565
 
556
566
  export const ragAgent = new Agent({
557
567
  id: 'rag-agent',
@@ -569,6 +579,7 @@ export const ragAgent = new Agent({
569
579
 
570
580
  ```ts
571
581
  import { S3VECTORS_PROMPT } from '@mastra/s3vectors'
582
+ import { Agent } from '@mastra/core/agent'
572
583
 
573
584
  export const ragAgent = new Agent({
574
585
  id: 'rag-agent',
@@ -10,6 +10,22 @@
10
10
 
11
11
  For usage patterns and concepts, see [Schedules](https://mastra.ai/docs/harness/schedules).
12
12
 
13
+ ## Delivery guarantees
14
+
15
+ Scheduled publication is best-effort, not at-least-once delivery. The scheduler atomically claims an occurrence and advances `nextFireAt` before publishing the agent or workflow start event. An exhausted cron schedule is marked `completed` in that claim. Completion means there are no remaining occurrences, not that the target started or succeeded.
16
+
17
+ The scheduler makes up to three publication attempts for the same claimed occurrence, waiting 100 ms and then 200 ms between attempts. A transport can accept an event before returning an error, so retries can publish duplicates with the same run ID.
18
+
19
+ After all three attempts fail, the scheduler logs the schedule ID, run ID, scheduled fire time, `publicationOutcome: 'unknown'`, and `automaticReplay: false`. It invokes the configured `scheduler.onError` hook and attempts to record a trigger with outcome `failed`. This failure describes the publication attempts. It doesn't prove that the target never started.
20
+
21
+ Once those attempts are exhausted, the scheduler doesn't replay the occurrence. Recurring schedules remain active and can fire at their next scheduled time. Terminal schedules remain completed with any recorded failure details in trigger history.
22
+
23
+ After a successful claim, an info-level `Claimed schedule occurrence` log identifies the schedule ID, run ID, and scheduled fire time. A matching `Published schedule occurrence` log reports transport acceptance. If neither that success log nor the final failure log follows a claim, publication is unconfirmed. These logs aren't durable state: a crash between the claim commit and logging, or before logs are flushed, can leave no log record.
24
+
25
+ If a publisher process dies after the claim commits, or confirmation is lost, that occurrence may be skipped without a failed trigger. A replacement scheduler can't distinguish an unpublished event from one accepted before the crash using claim metadata or missing trigger history. It doesn't replay the occurrence or block later recurring fires. A publication acknowledgement also doesn't guarantee target execution, and transport redelivery can produce duplicates.
26
+
27
+ Before manually rerunning missed work, check target execution and transport records independently. Missing trigger history or a failed publication attempt alone isn't evidence that rerunning is safe.
28
+
13
29
  ## Usage example
14
30
 
15
31
  Create an agent schedule:
@@ -62,7 +78,7 @@ const schedule = await mastra.schedules.create({
62
78
 
63
79
  **name** (`string`): Free-form label for distinguishing multiple schedules on the same agent or thread.
64
80
 
65
- **timezone** (`string`): IANA timezone used to resolve cron fire times, for example America/New\_York.
81
+ **timezone** (`string`): IANA timezone used to resolve cron fire times, for example America/New_York.
66
82
 
67
83
  **threadId** (`string`): Thread that receives the scheduled signal. When omitted, each fire runs threadless with agent.generate().
68
84
 
@@ -104,6 +104,8 @@ await server.init()
104
104
  The [`server.onError`](https://mastra.ai/reference/configuration) hook is also supported. When configured, it's called before the error propagates to middleware, and its response is used directly:
105
105
 
106
106
  ```typescript
107
+ import { Mastra } from '@mastra/core'
108
+
107
109
  const mastra = new Mastra({
108
110
  server: {
109
111
  onError: (err, c) => {
@@ -12,15 +12,32 @@ Mastra storage is organized into domains. Each domain owns a set of tables or co
12
12
 
13
13
  Not every storage adapter implements every domain. Composite storage lets you mix adapters per domain when the adapter packages export the corresponding domain classes.
14
14
 
15
- | Domain | Description |
16
- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
17
- | `memory` | Conversation persistence: messages, threads, and resources (including working memory). |
18
- | `workflows` | Workflow run snapshots used for suspend and resume. |
19
- | `workflowDefinitions` | Persisted [dynamic workflow](https://mastra.ai/docs/workflows/dynamic-workflows) definitions (beta). Loaded and live-registered on boot. |
20
- | `scores` | Evaluation score records from eval runs. |
21
- | `observability` | Traces and spans used by observability exporters and Studio. |
22
- | `datasets` | Dataset records, versioned items, and dataset versions used by experiments. |
23
- | `experiments` | Experiment runs and per-item experiment results. |
15
+ | Domain | Description |
16
+ | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
17
+ | `memory` | Conversation persistence: messages, threads, and resources (including working memory). |
18
+ | `workflows` | Workflow run snapshots used for suspend and resume. |
19
+ | `workflowDefinitions` | Persisted [dynamic workflow](https://mastra.ai/docs/workflows/dynamic-workflows) definitions (beta). Loaded and live-registered on boot. |
20
+ | `scores` | Evaluation score records from eval runs. |
21
+ | `observability` | Traces and spans used by observability exporters and Studio. |
22
+ | `datasets` | Dataset records, versioned items, and dataset versions used by experiments. |
23
+ | `experiments` | Experiment runs and per-item experiment results. |
24
+ | `agents` | Stored agent definitions and their versions, used by the Mastra Editor. |
25
+ | `promptBlocks` | Stored prompt blocks and their versions, used by the Mastra Editor. |
26
+ | `scorerDefinitions` | Stored scorer definitions, used by the Mastra Editor. |
27
+ | `mcpClients` | Stored MCP client configurations, used by the Mastra Editor. |
28
+ | `mcpServers` | Stored MCP server configurations, used by the Mastra Editor. |
29
+ | `workspaces` | Stored workspace configurations, used by the Mastra Editor. |
30
+ | `skills` | Stored skills and their versions, used by the Mastra Editor. |
31
+ | `favorites` | Per-user favorites on stored entities. |
32
+ | `blobs` | Content-addressable blobs keyed by SHA-256 hash. Stores file contents for skill versioning. |
33
+ | `backgroundTasks` | Background task state: creation, status updates, and cleanup. |
34
+ | `schedules` | Schedules polled by the scheduler to trigger workflow and agent runs. |
35
+ | `channels` | Channel installations and configuration for multi-platform integrations. |
36
+ | `harness` | Harness session records. |
37
+ | `toolProviderConnections` | User-assigned names for tool provider connections. |
38
+ | `notifications` | Notification records. |
39
+ | `threadState` | Durable per-thread state, such as task lists and goals. |
40
+ | `knowledge` | Knowledge graph nodes and records (experimental). |
24
41
 
25
42
  The schema definitions below cover the built-in database-backed tables documented for `memory`, `workflows`, `scores`, and `observability`. Other domains, and non-database adapters, use implementation-specific storage structures.
26
43
 
@@ -30,11 +47,11 @@ The schema definitions below cover the built-in database-backed tables documente
30
47
 
31
48
  Stores conversation messages and their metadata. Each message belongs to a thread and contains the actual content along with metadata about the sender role and message type.
32
49
 
33
- idtextPRIMARYKEYNOT NULLUnique identifier for the messagethread\_idtextFK → threads.idNOT NULLParent thread referenceresourceIdtextCAN BE NULLID of the resource that owns this messagecontenttextNOT NULLJSON of the message content in V2 format. Example: `{ format: 2, parts: [...] }`roletextNOT NULLEnum of `user | assistant`createdAttimestampNOT NULLUsed for thread message ordering
50
+ idtextPRIMARYKEYNOT NULLUnique identifier for the messagethread_idtextFK → threads.idNOT NULLParent thread referenceresourceIdtextCAN BE NULLID of the resource that owns this messagecontenttextNOT NULLJSON of the message content in V2 format. Example: `{ format: 2, parts: [...] }`roletextNOT NULLEnum of `user | assistant`createdAttimestampNOT NULLUsed for thread message ordering
34
51
 
35
52
  The message `content` column contains a JSON object conforming to the `MastraMessageContentV2` type, which is designed to align closely with the AI SDK `UIMessage` message shape.
36
53
 
37
- formatintegerNOT NULLMessage format version (currently 2)partsarray (JSON)NOT NULLArray of message parts (text, tool-invocation, file, reasoning, etc.). The structure of items in this array varies by `type`.experimental\_attachmentsarray (JSON)CAN BE NULLOptional array of file attachmentscontenttextCAN BE NULLOptional main text content of the messagetoolInvocationsarray (JSON)CAN BE NULLOptional array summarizing tool calls and resultsreasoningobject (JSON)CAN BE NULLOptional information about the reasoning process behind the assistant's responseannotationsobject (JSON)CAN BE NULLOptional additional metadata or annotations
54
+ formatintegerNOT NULLMessage format version (currently 2)partsarray (JSON)NOT NULLArray of message parts (text, tool-invocation, file, reasoning, etc.). The structure of items in this array varies by `type`.experimental_attachmentsarray (JSON)CAN BE NULLOptional array of file attachmentscontenttextCAN BE NULLOptional main text content of the messagetoolInvocationsarray (JSON)CAN BE NULLOptional array summarizing tool calls and resultsreasoningobject (JSON)CAN BE NULLOptional information about the reasoning process behind the assistant's responseannotationsobject (JSON)CAN BE NULLOptional additional metadata or annotations
38
55
 
39
56
  **Threads**:
40
57
 
@@ -76,7 +93,7 @@ createdAttimestampNOT NULLWhen the resource record was first createdupdatedAttim
76
93
 
77
94
  When `suspend()` is called on a workflow, its state is saved in the following format. When `resume()` is called, that state is rehydrated.
78
95
 
79
- workflow\_nametextNOT NULLName of the workflowrun\_idtextNOT NULLUnique identifier for the workflow execution. Used to track state across suspend/resume cyclessnapshotjsonbNOT NULLWorkflow state as JSON. Example:
96
+ workflow_nametextNOT NULLName of the workflowrun_idtextNOT NULLUnique identifier for the workflow execution. Used to track state across suspend/resume cyclessnapshotjsonbNOT NULLWorkflow state as JSON. Example:
80
97
 
81
98
  ```json
82
99
  {
@@ -115,7 +132,7 @@ inputtextNOT NULLInput provided to the agentoutputtextNOT NULLOutput generated b
115
132
  }
116
133
  ```
117
134
 
118
- agent\_nametextNOT NULLmetric\_nametextNOT NULLe.g Faithfulness, Hallucination, etc.instructionstextNOT NULLSystem prompt or instructions for the agenttest\_infojsonbNOT NULLAdditional test metadata and configurationglobal\_run\_iduuidv4NOT NULLGroups related evaluation runs (e.g. all unit tests in a CI run)run\_iduuidv4NOT NULLUnique identifier for the run being evaluated (format: `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`)created\_attimestampNOT NULL
135
+ agent_nametextNOT NULLmetric_nametextNOT NULLe.g Faithfulness, Hallucination, etc.instructionstextNOT NULLSystem prompt or instructions for the agenttest_infojsonbNOT NULLAdditional test metadata and configurationglobal_run_iduuidv4NOT NULLGroups related evaluation runs (e.g. all unit tests in a CI run)run_iduuidv4NOT NULLUnique identifier for the run being evaluated (format: `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`)created_attimestampNOT NULL
119
136
 
120
137
  **Traces**:
121
138
 
@@ -75,15 +75,15 @@ These properties resolve to final values after the stream completes:
75
75
 
76
76
  **usage.cachedInputTokens** (`number`): Number of input tokens that were a cache hit
77
77
 
78
- **finishReason** (`Promise<string | undefined>`): Reason why generation stopped (e.g., 'stop', 'length', 'tool\_calls', 'content\_filter'). Undefined if the stream hasn't finished.
78
+ **finishReason** (`Promise<string | undefined>`): Reason why generation stopped (e.g., 'stop', 'length', 'tool_calls', 'content_filter'). Undefined if the stream hasn't finished.
79
79
 
80
80
  **finishReason.stop** (`'stop'`): Model finished naturally
81
81
 
82
82
  **finishReason.length** (`'length'`): Hit maximum token limit
83
83
 
84
- **finishReason.tool\_calls** (`'tool_calls'`): Model called tools
84
+ **finishReason.tool_calls** (`'tool_calls'`): Model called tools
85
85
 
86
- **finishReason.content\_filter** (`'content_filter'`): Content was filtered
86
+ **finishReason.content_filter** (`'content_filter'`): Content was filtered
87
87
 
88
88
  **response** (`Promise<Response>`): Response metadata and messages from the model provider.
89
89