@mastra/mcp-docs-server 0.13.39 → 1.0.0-beta.1

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 (494) hide show
  1. package/.docs/organized/changelogs/%40internal%2Fai-sdk-v4.md +1 -0
  2. package/.docs/organized/changelogs/%40internal%2Fchangeset-cli.md +0 -10
  3. package/.docs/organized/changelogs/%40internal%2Fexternal-types.md +0 -10
  4. package/.docs/organized/changelogs/%40internal%2Fstorage-test-utils.md +36 -36
  5. package/.docs/organized/changelogs/%40internal%2Ftypes-builder.md +0 -10
  6. package/.docs/organized/changelogs/%40mastra%2Fagent-builder.md +70 -70
  7. package/.docs/organized/changelogs/%40mastra%2Fai-sdk.md +40 -40
  8. package/.docs/organized/changelogs/%40mastra%2Fastra.md +19 -19
  9. package/.docs/organized/changelogs/%40mastra%2Fauth.md +4 -14
  10. package/.docs/organized/changelogs/%40mastra%2Fchroma.md +18 -18
  11. package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +199 -199
  12. package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +220 -220
  13. package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +190 -190
  14. package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +199 -199
  15. package/.docs/organized/changelogs/%40mastra%2Fcodemod.md +7 -0
  16. package/.docs/organized/changelogs/%40mastra%2Fcore.md +210 -210
  17. package/.docs/organized/changelogs/%40mastra%2Fcouchbase.md +16 -16
  18. package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +69 -69
  19. package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +67 -67
  20. package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +70 -70
  21. package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +67 -67
  22. package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +209 -209
  23. package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +191 -191
  24. package/.docs/organized/changelogs/%40mastra%2Fevals.md +34 -34
  25. package/.docs/organized/changelogs/%40mastra%2Ffastembed.md +5 -13
  26. package/.docs/organized/changelogs/%40mastra%2Flance.md +182 -182
  27. package/.docs/organized/changelogs/%40mastra%2Flibsql.md +199 -199
  28. package/.docs/organized/changelogs/%40mastra%2Floggers.md +20 -20
  29. package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +56 -56
  30. package/.docs/organized/changelogs/%40mastra%2Fmcp-registry-registry.md +20 -20
  31. package/.docs/organized/changelogs/%40mastra%2Fmcp.md +65 -65
  32. package/.docs/organized/changelogs/%40mastra%2Fmemory.md +228 -228
  33. package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +199 -199
  34. package/.docs/organized/changelogs/%40mastra%2Fmssql.md +206 -206
  35. package/.docs/organized/changelogs/%40mastra%2Fopensearch.md +19 -19
  36. package/.docs/organized/changelogs/%40mastra%2Fpg.md +197 -197
  37. package/.docs/organized/changelogs/%40mastra%2Fpinecone.md +16 -16
  38. package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +216 -216
  39. package/.docs/organized/changelogs/%40mastra%2Fqdrant.md +16 -16
  40. package/.docs/organized/changelogs/%40mastra%2Frag.md +61 -61
  41. package/.docs/organized/changelogs/%40mastra%2Freact.md +66 -66
  42. package/.docs/organized/changelogs/%40mastra%2Fs3vectors.md +9 -17
  43. package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +6 -30
  44. package/.docs/organized/changelogs/%40mastra%2Fserver.md +203 -203
  45. package/.docs/organized/changelogs/%40mastra%2Fturbopuffer.md +16 -16
  46. package/.docs/organized/changelogs/%40mastra%2Fupstash.md +190 -190
  47. package/.docs/organized/changelogs/%40mastra%2Fvectorize.md +18 -18
  48. package/.docs/organized/changelogs/%40mastra%2Fvoice-azure.md +21 -21
  49. package/.docs/organized/changelogs/%40mastra%2Fvoice-cloudflare.md +20 -20
  50. package/.docs/organized/changelogs/%40mastra%2Fvoice-deepgram.md +20 -20
  51. package/.docs/organized/changelogs/%40mastra%2Fvoice-elevenlabs.md +20 -20
  52. package/.docs/organized/changelogs/%40mastra%2Fvoice-gladia.md +20 -20
  53. package/.docs/organized/changelogs/%40mastra%2Fvoice-google-gemini-live.md +56 -56
  54. package/.docs/organized/changelogs/%40mastra%2Fvoice-google.md +20 -20
  55. package/.docs/organized/changelogs/%40mastra%2Fvoice-murf.md +20 -20
  56. package/.docs/organized/changelogs/%40mastra%2Fvoice-openai-realtime.md +56 -56
  57. package/.docs/organized/changelogs/%40mastra%2Fvoice-openai.md +20 -20
  58. package/.docs/organized/changelogs/%40mastra%2Fvoice-playai.md +20 -20
  59. package/.docs/organized/changelogs/%40mastra%2Fvoice-sarvam.md +20 -20
  60. package/.docs/organized/changelogs/%40mastra%2Fvoice-speechify.md +20 -20
  61. package/.docs/organized/changelogs/create-mastra.md +29 -29
  62. package/.docs/organized/changelogs/mastra.md +93 -93
  63. package/.docs/organized/code-examples/a2a.md +4 -2
  64. package/.docs/organized/code-examples/agui.md +12 -9
  65. package/.docs/organized/code-examples/ai-sdk-useChat.md +12 -18
  66. package/.docs/organized/code-examples/ai-sdk-v5.md +4 -2
  67. package/.docs/organized/code-examples/bird-checker-with-express.md +5 -4
  68. package/.docs/organized/code-examples/bird-checker-with-nextjs-and-eval.md +4 -3
  69. package/.docs/organized/code-examples/bird-checker-with-nextjs.md +4 -3
  70. package/.docs/organized/code-examples/client-side-tools.md +1 -0
  71. package/.docs/organized/code-examples/crypto-chatbot.md +1 -1
  72. package/.docs/organized/code-examples/experimental-auth-weather-agent.md +8 -177
  73. package/.docs/organized/code-examples/fireworks-r1.md +2 -2
  74. package/.docs/organized/code-examples/heads-up-game.md +10 -7
  75. package/.docs/organized/code-examples/mcp-configuration.md +5 -3
  76. package/.docs/organized/code-examples/mcp-registry-registry.md +3 -2
  77. package/.docs/organized/code-examples/memory-per-resource-example.md +4 -2
  78. package/.docs/organized/code-examples/memory-todo-agent.md +1 -0
  79. package/.docs/organized/code-examples/memory-with-context.md +2 -1
  80. package/.docs/organized/code-examples/memory-with-libsql.md +4 -2
  81. package/.docs/organized/code-examples/memory-with-mongodb.md +4 -2
  82. package/.docs/organized/code-examples/memory-with-pg.md +4 -2
  83. package/.docs/organized/code-examples/memory-with-processors.md +13 -8
  84. package/.docs/organized/code-examples/memory-with-upstash.md +5 -3
  85. package/.docs/organized/code-examples/openapi-spec-writer.md +32 -41
  86. package/.docs/organized/code-examples/quick-start.md +5 -32
  87. package/.docs/organized/code-examples/stock-price-tool.md +6 -5
  88. package/.docs/organized/code-examples/weather-agent.md +21 -16
  89. package/.docs/organized/code-examples/workflow-ai-recruiter.md +3 -2
  90. package/.docs/organized/code-examples/workflow-with-inline-steps.md +9 -12
  91. package/.docs/organized/code-examples/workflow-with-memory.md +16 -15
  92. package/.docs/organized/code-examples/workflow-with-separate-steps.md +2 -2
  93. package/.docs/organized/code-examples/workflow-with-suspend-resume.md +3 -2
  94. package/.docs/raw/agents/adding-voice.mdx +27 -22
  95. package/.docs/raw/agents/agent-memory.mdx +24 -16
  96. package/.docs/raw/agents/guardrails.mdx +33 -12
  97. package/.docs/raw/agents/networks.mdx +8 -4
  98. package/.docs/raw/agents/overview.mdx +23 -17
  99. package/.docs/raw/agents/using-tools.mdx +11 -8
  100. package/.docs/raw/auth/auth0.mdx +9 -9
  101. package/.docs/raw/auth/clerk.mdx +7 -7
  102. package/.docs/raw/auth/firebase.mdx +9 -9
  103. package/.docs/raw/auth/index.mdx +6 -6
  104. package/.docs/raw/auth/jwt.mdx +7 -7
  105. package/.docs/raw/auth/supabase.mdx +8 -8
  106. package/.docs/raw/auth/workos.mdx +9 -9
  107. package/.docs/raw/community/contributing-templates.mdx +3 -3
  108. package/.docs/raw/community/discord.mdx +1 -1
  109. package/.docs/raw/course/01-first-agent/03-verifying-installation.md +1 -1
  110. package/.docs/raw/course/01-first-agent/08-exporting-your-agent.md +2 -1
  111. package/.docs/raw/course/01-first-agent/16-adding-memory-to-agent.md +2 -1
  112. package/.docs/raw/course/02-agent-tools-mcp/02-installing-mcp.md +1 -1
  113. package/.docs/raw/course/02-agent-tools-mcp/31-enhancing-memory-configuration.md +2 -0
  114. package/.docs/raw/course/03-agent-memory/03-installing-memory.md +1 -1
  115. package/.docs/raw/course/03-agent-memory/04-creating-basic-memory-agent.md +1 -0
  116. package/.docs/raw/course/03-agent-memory/10-storage-configuration.md +2 -3
  117. package/.docs/raw/course/03-agent-memory/13-vector-store-configuration.md +2 -0
  118. package/.docs/raw/course/03-agent-memory/16-configuring-semantic-recall.md +2 -0
  119. package/.docs/raw/course/03-agent-memory/18-advanced-configuration-semantic-recall.md +1 -0
  120. package/.docs/raw/course/03-agent-memory/21-configuring-working-memory.md +2 -0
  121. package/.docs/raw/course/03-agent-memory/22-custom-working-memory-templates.md +1 -0
  122. package/.docs/raw/course/03-agent-memory/25-combining-memory-features.md +1 -0
  123. package/.docs/raw/course/03-agent-memory/27-creating-learning-assistant.md +1 -0
  124. package/.docs/raw/course/04-workflows/08-running-workflows-programmatically.md +2 -2
  125. package/.docs/raw/deployment/cloud-providers/amazon-ec2.mdx +6 -6
  126. package/.docs/raw/deployment/cloud-providers/aws-lambda.mdx +8 -6
  127. package/.docs/raw/deployment/cloud-providers/azure-app-services.mdx +5 -5
  128. package/.docs/raw/deployment/cloud-providers/digital-ocean.mdx +5 -5
  129. package/.docs/raw/deployment/cloud-providers/index.mdx +11 -8
  130. package/.docs/raw/deployment/monorepo.mdx +2 -2
  131. package/.docs/raw/deployment/overview.mdx +2 -2
  132. package/.docs/raw/deployment/server-deployment.mdx +2 -10
  133. package/.docs/raw/deployment/serverless-platforms/cloudflare-deployer.mdx +5 -5
  134. package/.docs/raw/deployment/serverless-platforms/index.mdx +10 -7
  135. package/.docs/raw/deployment/serverless-platforms/netlify-deployer.mdx +5 -5
  136. package/.docs/raw/deployment/serverless-platforms/vercel-deployer.mdx +5 -5
  137. package/.docs/raw/deployment/web-framework.mdx +8 -8
  138. package/.docs/raw/{scorers → evals}/custom-scorers.mdx +6 -6
  139. package/.docs/raw/evals/off-the-shelf-scorers.mdx +50 -0
  140. package/.docs/raw/{scorers → evals}/overview.mdx +9 -9
  141. package/.docs/raw/evals/running-in-ci.mdx +113 -0
  142. package/.docs/raw/frameworks/agentic-uis/ai-sdk.mdx +26 -25
  143. package/.docs/raw/frameworks/agentic-uis/assistant-ui.mdx +1 -1
  144. package/.docs/raw/frameworks/agentic-uis/copilotkit.mdx +17 -17
  145. package/.docs/raw/frameworks/agentic-uis/openrouter.mdx +4 -1
  146. package/.docs/raw/frameworks/servers/express.mdx +11 -10
  147. package/.docs/raw/frameworks/web-frameworks/astro.mdx +18 -18
  148. package/.docs/raw/frameworks/web-frameworks/next-js.mdx +7 -7
  149. package/.docs/raw/frameworks/web-frameworks/sveltekit.mdx +16 -16
  150. package/.docs/raw/frameworks/web-frameworks/vite-react.mdx +7 -7
  151. package/.docs/raw/getting-started/installation.mdx +26 -25
  152. package/.docs/raw/getting-started/mcp-docs-server.mdx +1 -1
  153. package/.docs/raw/getting-started/project-structure.mdx +4 -4
  154. package/.docs/raw/getting-started/studio.mdx +8 -8
  155. package/.docs/raw/getting-started/templates.mdx +6 -6
  156. package/.docs/raw/guides/guide/ai-recruiter.mdx +264 -0
  157. package/.docs/raw/guides/guide/chef-michel.mdx +271 -0
  158. package/.docs/raw/guides/guide/notes-mcp-server.mdx +450 -0
  159. package/.docs/raw/guides/guide/research-assistant.mdx +380 -0
  160. package/.docs/raw/guides/guide/stock-agent.mdx +185 -0
  161. package/.docs/raw/guides/guide/web-search.mdx +291 -0
  162. package/.docs/raw/guides/index.mdx +43 -0
  163. package/.docs/raw/guides/migrations/agentnetwork.mdx +114 -0
  164. package/.docs/raw/guides/migrations/upgrade-to-v1/_template.mdx +50 -0
  165. package/.docs/raw/guides/migrations/upgrade-to-v1/agent.mdx +265 -0
  166. package/.docs/raw/guides/migrations/upgrade-to-v1/cli.mdx +48 -0
  167. package/.docs/raw/guides/migrations/upgrade-to-v1/client.mdx +153 -0
  168. package/.docs/raw/guides/migrations/upgrade-to-v1/evals.mdx +230 -0
  169. package/.docs/raw/guides/migrations/upgrade-to-v1/mastra.mdx +171 -0
  170. package/.docs/raw/guides/migrations/upgrade-to-v1/mcp.mdx +114 -0
  171. package/.docs/raw/guides/migrations/upgrade-to-v1/memory.mdx +241 -0
  172. package/.docs/raw/guides/migrations/upgrade-to-v1/overview.mdx +83 -0
  173. package/.docs/raw/guides/migrations/upgrade-to-v1/processors.mdx +62 -0
  174. package/.docs/raw/guides/migrations/upgrade-to-v1/storage.mdx +270 -0
  175. package/.docs/raw/guides/migrations/upgrade-to-v1/tools.mdx +115 -0
  176. package/.docs/raw/guides/migrations/upgrade-to-v1/tracing.mdx +280 -0
  177. package/.docs/raw/guides/migrations/upgrade-to-v1/vectors.mdx +23 -0
  178. package/.docs/raw/guides/migrations/upgrade-to-v1/voice.mdx +39 -0
  179. package/.docs/raw/guides/migrations/upgrade-to-v1/workflows.mdx +178 -0
  180. package/.docs/raw/guides/migrations/vnext-to-standard-apis.mdx +367 -0
  181. package/.docs/raw/guides/quickstarts/nextjs.mdx +275 -0
  182. package/.docs/raw/index.mdx +9 -9
  183. package/.docs/raw/{observability/logging.mdx → logging.mdx} +4 -4
  184. package/.docs/raw/mastra-cloud/dashboard.mdx +2 -2
  185. package/.docs/raw/mastra-cloud/observability.mdx +6 -6
  186. package/.docs/raw/mastra-cloud/overview.mdx +2 -2
  187. package/.docs/raw/mastra-cloud/setting-up.mdx +4 -4
  188. package/.docs/raw/memory/conversation-history.mdx +1 -0
  189. package/.docs/raw/memory/memory-processors.mdx +4 -3
  190. package/.docs/raw/memory/overview.mdx +10 -6
  191. package/.docs/raw/memory/semantic-recall.mdx +13 -8
  192. package/.docs/raw/memory/storage/memory-with-libsql.mdx +12 -7
  193. package/.docs/raw/memory/storage/memory-with-pg.mdx +11 -6
  194. package/.docs/raw/memory/storage/memory-with-upstash.mdx +11 -6
  195. package/.docs/raw/memory/threads-and-resources.mdx +11 -13
  196. package/.docs/raw/memory/working-memory.mdx +30 -14
  197. package/.docs/raw/observability/overview.mdx +13 -30
  198. package/.docs/raw/observability/{ai-tracing → tracing}/exporters/arize.mdx +11 -19
  199. package/.docs/raw/observability/{ai-tracing → tracing}/exporters/braintrust.mdx +8 -17
  200. package/.docs/raw/observability/{ai-tracing → tracing}/exporters/cloud.mdx +11 -17
  201. package/.docs/raw/observability/{ai-tracing → tracing}/exporters/default.mdx +16 -20
  202. package/.docs/raw/observability/{ai-tracing → tracing}/exporters/langfuse.mdx +8 -17
  203. package/.docs/raw/observability/{ai-tracing → tracing}/exporters/langsmith.mdx +8 -17
  204. package/.docs/raw/observability/{ai-tracing → tracing}/exporters/otel.mdx +12 -21
  205. package/.docs/raw/observability/{ai-tracing → tracing}/overview.mdx +107 -142
  206. package/.docs/raw/observability/{ai-tracing → tracing}/processors/sensitive-data-filter.mdx +14 -13
  207. package/.docs/raw/rag/chunking-and-embedding.mdx +5 -5
  208. package/.docs/raw/rag/overview.mdx +3 -13
  209. package/.docs/raw/rag/retrieval.mdx +24 -12
  210. package/.docs/raw/rag/vector-databases.mdx +7 -1
  211. package/.docs/raw/reference/agents/agent.mdx +35 -30
  212. package/.docs/raw/reference/agents/generate.mdx +10 -10
  213. package/.docs/raw/reference/agents/generateLegacy.mdx +8 -8
  214. package/.docs/raw/reference/agents/getDefaultGenerateOptions.mdx +21 -15
  215. package/.docs/raw/reference/agents/getDefaultOptions.mdx +69 -0
  216. package/.docs/raw/reference/agents/getDefaultStreamOptions.mdx +22 -16
  217. package/.docs/raw/reference/agents/getDescription.mdx +1 -1
  218. package/.docs/raw/reference/agents/getInstructions.mdx +8 -8
  219. package/.docs/raw/reference/agents/getLLM.mdx +9 -9
  220. package/.docs/raw/reference/agents/getMemory.mdx +9 -9
  221. package/.docs/raw/reference/agents/getModel.mdx +10 -10
  222. package/.docs/raw/reference/agents/getVoice.mdx +8 -8
  223. package/.docs/raw/reference/agents/listAgents.mdx +9 -9
  224. package/.docs/raw/reference/agents/listScorers.mdx +7 -7
  225. package/.docs/raw/reference/agents/listTools.mdx +7 -7
  226. package/.docs/raw/reference/agents/listWorkflows.mdx +7 -7
  227. package/.docs/raw/reference/agents/network.mdx +11 -10
  228. package/.docs/raw/reference/auth/auth0.mdx +4 -4
  229. package/.docs/raw/reference/auth/clerk.mdx +4 -4
  230. package/.docs/raw/reference/auth/firebase.mdx +6 -6
  231. package/.docs/raw/reference/auth/jwt.mdx +4 -4
  232. package/.docs/raw/reference/auth/supabase.mdx +4 -4
  233. package/.docs/raw/reference/auth/workos.mdx +4 -4
  234. package/.docs/raw/reference/cli/create-mastra.mdx +10 -10
  235. package/.docs/raw/reference/cli/mastra.mdx +7 -7
  236. package/.docs/raw/reference/client-js/agents.mdx +6 -2
  237. package/.docs/raw/reference/client-js/mastra-client.mdx +7 -7
  238. package/.docs/raw/reference/client-js/memory.mdx +24 -16
  239. package/.docs/raw/reference/client-js/observability.mdx +11 -11
  240. package/.docs/raw/reference/client-js/workflows.mdx +6 -34
  241. package/.docs/raw/reference/core/getAgent.mdx +1 -1
  242. package/.docs/raw/reference/core/getAgentById.mdx +1 -1
  243. package/.docs/raw/reference/core/getDeployer.mdx +2 -2
  244. package/.docs/raw/reference/core/getLogger.mdx +2 -2
  245. package/.docs/raw/reference/core/getMCPServer.mdx +31 -15
  246. package/.docs/raw/reference/core/getMCPServerById.mdx +81 -0
  247. package/.docs/raw/reference/core/getScorer.mdx +3 -3
  248. package/.docs/raw/reference/core/getScorerById.mdx +79 -0
  249. package/.docs/raw/reference/core/getServer.mdx +2 -2
  250. package/.docs/raw/reference/core/getStorage.mdx +2 -2
  251. package/.docs/raw/reference/core/getTelemetry.mdx +2 -2
  252. package/.docs/raw/reference/core/getVector.mdx +2 -2
  253. package/.docs/raw/reference/core/getWorkflow.mdx +1 -1
  254. package/.docs/raw/reference/core/listAgents.mdx +1 -1
  255. package/.docs/raw/reference/core/listLogs.mdx +2 -2
  256. package/.docs/raw/reference/core/listLogsByRunId.mdx +2 -2
  257. package/.docs/raw/reference/core/listMCPServers.mdx +65 -0
  258. package/.docs/raw/reference/core/listScorers.mdx +3 -3
  259. package/.docs/raw/reference/core/listVectors.mdx +36 -0
  260. package/.docs/raw/reference/core/listWorkflows.mdx +6 -6
  261. package/.docs/raw/reference/core/mastra-class.mdx +3 -2
  262. package/.docs/raw/reference/core/setLogger.mdx +2 -2
  263. package/.docs/raw/reference/core/setStorage.mdx +3 -2
  264. package/.docs/raw/reference/core/setTelemetry.mdx +2 -2
  265. package/.docs/raw/reference/deployer/cloudflare.mdx +2 -2
  266. package/.docs/raw/reference/deployer/deployer.mdx +0 -6
  267. package/.docs/raw/reference/deployer/netlify.mdx +2 -2
  268. package/.docs/raw/reference/deployer/vercel.mdx +3 -3
  269. package/.docs/raw/reference/evals/answer-relevancy.mdx +164 -126
  270. package/.docs/raw/reference/{scorers → evals}/answer-similarity.mdx +27 -27
  271. package/.docs/raw/reference/evals/bias.mdx +149 -115
  272. package/.docs/raw/reference/evals/completeness.mdx +148 -117
  273. package/.docs/raw/reference/evals/content-similarity.mdx +126 -113
  274. package/.docs/raw/reference/evals/context-precision.mdx +290 -133
  275. package/.docs/raw/reference/{scorers → evals}/context-relevance.mdx +6 -6
  276. package/.docs/raw/reference/{scorers → evals}/create-scorer.mdx +69 -60
  277. package/.docs/raw/reference/evals/faithfulness.mdx +163 -121
  278. package/.docs/raw/reference/evals/hallucination.mdx +159 -132
  279. package/.docs/raw/reference/evals/keyword-coverage.mdx +169 -125
  280. package/.docs/raw/reference/{scorers → evals}/mastra-scorer.mdx +7 -5
  281. package/.docs/raw/reference/{scorers → evals}/noise-sensitivity.mdx +9 -9
  282. package/.docs/raw/reference/evals/prompt-alignment.mdx +604 -182
  283. package/.docs/raw/reference/{scorers/run-experiment.mdx → evals/run-evals.mdx} +17 -18
  284. package/.docs/raw/reference/evals/textual-difference.mdx +149 -117
  285. package/.docs/raw/reference/evals/tone-consistency.mdx +149 -125
  286. package/.docs/raw/reference/{scorers → evals}/tool-call-accuracy.mdx +8 -6
  287. package/.docs/raw/reference/evals/toxicity.mdx +152 -96
  288. package/.docs/raw/reference/{observability/logging → logging}/pino-logger.mdx +2 -2
  289. package/.docs/raw/reference/memory/createThread.mdx +5 -5
  290. package/.docs/raw/reference/memory/deleteMessages.mdx +7 -7
  291. package/.docs/raw/reference/memory/getThreadById.mdx +4 -4
  292. package/.docs/raw/reference/memory/listThreadsByResourceId.mdx +110 -0
  293. package/.docs/raw/reference/memory/memory-class.mdx +13 -9
  294. package/.docs/raw/reference/memory/query.mdx +58 -57
  295. package/.docs/raw/reference/memory/recall.mdx +185 -0
  296. package/.docs/raw/reference/observability/tracing/configuration.mdx +245 -0
  297. package/.docs/raw/reference/observability/{ai-tracing → tracing}/exporters/arize.mdx +13 -13
  298. package/.docs/raw/reference/observability/{ai-tracing → tracing}/exporters/braintrust.mdx +11 -8
  299. package/.docs/raw/reference/observability/{ai-tracing → tracing}/exporters/cloud-exporter.mdx +21 -19
  300. package/.docs/raw/reference/observability/{ai-tracing → tracing}/exporters/console-exporter.mdx +49 -17
  301. package/.docs/raw/reference/observability/{ai-tracing → tracing}/exporters/default-exporter.mdx +42 -41
  302. package/.docs/raw/reference/observability/{ai-tracing → tracing}/exporters/langfuse.mdx +10 -7
  303. package/.docs/raw/reference/observability/{ai-tracing → tracing}/exporters/langsmith.mdx +10 -7
  304. package/.docs/raw/reference/observability/{ai-tracing → tracing}/exporters/otel.mdx +5 -5
  305. package/.docs/raw/reference/observability/tracing/instances.mdx +168 -0
  306. package/.docs/raw/reference/observability/{ai-tracing → tracing}/interfaces.mdx +115 -89
  307. package/.docs/raw/reference/observability/{ai-tracing → tracing}/processors/sensitive-data-filter.mdx +3 -3
  308. package/.docs/raw/reference/observability/{ai-tracing/span.mdx → tracing/spans.mdx} +59 -41
  309. package/.docs/raw/reference/processors/batch-parts-processor.mdx +9 -3
  310. package/.docs/raw/reference/processors/language-detector.mdx +9 -3
  311. package/.docs/raw/reference/processors/moderation-processor.mdx +9 -3
  312. package/.docs/raw/reference/processors/pii-detector.mdx +9 -3
  313. package/.docs/raw/reference/processors/prompt-injection-detector.mdx +9 -3
  314. package/.docs/raw/reference/processors/system-prompt-scrubber.mdx +9 -3
  315. package/.docs/raw/reference/processors/token-limiter-processor.mdx +9 -3
  316. package/.docs/raw/reference/processors/unicode-normalizer.mdx +9 -3
  317. package/.docs/raw/reference/rag/chunk.mdx +1 -8
  318. package/.docs/raw/reference/rag/database-config.mdx +7 -7
  319. package/.docs/raw/reference/rag/metadata-filters.mdx +14 -11
  320. package/.docs/raw/reference/storage/cloudflare-d1.mdx +1 -1
  321. package/.docs/raw/reference/storage/cloudflare.mdx +1 -1
  322. package/.docs/raw/reference/storage/dynamodb.mdx +3 -3
  323. package/.docs/raw/reference/storage/lance.mdx +1 -1
  324. package/.docs/raw/reference/storage/libsql.mdx +3 -1
  325. package/.docs/raw/reference/storage/mongodb.mdx +1 -1
  326. package/.docs/raw/reference/storage/mssql.mdx +6 -1
  327. package/.docs/raw/reference/storage/postgresql.mdx +7 -1
  328. package/.docs/raw/reference/storage/upstash.mdx +2 -1
  329. package/.docs/raw/reference/streaming/agents/stream.mdx +12 -12
  330. package/.docs/raw/reference/streaming/agents/streamLegacy.mdx +8 -8
  331. package/.docs/raw/reference/streaming/workflows/observeStream.mdx +3 -3
  332. package/.docs/raw/reference/streaming/workflows/observeStreamVNext.mdx +3 -3
  333. package/.docs/raw/reference/streaming/workflows/resumeStreamVNext.mdx +6 -6
  334. package/.docs/raw/reference/streaming/workflows/stream.mdx +10 -10
  335. package/.docs/raw/reference/streaming/workflows/streamVNext.mdx +11 -11
  336. package/.docs/raw/reference/templates/overview.mdx +3 -3
  337. package/.docs/raw/reference/tools/create-tool.mdx +52 -35
  338. package/.docs/raw/reference/tools/graph-rag-tool.mdx +15 -15
  339. package/.docs/raw/reference/tools/mcp-client.mdx +1 -1
  340. package/.docs/raw/reference/tools/mcp-server.mdx +119 -35
  341. package/.docs/raw/reference/tools/vector-query-tool.mdx +27 -26
  342. package/.docs/raw/reference/vectors/couchbase.mdx +8 -2
  343. package/.docs/raw/reference/vectors/libsql.mdx +2 -1
  344. package/.docs/raw/reference/vectors/mongodb.mdx +7 -1
  345. package/.docs/raw/reference/vectors/pg.mdx +3 -0
  346. package/.docs/raw/reference/vectors/s3vectors.mdx +1 -1
  347. package/.docs/raw/reference/vectors/upstash.mdx +1 -0
  348. package/.docs/raw/reference/voice/google-gemini-live.mdx +1 -1
  349. package/.docs/raw/reference/voice/voice.addTools.mdx +3 -3
  350. package/.docs/raw/reference/workflows/run-methods/cancel.mdx +4 -4
  351. package/.docs/raw/reference/workflows/run-methods/resume.mdx +14 -14
  352. package/.docs/raw/reference/workflows/run-methods/start.mdx +17 -17
  353. package/.docs/raw/reference/workflows/run.mdx +1 -8
  354. package/.docs/raw/reference/workflows/step.mdx +5 -5
  355. package/.docs/raw/reference/workflows/workflow-methods/branch.mdx +2 -2
  356. package/.docs/raw/reference/workflows/workflow-methods/commit.mdx +1 -1
  357. package/.docs/raw/reference/workflows/workflow-methods/create-run.mdx +7 -13
  358. package/.docs/raw/reference/workflows/workflow-methods/dountil.mdx +1 -1
  359. package/.docs/raw/reference/workflows/workflow-methods/dowhile.mdx +1 -1
  360. package/.docs/raw/reference/workflows/workflow-methods/foreach.mdx +1 -1
  361. package/.docs/raw/reference/workflows/workflow-methods/map.mdx +5 -0
  362. package/.docs/raw/reference/workflows/workflow-methods/parallel.mdx +1 -1
  363. package/.docs/raw/reference/workflows/workflow-methods/sendEvent.mdx +2 -2
  364. package/.docs/raw/reference/workflows/workflow-methods/sleep.mdx +1 -1
  365. package/.docs/raw/reference/workflows/workflow-methods/sleepUntil.mdx +1 -1
  366. package/.docs/raw/reference/workflows/workflow-methods/then.mdx +1 -1
  367. package/.docs/raw/reference/workflows/workflow-methods/waitForEvent.mdx +1 -1
  368. package/.docs/raw/reference/workflows/workflow.mdx +1 -1
  369. package/.docs/raw/server-db/custom-api-routes.mdx +2 -2
  370. package/.docs/raw/server-db/mastra-client.mdx +23 -22
  371. package/.docs/raw/server-db/middleware.mdx +7 -7
  372. package/.docs/raw/server-db/production-server.mdx +4 -4
  373. package/.docs/raw/server-db/{runtime-context.mdx → request-context.mdx} +46 -45
  374. package/.docs/raw/server-db/storage.mdx +29 -21
  375. package/.docs/raw/streaming/events.mdx +3 -3
  376. package/.docs/raw/streaming/overview.mdx +5 -5
  377. package/.docs/raw/streaming/tool-streaming.mdx +18 -17
  378. package/.docs/raw/streaming/workflow-streaming.mdx +1 -1
  379. package/.docs/raw/tools-mcp/advanced-usage.mdx +5 -4
  380. package/.docs/raw/tools-mcp/mcp-overview.mdx +33 -20
  381. package/.docs/raw/tools-mcp/overview.mdx +11 -11
  382. package/.docs/raw/voice/overview.mdx +63 -43
  383. package/.docs/raw/voice/speech-to-speech.mdx +5 -3
  384. package/.docs/raw/voice/speech-to-text.mdx +10 -9
  385. package/.docs/raw/voice/text-to-speech.mdx +13 -12
  386. package/.docs/raw/workflows/agents-and-tools.mdx +9 -5
  387. package/.docs/raw/workflows/control-flow.mdx +3 -3
  388. package/.docs/raw/workflows/error-handling.mdx +2 -21
  389. package/.docs/raw/workflows/human-in-the-loop.mdx +7 -4
  390. package/.docs/raw/workflows/inngest-workflow.mdx +3 -3
  391. package/.docs/raw/workflows/input-data-mapping.mdx +107 -0
  392. package/.docs/raw/workflows/overview.mdx +17 -16
  393. package/.docs/raw/workflows/snapshots.mdx +13 -11
  394. package/.docs/raw/workflows/suspend-and-resume.mdx +23 -15
  395. package/CHANGELOG.md +55 -53
  396. package/README.md +11 -2
  397. package/dist/{chunk-TUAHUTTB.js → chunk-5NJC7NRO.js} +3 -0
  398. package/dist/index.d.ts.map +1 -1
  399. package/dist/prepare-docs/copy-raw.d.ts.map +1 -1
  400. package/dist/prepare-docs/prepare.js +1 -1
  401. package/dist/prompts/migration.d.ts +6 -0
  402. package/dist/prompts/migration.d.ts.map +1 -0
  403. package/dist/stdio.js +402 -30
  404. package/dist/tools/migration.d.ts +40 -0
  405. package/dist/tools/migration.d.ts.map +1 -0
  406. package/package.json +8 -12
  407. package/.docs/organized/changelogs/%40mastra%2Fcloud.md +0 -302
  408. package/.docs/raw/observability/nextjs-tracing.mdx +0 -109
  409. package/.docs/raw/observability/otel-tracing.mdx +0 -189
  410. package/.docs/raw/reference/agents/getScorers.mdx +0 -69
  411. package/.docs/raw/reference/agents/getTools.mdx +0 -69
  412. package/.docs/raw/reference/agents/getWorkflows.mdx +0 -69
  413. package/.docs/raw/reference/client-js/workflows-legacy.mdx +0 -143
  414. package/.docs/raw/reference/core/getAgents.mdx +0 -35
  415. package/.docs/raw/reference/core/getLogs.mdx +0 -96
  416. package/.docs/raw/reference/core/getLogsByRunId.mdx +0 -87
  417. package/.docs/raw/reference/core/getMCPServers.mdx +0 -36
  418. package/.docs/raw/reference/core/getMemory.mdx +0 -36
  419. package/.docs/raw/reference/core/getScorerByName.mdx +0 -78
  420. package/.docs/raw/reference/core/getScorers.mdx +0 -43
  421. package/.docs/raw/reference/core/getVectors.mdx +0 -36
  422. package/.docs/raw/reference/core/getWorkflows.mdx +0 -45
  423. package/.docs/raw/reference/evals/context-position.mdx +0 -197
  424. package/.docs/raw/reference/evals/context-relevancy.mdx +0 -196
  425. package/.docs/raw/reference/evals/contextual-recall.mdx +0 -196
  426. package/.docs/raw/reference/evals/summarization.mdx +0 -212
  427. package/.docs/raw/reference/legacyWorkflows/after.mdx +0 -89
  428. package/.docs/raw/reference/legacyWorkflows/afterEvent.mdx +0 -79
  429. package/.docs/raw/reference/legacyWorkflows/commit.mdx +0 -33
  430. package/.docs/raw/reference/legacyWorkflows/createRun.mdx +0 -76
  431. package/.docs/raw/reference/legacyWorkflows/else.mdx +0 -68
  432. package/.docs/raw/reference/legacyWorkflows/events.mdx +0 -305
  433. package/.docs/raw/reference/legacyWorkflows/execute.mdx +0 -110
  434. package/.docs/raw/reference/legacyWorkflows/if.mdx +0 -108
  435. package/.docs/raw/reference/legacyWorkflows/resume.mdx +0 -158
  436. package/.docs/raw/reference/legacyWorkflows/resumeWithEvent.mdx +0 -133
  437. package/.docs/raw/reference/legacyWorkflows/snapshots.mdx +0 -207
  438. package/.docs/raw/reference/legacyWorkflows/start.mdx +0 -87
  439. package/.docs/raw/reference/legacyWorkflows/step-class.mdx +0 -100
  440. package/.docs/raw/reference/legacyWorkflows/step-condition.mdx +0 -137
  441. package/.docs/raw/reference/legacyWorkflows/step-function.mdx +0 -93
  442. package/.docs/raw/reference/legacyWorkflows/step-options.mdx +0 -69
  443. package/.docs/raw/reference/legacyWorkflows/step-retries.mdx +0 -196
  444. package/.docs/raw/reference/legacyWorkflows/suspend.mdx +0 -70
  445. package/.docs/raw/reference/legacyWorkflows/then.mdx +0 -72
  446. package/.docs/raw/reference/legacyWorkflows/until.mdx +0 -168
  447. package/.docs/raw/reference/legacyWorkflows/watch.mdx +0 -124
  448. package/.docs/raw/reference/legacyWorkflows/while.mdx +0 -168
  449. package/.docs/raw/reference/legacyWorkflows/workflow.mdx +0 -234
  450. package/.docs/raw/reference/memory/getThreadsByResourceId.mdx +0 -79
  451. package/.docs/raw/reference/memory/getThreadsByResourceIdPaginated.mdx +0 -110
  452. package/.docs/raw/reference/observability/ai-tracing/ai-tracing.mdx +0 -185
  453. package/.docs/raw/reference/observability/ai-tracing/configuration.mdx +0 -238
  454. package/.docs/raw/reference/observability/otel-tracing/otel-config.mdx +0 -117
  455. package/.docs/raw/reference/observability/otel-tracing/providers/arize-ax.mdx +0 -81
  456. package/.docs/raw/reference/observability/otel-tracing/providers/arize-phoenix.mdx +0 -121
  457. package/.docs/raw/reference/observability/otel-tracing/providers/braintrust.mdx +0 -40
  458. package/.docs/raw/reference/observability/otel-tracing/providers/dash0.mdx +0 -40
  459. package/.docs/raw/reference/observability/otel-tracing/providers/index.mdx +0 -20
  460. package/.docs/raw/reference/observability/otel-tracing/providers/keywordsai.mdx +0 -73
  461. package/.docs/raw/reference/observability/otel-tracing/providers/laminar.mdx +0 -41
  462. package/.docs/raw/reference/observability/otel-tracing/providers/langfuse.mdx +0 -84
  463. package/.docs/raw/reference/observability/otel-tracing/providers/langsmith.mdx +0 -48
  464. package/.docs/raw/reference/observability/otel-tracing/providers/langwatch.mdx +0 -43
  465. package/.docs/raw/reference/observability/otel-tracing/providers/new-relic.mdx +0 -40
  466. package/.docs/raw/reference/observability/otel-tracing/providers/signoz.mdx +0 -40
  467. package/.docs/raw/reference/observability/otel-tracing/providers/traceloop.mdx +0 -40
  468. package/.docs/raw/reference/scorers/answer-relevancy.mdx +0 -227
  469. package/.docs/raw/reference/scorers/bias.mdx +0 -228
  470. package/.docs/raw/reference/scorers/completeness.mdx +0 -214
  471. package/.docs/raw/reference/scorers/content-similarity.mdx +0 -197
  472. package/.docs/raw/reference/scorers/context-precision.mdx +0 -352
  473. package/.docs/raw/reference/scorers/faithfulness.mdx +0 -241
  474. package/.docs/raw/reference/scorers/hallucination.mdx +0 -252
  475. package/.docs/raw/reference/scorers/keyword-coverage.mdx +0 -229
  476. package/.docs/raw/reference/scorers/prompt-alignment.mdx +0 -668
  477. package/.docs/raw/reference/scorers/textual-difference.mdx +0 -203
  478. package/.docs/raw/reference/scorers/tone-consistency.mdx +0 -211
  479. package/.docs/raw/reference/scorers/toxicity.mdx +0 -228
  480. package/.docs/raw/reference/workflows/run-methods/watch.mdx +0 -73
  481. package/.docs/raw/scorers/evals-old-api/custom-eval.mdx +0 -24
  482. package/.docs/raw/scorers/evals-old-api/overview.mdx +0 -106
  483. package/.docs/raw/scorers/evals-old-api/running-in-ci.mdx +0 -85
  484. package/.docs/raw/scorers/evals-old-api/textual-evals.mdx +0 -58
  485. package/.docs/raw/scorers/off-the-shelf-scorers.mdx +0 -50
  486. package/.docs/raw/workflows-legacy/control-flow.mdx +0 -774
  487. package/.docs/raw/workflows-legacy/dynamic-workflows.mdx +0 -239
  488. package/.docs/raw/workflows-legacy/error-handling.mdx +0 -187
  489. package/.docs/raw/workflows-legacy/nested-workflows.mdx +0 -360
  490. package/.docs/raw/workflows-legacy/overview.mdx +0 -182
  491. package/.docs/raw/workflows-legacy/runtime-variables.mdx +0 -156
  492. package/.docs/raw/workflows-legacy/steps.mdx +0 -115
  493. package/.docs/raw/workflows-legacy/suspend-and-resume.mdx +0 -406
  494. package/.docs/raw/workflows-legacy/variables.mdx +0 -318
