@mastra/mcp-docs-server 1.0.0-beta.13 → 1.0.0-beta.15

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 (321) hide show
  1. package/.docs/organized/changelogs/%40mastra%2Fagent-builder.md +27 -27
  2. package/.docs/organized/changelogs/%40mastra%2Fai-sdk.md +78 -78
  3. package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +195 -195
  4. package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +173 -173
  5. package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +195 -195
  6. package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +195 -195
  7. package/.docs/organized/changelogs/%40mastra%2Fconvex.md +248 -0
  8. package/.docs/organized/changelogs/%40mastra%2Fcore.md +338 -338
  9. package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +33 -33
  10. package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +16 -16
  11. package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +41 -41
  12. package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +195 -195
  13. package/.docs/organized/changelogs/%40mastra%2Fevals.md +10 -10
  14. package/.docs/organized/changelogs/%40mastra%2Ffastembed.md +6 -0
  15. package/.docs/organized/changelogs/%40mastra%2Flance.md +195 -195
  16. package/.docs/organized/changelogs/%40mastra%2Flibsql.md +195 -195
  17. package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +17 -17
  18. package/.docs/organized/changelogs/%40mastra%2Fmemory.md +139 -139
  19. package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +219 -219
  20. package/.docs/organized/changelogs/%40mastra%2Fmssql.md +219 -219
  21. package/.docs/organized/changelogs/%40mastra%2Fpg.md +235 -235
  22. package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +102 -102
  23. package/.docs/organized/changelogs/%40mastra%2Frag.md +17 -17
  24. package/.docs/organized/changelogs/%40mastra%2Freact.md +77 -70
  25. package/.docs/organized/changelogs/%40mastra%2Fserver.md +218 -218
  26. package/.docs/organized/changelogs/%40mastra%2Fupstash.md +195 -195
  27. package/.docs/organized/changelogs/create-mastra.md +13 -13
  28. package/.docs/organized/changelogs/mastra.md +56 -56
  29. package/.docs/organized/code-examples/agent-v6.md +210 -0
  30. package/.docs/organized/code-examples/ai-elements.md +1 -1
  31. package/.docs/organized/code-examples/client-side-tools.md +1 -1
  32. package/.docs/raw/agents/adding-voice.mdx +10 -6
  33. package/.docs/raw/agents/agent-approval.mdx +5 -6
  34. package/.docs/raw/agents/agent-memory.mdx +22 -30
  35. package/.docs/raw/agents/guardrails.mdx +60 -50
  36. package/.docs/raw/agents/networks.mdx +8 -12
  37. package/.docs/raw/agents/overview.mdx +39 -23
  38. package/.docs/raw/agents/processors.mdx +20 -19
  39. package/.docs/raw/agents/structured-output.mdx +11 -7
  40. package/.docs/raw/agents/using-tools.mdx +4 -5
  41. package/.docs/raw/deployment/mastra-server.mdx +3 -3
  42. package/.docs/raw/deployment/overview.mdx +7 -1
  43. package/.docs/raw/deployment/web-framework.mdx +4 -6
  44. package/.docs/raw/deployment/workflow-runners.mdx +14 -0
  45. package/.docs/raw/evals/custom-scorers.mdx +9 -6
  46. package/.docs/raw/evals/overview.mdx +3 -6
  47. package/.docs/raw/evals/running-in-ci.mdx +2 -2
  48. package/.docs/raw/getting-started/manual-install.mdx +20 -20
  49. package/.docs/raw/getting-started/mcp-docs-server.mdx +2 -2
  50. package/.docs/raw/getting-started/studio.mdx +1 -1
  51. package/.docs/raw/guides/agent-frameworks/ai-sdk.mdx +4 -4
  52. package/.docs/raw/guides/build-your-ui/ai-sdk-ui.mdx +30 -30
  53. package/.docs/raw/guides/build-your-ui/assistant-ui.mdx +8 -8
  54. package/.docs/raw/guides/build-your-ui/copilotkit.mdx +11 -11
  55. package/.docs/raw/guides/deployment/amazon-ec2.mdx +9 -9
  56. package/.docs/raw/guides/deployment/aws-lambda.mdx +11 -11
  57. package/.docs/raw/guides/deployment/azure-app-services.mdx +2 -2
  58. package/.docs/raw/guides/deployment/cloudflare-deployer.mdx +5 -6
  59. package/.docs/raw/guides/deployment/digital-ocean.mdx +10 -10
  60. package/.docs/raw/guides/deployment/index.mdx +1 -1
  61. package/.docs/raw/guides/deployment/inngest.mdx +444 -0
  62. package/.docs/raw/guides/deployment/netlify-deployer.mdx +4 -4
  63. package/.docs/raw/guides/deployment/vercel-deployer.mdx +5 -6
  64. package/.docs/raw/guides/getting-started/astro.mdx +292 -451
  65. package/.docs/raw/guides/getting-started/express.mdx +7 -7
  66. package/.docs/raw/guides/getting-started/hono.mdx +18 -18
  67. package/.docs/raw/guides/getting-started/next-js.mdx +19 -20
  68. package/.docs/raw/guides/getting-started/quickstart.mdx +4 -4
  69. package/.docs/raw/guides/getting-started/sveltekit.mdx +238 -409
  70. package/.docs/raw/guides/getting-started/vite-react.mdx +21 -21
  71. package/.docs/raw/guides/guide/ai-recruiter.mdx +10 -10
  72. package/.docs/raw/guides/guide/chef-michel.mdx +9 -11
  73. package/.docs/raw/guides/guide/notes-mcp-server.mdx +15 -15
  74. package/.docs/raw/guides/guide/research-assistant.mdx +13 -13
  75. package/.docs/raw/guides/guide/stock-agent.mdx +5 -5
  76. package/.docs/raw/guides/guide/web-search.mdx +8 -8
  77. package/.docs/raw/guides/guide/whatsapp-chat-bot.mdx +7 -7
  78. package/.docs/raw/guides/migrations/ai-sdk-v4-to-v5.mdx +2 -2
  79. package/.docs/raw/guides/migrations/upgrade-to-v1/agent.mdx +1 -1
  80. package/.docs/raw/guides/migrations/upgrade-to-v1/memory.mdx +11 -3
  81. package/.docs/raw/guides/migrations/upgrade-to-v1/processors.mdx +11 -0
  82. package/.docs/raw/guides/migrations/upgrade-to-v1/storage.mdx +41 -0
  83. package/.docs/raw/guides/migrations/upgrade-to-v1/workflows.mdx +0 -2
  84. package/.docs/raw/guides/migrations/vnext-to-standard-apis.mdx +21 -23
  85. package/.docs/raw/index.mdx +2 -2
  86. package/.docs/raw/mastra-cloud/deployment.mdx +39 -0
  87. package/.docs/raw/mastra-cloud/observability.mdx +9 -15
  88. package/.docs/raw/mastra-cloud/overview.mdx +14 -44
  89. package/.docs/raw/mastra-cloud/setup.mdx +64 -0
  90. package/.docs/raw/mastra-cloud/studio.mdx +35 -0
  91. package/.docs/raw/mcp/overview.mdx +31 -13
  92. package/.docs/raw/mcp/publishing-mcp-server.mdx +2 -2
  93. package/.docs/raw/memory/memory-processors.mdx +9 -9
  94. package/.docs/raw/memory/message-history.mdx +69 -0
  95. package/.docs/raw/memory/overview.mdx +34 -76
  96. package/.docs/raw/memory/semantic-recall.mdx +58 -49
  97. package/.docs/raw/memory/storage.mdx +188 -0
  98. package/.docs/raw/memory/working-memory.mdx +7 -7
  99. package/.docs/raw/observability/logging.mdx +9 -10
  100. package/.docs/raw/observability/overview.mdx +0 -1
  101. package/.docs/raw/observability/tracing/bridges/otel.mdx +2 -2
  102. package/.docs/raw/observability/tracing/exporters/default.mdx +3 -3
  103. package/.docs/raw/observability/tracing/exporters/langfuse.mdx +1 -2
  104. package/.docs/raw/observability/tracing/overview.mdx +23 -25
  105. package/.docs/raw/observability/tracing/processors/sensitive-data-filter.mdx +3 -3
  106. package/.docs/raw/rag/chunking-and-embedding.mdx +6 -6
  107. package/.docs/raw/rag/graph-rag.mdx +7 -7
  108. package/.docs/raw/rag/overview.mdx +1 -1
  109. package/.docs/raw/rag/retrieval.mdx +21 -22
  110. package/.docs/raw/rag/vector-databases.mdx +22 -22
  111. package/.docs/raw/reference/agents/agent.mdx +3 -3
  112. package/.docs/raw/reference/agents/generate.mdx +1 -1
  113. package/.docs/raw/reference/agents/generateLegacy.mdx +2 -2
  114. package/.docs/raw/reference/agents/getDefaultGenerateOptions.mdx +2 -2
  115. package/.docs/raw/reference/agents/getDefaultOptions.mdx +2 -2
  116. package/.docs/raw/reference/agents/getDefaultStreamOptions.mdx +2 -2
  117. package/.docs/raw/reference/agents/getDescription.mdx +1 -1
  118. package/.docs/raw/reference/agents/getInstructions.mdx +2 -2
  119. package/.docs/raw/reference/agents/getLLM.mdx +2 -2
  120. package/.docs/raw/reference/agents/getMemory.mdx +2 -2
  121. package/.docs/raw/reference/agents/getModel.mdx +2 -2
  122. package/.docs/raw/reference/agents/getTools.mdx +2 -2
  123. package/.docs/raw/reference/agents/getVoice.mdx +2 -2
  124. package/.docs/raw/reference/agents/listAgents.mdx +2 -2
  125. package/.docs/raw/reference/agents/listScorers.mdx +2 -2
  126. package/.docs/raw/reference/agents/listTools.mdx +2 -2
  127. package/.docs/raw/reference/agents/listWorkflows.mdx +2 -2
  128. package/.docs/raw/reference/agents/network.mdx +1 -1
  129. package/.docs/raw/reference/ai-sdk/chat-route.mdx +2 -2
  130. package/.docs/raw/reference/ai-sdk/handle-chat-stream.mdx +1 -1
  131. package/.docs/raw/reference/ai-sdk/handle-network-stream.mdx +1 -1
  132. package/.docs/raw/reference/ai-sdk/handle-workflow-stream.mdx +1 -1
  133. package/.docs/raw/reference/ai-sdk/network-route.mdx +2 -2
  134. package/.docs/raw/reference/ai-sdk/to-ai-sdk-stream.mdx +6 -6
  135. package/.docs/raw/reference/ai-sdk/to-ai-sdk-v4-messages.mdx +3 -3
  136. package/.docs/raw/reference/ai-sdk/to-ai-sdk-v5-messages.mdx +3 -3
  137. package/.docs/raw/reference/ai-sdk/with-mastra.mdx +1 -1
  138. package/.docs/raw/reference/ai-sdk/workflow-route.mdx +2 -2
  139. package/.docs/raw/reference/auth/auth0.mdx +1 -2
  140. package/.docs/raw/reference/auth/clerk.mdx +1 -2
  141. package/.docs/raw/reference/auth/firebase.mdx +2 -4
  142. package/.docs/raw/reference/auth/jwt.mdx +1 -2
  143. package/.docs/raw/reference/auth/supabase.mdx +1 -2
  144. package/.docs/raw/reference/auth/workos.mdx +1 -2
  145. package/.docs/raw/reference/cli/create-mastra.mdx +10 -10
  146. package/.docs/raw/reference/cli/mastra.mdx +9 -9
  147. package/.docs/raw/reference/client-js/agents.mdx +1 -2
  148. package/.docs/raw/reference/client-js/mastra-client.mdx +1 -1
  149. package/.docs/raw/reference/core/getAgent.mdx +1 -1
  150. package/.docs/raw/reference/core/getAgentById.mdx +1 -1
  151. package/.docs/raw/reference/core/getDeployer.mdx +1 -1
  152. package/.docs/raw/reference/core/getLogger.mdx +1 -1
  153. package/.docs/raw/reference/core/getMCPServer.mdx +1 -1
  154. package/.docs/raw/reference/core/getMCPServerById.mdx +1 -1
  155. package/.docs/raw/reference/core/getMemory.mdx +2 -2
  156. package/.docs/raw/reference/core/getServer.mdx +1 -1
  157. package/.docs/raw/reference/core/getStorage.mdx +2 -2
  158. package/.docs/raw/reference/core/getStoredAgentById.mdx +3 -3
  159. package/.docs/raw/reference/core/getTelemetry.mdx +1 -1
  160. package/.docs/raw/reference/core/getVector.mdx +1 -1
  161. package/.docs/raw/reference/core/getWorkflow.mdx +1 -1
  162. package/.docs/raw/reference/core/listAgents.mdx +1 -1
  163. package/.docs/raw/reference/core/listLogs.mdx +1 -1
  164. package/.docs/raw/reference/core/listLogsByRunId.mdx +1 -1
  165. package/.docs/raw/reference/core/listMCPServers.mdx +1 -1
  166. package/.docs/raw/reference/core/listMemory.mdx +2 -2
  167. package/.docs/raw/reference/core/listStoredAgents.mdx +4 -4
  168. package/.docs/raw/reference/core/listVectors.mdx +1 -1
  169. package/.docs/raw/reference/core/listWorkflows.mdx +1 -1
  170. package/.docs/raw/reference/core/setLogger.mdx +1 -1
  171. package/.docs/raw/reference/core/setStorage.mdx +2 -2
  172. package/.docs/raw/reference/core/setTelemetry.mdx +1 -1
  173. package/.docs/raw/reference/deployer/cloudflare.mdx +1 -2
  174. package/.docs/raw/reference/deployer/deployer.mdx +0 -1
  175. package/.docs/raw/reference/deployer/netlify.mdx +1 -1
  176. package/.docs/raw/reference/deployer/vercel.mdx +2 -4
  177. package/.docs/raw/reference/evals/answer-relevancy.mdx +1 -1
  178. package/.docs/raw/reference/evals/answer-similarity.mdx +1 -1
  179. package/.docs/raw/reference/evals/bias.mdx +1 -1
  180. package/.docs/raw/reference/evals/completeness.mdx +1 -1
  181. package/.docs/raw/reference/evals/content-similarity.mdx +1 -1
  182. package/.docs/raw/reference/evals/context-precision.mdx +1 -1
  183. package/.docs/raw/reference/evals/faithfulness.mdx +1 -1
  184. package/.docs/raw/reference/evals/hallucination.mdx +1 -1
  185. package/.docs/raw/reference/evals/keyword-coverage.mdx +1 -1
  186. package/.docs/raw/reference/evals/prompt-alignment.mdx +7 -7
  187. package/.docs/raw/reference/evals/textual-difference.mdx +1 -1
  188. package/.docs/raw/reference/evals/tone-consistency.mdx +1 -1
  189. package/.docs/raw/reference/evals/tool-call-accuracy.mdx +10 -10
  190. package/.docs/raw/reference/evals/toxicity.mdx +1 -1
  191. package/.docs/raw/reference/logging/pino-logger.mdx +7 -8
  192. package/.docs/raw/reference/memory/createThread.mdx +2 -2
  193. package/.docs/raw/reference/memory/deleteMessages.mdx +2 -2
  194. package/.docs/raw/reference/memory/listThreadsByResourceId.mdx +2 -2
  195. package/.docs/raw/reference/memory/memory-class.mdx +3 -3
  196. package/.docs/raw/reference/memory/query.mdx +2 -2
  197. package/.docs/raw/reference/memory/recall.mdx +2 -2
  198. package/.docs/raw/reference/observability/tracing/exporters/langfuse.mdx +1 -1
  199. package/.docs/raw/reference/processors/batch-parts-processor.mdx +2 -2
  200. package/.docs/raw/reference/processors/language-detector.mdx +2 -2
  201. package/.docs/raw/reference/processors/message-history-processor.mdx +2 -2
  202. package/.docs/raw/reference/processors/moderation-processor.mdx +3 -3
  203. package/.docs/raw/reference/processors/pii-detector.mdx +3 -3
  204. package/.docs/raw/reference/processors/processor-interface.mdx +13 -13
  205. package/.docs/raw/reference/processors/prompt-injection-detector.mdx +2 -2
  206. package/.docs/raw/reference/processors/semantic-recall-processor.mdx +2 -2
  207. package/.docs/raw/reference/processors/system-prompt-scrubber.mdx +2 -2
  208. package/.docs/raw/reference/processors/token-limiter-processor.mdx +40 -19
  209. package/.docs/raw/reference/processors/tool-call-filter.mdx +3 -3
  210. package/.docs/raw/reference/processors/unicode-normalizer.mdx +2 -2
  211. package/.docs/raw/reference/processors/working-memory-processor.mdx +3 -3
  212. package/.docs/raw/reference/rag/chunk.mdx +1 -1
  213. package/.docs/raw/reference/rag/extract-params.mdx +2 -2
  214. package/.docs/raw/reference/rag/metadata-filters.mdx +7 -7
  215. package/.docs/raw/reference/server/create-route.mdx +13 -13
  216. package/.docs/raw/reference/server/express-adapter.mdx +6 -7
  217. package/.docs/raw/reference/server/hono-adapter.mdx +6 -7
  218. package/.docs/raw/reference/server/mastra-server.mdx +20 -20
  219. package/.docs/raw/reference/storage/cloudflare-d1.mdx +7 -5
  220. package/.docs/raw/reference/storage/cloudflare.mdx +2 -2
  221. package/.docs/raw/reference/storage/convex.mdx +6 -6
  222. package/.docs/raw/reference/storage/dynamodb.mdx +4 -4
  223. package/.docs/raw/reference/storage/lance.mdx +6 -5
  224. package/.docs/raw/reference/storage/libsql.mdx +72 -54
  225. package/.docs/raw/reference/storage/mongodb.mdx +84 -9
  226. package/.docs/raw/reference/storage/mssql.mdx +8 -6
  227. package/.docs/raw/{memory → reference}/storage/overview.mdx +12 -110
  228. package/.docs/raw/reference/storage/postgresql.mdx +82 -9
  229. package/.docs/raw/reference/storage/upstash.mdx +74 -2
  230. package/.docs/raw/reference/streaming/agents/stream.mdx +5 -5
  231. package/.docs/raw/reference/streaming/agents/streamLegacy.mdx +2 -2
  232. package/.docs/raw/reference/streaming/workflows/observeStream.mdx +1 -1
  233. package/.docs/raw/reference/streaming/workflows/resumeStream.mdx +1 -1
  234. package/.docs/raw/reference/streaming/workflows/stream.mdx +2 -2
  235. package/.docs/raw/reference/streaming/workflows/timeTravelStream.mdx +4 -4
  236. package/.docs/raw/reference/templates/overview.mdx +1 -2
  237. package/.docs/raw/reference/tools/create-tool.mdx +1 -4
  238. package/.docs/raw/reference/tools/vector-query-tool.mdx +1 -1
  239. package/.docs/raw/reference/vectors/astra.mdx +3 -3
  240. package/.docs/raw/reference/vectors/chroma.mdx +3 -3
  241. package/.docs/raw/reference/vectors/convex.mdx +12 -12
  242. package/.docs/raw/reference/vectors/couchbase.mdx +5 -5
  243. package/.docs/raw/reference/vectors/duckdb.mdx +10 -10
  244. package/.docs/raw/reference/vectors/elasticsearch.mdx +4 -4
  245. package/.docs/raw/reference/vectors/lance.mdx +4 -4
  246. package/.docs/raw/reference/vectors/libsql.mdx +61 -11
  247. package/.docs/raw/reference/vectors/mongodb.mdx +58 -5
  248. package/.docs/raw/reference/vectors/pg.mdx +53 -6
  249. package/.docs/raw/reference/vectors/pinecone.mdx +3 -3
  250. package/.docs/raw/reference/vectors/qdrant.mdx +3 -3
  251. package/.docs/raw/reference/vectors/s3vectors.mdx +6 -6
  252. package/.docs/raw/reference/vectors/turbopuffer.mdx +4 -4
  253. package/.docs/raw/reference/vectors/upstash.mdx +55 -6
  254. package/.docs/raw/reference/vectors/vectorize.mdx +3 -3
  255. package/.docs/raw/reference/workflows/run-methods/cancel.mdx +2 -2
  256. package/.docs/raw/reference/workflows/run-methods/restart.mdx +1 -3
  257. package/.docs/raw/reference/workflows/run-methods/resume.mdx +2 -2
  258. package/.docs/raw/reference/workflows/run-methods/start.mdx +2 -2
  259. package/.docs/raw/reference/workflows/run-methods/startAsync.mdx +2 -2
  260. package/.docs/raw/reference/workflows/run-methods/timeTravel.mdx +5 -5
  261. package/.docs/raw/reference/workflows/run.mdx +1 -1
  262. package/.docs/raw/reference/workflows/step.mdx +3 -3
  263. package/.docs/raw/reference/workflows/workflow-methods/branch.mdx +1 -1
  264. package/.docs/raw/reference/workflows/workflow-methods/commit.mdx +1 -1
  265. package/.docs/raw/reference/workflows/workflow-methods/create-run.mdx +3 -3
  266. package/.docs/raw/reference/workflows/workflow-methods/dountil.mdx +1 -1
  267. package/.docs/raw/reference/workflows/workflow-methods/dowhile.mdx +1 -1
  268. package/.docs/raw/reference/workflows/workflow-methods/foreach.mdx +6 -6
  269. package/.docs/raw/reference/workflows/workflow-methods/map.mdx +7 -7
  270. package/.docs/raw/reference/workflows/workflow-methods/parallel.mdx +1 -1
  271. package/.docs/raw/reference/workflows/workflow-methods/sendEvent.mdx +2 -2
  272. package/.docs/raw/reference/workflows/workflow-methods/sleep.mdx +2 -2
  273. package/.docs/raw/reference/workflows/workflow-methods/sleepUntil.mdx +2 -2
  274. package/.docs/raw/reference/workflows/workflow-methods/then.mdx +1 -1
  275. package/.docs/raw/reference/workflows/workflow-methods/waitForEvent.mdx +2 -2
  276. package/.docs/raw/reference/workflows/workflow.mdx +3 -3
  277. package/.docs/raw/server/auth/auth0.mdx +20 -14
  278. package/.docs/raw/server/auth/clerk.mdx +16 -9
  279. package/.docs/raw/server/auth/firebase.mdx +21 -15
  280. package/.docs/raw/server/auth/jwt.mdx +14 -7
  281. package/.docs/raw/server/auth/supabase.mdx +16 -9
  282. package/.docs/raw/server/auth/workos.mdx +19 -13
  283. package/.docs/raw/server/custom-adapters.mdx +10 -10
  284. package/.docs/raw/server/custom-api-routes.mdx +2 -4
  285. package/.docs/raw/server/mastra-client.mdx +24 -13
  286. package/.docs/raw/server/mastra-server.mdx +3 -3
  287. package/.docs/raw/server/middleware.mdx +7 -7
  288. package/.docs/raw/server/request-context.mdx +31 -30
  289. package/.docs/raw/server/server-adapters.mdx +6 -6
  290. package/.docs/raw/streaming/events.mdx +14 -7
  291. package/.docs/raw/streaming/overview.mdx +21 -10
  292. package/.docs/raw/streaming/tool-streaming.mdx +6 -6
  293. package/.docs/raw/streaming/workflow-streaming.mdx +6 -8
  294. package/.docs/raw/tools-mcp/advanced-usage.mdx +2 -2
  295. package/.docs/raw/tools-mcp/mcp-overview.mdx +31 -12
  296. package/.docs/raw/tools-mcp/overview.mdx +9 -10
  297. package/.docs/raw/voice/overview.mdx +2 -2
  298. package/.docs/raw/workflows/agents-and-tools.mdx +28 -19
  299. package/.docs/raw/workflows/control-flow.mdx +27 -40
  300. package/.docs/raw/workflows/error-handling.mdx +15 -22
  301. package/.docs/raw/workflows/human-in-the-loop.mdx +6 -7
  302. package/.docs/raw/workflows/input-data-mapping.mdx +7 -7
  303. package/.docs/raw/workflows/overview.mdx +34 -23
  304. package/.docs/raw/workflows/snapshots.mdx +16 -45
  305. package/.docs/raw/workflows/suspend-and-resume.mdx +7 -7
  306. package/.docs/raw/workflows/time-travel.mdx +16 -16
  307. package/.docs/raw/workflows/workflow-state.mdx +5 -8
  308. package/CHANGELOG.md +16 -0
  309. package/dist/logger.d.ts +3 -0
  310. package/dist/logger.d.ts.map +1 -1
  311. package/dist/stdio.js +53 -0
  312. package/package.json +3 -3
  313. package/.docs/raw/mastra-cloud/dashboard.mdx +0 -96
  314. package/.docs/raw/mastra-cloud/setting-up.mdx +0 -102
  315. package/.docs/raw/memory/conversation-history.mdx +0 -24
  316. package/.docs/raw/memory/storage/memory-with-libsql.mdx +0 -140
  317. package/.docs/raw/memory/storage/memory-with-mongodb.mdx +0 -150
  318. package/.docs/raw/memory/storage/memory-with-pg.mdx +0 -138
  319. package/.docs/raw/memory/storage/memory-with-upstash.mdx +0 -146
  320. package/.docs/raw/memory/threads-and-resources.mdx +0 -95
  321. package/.docs/raw/workflows/inngest-workflow.mdx +0 -363
