@mastra/mcp-docs-server 1.0.0-beta.11 → 1.0.0-beta.14

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 (345) hide show
  1. package/.docs/organized/changelogs/%40mastra%2Fagent-builder.md +29 -29
  2. package/.docs/organized/changelogs/%40mastra%2Fai-sdk.md +51 -51
  3. package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +45 -45
  4. package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +180 -180
  5. package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +39 -39
  6. package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +39 -39
  7. package/.docs/organized/changelogs/%40mastra%2Fconvex.md +68 -0
  8. package/.docs/organized/changelogs/%40mastra%2Fcore.md +331 -331
  9. package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +31 -31
  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 +39 -39
  13. package/.docs/organized/changelogs/%40mastra%2Ffastembed.md +6 -0
  14. package/.docs/organized/changelogs/%40mastra%2Flance.md +39 -39
  15. package/.docs/organized/changelogs/%40mastra%2Flibsql.md +45 -45
  16. package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +24 -24
  17. package/.docs/organized/changelogs/%40mastra%2Fmemory.md +24 -24
  18. package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +39 -39
  19. package/.docs/organized/changelogs/%40mastra%2Fmssql.md +39 -39
  20. package/.docs/organized/changelogs/%40mastra%2Fpg.md +45 -45
  21. package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +96 -96
  22. package/.docs/organized/changelogs/%40mastra%2Frag.md +17 -17
  23. package/.docs/organized/changelogs/%40mastra%2Freact.md +49 -2
  24. package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +6 -0
  25. package/.docs/organized/changelogs/%40mastra%2Fserver.md +122 -122
  26. package/.docs/organized/changelogs/%40mastra%2Fupstash.md +39 -39
  27. package/.docs/organized/changelogs/create-mastra.md +31 -31
  28. package/.docs/organized/changelogs/mastra.md +51 -51
  29. package/.docs/organized/code-examples/agent-v6.md +151 -0
  30. package/.docs/organized/code-examples/ai-elements.md +1 -1
  31. package/.docs/organized/code-examples/quick-start.md +0 -4
  32. package/.docs/organized/code-examples/stock-price-tool.md +21 -2
  33. package/.docs/raw/agents/adding-voice.mdx +2 -3
  34. package/.docs/raw/agents/agent-approval.mdx +139 -6
  35. package/.docs/raw/agents/agent-memory.mdx +24 -32
  36. package/.docs/raw/agents/guardrails.mdx +61 -51
  37. package/.docs/raw/agents/networks.mdx +9 -13
  38. package/.docs/raw/agents/overview.mdx +40 -24
  39. package/.docs/raw/agents/processors.mdx +20 -19
  40. package/.docs/raw/agents/structured-output.mdx +11 -7
  41. package/.docs/raw/agents/using-tools.mdx +5 -6
  42. package/.docs/raw/course/01-first-agent/07-creating-your-agent.md +1 -2
  43. package/.docs/raw/course/01-first-agent/12-connecting-tool-to-agent.md +1 -1
  44. package/.docs/raw/course/01-first-agent/16-adding-memory-to-agent.md +1 -2
  45. package/.docs/raw/course/02-agent-tools-mcp/05-updating-your-agent.md +1 -1
  46. package/.docs/raw/course/02-agent-tools-mcp/10-updating-agent-instructions-zapier.md +1 -1
  47. package/.docs/raw/course/02-agent-tools-mcp/16-updating-agent-instructions-github.md +1 -1
  48. package/.docs/raw/course/02-agent-tools-mcp/21-updating-agent-instructions-hackernews.md +1 -1
  49. package/.docs/raw/course/02-agent-tools-mcp/27-updating-agent-instructions-filesystem.md +1 -1
  50. package/.docs/raw/course/02-agent-tools-mcp/31-enhancing-memory-configuration.md +2 -2
  51. package/.docs/raw/course/03-agent-memory/04-creating-basic-memory-agent.md +1 -2
  52. package/.docs/raw/course/03-agent-memory/08-configuring-conversation-history.md +1 -2
  53. package/.docs/raw/course/03-agent-memory/16-configuring-semantic-recall.md +3 -4
  54. package/.docs/raw/course/03-agent-memory/21-configuring-working-memory.md +2 -3
  55. package/.docs/raw/course/03-agent-memory/22-custom-working-memory-templates.md +2 -3
  56. package/.docs/raw/course/03-agent-memory/25-combining-memory-features.md +1 -2
  57. package/.docs/raw/course/03-agent-memory/27-creating-learning-assistant.md +2 -3
  58. package/.docs/raw/course/04-workflows/11-creating-an-ai-agent.md +2 -3
  59. package/.docs/raw/deployment/cloud-providers.mdx +20 -0
  60. package/.docs/raw/deployment/{building-mastra.mdx → mastra-server.mdx} +5 -5
  61. package/.docs/raw/deployment/monorepo.mdx +23 -44
  62. package/.docs/raw/deployment/overview.mdx +32 -50
  63. package/.docs/raw/deployment/web-framework.mdx +15 -19
  64. package/.docs/raw/evals/custom-scorers.mdx +9 -6
  65. package/.docs/raw/evals/overview.mdx +3 -6
  66. package/.docs/raw/evals/running-in-ci.mdx +2 -2
  67. package/.docs/raw/getting-started/manual-install.mdx +20 -20
  68. package/.docs/raw/getting-started/mcp-docs-server.mdx +2 -2
  69. package/.docs/raw/getting-started/start.mdx +10 -1
  70. package/.docs/raw/getting-started/studio.mdx +1 -1
  71. package/.docs/raw/guides/agent-frameworks/ai-sdk.mdx +4 -4
  72. package/.docs/raw/guides/build-your-ui/ai-sdk-ui.mdx +1033 -79
  73. package/.docs/raw/guides/build-your-ui/assistant-ui.mdx +8 -8
  74. package/.docs/raw/guides/build-your-ui/copilotkit.mdx +11 -11
  75. package/.docs/raw/{deployment/cloud-providers → guides/deployment}/amazon-ec2.mdx +9 -9
  76. package/.docs/raw/{deployment/cloud-providers → guides/deployment}/aws-lambda.mdx +13 -16
  77. package/.docs/raw/{deployment/cloud-providers → guides/deployment}/azure-app-services.mdx +5 -7
  78. package/.docs/raw/{deployment/cloud-providers → guides/deployment}/cloudflare-deployer.mdx +8 -5
  79. package/.docs/raw/{deployment/cloud-providers → guides/deployment}/digital-ocean.mdx +12 -15
  80. package/.docs/raw/guides/deployment/index.mdx +32 -0
  81. package/.docs/raw/guides/deployment/inngest.mdx +386 -0
  82. package/.docs/raw/{deployment/cloud-providers → guides/deployment}/netlify-deployer.mdx +7 -3
  83. package/.docs/raw/{deployment/cloud-providers → guides/deployment}/vercel-deployer.mdx +8 -5
  84. package/.docs/raw/guides/getting-started/astro.mdx +292 -451
  85. package/.docs/raw/guides/getting-started/express.mdx +72 -153
  86. package/.docs/raw/guides/getting-started/hono.mdx +227 -0
  87. package/.docs/raw/guides/getting-started/next-js.mdx +170 -61
  88. package/.docs/raw/guides/getting-started/quickstart.mdx +4 -4
  89. package/.docs/raw/guides/getting-started/sveltekit.mdx +238 -409
  90. package/.docs/raw/guides/getting-started/vite-react.mdx +317 -147
  91. package/.docs/raw/guides/guide/ai-recruiter.mdx +10 -10
  92. package/.docs/raw/guides/guide/chef-michel.mdx +9 -11
  93. package/.docs/raw/guides/guide/notes-mcp-server.mdx +15 -15
  94. package/.docs/raw/guides/guide/research-assistant.mdx +17 -17
  95. package/.docs/raw/guides/guide/stock-agent.mdx +5 -5
  96. package/.docs/raw/guides/guide/web-search.mdx +8 -8
  97. package/.docs/raw/guides/guide/whatsapp-chat-bot.mdx +7 -7
  98. package/.docs/raw/guides/migrations/ai-sdk-v4-to-v5.mdx +2 -2
  99. package/.docs/raw/guides/migrations/upgrade-to-v1/agent.mdx +1 -1
  100. package/.docs/raw/guides/migrations/upgrade-to-v1/client.mdx +17 -0
  101. package/.docs/raw/guides/migrations/upgrade-to-v1/overview.mdx +6 -0
  102. package/.docs/raw/guides/migrations/upgrade-to-v1/workflows.mdx +0 -2
  103. package/.docs/raw/guides/migrations/vnext-to-standard-apis.mdx +21 -23
  104. package/.docs/raw/index.mdx +2 -2
  105. package/.docs/raw/{deployment/mastra-cloud → mastra-cloud}/dashboard.mdx +2 -6
  106. package/.docs/raw/{deployment/mastra-cloud → mastra-cloud}/observability.mdx +1 -5
  107. package/.docs/raw/{deployment/mastra-cloud → mastra-cloud}/overview.mdx +2 -6
  108. package/.docs/raw/{deployment/mastra-cloud → mastra-cloud}/setting-up.mdx +8 -7
  109. package/.docs/raw/mcp/overview.mdx +31 -13
  110. package/.docs/raw/mcp/publishing-mcp-server.mdx +2 -2
  111. package/.docs/raw/memory/memory-processors.mdx +9 -9
  112. package/.docs/raw/memory/message-history.mdx +69 -0
  113. package/.docs/raw/memory/overview.mdx +34 -76
  114. package/.docs/raw/memory/semantic-recall.mdx +58 -49
  115. package/.docs/raw/memory/storage.mdx +188 -0
  116. package/.docs/raw/memory/working-memory.mdx +7 -7
  117. package/.docs/raw/observability/logging.mdx +10 -11
  118. package/.docs/raw/observability/overview.mdx +0 -1
  119. package/.docs/raw/observability/tracing/bridges/otel.mdx +2 -2
  120. package/.docs/raw/observability/tracing/exporters/cloud.mdx +1 -1
  121. package/.docs/raw/observability/tracing/exporters/default.mdx +3 -3
  122. package/.docs/raw/observability/tracing/exporters/langfuse.mdx +1 -2
  123. package/.docs/raw/observability/tracing/overview.mdx +23 -25
  124. package/.docs/raw/observability/tracing/processors/sensitive-data-filter.mdx +3 -3
  125. package/.docs/raw/rag/chunking-and-embedding.mdx +18 -31
  126. package/.docs/raw/rag/graph-rag.mdx +220 -0
  127. package/.docs/raw/rag/overview.mdx +2 -3
  128. package/.docs/raw/rag/retrieval.mdx +34 -51
  129. package/.docs/raw/rag/vector-databases.mdx +29 -25
  130. package/.docs/raw/reference/agents/agent.mdx +3 -3
  131. package/.docs/raw/reference/agents/generate.mdx +1 -1
  132. package/.docs/raw/reference/agents/generateLegacy.mdx +2 -2
  133. package/.docs/raw/reference/agents/getDefaultGenerateOptions.mdx +3 -3
  134. package/.docs/raw/reference/agents/getDefaultOptions.mdx +3 -3
  135. package/.docs/raw/reference/agents/getDefaultStreamOptions.mdx +3 -3
  136. package/.docs/raw/reference/agents/getDescription.mdx +1 -1
  137. package/.docs/raw/reference/agents/getInstructions.mdx +3 -3
  138. package/.docs/raw/reference/agents/getLLM.mdx +3 -3
  139. package/.docs/raw/reference/agents/getMemory.mdx +3 -3
  140. package/.docs/raw/reference/agents/getModel.mdx +3 -3
  141. package/.docs/raw/reference/agents/getTools.mdx +2 -2
  142. package/.docs/raw/reference/agents/getVoice.mdx +2 -2
  143. package/.docs/raw/reference/agents/listAgents.mdx +2 -2
  144. package/.docs/raw/reference/agents/listScorers.mdx +3 -3
  145. package/.docs/raw/reference/agents/listTools.mdx +2 -2
  146. package/.docs/raw/reference/agents/listWorkflows.mdx +2 -2
  147. package/.docs/raw/reference/agents/network.mdx +1 -1
  148. package/.docs/raw/reference/ai-sdk/chat-route.mdx +3 -3
  149. package/.docs/raw/reference/ai-sdk/handle-chat-stream.mdx +2 -2
  150. package/.docs/raw/reference/ai-sdk/handle-network-stream.mdx +2 -2
  151. package/.docs/raw/reference/ai-sdk/handle-workflow-stream.mdx +2 -2
  152. package/.docs/raw/reference/ai-sdk/network-route.mdx +3 -3
  153. package/.docs/raw/reference/ai-sdk/to-ai-sdk-stream.mdx +6 -6
  154. package/.docs/raw/reference/ai-sdk/to-ai-sdk-v4-messages.mdx +127 -0
  155. package/.docs/raw/reference/ai-sdk/to-ai-sdk-v5-messages.mdx +107 -0
  156. package/.docs/raw/reference/ai-sdk/with-mastra.mdx +1 -1
  157. package/.docs/raw/reference/ai-sdk/workflow-route.mdx +3 -3
  158. package/.docs/raw/reference/auth/auth0.mdx +2 -3
  159. package/.docs/raw/reference/auth/clerk.mdx +2 -3
  160. package/.docs/raw/reference/auth/firebase.mdx +3 -5
  161. package/.docs/raw/reference/auth/jwt.mdx +2 -3
  162. package/.docs/raw/reference/auth/supabase.mdx +2 -3
  163. package/.docs/raw/reference/auth/workos.mdx +2 -3
  164. package/.docs/raw/reference/cli/create-mastra.mdx +10 -10
  165. package/.docs/raw/reference/cli/mastra.mdx +10 -10
  166. package/.docs/raw/reference/client-js/agents.mdx +1 -2
  167. package/.docs/raw/reference/client-js/mastra-client.mdx +2 -2
  168. package/.docs/raw/reference/client-js/workflows.mdx +20 -0
  169. package/.docs/raw/reference/core/getAgent.mdx +1 -1
  170. package/.docs/raw/reference/core/getAgentById.mdx +1 -1
  171. package/.docs/raw/reference/core/getDeployer.mdx +1 -1
  172. package/.docs/raw/reference/core/getLogger.mdx +1 -1
  173. package/.docs/raw/reference/core/getMCPServer.mdx +1 -1
  174. package/.docs/raw/reference/core/getMCPServerById.mdx +1 -1
  175. package/.docs/raw/reference/core/getMemory.mdx +2 -2
  176. package/.docs/raw/reference/core/getServer.mdx +3 -3
  177. package/.docs/raw/reference/core/getStorage.mdx +2 -2
  178. package/.docs/raw/reference/core/getStoredAgentById.mdx +3 -3
  179. package/.docs/raw/reference/core/getTelemetry.mdx +1 -1
  180. package/.docs/raw/reference/core/getVector.mdx +1 -1
  181. package/.docs/raw/reference/core/getWorkflow.mdx +1 -1
  182. package/.docs/raw/reference/core/listAgents.mdx +1 -1
  183. package/.docs/raw/reference/core/listLogs.mdx +1 -1
  184. package/.docs/raw/reference/core/listLogsByRunId.mdx +1 -1
  185. package/.docs/raw/reference/core/listMCPServers.mdx +1 -1
  186. package/.docs/raw/reference/core/listMemory.mdx +2 -2
  187. package/.docs/raw/reference/core/listStoredAgents.mdx +4 -4
  188. package/.docs/raw/reference/core/listVectors.mdx +1 -1
  189. package/.docs/raw/reference/core/listWorkflows.mdx +1 -1
  190. package/.docs/raw/reference/core/setLogger.mdx +1 -1
  191. package/.docs/raw/reference/core/setStorage.mdx +2 -2
  192. package/.docs/raw/reference/core/setTelemetry.mdx +1 -1
  193. package/.docs/raw/reference/deployer/cloudflare.mdx +1 -2
  194. package/.docs/raw/reference/deployer/deployer.mdx +0 -1
  195. package/.docs/raw/reference/deployer/netlify.mdx +1 -1
  196. package/.docs/raw/reference/deployer/vercel.mdx +2 -4
  197. package/.docs/raw/reference/evals/answer-relevancy.mdx +1 -1
  198. package/.docs/raw/reference/evals/answer-similarity.mdx +1 -1
  199. package/.docs/raw/reference/evals/bias.mdx +1 -1
  200. package/.docs/raw/reference/evals/completeness.mdx +1 -1
  201. package/.docs/raw/reference/evals/content-similarity.mdx +1 -1
  202. package/.docs/raw/reference/evals/context-precision.mdx +1 -1
  203. package/.docs/raw/reference/evals/faithfulness.mdx +1 -1
  204. package/.docs/raw/reference/evals/hallucination.mdx +1 -1
  205. package/.docs/raw/reference/evals/keyword-coverage.mdx +1 -1
  206. package/.docs/raw/reference/evals/prompt-alignment.mdx +7 -7
  207. package/.docs/raw/reference/evals/textual-difference.mdx +1 -1
  208. package/.docs/raw/reference/evals/tone-consistency.mdx +1 -1
  209. package/.docs/raw/reference/evals/tool-call-accuracy.mdx +10 -10
  210. package/.docs/raw/reference/evals/toxicity.mdx +1 -1
  211. package/.docs/raw/reference/logging/pino-logger.mdx +7 -8
  212. package/.docs/raw/reference/memory/createThread.mdx +2 -2
  213. package/.docs/raw/reference/memory/deleteMessages.mdx +2 -2
  214. package/.docs/raw/reference/memory/listThreadsByResourceId.mdx +2 -2
  215. package/.docs/raw/reference/memory/memory-class.mdx +3 -3
  216. package/.docs/raw/reference/memory/query.mdx +2 -2
  217. package/.docs/raw/reference/memory/recall.mdx +2 -2
  218. package/.docs/raw/reference/observability/tracing/exporters/langfuse.mdx +1 -1
  219. package/.docs/raw/reference/processors/batch-parts-processor.mdx +2 -2
  220. package/.docs/raw/reference/processors/language-detector.mdx +2 -2
  221. package/.docs/raw/reference/processors/message-history-processor.mdx +2 -2
  222. package/.docs/raw/reference/processors/moderation-processor.mdx +3 -3
  223. package/.docs/raw/reference/processors/pii-detector.mdx +3 -3
  224. package/.docs/raw/reference/processors/processor-interface.mdx +13 -13
  225. package/.docs/raw/reference/processors/prompt-injection-detector.mdx +2 -2
  226. package/.docs/raw/reference/processors/semantic-recall-processor.mdx +2 -2
  227. package/.docs/raw/reference/processors/system-prompt-scrubber.mdx +2 -2
  228. package/.docs/raw/reference/processors/token-limiter-processor.mdx +2 -2
  229. package/.docs/raw/reference/processors/tool-call-filter.mdx +3 -3
  230. package/.docs/raw/reference/processors/unicode-normalizer.mdx +2 -2
  231. package/.docs/raw/reference/processors/working-memory-processor.mdx +3 -3
  232. package/.docs/raw/reference/rag/chunk.mdx +1 -1
  233. package/.docs/raw/reference/rag/database-config.mdx +1 -1
  234. package/.docs/raw/reference/rag/extract-params.mdx +2 -2
  235. package/.docs/raw/reference/rag/metadata-filters.mdx +7 -7
  236. package/.docs/raw/reference/server/create-route.mdx +14 -14
  237. package/.docs/raw/reference/server/express-adapter.mdx +10 -11
  238. package/.docs/raw/reference/server/hono-adapter.mdx +10 -11
  239. package/.docs/raw/reference/server/mastra-server.mdx +22 -22
  240. package/.docs/raw/reference/server/routes.mdx +28 -1
  241. package/.docs/raw/reference/storage/cloudflare-d1.mdx +3 -3
  242. package/.docs/raw/reference/storage/cloudflare.mdx +2 -2
  243. package/.docs/raw/reference/storage/convex.mdx +6 -6
  244. package/.docs/raw/reference/storage/dynamodb.mdx +4 -4
  245. package/.docs/raw/reference/storage/lance.mdx +3 -3
  246. package/.docs/raw/reference/storage/libsql.mdx +69 -54
  247. package/.docs/raw/reference/storage/mongodb.mdx +80 -7
  248. package/.docs/raw/reference/storage/mssql.mdx +4 -4
  249. package/.docs/raw/{server-db/storage.mdx → reference/storage/overview.mdx} +13 -111
  250. package/.docs/raw/reference/storage/postgresql.mdx +78 -7
  251. package/.docs/raw/reference/storage/upstash.mdx +74 -2
  252. package/.docs/raw/reference/streaming/agents/stream.mdx +27 -5
  253. package/.docs/raw/reference/streaming/agents/streamLegacy.mdx +2 -2
  254. package/.docs/raw/reference/streaming/workflows/observeStream.mdx +1 -1
  255. package/.docs/raw/reference/streaming/workflows/resumeStream.mdx +1 -1
  256. package/.docs/raw/reference/streaming/workflows/stream.mdx +35 -22
  257. package/.docs/raw/reference/streaming/workflows/timeTravelStream.mdx +4 -4
  258. package/.docs/raw/reference/templates/overview.mdx +1 -2
  259. package/.docs/raw/reference/tools/create-tool.mdx +24 -5
  260. package/.docs/raw/reference/tools/graph-rag-tool.mdx +3 -3
  261. package/.docs/raw/reference/tools/vector-query-tool.mdx +4 -4
  262. package/.docs/raw/reference/vectors/astra.mdx +3 -3
  263. package/.docs/raw/reference/vectors/chroma.mdx +3 -3
  264. package/.docs/raw/reference/vectors/convex.mdx +12 -12
  265. package/.docs/raw/reference/vectors/couchbase.mdx +5 -5
  266. package/.docs/raw/reference/vectors/duckdb.mdx +10 -10
  267. package/.docs/raw/reference/vectors/elasticsearch.mdx +4 -4
  268. package/.docs/raw/reference/vectors/lance.mdx +4 -4
  269. package/.docs/raw/reference/vectors/libsql.mdx +61 -11
  270. package/.docs/raw/reference/vectors/mongodb.mdx +58 -5
  271. package/.docs/raw/reference/vectors/pg.mdx +53 -6
  272. package/.docs/raw/reference/vectors/pinecone.mdx +3 -3
  273. package/.docs/raw/reference/vectors/qdrant.mdx +3 -3
  274. package/.docs/raw/reference/vectors/s3vectors.mdx +6 -6
  275. package/.docs/raw/reference/vectors/turbopuffer.mdx +4 -4
  276. package/.docs/raw/reference/vectors/upstash.mdx +55 -6
  277. package/.docs/raw/reference/vectors/vectorize.mdx +3 -3
  278. package/.docs/raw/reference/workflows/run-methods/cancel.mdx +2 -2
  279. package/.docs/raw/reference/workflows/run-methods/restart.mdx +1 -3
  280. package/.docs/raw/reference/workflows/run-methods/resume.mdx +2 -2
  281. package/.docs/raw/reference/workflows/run-methods/start.mdx +2 -2
  282. package/.docs/raw/reference/workflows/run-methods/startAsync.mdx +143 -0
  283. package/.docs/raw/reference/workflows/run-methods/timeTravel.mdx +5 -5
  284. package/.docs/raw/reference/workflows/run.mdx +1 -1
  285. package/.docs/raw/reference/workflows/step.mdx +3 -3
  286. package/.docs/raw/reference/workflows/workflow-methods/branch.mdx +1 -1
  287. package/.docs/raw/reference/workflows/workflow-methods/commit.mdx +1 -1
  288. package/.docs/raw/reference/workflows/workflow-methods/create-run.mdx +37 -2
  289. package/.docs/raw/reference/workflows/workflow-methods/dountil.mdx +1 -1
  290. package/.docs/raw/reference/workflows/workflow-methods/dowhile.mdx +1 -1
  291. package/.docs/raw/reference/workflows/workflow-methods/foreach.mdx +6 -6
  292. package/.docs/raw/reference/workflows/workflow-methods/map.mdx +7 -7
  293. package/.docs/raw/reference/workflows/workflow-methods/parallel.mdx +1 -1
  294. package/.docs/raw/reference/workflows/workflow-methods/sendEvent.mdx +2 -2
  295. package/.docs/raw/reference/workflows/workflow-methods/sleep.mdx +2 -2
  296. package/.docs/raw/reference/workflows/workflow-methods/sleepUntil.mdx +2 -2
  297. package/.docs/raw/reference/workflows/workflow-methods/then.mdx +1 -1
  298. package/.docs/raw/reference/workflows/workflow-methods/waitForEvent.mdx +2 -2
  299. package/.docs/raw/reference/workflows/workflow.mdx +17 -3
  300. package/.docs/raw/{auth → server/auth}/auth0.mdx +20 -14
  301. package/.docs/raw/{auth → server/auth}/clerk.mdx +16 -9
  302. package/.docs/raw/{auth → server/auth}/firebase.mdx +21 -15
  303. package/.docs/raw/{auth → server/auth}/index.mdx +6 -6
  304. package/.docs/raw/{auth → server/auth}/jwt.mdx +14 -7
  305. package/.docs/raw/{auth → server/auth}/supabase.mdx +16 -9
  306. package/.docs/raw/{auth → server/auth}/workos.mdx +19 -13
  307. package/.docs/raw/{server-db → server}/custom-adapters.mdx +13 -13
  308. package/.docs/raw/{server-db → server}/custom-api-routes.mdx +3 -5
  309. package/.docs/raw/{server-db → server}/mastra-client.mdx +26 -15
  310. package/.docs/raw/{server-db → server}/mastra-server.mdx +8 -8
  311. package/.docs/raw/{server-db → server}/middleware.mdx +9 -9
  312. package/.docs/raw/{server-db → server}/request-context.mdx +33 -32
  313. package/.docs/raw/{server-db → server}/server-adapters.mdx +12 -12
  314. package/.docs/raw/streaming/events.mdx +14 -7
  315. package/.docs/raw/streaming/overview.mdx +21 -10
  316. package/.docs/raw/streaming/tool-streaming.mdx +6 -6
  317. package/.docs/raw/streaming/workflow-streaming.mdx +6 -8
  318. package/.docs/raw/tools-mcp/advanced-usage.mdx +2 -2
  319. package/.docs/raw/tools-mcp/mcp-overview.mdx +31 -12
  320. package/.docs/raw/tools-mcp/overview.mdx +10 -11
  321. package/.docs/raw/voice/overview.mdx +1 -1
  322. package/.docs/raw/workflows/agents-and-tools.mdx +28 -19
  323. package/.docs/raw/workflows/control-flow.mdx +27 -40
  324. package/.docs/raw/workflows/error-handling.mdx +172 -18
  325. package/.docs/raw/workflows/human-in-the-loop.mdx +6 -7
  326. package/.docs/raw/workflows/inngest-workflow.mdx +8 -9
  327. package/.docs/raw/workflows/input-data-mapping.mdx +7 -7
  328. package/.docs/raw/workflows/overview.mdx +34 -23
  329. package/.docs/raw/workflows/snapshots.mdx +14 -44
  330. package/.docs/raw/workflows/suspend-and-resume.mdx +7 -7
  331. package/.docs/raw/workflows/time-travel.mdx +16 -16
  332. package/.docs/raw/workflows/workflow-state.mdx +5 -8
  333. package/CHANGELOG.md +23 -0
  334. package/dist/logger.d.ts +3 -0
  335. package/dist/logger.d.ts.map +1 -1
  336. package/dist/stdio.js +53 -0
  337. package/package.json +4 -4
  338. package/.docs/organized/changelogs/%40internal%2Fai-sdk-v4.md +0 -1
  339. package/.docs/raw/deployment/cloud-providers/index.mdx +0 -55
  340. package/.docs/raw/memory/conversation-history.mdx +0 -24
  341. package/.docs/raw/memory/storage/memory-with-libsql.mdx +0 -140
  342. package/.docs/raw/memory/storage/memory-with-mongodb.mdx +0 -150
  343. package/.docs/raw/memory/storage/memory-with-pg.mdx +0 -138
  344. package/.docs/raw/memory/storage/memory-with-upstash.mdx +0 -146
  345. package/.docs/raw/memory/threads-and-resources.mdx +0 -95