@@ -0,0 +1,265 @@
1
+ ---
2
+ title: "Agent Class | v1 Migration Guide"
3
+ description: "Learn how to migrate Agent class changes when upgrading to v1."
4
+ ---
5
+
6
+ # Agent Class
7
+
8
+ The Agent class has been updated with reorganized voice methods, updated property access patterns, and streamlined streaming APIs.
9
+
10
+ ## Changed
11
+
12
+ ### `getAgents` to `listAgents`
13
+
14
+ The `mastra.getAgents()` method has been renamed to `mastra.listAgents()`. This change aligns with the naming convention used across the API where plural getter methods use the `list` prefix.
15
+
16
+ To migrate, replace all calls to `mastra.getAgents()` with `mastra.listAgents()`.
17
+
18
+ ```diff
19
+ - const agents = mastra.getAgents();
20
+ + const agents = mastra.listAgents();
21
+ ```
22
+
23
+ :::tip[Codemod]
24
+
25
+ You can use Mastra's codemod CLI to update your code automatically:
26
+
27
+ ```shell
28
+ npx @mastra/codemod@beta v1/agent-get-agents .
29
+ ```
30
+
31
+ :::
32
+
33
+ ### `RuntimeContext` to `RequestContext`
34
+
35
+ The `RuntimeContext` class has been renamed to `RequestContext` throughout the codebase. This change provides clearer naming that better describes its purpose as request-specific data and aligns with web framework conventions.
36
+
37
+ To migrate, update all imports and parameter names from `RuntimeContext`/`runtimeContext` to `RequestContext`/`requestContext`.
38
+
39
+ ```diff
40
+ - import { RuntimeContext } from '@mastra/core/runtime-context';
41
+ + import { RequestContext } from '@mastra/core/request-context';
42
+
43
+ - const runtimeContext = new RuntimeContext();
44
+ - runtimeContext.set('userTier', 'enterprise');
45
+ + const requestContext = new RequestContext();
46
+ + requestContext.set('userTier', 'enterprise');
47
+
48
+ - await agent.generate(messages, { runtimeContext });
49
+ + await agent.generate(messages, { requestContext });
50
+ ```
51
+
52
+ :::tip[Codemod]
53
+
54
+ You can use Mastra's codemod CLI to update your code automatically:
55
+
56
+ ```shell
57
+ npx @mastra/codemod@beta v1/runtime-context .
58
+ ```
59
+
60
+ :::
61
+
62
+ ### Direct property access to getter methods
63
+
64
+ Direct property access to `agent.llm`, `agent.tools`, and `agent.instructions` is deprecated. This change provides better encapsulation and consistency with the broader API design.
65
+
66
+ To migrate, replace property access with the corresponding getter methods.
67
+
68
+ ```diff
69
+ - const llm = agent.llm;
70
+ - const tools = agent.tools;
71
+ - const instructions = agent.instructions;
72
+ + const llm = agent.getLLM();
73
+ + const tools = agent.getTools();
74
+ + const instructions = agent.getInstructions();
75
+ ```
76
+
77
+ :::tip[Codemod]
78
+
79
+ You can use Mastra's codemod CLI to update your code automatically:
80
+
81
+ ```shell
82
+ npx @mastra/codemod@beta v1/agent-property-access .
83
+ ```
84
+
85
+ :::
86
+
87
+ ### Voice methods moved to `agent.voice` namespace
88
+
89
+ Voice-related methods have been moved from the Agent class to the `agent.voice` namespace. This change provides better organization and clearer separation of concerns.
90
+
91
+ To migrate, update voice method calls to use the `agent.voice` namespace.
92
+
93
+ ```diff
94
+ - await agent.speak('Hello');
95
+ - await agent.listen();
96
+ - const speakers = agent.getSpeakers();
97
+ + await agent.voice.speak('Hello');
98
+ + await agent.voice.listen();
99
+ + const speakers = agent.voice.getSpeakers();
100
+ ```
101
+
102
+ :::tip[Codemod]
103
+
104
+ You can use Mastra's codemod CLI to update your code automatically:
105
+
106
+ ```shell
107
+ npx @mastra/codemod@beta v1/agent-voice .
108
+ ```
109
+
110
+ :::
111
+
112
+ ### `agent.fetchMemory()` to `(await agent.getMemory()).recall()`
113
+
114
+ The `fetchMemory()` method has been replaced with a more explicit API. This change provides better clarity about the asynchronous nature of memory access.
115
+
116
+ To migrate, replace `fetchMemory()` calls with the new API.
117
+
118
+ ```diff
119
+ - const messages = await agent.fetchMemory({ threadId: 'thread-123' });
120
+ + const memory = await agent.getMemory();
121
+ + const result = await memory.recall({ threadId: 'thread-123' });
122
+ + const messages = result.messages;
123
+ ```
124
+
125
+ ### Processor method names from `get*` to `list*`
126
+
127
+ Agent processor methods have been renamed from `get*` to `list*` pattern for consistency with the broader API. This change aligns with the convention that `list*` methods return collections.
128
+
129
+ To migrate, update processor method names.
130
+
131
+ ```diff
132
+ - const inputProcessors = await agent.getInputProcessors(runtimeContext);
133
+ - const outputProcessors = await agent.getOutputProcessors(runtimeContext);
134
+ + const inputProcessors = await agent.listInputProcessors(requestContext);
135
+ + const outputProcessors = await agent.listOutputProcessors(requestContext);
136
+ ```
137
+
138
+ :::tip[Codemod]
139
+
140
+ You can use Mastra's codemod CLI to update your code automatically:
141
+
142
+ ```shell
143
+ npx @mastra/codemod@beta v1/agent-processor-methods .
144
+ ```
145
+
146
+ :::
147
+
148
+ ### Default options method renames for AI SDK versions
149
+
150
+ Default options methods have been renamed to clarify legacy (AI SDK v4) vs new (AI SDK v5) APIs. This change helps developers understand which AI SDK version they're targeting.
151
+
152
+ To migrate, update method names based on which AI SDK version you're using.
153
+
154
+ ```diff
155
+ // For legacy AI SDK v4
156
+ - const options = await agent.getDefaultGenerateOptions();
157
+ - const streamOptions = await agent.getDefaultStreamOptions();
158
+ + const options = await agent.getDefaultGenerateOptionsLegacy();
159
+ + const streamOptions = await agent.getDefaultStreamOptionsLegacy();
160
+
161
+ // For new AI SDK v5 (default)
162
+ const streamOptions = await agent.getDefaultStreamOptions();
163
+ ```
164
+
165
+ ### `modelSettings.abortSignal` to top-level `abortSignal`
166
+
167
+ The `abortSignal` option has been moved from `modelSettings` to the top level of stream/generate options. This change provides a clearer separation between model-specific settings and execution control.
168
+
169
+ To migrate, move `abortSignal` from `modelSettings` to the top level.
170
+
171
+ ```diff
172
+ agent.stream('Hello', {
173
+ - modelSettings: {
174
+ - abortSignal: abortController.signal,
175
+ - },
176
+ + abortSignal: abortController.signal,
177
+ });
178
+ ```
179
+
180
+ ### `output` to `structuredOutput.schema`
181
+
182
+ The deprecated `output` and `experimental_output` options have been removed. This change consolidates on a single, stable API for structured output.
183
+
184
+ To migrate, update from `output` or `experimental_output` to `structuredOutput.schema`.
185
+
186
+ ```diff
187
+ agent.stream('Hello', {
188
+ - output: z.object({ result: z.string() }),
189
+ + structuredOutput: {
190
+ + schema: z.object({ result: z.string() }),
191
+ + },
192
+ });
193
+ ```
194
+
195
+ ## Removed
196
+
197
+ ### `generateVNext` and `streamVNext` methods
198
+
199
+ The deprecated `generateVNext()` and `streamVNext()` methods have been removed. These methods were previously used for AI SDK v5 compatibility but are now the standard implementation.
200
+
201
+ To migrate, use the standard `generate()` and `stream()` methods.
202
+
203
+ ```diff
204
+ - const result = await agent.generateVNext('Hello');
205
+ - const stream = await agent.streamVNext('Hello');
206
+ + const result = await agent.generate('Hello');
207
+ + const stream = await agent.stream('Hello');
208
+ ```
209
+
210
+ :::tip[Codemod]
211
+
212
+ You can use Mastra's codemod CLI to update your code automatically:
213
+
214
+ ```shell
215
+ npx @mastra/codemod@beta v1/agent-generate-stream-v-next .
216
+ ```
217
+
218
+ :::
219
+
220
+ ### `format` parameter from `stream()` and `generate()`
221
+
222
+ The `format` parameter has been removed from `agent.stream()` and `agent.generate()` methods. AI SDK stream transformations are now handled by the `@mastra/ai-sdk` package. This change improves tree-shaking by moving AI SDK-specific code to a dedicated package.
223
+
224
+ To migrate, use the `toAISdkStream()` function from `@mastra/ai-sdk` for AI SDK format conversion.
225
+
226
+ ```diff
227
+ - const stream = await agent.stream(messages, {
228
+ - format: 'aisdk',
229
+ - });
230
+
231
+ + import { toAISdkStream } from '@mastra/ai-sdk';
232
+ +
233
+ + const stream = await agent.stream(messages);
234
+ + const aiSdkStream = toAISdkStream(stream, { from: 'agent' });
235
+ ```
236
+
237
+ ### `agent.toStep()` method
238
+
239
+ The `toStep()` method has been removed from the Agent class. Agents can now be added directly to workflow steps without explicit conversion.
240
+
241
+ To migrate, add agents directly to workflow steps. Workflows handle the transformation automatically.
242
+
243
+ ```diff
244
+ - const step = agent.toStep();
245
+ - const workflow = new Workflow({
246
+ - steps: [step],
247
+ - });
248
+
249
+ + const workflow = new Workflow({
250
+ + steps: [agent],
251
+ + });
252
+ ```
253
+
254
+ ### `TMetrics` generic parameter from Agent
255
+
256
+ The `TMetrics` generic parameter has been removed from `AgentConfig` and the `Agent` constructor. Metrics/scorers are now configured using the scorers API instead of being part of the Agent type system.
257
+
258
+ To migrate, remove the `TMetrics` generic parameter and configure scorers using the new API.
259
+
260
+ ```diff
261
+ - const agent = new Agent<AgentId, Tools, Metrics>({
262
+ + const agent = new Agent<AgentId, Tools>({
263
+ // ...
264
+ });
265
+ ```
@@ -0,0 +1,48 @@
1
+ ---
2
+ title: "CLI | v1 Migration Guide"
3
+ description: "Learn how to migrate CLI changes when upgrading to v1."
4
+ ---
5
+
6
+ # CLI
7
+
8
+ The CLI has been simplified by removing deployment commands, configuration flags, and starter files.
9
+
10
+ ## Removed
11
+
12
+ ### `mastra deploy` command
13
+
14
+ The `mastra deploy` command has been removed from the CLI. This change simplifies the CLI by removing vendor-specific deployment logic.
15
+
16
+ To migrate, choose one of the [deployment platforms](/docs/v1/deployment/overview) of your choice.
17
+
18
+ ### `--env` flag from `mastra build`
19
+
20
+ The `--env` flag has been removed from the `mastra build` command. This change simplifies the build command.
21
+
22
+ To migrate, use `mastra start --env <env>` to start the build output with a custom environment.
23
+
24
+ ```diff
25
+ - mastra build --env production
26
+ + mastra build
27
+ + mastra start --env production
28
+ ```
29
+
30
+ ### `--port` flag from `mastra dev`
31
+
32
+ The `--port` flag has been removed from the `mastra dev` command. Port configuration is now handled through the Mastra instance configuration. This change centralizes port configuration.
33
+
34
+ To migrate, use `server.port` on the Mastra instance instead of the CLI flag.
35
+
36
+ ```ts
37
+ const mastra = new Mastra({
38
+ server: {
39
+ port: 3001,
40
+ },
41
+ });
42
+ ```
43
+
44
+ ### Telemetry options from CLI
45
+
46
+ The `telemetry` option has been removed from CLI commands including the `--no-telemetry` / `-nt` flag. Telemetry configuration has been removed from the CLI. This change reflects the move of telemetry features to the observability package.
47
+
48
+ To migrate, remove telemetry flags from CLI commands. Use `@mastra/observability` for tracing features.
@@ -0,0 +1,153 @@
1
+ ---
2
+ title: "Client SDK | v1 Migration Guide"
3
+ description: "Learn how to migrate client SDK changes when upgrading to v1."
4
+ ---
5
+
6
+ # Client SDK
7
+
8
+ Client SDK changes align with server-side API updates including renamed utilities, updated pagination, and type naming conventions.
9
+
10
+ ## Changed
11
+
12
+ ### Client SDK types from `Get*` to `List*`
13
+
14
+ Client SDK types have been renamed from `Get*` to `List*` pattern. This change aligns type names with the method naming convention.
15
+
16
+ To migrate, update type imports to use the new naming pattern.
17
+
18
+ ```diff
19
+ - import type {
20
+ - GetWorkflowRunsParams,
21
+ - GetWorkflowRunsResponse,
22
+ - GetMemoryThreadParams,
23
+ - } from '@mastra/client-js';
24
+ + import type {
25
+ + ListWorkflowRunsParams,
26
+ + ListWorkflowRunsResponse,
27
+ + ListMemoryThreadsParams,
28
+ + } from '@mastra/client-js';
29
+ ```
30
+
31
+ ### Pagination parameters from `offset/limit` to `page/perPage`
32
+
33
+ All client SDK methods that used `offset/limit` now use `page/perPage`. This change provides a more intuitive pagination model aligned with web pagination patterns.
34
+
35
+ To migrate, update pagination parameters in all client SDK method calls. Example:
36
+
37
+ ```diff
38
+ client.memory.listMessages({
39
+ threadId: 'thread-123',
40
+ - offset: 0,
41
+ - limit: 20,
42
+ + page: 0,
43
+ + perPage: 20,
44
+ });
45
+ ```
46
+
47
+ ### `getMemoryThread` parameter structure
48
+
49
+ The `getMemoryThread` method parameter structure has been updated. This change provides a more consistent API across memory methods.
50
+
51
+ To migrate, update the method call with the new parameter structure. Check the updated API documentation for the specific changes.
52
+
53
+ ```diff
54
+ - const thread = await client.memory.getMemoryThread(threadId, agentId);
55
+ + const thread = await client.memory.getMemoryThread({ threadId, agentId });
56
+ ```
57
+
58
+ ## Removed
59
+
60
+ ### `toAISdkFormat` function
61
+
62
+ The `toAISdkFormat()` function has been removed from `@mastra/ai-sdk`. This change provides clearer naming for stream conversion utilities.
63
+
64
+ To migrate, use `toAISdkStream()` instead.
65
+
66
+ ```diff
67
+ - import { toAISdkFormat } from '@mastra/ai-sdk';
68
+ - const stream = toAISdkFormat(agentStream, { from: 'agent' });
69
+ + import { toAISdkStream } from '@mastra/ai-sdk';
70
+ + const stream = toAISdkStream(agentStream, { from: 'agent' });
71
+ ```
72
+
73
+ ### Network memory methods
74
+
75
+ Network memory methods have been removed from `@mastra/client-js`. The `NetworkMemoryThread` class and all network memory-related methods are no longer available. This change simplifies the memory API by removing specialized network memory functionality.
76
+
77
+ To migrate, use regular memory APIs instead of network memory.
78
+
79
+ ```diff
80
+ - import { MastraClient } from '@mastra/client-js';
81
+ -
82
+ - const client = new MastraClient({ baseUrl: '...' });
83
+ - const networkThread = client.networkMemory.getThread('thread-id');
84
+ - const networkThread = client.memory.networkThread('thread-id', 'network-id');
85
+ - await networkThread.get();
86
+ - await networkThread.getMessages();
87
+
88
+ + // Use regular memory thread APIs instead
89
+ + const client = new MastraClient({ baseUrl: '...' });
90
+ + const thread = client.memory.getThread('thread-id');
91
+ + await thread.get();
92
+ + const messages = await thread.listMessages();
93
+ ```
94
+
95
+ ### Watch-related types
96
+
97
+ Watch-related types have been removed from `@mastra/client-js`. This includes `WorkflowWatchResult`, `WatchEvent`, and related types. This change reflects the removal of the watch API in favor of streaming.
98
+
99
+ To migrate, use workflow streaming APIs instead of watch.
100
+
101
+ ```diff
102
+ - import type { WorkflowWatchResult, WatchEvent } from '@mastra/client-js';
103
+ -
104
+ - const workflow = client.getWorkflow('my-workflow');
105
+ - const run = await workflow.createRun();
106
+ - await run.watch((event: WatchEvent) => {
107
+ - console.log('Event:', event);
108
+ - });
109
+
110
+ + const workflow = client.getWorkflow('my-workflow');
111
+ + const run = await workflow.createRun();
112
+ + const stream = await run.stream({ inputData: { ... } });
113
+ + for await (const chunk of stream) {
114
+ + console.log('Event:', chunk);
115
+ + }
116
+ ```
117
+
118
+ ### Deprecated stream endpoints
119
+
120
+ Some stream endpoints are deprecated and will be removed. The `/api/agents/:agentId/stream/vnext` endpoint returns 410 Gone, and `/api/agents/:agentId/stream/ui` is deprecated. This change consolidates on standard streaming endpoints.
121
+
122
+ To migrate, use the standard stream endpoint or `@mastra/ai-sdk` for UI message transformations.
123
+
124
+ ```diff
125
+ - const response = await fetch('/api/agents/my-agent/stream/vnext', {
126
+ - method: 'POST',
127
+ - body: JSON.stringify({ messages: [...] }),
128
+ - });
129
+
130
+ + const response = await fetch('/api/agents/my-agent/stream', {
131
+ + method: 'POST',
132
+ + body: JSON.stringify({ messages: [...] }),
133
+ + });
134
+ +
135
+ + // Or use @mastra/ai-sdk for UI message transformations
136
+ ```
137
+
138
+ ### Network memory API endpoints
139
+
140
+ Network memory API endpoints have been removed including `/api/memory/network/*`. This change simplifies the memory API surface.
141
+
142
+ To migrate, use regular memory API endpoints.
143
+
144
+ ```diff
145
+ - const networkThread = await fetch('/api/memory/network/threads/thread-123');
146
+ + const thread = await fetch('/api/memory/threads/thread-123');
147
+ ```
148
+
149
+ ### Eval-related client SDK types
150
+
151
+ Several eval-related types have been removed from the client SDK including `GetEvalsByAgentIdResponse`, `GetTelemetryResponse`, and `GetTelemetryParams`. This change reflects the removal of legacy evals functionality.
152
+
153
+ To migrate, use the new scorers API instead of legacy evals.
@@ -0,0 +1,230 @@
1
+ ---
2
+ title: "Evals & Scorers | v1 Migration Guide"
3
+ description: "Learn how to migrate evals and scorers changes when upgrading to v1."
4
+ ---
5
+
6
+ # Evals & Scorers
7
+
8
+ The evaluation API has been consolidated on the new scorers system with updated naming conventions and configuration requirements.
9
+
10
+ ## Changed
11
+
12
+ ### `getScorers` to `listScorers`
13
+
14
+ The `getScorers()` method has been renamed to `listScorers()`. This change aligns with the naming convention used across the API where plural getter methods use the `list` prefix.
15
+
16
+ To migrate, replace all calls to `getScorers()` with `listScorers()`.
17
+
18
+ ```diff
19
+ - const scorers = mastra.getScorers();
20
+ + const scorers = mastra.listScorers();
21
+ ```
22
+
23
+ :::tip[Codemod]
24
+
25
+ You can use Mastra's codemod CLI to update your code automatically:
26
+
27
+ ```shell
28
+ npx @mastra/codemod@beta v1/evals-get-scorers .
29
+ ```
30
+
31
+ :::
32
+
33
+ ### `runExperiment` to `runEvals`
34
+
35
+ The `runExperiment()` function has been renamed to `runEvals()`. This change provides clearer naming that better describes the evaluation functionality.
36
+
37
+ To migrate, update function calls from `runExperiment` to `runEvals`.
38
+
39
+ ```diff
40
+ - import { createScorer, runExperiment } from '@mastra/core/evals';
41
+ + import { createScorer, runEvals } from '@mastra/core/evals';
42
+ import { myAgent } from './agents/my-agent';
43
+
44
+ const scorer = createScorer({
45
+ id: 'helpfulness-scorer',
46
+ // ...
47
+ });
48
+
49
+ - const result = await runExperiment({ target: myAgent, scorers: [scorer], data: inputs });
50
+ + const result = await runEvals({ target: myAgent, scorers: [scorer], data: inputs });
51
+ ```
52
+
53
+ ### `getScorerByName` to `getScorerById`
54
+
55
+ The `getScorerByName()` method has been renamed to `getScorerById()`. Scorers now require an `id` field instead of `name`. This change aligns with the broader API pattern of using `id` for entity identification.
56
+
57
+ To migrate, update method calls and scorer configuration to use `id` instead of `name`.
58
+
59
+ ```diff
60
+ const scorer = createScorer({
61
+ - name: 'helpfulness-scorer',
62
+ + id: 'helpfulness-scorer',
63
+ // ...
64
+ });
65
+
66
+ - const scorer = mastra.getScorerByName('helpfulness-scorer');
67
+ + const scorer = mastra.getScorerById('helpfulness-scorer');
68
+ ```
69
+
70
+ ### Scorer configuration from `name` to `id`
71
+
72
+ Scorers now require an `id` field instead of `name`. The `name` field is now optional. This change provides consistency with other Mastra entities.
73
+
74
+ To migrate, update scorer definitions to use `id` as the required field.
75
+
76
+ ```diff
77
+ const scorer = createScorer({
78
+ - name: 'helpfulness-scorer',
79
+ + id: 'helpfulness-scorer',
80
+ + name: 'Helpfulness Scorer', // optional
81
+ // ...
82
+ });
83
+ ```
84
+
85
+ ### Storage score APIs to `listScoresBy*` pattern
86
+
87
+ Score storage APIs have been renamed to follow the `listScoresBy*` pattern. This change aligns with the broader storage API naming conventions.
88
+
89
+ To migrate, update score query methods to use the new naming pattern.
90
+
91
+ ```diff
92
+ - const scores = await storage.getScores({ scorerName: 'helpfulness-scorer' });
93
+ + const scores = await storage.listScoresByScorerId({
94
+ + scorerId: 'helpfulness-scorer',
95
+ + });
96
+
97
+ // Also available:
98
+ // - listScoresByRunId
99
+ // - listScoresByEntityId
100
+ // - listScoresBySpan
101
+ ```
102
+
103
+ ### Prebuilt scorer imports to `scorers/prebuilt` path
104
+
105
+ Prebuilt scorer imports have been consolidated under a single `@mastra/evals/scorers/prebuilt` path instead of separate `scorers/llm` and `scorers/code` paths. This change simplifies imports and provides a clearer organization of prebuilt scorers.
106
+
107
+ To migrate, update import statements to use the new `scorers/prebuilt` path.
108
+
109
+ ```diff
110
+ // LLM-based scorers
111
+ - import { createHallucinationScorer } from '@mastra/evals/scorers/llm';
112
+ - import { createFaithfulnessScorer } from '@mastra/evals/scorers/llm';
113
+ + import { createHallucinationScorer } from '@mastra/evals/scorers/prebuilt';
114
+ + import { createFaithfulnessScorer } from '@mastra/evals/scorers/prebuilt';
115
+
116
+ // Code-based scorers
117
+ - import { createContentSimilarityScorer } from '@mastra/evals/scorers/code';
118
+ - import { createCompletenessScorer } from '@mastra/evals/scorers/code';
119
+ + import { createContentSimilarityScorer } from '@mastra/evals/scorers/prebuilt';
120
+ + import { createCompletenessScorer } from '@mastra/evals/scorers/prebuilt';
121
+ ```
122
+
123
+ ### Scorer message types from `UIMessage` to `MastraDBMessage`
124
+
125
+ Scorer input and output types now use `MastraDBMessage[]` instead of `UIMessage`. This change aligns scorers with the database-persisted message format for consistency across the framework.
126
+
127
+ To migrate, update scorer implementations to use `MastraDBMessage` types and access message content through the nested `content` structure.
128
+
129
+ ```diff
130
+ import type {
131
+ ScorerRunInputForAgent,
132
+ ScorerRunOutputForAgent
133
+ } from '@mastra/core/evals';
134
+
135
+ - // ScorerRunInputForAgent uses UIMessage[]
136
+ - const inputMessages: UIMessage[] = run.input.inputMessages;
137
+ + // ScorerRunInputForAgent now uses MastraDBMessage[]
138
+ + import type { MastraDBMessage } from '@mastra/core/agent';
139
+ + const inputMessages: MastraDBMessage[] = run.input.inputMessages;
140
+ ```
141
+
142
+ ### Message content structure to nested format
143
+
144
+ Tool invocations and text content are now accessed through a nested `content` object structure instead of being flat properties on the message. This change provides better type safety and aligns with the database message format.
145
+
146
+ To migrate, access tool invocations via `message.content.toolInvocations` and text via `message.content.content` or use the `getTextContentFromMastraDBMessage()` helper.
147
+
148
+ ```diff
149
+ + import { getTextContentFromMastraDBMessage } from '@mastra/evals';
150
+ +
151
+ const run = await scorer.run(testRun);
152
+
153
+ // Accessing text content
154
+ - const text = message.content;
155
+ + const text = getTextContentFromMastraDBMessage(message);
156
+ + // or directly: message.content.content
157
+
158
+ // Accessing tool invocations
159
+ - const toolCalls = message.toolInvocations;
160
+ + const toolCalls = message.content.toolInvocations;
161
+ ```
162
+
163
+ ## Removed
164
+
165
+ ### Legacy evals code
166
+
167
+ Legacy evals code has been removed from `@mastra/core`. This includes legacy evaluation metrics, scorer/judge modules, and hook-based automatic evaluation code. This change simplifies the codebase by removing outdated evaluation approaches.
168
+
169
+ To migrate, use the new evals/scorers API in `@mastra/core/evals` or `@mastra/evals`.
170
+
171
+ ```diff
172
+ - // Legacy evals APIs
173
+ + import { createScorer, runEvals } from '@mastra/core/evals';
174
+ +
175
+ + const scorer = createScorer({
176
+ + id: 'my-scorer',
177
+ + // Use new scorer API
178
+ + });
179
+ ```
180
+
181
+ ### Agent `TMetrics` generic parameter
182
+
183
+ The `TMetrics` generic parameter has been removed from `AgentConfig` and the `Agent` constructor. Metrics/scorers are now configured using the scorers API instead of being part of the Agent type system. This change simplifies the Agent type signature.
184
+
185
+ To migrate, remove the `TMetrics` generic parameter and configure scorers using the scorers API.
186
+
187
+ ```diff
188
+ - const agent = new Agent<AgentId, Tools, Metrics>({
189
+ + const agent = new Agent<AgentId, Tools>({
190
+ // ...
191
+ });
192
+ ```
193
+
194
+ ### Evals-related type exports
195
+
196
+ Several evals-related type exports have been removed including `DeprecatedOutputOptions`, `Metric`, and processor option types. These types are now internal or have been replaced by the new scorers API. This change reduces API surface area.
197
+
198
+ To migrate, remove references to these removed types and use the new scorers API.
199
+
200
+ ```diff
201
+ - import type {
202
+ - DeprecatedOutputOptions,
203
+ - Metric,
204
+ - LanguageDetectorOptions,
205
+ - ModerationOptions,
206
+ - } from '@mastra/core';
207
+ + // Use new scorers API types
208
+ + import type { Scorer } from '@mastra/core/evals';
209
+ ```
210
+
211
+ ### `createUIMessage` test helper
212
+
213
+ The `createUIMessage()` test helper has been removed and replaced with `createTestMessage()`. The new helper creates `MastraDBMessage` objects with the nested content structure and supports optional tool invocations. This change aligns test utilities with the new message format.
214
+
215
+ To migrate, replace `createUIMessage()` calls with `createTestMessage()` and update to use `MastraDBMessage` types.
216
+
217
+ ```diff
218
+ - import { createUIMessage } from '@mastra/evals';
219
+ + import { createTestMessage } from '@mastra/evals';
220
+
221
+ // Creating test messages
222
+ - const message = createUIMessage({
223
+ - id: 'test-1',
224
+ + const message = createTestMessage({
225
+ + id: 'test-1', // optional, defaults to 'test-message'
226
+ role: 'user',
227
+ content: 'Hello',
228
+ toolInvocations: [], // optional
229
+ });
230
+ ```