@@ -49,7 +49,7 @@ Install `@mastra/ai-sdk` to begin using the `withMastra()` function.
49
49
 
50
50
  Processors let you transform messages before they're sent to the model (`processInput`) and after responses are received (`processOutputResult`). This example creates a logging processor that logs message counts at each stage, then wraps an OpenAI model with it.
51
51
 
52
- ```typescript title="src/example.ts" copy
52
+ ```typescript title="src/example.ts"
53
53
  import { openai } from '@ai-sdk/openai';
54
54
  import { generateText } from 'ai';
55
55
  import { withMastra } from '@mastra/ai-sdk';
@@ -80,9 +80,9 @@ const { text } = await generateText({
80
80
 
81
81
  ### With Memory
82
82
 
83
- Memory automatically loads previous messages from storage before the LLM call and saves new messages after. This example configures a LibSQL storage backend to persist conversation history, loading the last 10 messages for context.
83
+ Memory automatically loads previous messages from storage before the LLM call and saves new messages after. This example configures a libSQL storage backend to persist conversation history, loading the last 10 messages for context.
84
84
 
85
- ```typescript title="src/memory-example.ts" copy
85
+ ```typescript title="src/memory-example.ts"
86
86
  import { openai } from '@ai-sdk/openai';
87
87
  import { generateText } from 'ai';
88
88
  import { withMastra } from '@mastra/ai-sdk';
@@ -113,7 +113,7 @@ const { text } = await generateText({
113
113
 
114
114
  You can combine processors and memory together. Input processors run after memory loads historical messages, and output processors run before memory saves the response.
115
115
 
116
- ```typescript title="src/combined-example.ts" copy
116
+ ```typescript title="src/combined-example.ts"
117
117
  import { openai } from '@ai-sdk/openai';
118
118
  import { generateText } from 'ai';
119
119
  import { withMastra } from '@mastra/ai-sdk';
@@ -80,7 +80,7 @@ You can use [`chatRoute()`](/reference/v1/ai-sdk/chat-route), [`workflowRoute()`
80
80
 
81
81
  This example shows how to set up a chat route at the `/chat` endpoint that uses an agent with the ID `weatherAgent`.
82
82
 
83
- ```typescript title="src/mastra/index.ts" copy
83
+ ```typescript title="src/mastra/index.ts"
84
84
  import { Mastra } from "@mastra/core";
85
85
  import { chatRoute } from "@mastra/ai-sdk";
86
86
 
@@ -104,7 +104,7 @@ You can also use dynamic agent routing, see the [`chatRoute()` reference documen
104
104
 
105
105
  This example shows how to set up a workflow route at the `/workflow` endpoint that uses a workflow with the ID `weatherWorkflow`.
106
106
 
107
- ```typescript title="src/mastra/index.ts" copy
107
+ ```typescript title="src/mastra/index.ts"
108
108
  import { Mastra } from "@mastra/core";
109
109
  import { workflowRoute } from "@mastra/ai-sdk";
110
110
 
@@ -136,7 +136,7 @@ See [Workflow Streaming](/docs/v1/streaming/workflow-streaming#streaming-agent-t
136
136
 
137
137
  This example shows how to set up a network route at the `/network` endpoint that uses an agent with the ID `weatherAgent`.
138
138
 
139
- ```typescript title="src/mastra/index.ts" copy
139
+ ```typescript title="src/mastra/index.ts"
140
140
  import { Mastra } from "@mastra/core";
141
141
  import { networkRoute } from "@mastra/ai-sdk";
142
142
 
@@ -172,7 +172,7 @@ The examples below show you how to use them with Next.js App Router.
172
172
 
173
173
  This example shows how to set up a chat route at the `/chat` endpoint that uses an agent with the ID `weatherAgent`.
174
174
 
175
- ```typescript title="app/chat/route.ts" copy
175
+ ```typescript title="app/chat/route.ts"
176
176
  import { handleChatStream } from '@mastra/ai-sdk';
177
177
  import { createUIMessageStreamResponse } from 'ai';
178
178
  import { mastra } from '@/src/mastra';
@@ -194,7 +194,7 @@ export async function POST(req: Request) {
194
194
 
195
195
  This example shows how to set up a workflow route at the `/workflow` endpoint that uses a workflow with the ID `weatherWorkflow`.
196
196
 
197
- ```typescript title="app/workflow/route.ts" copy
197
+ ```typescript title="app/workflow/route.ts"
198
198
  import { handleWorkflowStream } from '@mastra/ai-sdk';
199
199
  import { createUIMessageStreamResponse } from 'ai';
200
200
  import { mastra } from '@/src/mastra';
@@ -216,7 +216,7 @@ export async function POST(req: Request) {
216
216
 
217
217
  This example shows how to set up a network route at the `/network` endpoint that uses an agent with the ID `routingAgent`.
218
218
 
219
- ```typescript title="app/network/route.ts" copy
219
+ ```typescript title="app/network/route.ts"
220
220
  import { handleNetworkStream } from '@mastra/ai-sdk';
221
221
  import { createUIMessageStreamResponse } from 'ai';
222
222
  import { mastra } from '@/src/mastra';
@@ -279,7 +279,7 @@ The `useCompletion()` hook handles single-turn completions between your frontend
279
279
 
280
280
  Your frontend could look like this:
281
281
 
282
- ```typescript title="app/page.tsx" copy
282
+ ```typescript title="app/page.tsx"
283
283
  import { useCompletion } from '@ai-sdk/react';
284
284
 
285
285
  export default function Page() {
@@ -308,7 +308,7 @@ Below are two approaches to implementing the backend:
308
308
 
309
309
  <TabItem value="mastra-server" label="Mastra Server">
310
310
 
311
- ```ts title="src/mastra/index.ts" copy
311
+ ```ts title="src/mastra/index.ts"
312
312
  import { Mastra } from '@mastra/core/mastra';
313
313
  import { registerApiRoute } from '@mastra/core/server';
314
314
  import { handleChatStream } from '@mastra/ai-sdk';
@@ -353,7 +353,7 @@ export const mastra = new Mastra({
353
353
 
354
354
  <TabItem value="nextjs" label="Next.js">
355
355
 
356
- ```ts title="app/completion/route.ts" copy
356
+ ```ts title="app/completion/route.ts"
357
357
  import { handleChatStream } from '@mastra/ai-sdk';
358
358
  import { createUIMessageStreamResponse } from 'ai';
359
359
  import { mastra } from '@/src/mastra';
@@ -433,7 +433,7 @@ Here's an example of rendering a weather tool's output as a custom `WeatherCard`
433
433
 
434
434
  Define a tool with an `outputSchema` so the frontend knows the shape of the data to render.
435
435
 
436
- ```typescript title="src/mastra/tools/weather-tool.ts" {10-17} copy
436
+ ```typescript title="src/mastra/tools/weather-tool.ts" {10-17}
437
437
  import { createTool } from "@mastra/core/tools";
438
438
  import { z } from "zod";
439
439
 
@@ -474,7 +474,7 @@ export const weatherTool = createTool({
474
474
 
475
475
  Check for `tool-{toolKey}` parts in the message and render a custom component based on the tool's state and output.
476
476
 
477
- ```typescript title="src/components/chat.tsx" {24-35} copy
477
+ ```typescript title="src/components/chat.tsx" {24-35}
478
478
  import { useChat } from "@ai-sdk/react";
479
479
  import { DefaultChatTransport } from "ai";
480
480
  import { WeatherCard } from "./weather-card";
@@ -540,7 +540,7 @@ When using `workflowRoute()` or `handleWorkflowStream()`, Mastra emits `data-wor
540
540
 
541
541
  Define a workflow with multiple steps that will emit `data-workflow` parts as it executes.
542
542
 
543
- ```typescript title="src/mastra/workflows/activities-workflow.ts" copy
543
+ ```typescript title="src/mastra/workflows/activities-workflow.ts"
544
544
  import { createStep, createWorkflow } from "@mastra/core/workflows";
545
545
  import { z } from "zod";
546
546
 
@@ -594,7 +594,7 @@ activitiesWorkflow.commit();
594
594
 
595
595
  Register the workflow with Mastra and expose it via `workflowRoute()` to stream workflow events to the frontend.
596
596
 
597
- ```typescript title="src/mastra/index.ts" copy
597
+ ```typescript title="src/mastra/index.ts"
598
598
  import { Mastra } from "@mastra/core";
599
599
  import { workflowRoute } from "@mastra/ai-sdk";
600
600
 
@@ -617,7 +617,7 @@ export const mastra = new Mastra({
617
617
 
618
618
  Check for `data-workflow` parts and render each step's status and output using the `WorkflowDataPart` type for type safety.
619
619
 
620
- ```typescript title="src/components/workflow-chat.tsx" {3,5,45-47} copy
620
+ ```typescript title="src/components/workflow-chat.tsx" {3,5,45-47}
621
621
  import { useChat } from "@ai-sdk/react";
622
622
  import { DefaultChatTransport } from "ai";
623
623
  import type { WorkflowDataPart } from "@mastra/ai-sdk";
@@ -706,7 +706,7 @@ When using `networkRoute()` or `handleNetworkStream()`, Mastra emits `data-netwo
706
706
 
707
707
  Register agents with Mastra and expose the routing agent via `networkRoute()` to stream network execution events to the frontend.
708
708
 
709
- ```typescript title="src/mastra/index.ts" copy
709
+ ```typescript title="src/mastra/index.ts"
710
710
  import { Mastra } from "@mastra/core";
711
711
  import { networkRoute } from "@mastra/ai-sdk";
712
712
 
@@ -729,7 +729,7 @@ export const mastra = new Mastra({
729
729
 
730
730
  Check for `data-network` parts and render each agent's execution step using the `NetworkDataPart` type for type safety.
731
731
 
732
- ```typescript title="src/components/network-chat.tsx" {3,5,42-44} copy
732
+ ```typescript title="src/components/network-chat.tsx" {3,5,42-44}
733
733
  import { useChat } from "@ai-sdk/react";
734
734
  import { DefaultChatTransport } from "ai";
735
735
  import type { NetworkDataPart } from "@mastra/ai-sdk";
@@ -823,7 +823,7 @@ You must `await` the `writer.custom()` call, otherwise you may encounter a `Writ
823
823
 
824
824
  Use `writer.custom()` inside the tool's `execute()` function to emit custom `data-` prefixed events at different stages of execution.
825
825
 
826
- ```typescript title="src/mastra/tools/task-tool.ts" {18-24,30-36} copy
826
+ ```typescript title="src/mastra/tools/task-tool.ts" {18-24,30-36}
827
827
  import { createTool } from "@mastra/core/tools";
828
828
  import { z } from "zod";
829
829
 
@@ -875,7 +875,7 @@ export const taskTool = createTool({
875
875
 
876
876
  Filter message parts for your custom event type and render a progress indicator that updates as new events arrive.
877
877
 
878
- ```typescript title="src/components/task-chat.tsx" {31-41,45} copy
878
+ ```typescript title="src/components/task-chat.tsx" {31-41,45}
879
879
  import { useChat } from "@ai-sdk/react";
880
880
  import { DefaultChatTransport } from "ai";
881
881
  import { useMemo } from "react";
@@ -969,7 +969,7 @@ When loading messages from Mastra's memory to display in a chat UI, use [`toAISd
969
969
 
970
970
  Here's an example of the frontend code:
971
971
 
972
- ```typescript {15-25} copy
972
+ ```typescript {15-25}
973
973
  import { useChat } from "@ai-sdk/react";
974
974
  import { useState } from "react";
975
975
  import { DefaultChatTransport } from 'ai';
@@ -1016,7 +1016,7 @@ Two examples on how to implement the backend portion of it.
1016
1016
 
1017
1017
  Add a `chatRoute()` to your Mastra configuration like shown above. Then, add a server-level middleware:
1018
1018
 
1019
- ```typescript title="src/mastra/index.ts" copy
1019
+ ```typescript title="src/mastra/index.ts"
1020
1020
  import { Mastra } from "@mastra/core";
1021
1021
 
1022
1022
  export const mastra = new Mastra({
@@ -1052,7 +1052,7 @@ You can access this data in your tools via the `requestContext` parameter. See t
1052
1052
 
1053
1053
  <TabItem value="nextjs" label="Next.js">
1054
1054
 
1055
- ```typescript title="app/chat-extra/route.ts" copy
1055
+ ```typescript title="app/chat-extra/route.ts"
1056
1056
  import { handleChatStream } from '@mastra/ai-sdk';
1057
1057
  import { RequestContext } from "@mastra/core/request-context";
1058
1058
  import { createUIMessageStreamResponse } from 'ai';
@@ -1101,7 +1101,7 @@ The workflow uses:
1101
1101
 
1102
1102
  Create a workflow step that suspends for approval. The step checks `resumeData` to determine if it's resuming, and calls `suspend()` on first execution.
1103
1103
 
1104
- ```typescript title="src/mastra/workflows/approval-workflow.ts" copy
1104
+ ```typescript title="src/mastra/workflows/approval-workflow.ts"
1105
1105
  import { createStep, createWorkflow } from "@mastra/core/workflows";
1106
1106
  import { z } from "zod";
1107
1107
 
@@ -1158,7 +1158,7 @@ approvalWorkflow.commit();
1158
1158
 
1159
1159
  Register the workflow. Storage is required for suspend/resume to persist state.
1160
1160
 
1161
- ```typescript title="src/mastra/index.ts" copy
1161
+ ```typescript title="src/mastra/index.ts"
1162
1162
  import { Mastra } from "@mastra/core";
1163
1163
  import { workflowRoute } from "@mastra/ai-sdk";
1164
1164
  import { LibSQLStore } from "@mastra/libsql";
@@ -1182,7 +1182,7 @@ export const mastra = new Mastra({
1182
1182
 
1183
1183
  Detect when the workflow is suspended and send resume data with `runId`, `step`, and `resumeData`.
1184
1184
 
1185
- ```typescript title="src/components/approval-workflow.tsx" copy
1185
+ ```typescript title="src/components/approval-workflow.tsx"
1186
1186
  import { useChat } from "@ai-sdk/react";
1187
1187
  import { DefaultChatTransport } from "ai";
1188
1188
  import { useMemo, useState } from "react";
@@ -1292,7 +1292,7 @@ The pattern uses:
1292
1292
 
1293
1293
  Create a tool that calls an agent and pipes its stream to the tool's writer.
1294
1294
 
1295
- ```typescript title="src/mastra/tools/nested-agent-tool.ts" copy
1295
+ ```typescript title="src/mastra/tools/nested-agent-tool.ts"
1296
1296
  import { createTool } from "@mastra/core/tools";
1297
1297
  import { z } from "zod";
1298
1298
 
@@ -1325,7 +1325,7 @@ export const nestedAgentTool = createTool({
1325
1325
 
1326
1326
  Create an agent that uses this tool.
1327
1327
 
1328
- ```typescript title="src/mastra/agents/forecast-agent.ts" copy
1328
+ ```typescript title="src/mastra/agents/forecast-agent.ts"
1329
1329
  import { Agent } from "@mastra/core/agent";
1330
1330
  import { nestedAgentTool } from "../tools/nested-agent-tool";
1331
1331
 
@@ -1343,7 +1343,7 @@ export const forecastAgent = new Agent({
1343
1343
 
1344
1344
  Handle `data-tool-agent` parts to display the nested agent's streamed output.
1345
1345
 
1346
- ```typescript title="src/components/nested-agent-chat.tsx" copy
1346
+ ```typescript title="src/components/nested-agent-chat.tsx"
1347
1347
  import { useChat } from "@ai-sdk/react";
1348
1348
  import { DefaultChatTransport } from "ai";
1349
1349
  import { useState } from "react";
@@ -1417,7 +1417,7 @@ The pattern uses:
1417
1417
 
1418
1418
  Create a workflow step that streams an agent's response by piping to the step's `writer`.
1419
1419
 
1420
- ```typescript title="src/mastra/workflows/weather-workflow.ts" copy
1420
+ ```typescript title="src/mastra/workflows/weather-workflow.ts"
1421
1421
  import { createStep, createWorkflow } from "@mastra/core/workflows";
1422
1422
  import { z } from "zod";
1423
1423
  import { weatherAgent } from "../agents/weather-agent";
@@ -1464,7 +1464,7 @@ weatherWorkflow.commit();
1464
1464
 
1465
1465
  Register the workflow with a `workflowRoute()`. Text streaming is enabled by default.
1466
1466
 
1467
- ```typescript title="src/mastra/index.ts" copy
1467
+ ```typescript title="src/mastra/index.ts"
1468
1468
  import { Mastra } from "@mastra/core";
1469
1469
  import { workflowRoute } from "@mastra/ai-sdk";
1470
1470
 
@@ -1485,7 +1485,7 @@ export const mastra = new Mastra({
1485
1485
 
1486
1486
  Render both `text` parts (streaming agent output) and `data-workflow` parts (step progress).
1487
1487
 
1488
- ```typescript title="src/components/weather-workflow.tsx" copy
1488
+ ```typescript title="src/components/weather-workflow.tsx"
1489
1489
  import { useChat } from "@ai-sdk/react";
1490
1490
  import { DefaultChatTransport } from "ai";
1491
1491
  import { useState } from "react";
@@ -44,7 +44,7 @@ project-root
44
44
 
45
45
  Bootstrap your Mastra server:
46
46
 
47
- ```bash copy
47
+ ```bash
48
48
  npx create-mastra@beta
49
49
  ```
50
50
 
@@ -52,7 +52,7 @@ This command will launch an interactive wizard to help you scaffold a new Mastra
52
52
 
53
53
  Navigate to your newly created Mastra server directory:
54
54
 
55
- ```bash copy
55
+ ```bash
56
56
  cd mastra-server # Replace with the actual directory name you provided
57
57
  ```
58
58
 
@@ -84,13 +84,13 @@ Ensure that you have set the appropriate environment variables for your LLM prov
84
84
 
85
85
  Create a chat route for the Assistant UI frontend by using the `chatRoute()` helper from `@mastra/ai-sdk`. Add it to your Mastra project:
86
86
 
87
- ```bash copy
87
+ ```bash
88
88
  npm install @mastra/ai-sdk@beta
89
89
  ```
90
90
 
91
91
  In your `src/mastra/index.ts` file, register the chat route:
92
92
 
93
- ```typescript copy title="src/mastra/index.ts" {2,7-13}
93
+ ```typescript title="src/mastra/index.ts" {2,7-13}
94
94
  import { Mastra } from '@mastra/core/mastra';
95
95
  import { chatRoute } from '@mastra/ai-sdk';
96
96
  // Rest of the imports...
@@ -115,7 +115,7 @@ This will make all agents available in AI SDK-compatible formats, including the
115
115
 
116
116
  Run the Mastra server using the following command:
117
117
 
118
- ```bash copy
118
+ ```bash
119
119
  npm run dev
120
120
  ```
121
121
 
@@ -127,13 +127,13 @@ By default, the Mastra server will run on `http://localhost:4111`. Keep this ser
127
127
 
128
128
  Go up one directory to your project root.
129
129
 
130
- ```bash copy
130
+ ```bash
131
131
  cd ..
132
132
  ```
133
133
 
134
134
  Create a new `assistant-ui` project with the following command.
135
135
 
136
- ```bash copy
136
+ ```bash
137
137
  npx assistant-ui@latest create
138
138
  ```
139
139
 
@@ -175,7 +175,7 @@ Now, the Assistant UI frontend will send chat requests directly to your running
175
175
 
176
176
  You're ready to connect the pieces! Make sure both the Mastra server and the Assistant UI frontend are running. Start the Next.js development server:
177
177
 
178
- ```bash copy
178
+ ```bash
179
179
  npm run dev
180
180
  ```
181
181
 
@@ -48,7 +48,7 @@ project-root
48
48
 
49
49
  Bootstrap your Mastra server:
50
50
 
51
- ```bash copy
51
+ ```bash
52
52
  npx create-mastra@latest
53
53
  ```
54
54
 
@@ -56,7 +56,7 @@ This command will launch an interactive wizard to help you scaffold a new Mastra
56
56
 
57
57
  Navigate to your newly created Mastra server directory:
58
58
 
59
- ```bash copy
59
+ ```bash
60
60
  cd mastra-server # Replace with the actual directory name you provided
61
61
  ```
62
62
 
@@ -88,13 +88,13 @@ Ensure that you have set the appropriate environment variables for your LLM prov
88
88
 
89
89
  Create a chat route for the CopilotKit frontend by using the `registerCopilotKit()` helper from `@ag-ui/mastra`. Add it to your Mastra project (and its peer dependencies):
90
90
 
91
- ```bash copy
91
+ ```bash
92
92
  npm install --legacy-peer-deps @ag-ui/mastra @copilotkit/runtime @ag-ui/core @ag-ui/client @ag-ui/encoder @ag-ui/langgraph @ag-ui/proto
93
93
  ```
94
94
 
95
95
  In your `src/mastra/index.ts` file, register the chat route:
96
96
 
97
- ```typescript copy title="src/mastra/index.ts" {2,7-19}
97
+ ```typescript title="src/mastra/index.ts" {2,7-19}
98
98
  import { Mastra } from '@mastra/core/mastra';
99
99
  import { registerCopilotKit } from '@ag-ui/mastra/copilotkit';
100
100
  // Rest of the imports...
@@ -125,7 +125,7 @@ This will make the `weatherAgent` available at `/chat` in a CopilotKit-compatibl
125
125
 
126
126
  Run the Mastra server using the following command:
127
127
 
128
- ```bash copy
128
+ ```bash
129
129
  npm run dev
130
130
  ```
131
131
 
@@ -137,19 +137,19 @@ By default, the Mastra server will run on `http://localhost:4111`. Keep this ser
137
137
 
138
138
  Go up one directory to your project root.
139
139
 
140
- ```bash copy
140
+ ```bash
141
141
  cd ..
142
142
  ```
143
143
 
144
144
  Create a new Next.js project with the name `my-copilot-app`:
145
145
 
146
- ```bash copy
146
+ ```bash
147
147
  npx create-next-app@latest my-copilot-app
148
148
  ```
149
149
 
150
150
  Navigate to your newly created Next.js project directory:
151
151
 
152
- ```bash copy
152
+ ```bash
153
153
  cd my-copilot-app
154
154
  ```
155
155
 
@@ -159,13 +159,13 @@ cd my-copilot-app
159
159
 
160
160
  Install the CopilotKit UI packages which you'll use to display a chat interface:
161
161
 
162
- ```bash copy
162
+ ```bash
163
163
  npm install @copilotkit/react-ui @copilotkit/react-core
164
164
  ```
165
165
 
166
166
  Open the home route of the Next.js app (usually `app/page.tsx` or `src/app/page.tsx`) and replace the existing contents with the following code to set up a basic CopilotKit chat interface:
167
167
 
168
- ```typescript copy title="app/page.tsx"
168
+ ```typescript title="app/page.tsx"
169
169
  import { CopilotChat } from "@copilotkit/react-ui";
170
170
  import { CopilotKit } from "@copilotkit/react-core";
171
171
  import "@copilotkit/react-ui/styles.css";
@@ -193,7 +193,7 @@ export default function Home() {
193
193
 
194
194
  You're ready to connect the pieces! Make sure both the Mastra server and the CopilotKit frontend are running. Start the Next.js development server:
195
195
 
196
- ```bash copy
196
+ ```bash
197
197
  npm run dev
198
198
  ```
199
199
 
@@ -39,7 +39,7 @@ Connect to your EC2 instance and clone your repository:
39
39
  <Tabs>
40
40
  <TabItem value="public" label="Public Repository">
41
41
 
42
- ```bash copy
42
+ ```bash
43
43
  git clone https://github.com/<your-username>/<your-repository>.git
44
44
  ```
45
45
 
@@ -47,7 +47,7 @@ git clone https://github.com/<your-username>/<your-repository>.git
47
47
 
48
48
  <TabItem value="private" label="Private Repository">
49
49
 
50
- ```bash copy
50
+ ```bash
51
51
  git clone https://<your-username>:<your-personal-access-token>@github.com/<your-username>/<your-repository>.git
52
52
  ```
53
53
 
@@ -56,7 +56,7 @@ git clone https://<your-username>:<your-personal-access-token>@github.com/<your-
56
56
 
57
57
  Navigate to the repository directory:
58
58
 
59
- ```bash copy
59
+ ```bash
60
60
  cd "<your-repository>"
61
61
  ```
62
62
 
@@ -66,7 +66,7 @@ cd "<your-repository>"
66
66
 
67
67
  Install dependencies:
68
68
 
69
- ```bash copy
69
+ ```bash
70
70
  npm install
71
71
  ```
72
72
 
@@ -76,13 +76,13 @@ npm install
76
76
 
77
77
  Create a `.env` file and add your environment variables:
78
78
 
79
- ```bash copy
79
+ ```bash
80
80
  touch .env
81
81
  ```
82
82
 
83
83
  Edit the `.env` file and add your environment variables:
84
84
 
85
- ```bash copy
85
+ ```bash
86
86
  OPENAI_API_KEY=<your-openai-api-key>
87
87
  # Add other required environment variables
88
88
  ```
@@ -93,7 +93,7 @@ OPENAI_API_KEY=<your-openai-api-key>
93
93
 
94
94
  Build the application:
95
95
 
96
- ```bash copy
96
+ ```bash
97
97
  npm run build
98
98
  ```
99
99
 
@@ -103,7 +103,7 @@ npm run build
103
103
 
104
104
  Run the application:
105
105
 
106
- ```bash copy
106
+ ```bash
107
107
  node --env-file=".env" .mastra/output/index.mjs
108
108
  ```
109
109
 
@@ -121,7 +121,7 @@ You can now connect to your Mastra server from your client application using a `
121
121
 
122
122
  Refer to the [`MastraClient` documentation](/reference/v1/client-js/mastra-client) for more information.
123
123
 
124
- ```typescript copy showLineNumbers
124
+ ```typescript
125
125
  import { MastraClient } from "@mastra/client-js";
126
126
 
127
127
  const mastraClient = new MastraClient({
@@ -30,14 +30,14 @@ Before deploying to AWS Lambda, ensure you have:
30
30
  ## Memory Configuration
31
31
 
32
32
  :::warning
33
- AWS Lambda uses an ephemeral file system, meaning that any files written to the file system are short-lived and may be lost. Remove any usage of [LibSQLStore](/docs/v1/memory/storage/overview) with file URLs from your Mastra configuration. Use in-memory storage (`:memory:`) or external storage providers like Turso, PostgreSQL, or Upstash.
33
+ AWS Lambda uses an ephemeral file system, meaning that any files written to the file system are short-lived and may be lost. Remove any usage of [LibSQLStore](/reference/v1/storage/libsql) with file URLs from your Mastra configuration. Use in-memory storage (`:memory:`) or external storage providers like Turso, PostgreSQL, or Upstash.
34
34
  :::
35
35
 
36
36
  Lambda functions have limitations with file system storage. Configure your Mastra application to use either in-memory or external storage providers:
37
37
 
38
38
  ### Option 1: In-Memory (Simplest)
39
39
 
40
- ```typescript title="src/mastra/index.ts" copy showLineNumbers
40
+ ```typescript title="src/mastra/index.ts"
41
41
  import { LibSQLStore } from "@mastra/libsql";
42
42
 
43
43
  const storage = new LibSQLStore({
@@ -50,7 +50,7 @@ const storage = new LibSQLStore({
50
50
 
51
51
  For persistent memory across Lambda invocations, use external storage providers like `LibSQLStore` with Turso or other storage providers like `PostgreStore`:
52
52
 
53
- ```typescript title="src/mastra/index.ts" copy showLineNumbers
53
+ ```typescript title="src/mastra/index.ts"
54
54
  import { LibSQLStore } from "@mastra/libsql";
55
55
 
56
56
  const storage = new LibSQLStore({
@@ -66,7 +66,7 @@ For more memory configuration options, see the [Memory documentation](/docs/v1/m
66
66
 
67
67
  Create a `Dockerfile` in your Mastra project root directory:
68
68
 
69
- ```dockerfile title="Dockerfile" copy showLineNumbers
69
+ ```dockerfile title="Dockerfile"
70
70
  FROM node:22-alpine
71
71
 
72
72
  WORKDIR /app
@@ -100,7 +100,7 @@ CMD ["node", ".mastra/output/index.mjs"]
100
100
 
101
101
  Set up your environment variables for the deployment process:
102
102
 
103
- ```bash copy
103
+ ```bash
104
104
  export PROJECT_NAME="your-mastra-app"
105
105
  export AWS_REGION="us-east-1"
106
106
  export AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)
@@ -112,7 +112,7 @@ export AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output tex
112
112
 
113
113
  Build your Docker image locally:
114
114
 
115
- ```bash copy
115
+ ```bash
116
116
  docker build -t "$PROJECT_NAME" .
117
117
  ```
118
118
 
@@ -122,7 +122,7 @@ docker build -t "$PROJECT_NAME" .
122
122
 
123
123
  Create an Amazon ECR repository to store your Docker image:
124
124
 
125
- ```bash copy
125
+ ```bash
126
126
  aws ecr create-repository --repository-name "$PROJECT_NAME" --region "$AWS_REGION"
127
127
  ```
128
128
 
@@ -132,7 +132,7 @@ aws ecr create-repository --repository-name "$PROJECT_NAME" --region "$AWS_REGIO
132
132
 
133
133
  Log in to Amazon ECR:
134
134
 
135
- ```bash copy
135
+ ```bash
136
136
  aws ecr get-login-password --region "$AWS_REGION" | docker login --username AWS --password-stdin "$AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com"
137
137
  ```
138
138
 
@@ -142,7 +142,7 @@ aws ecr get-login-password --region "$AWS_REGION" | docker login --username AWS
142
142
 
143
143
  Tag your image with the ECR repository URI and push it:
144
144
 
145
- ```bash copy
145
+ ```bash
146
146
  docker tag "$PROJECT_NAME":latest "$AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/$PROJECT_NAME":latest
147
147
  docker push "$AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/$PROJECT_NAME":latest
148
148
  ```
@@ -186,7 +186,7 @@ Add your environment variables in the Lambda function configuration:
186
186
  2. Add the required variables for your Mastra application:
187
187
  - `OPENAI_API_KEY`: Your OpenAI API key (if using OpenAI)
188
188
  - `ANTHROPIC_API_KEY`: Your Anthropic API key (if using Anthropic)
189
- - `TURSO_AUTH_TOKEN`: Your Turso auth token (if using LibSQL with Turso)
189
+ - `TURSO_AUTH_TOKEN`: Your Turso auth token (if using libSQL with Turso)
190
190
  - Other provider-specific API keys as needed
191
191
 
192
192
  </StepItem>
@@ -219,7 +219,7 @@ For more information about available API endpoints, see the [Server documentatio
219
219
 
220
220
  Update your client application to use the Lambda function URL:
221
221
 
222
- ```typescript title="src/client.ts" copy showLineNumbers
222
+ ```typescript title="src/client.ts"
223
223
  import { MastraClient } from "@mastra/client-js";
224
224
 
225
225
  const mastraClient = new MastraClient({
@@ -18,7 +18,7 @@ refer to our [getting started guide](/guides/v1/getting-started/quickstart)
18
18
  :::
19
19
 
20
20
  :::warning
21
- Azure App Services uses an ephemeral filesystem for some pricing tiers. Remove any usage of [LibSQLStore](/docs/v1/memory/storage/overview) with file URLs from your Mastra configuration. Use in-memory storage (`:memory:`) or external storage providers like Turso, PostgreSQL, or Upstash.
21
+ Azure App Services uses an ephemeral filesystem for some pricing tiers. Remove any usage of [LibSQLStore](/reference/v1/storage/libsql) with file URLs from your Mastra configuration. Use in-memory storage (`:memory:`) or external storage providers like Turso, PostgreSQL, or Upstash.
22
22
  :::
23
23
 
24
24
  ## Prerequisites
@@ -147,7 +147,7 @@ You can now connect to your Mastra server from your client application using a `
147
147
 
148
148
  Refer to the [`MastraClient` documentation](/reference/v1/client-js/mastra-client) for more information.
149
149
 
150
- ```typescript copy showLineNumbers
150
+ ```typescript
151
151
  import { MastraClient } from "@mastra/client-js";
152
152
 
153
153
  const mastraClient = new MastraClient({