@@ -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({
@@ -29,18 +29,15 @@ Before deploying to AWS Lambda, ensure you have:
29
29
 
30
30
  ## Memory Configuration
31
31
 
32
- :::note
33
- AWS Lambda uses an ephemeral file system,
34
- meaning that any files written to the file system are short-lived and may be lost.
35
- Avoid using a Mastra storage provider that uses the file system,
36
- such as `LibSQLStore` with a file URL.
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](/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.
37
34
  :::
38
35
 
39
36
  Lambda functions have limitations with file system storage. Configure your Mastra application to use either in-memory or external storage providers:
40
37
 
41
38
  ### Option 1: In-Memory (Simplest)
42
39
 
43
- ```typescript title="src/mastra/index.ts" copy showLineNumbers
40
+ ```typescript title="src/mastra/index.ts"
44
41
  import { LibSQLStore } from "@mastra/libsql";
45
42
 
46
43
  const storage = new LibSQLStore({
@@ -53,7 +50,7 @@ const storage = new LibSQLStore({
53
50
 
54
51
  For persistent memory across Lambda invocations, use external storage providers like `LibSQLStore` with Turso or other storage providers like `PostgreStore`:
55
52
 
56
- ```typescript title="src/mastra/index.ts" copy showLineNumbers
53
+ ```typescript title="src/mastra/index.ts"
57
54
  import { LibSQLStore } from "@mastra/libsql";
58
55
 
59
56
  const storage = new LibSQLStore({
@@ -69,7 +66,7 @@ For more memory configuration options, see the [Memory documentation](/docs/v1/m
69
66
 
70
67
  Create a `Dockerfile` in your Mastra project root directory:
71
68
 
72
- ```dockerfile title="Dockerfile" copy showLineNumbers
69
+ ```dockerfile title="Dockerfile"
73
70
  FROM node:22-alpine
74
71
 
75
72
  WORKDIR /app
@@ -103,7 +100,7 @@ CMD ["node", ".mastra/output/index.mjs"]
103
100
 
104
101
  Set up your environment variables for the deployment process:
105
102
 
106
- ```bash copy
103
+ ```bash
107
104
  export PROJECT_NAME="your-mastra-app"
108
105
  export AWS_REGION="us-east-1"
109
106
  export AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)
@@ -115,7 +112,7 @@ export AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output tex
115
112
 
116
113
  Build your Docker image locally:
117
114
 
118
- ```bash copy
115
+ ```bash
119
116
  docker build -t "$PROJECT_NAME" .
120
117
  ```
121
118
 
@@ -125,7 +122,7 @@ docker build -t "$PROJECT_NAME" .
125
122
 
126
123
  Create an Amazon ECR repository to store your Docker image:
127
124
 
128
- ```bash copy
125
+ ```bash
129
126
  aws ecr create-repository --repository-name "$PROJECT_NAME" --region "$AWS_REGION"
130
127
  ```
131
128
 
@@ -135,7 +132,7 @@ aws ecr create-repository --repository-name "$PROJECT_NAME" --region "$AWS_REGIO
135
132
 
136
133
  Log in to Amazon ECR:
137
134
 
138
- ```bash copy
135
+ ```bash
139
136
  aws ecr get-login-password --region "$AWS_REGION" | docker login --username AWS --password-stdin "$AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com"
140
137
  ```
141
138
 
@@ -145,7 +142,7 @@ aws ecr get-login-password --region "$AWS_REGION" | docker login --username AWS
145
142
 
146
143
  Tag your image with the ECR repository URI and push it:
147
144
 
148
- ```bash copy
145
+ ```bash
149
146
  docker tag "$PROJECT_NAME":latest "$AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/$PROJECT_NAME":latest
150
147
  docker push "$AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/$PROJECT_NAME":latest
151
148
  ```
@@ -189,7 +186,7 @@ Add your environment variables in the Lambda function configuration:
189
186
  2. Add the required variables for your Mastra application:
190
187
  - `OPENAI_API_KEY`: Your OpenAI API key (if using OpenAI)
191
188
  - `ANTHROPIC_API_KEY`: Your Anthropic API key (if using Anthropic)
192
- - `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)
193
190
  - Other provider-specific API keys as needed
194
191
 
195
192
  </StepItem>
@@ -216,13 +213,13 @@ Once deployed, test your Lambda function:
216
213
  2. Visit the URL in your browser to see your Mastra's server home screen
217
214
  3. Test your agents and workflows using the generated API endpoints
218
215
 
219
- For more information about available API endpoints, see the [Server documentation](/docs/v1/deployment/building-mastra).
216
+ For more information about available API endpoints, see the [Server documentation](/docs/v1/deployment/mastra-server).
220
217
 
221
218
  ## Connecting your client
222
219
 
223
220
  Update your client application to use the Lambda function URL:
224
221
 
225
- ```typescript title="src/client.ts" copy showLineNumbers
222
+ ```typescript title="src/client.ts"
226
223
  import { MastraClient } from "@mastra/client-js";
227
224
 
228
225
  const mastraClient = new MastraClient({
@@ -17,6 +17,10 @@ For more information on how to create a new Mastra application,
17
17
  refer to our [getting started guide](/guides/v1/getting-started/quickstart)
18
18
  :::
19
19
 
20
+ :::warning
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
+ :::
23
+
20
24
  ## Prerequisites
21
25
 
22
26
  - An [Azure account](https://azure.microsoft.com/) with an active subscription
@@ -143,7 +147,7 @@ You can now connect to your Mastra server from your client application using a `
143
147
 
144
148
  Refer to the [`MastraClient` documentation](/reference/v1/client-js/mastra-client) for more information.
145
149
 
146
- ```typescript copy showLineNumbers
150
+ ```typescript
147
151
  import { MastraClient } from "@mastra/client-js";
148
152
 
149
153
  const mastraClient = new MastraClient({
@@ -151,12 +155,6 @@ const mastraClient = new MastraClient({
151
155
  });
152
156
  ```
153
157
 
154
- :::note
155
- Azure App Services uses an ephemeral file system for some pricing tiers.
156
- For production applications, avoid using Mastra storage providers that rely on the local file system,
157
- such as `LibSQLStore` with a file URL. Consider using cloud-based storage solutions instead.
158
- :::
159
-
160
158
  ## Next steps
161
159
 
162
160
  - [Mastra Client SDK](/reference/v1/client-js/mastra-client)
@@ -7,20 +7,23 @@ description: "Learn how to deploy a Mastra application to Cloudflare using the M
7
7
 
8
8
  The `CloudflareDeployer` class handles deployment of standalone Mastra applications to Cloudflare Workers. It manages configuration, deployment, and extends the base [Deployer](/reference/v1/deployer/) class with Cloudflare specific functionality.
9
9
 
10
+ :::warning
11
+ Cloudflare Workers do not support filesystem access. 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.
12
+ :::
13
+
10
14
  ## Installation
11
15
 
12
- ```bash copy
16
+ ```bash
13
17
  npm install @mastra/deployer-cloudflare@beta
14
18
  ```
15
19
 
16
20
  ## Usage example
17
21
 
18
- ```typescript title="src/mastra/index.ts" showLineNumbers copy
22
+ ```typescript title="src/mastra/index.ts"
19
23
  import { Mastra } from "@mastra/core";
20
24
  import { CloudflareDeployer } from "@mastra/deployer-cloudflare";
21
25
 
22
26
  export const mastra = new Mastra({
23
- // ...
24
27
  deployer: new CloudflareDeployer({
25
28
  projectName: "hello-mastra",
26
29
  env: {
@@ -38,13 +41,13 @@ Manual deployments are also possible using the [Cloudflare Wrangler CLI](https:/
38
41
 
39
42
  With the Wrangler CLI installed, login and authenticate with your Cloudflare logins:
40
43
 
41
- ```bash copy
44
+ ```bash
42
45
  npx wrangler login
43
46
  ```
44
47
 
45
48
  Run the following to build and deploy your application to Cloudflare
46
49
 
47
- ```bash copy
50
+ ```bash
48
51
  npm run build && wrangler deploy --config .mastra/output/wrangler.json
49
52
  ```
50
53
 
@@ -97,11 +97,8 @@ Deployment
97
97
 
98
98
  You can now access your deployed application at the URL provided by Digital Ocean.
99
99
 
100
- :::note
101
- The Digital Ocean App Platform uses an ephemeral file system,
102
- meaning that any files written to the file system are short-lived and may be lost.
103
- Avoid using a Mastra storage provider that uses the file system,
104
- such as `LibSQLStore` with a file URL.
100
+ :::warning
101
+ The Digital Ocean App Platform 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.
105
102
  :::
106
103
 
107
104
  </TabItem>
@@ -134,7 +131,7 @@ Connect to your Droplet and clone your repository:
134
131
  <Tabs>
135
132
  <TabItem value="public" label="Public Repository">
136
133
 
137
- ```bash copy
134
+ ```bash
138
135
  git clone https://github.com/<your-username>/<your-repository>.git
139
136
  ```
140
137
 
@@ -142,7 +139,7 @@ git clone https://github.com/<your-username>/<your-repository>.git
142
139
 
143
140
  <TabItem value="private" label="Private Repository">
144
141
 
145
- ```bash copy
142
+ ```bash
146
143
  git clone https://<your-username>:<your-personal-access-token>@github.com/<your-username>/<your-repository>.git
147
144
  ```
148
145
 
@@ -151,7 +148,7 @@ git clone https://<your-username>:<your-personal-access-token>@github.com/<your-
151
148
 
152
149
  Navigate to the repository directory:
153
150
 
154
- ```bash copy
151
+ ```bash
155
152
  cd "<your-repository>"
156
153
  ```
157
154
 
@@ -161,7 +158,7 @@ cd "<your-repository>"
161
158
 
162
159
  Install dependencies
163
160
 
164
- ```bash copy
161
+ ```bash
165
162
  npm install
166
163
  ```
167
164
 
@@ -173,13 +170,13 @@ Set up environment variables
173
170
 
174
171
  Create a `.env` file and add your environment variables:
175
172
 
176
- ```bash copy
173
+ ```bash
177
174
  touch .env
178
175
  ```
179
176
 
180
177
  Edit the `.env` file and add your environment variables:
181
178
 
182
- ```bash copy
179
+ ```bash
183
180
  OPENAI_API_KEY=<your-openai-api-key>
184
181
  # Add other required environment variables
185
182
  ```
@@ -190,7 +187,7 @@ OPENAI_API_KEY=<your-openai-api-key>
190
187
 
191
188
  Build the application
192
189
 
193
- ```bash copy
190
+ ```bash
194
191
  npm run build
195
192
  ```
196
193
 
@@ -200,7 +197,7 @@ npm run build
200
197
 
201
198
  Run the application
202
199
 
203
- ```bash copy
200
+ ```bash
204
201
  node --env-file=".env" .mastra/output/index.mjs
205
202
  ```
206
203
 
@@ -220,9 +217,9 @@ Your Mastra application will run on port 4111 by default. Ensure your reverse pr
220
217
 
221
218
  You can now connect to your Mastra server from your client application using a `MastraClient` from the `@mastra/client-js` package.
222
219
 
223
- Refer to the [`MastraClient` documentation](/docs/v1/server-db/mastra-client) for more information.
220
+ Refer to the [`MastraClient` documentation](/docs/v1/server/mastra-client) for more information.
224
221
 
225
- ```typescript copy showLineNumbers
222
+ ```typescript
226
223
  import { MastraClient } from "@mastra/client-js";
227
224
 
228
225
  const mastraClient = new MastraClient({
@@ -0,0 +1,32 @@
1
+ ---
2
+ title: "Cloud Providers | Deployment"
3
+ description: "Deploy your Mastra applications to popular cloud providers."
4
+ ---
5
+
6
+ # Cloud Providers
7
+
8
+ Standalone Mastra applications can be deployed to popular cloud providers, see one of the following guides for more information:
9
+
10
+ - [Amazon EC2](/guides/v1/deployment/amazon-ec2)
11
+ - [AWS Lambda](/guides/v1/deployment/aws-lambda)
12
+ - [Azure App Services](/guides/v1/deployment/azure-app-services)
13
+ - [Cloudflare](/guides/v1/deployment/cloudflare-deployer)
14
+ - [Digital Ocean](/guides/v1/deployment/digital-ocean)
15
+ - [Netlify](/guides/v1/deployment/netlify-deployer)
16
+ - [Vercel](/guides/v1/deployment/vercel-deployer)
17
+
18
+ For self-hosted Node.js server deployment, see the [Creating A Mastra Server](/docs/v1/deployment/mastra-server) guide.
19
+
20
+ ## Prerequisites
21
+
22
+ Before deploying to a cloud provider, ensure you have:
23
+
24
+ - A [Mastra application](/guides/v1/getting-started/quickstart)
25
+ - Node.js `v22.13.0` or later
26
+ - A GitHub repository for your application (required for most CI/CD setups)
27
+ - Domain name management access (for SSL and HTTPS)
28
+ - Basic familiarity with server setup (e.g. Nginx, environment variables)
29
+
30
+ :::warning
31
+ `LibSQLStore` writes to the local filesystem, which is not supported in cloud environments that use ephemeral file systems. If you're deploying to platforms like AWS Lambda, Netlify, Azure App Services, or Digital Ocean App Platform, you must remove all usage of [LibSQLStore](/reference/v1/storage/libsql) with file URLs. Use in-memory storage (`:memory:`) or external storage providers like Turso, PostgreSQL, or Upstash.
32
+ :::