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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (397) hide show
  1. package/.docs/organized/changelogs/%40mastra%2Fagent-builder.md +9 -9
  2. package/.docs/organized/changelogs/%40mastra%2Fai-sdk.md +35 -35
  3. package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +11 -11
  4. package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +17 -17
  5. package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +11 -11
  6. package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +11 -11
  7. package/.docs/organized/changelogs/%40mastra%2Fcodemod.md +14 -0
  8. package/.docs/organized/changelogs/%40mastra%2Fcore.md +172 -172
  9. package/.docs/organized/changelogs/%40mastra%2Fcouchbase.md +10 -10
  10. package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +20 -20
  11. package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +11 -11
  12. package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +11 -11
  13. package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +34 -34
  14. package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +14 -14
  15. package/.docs/organized/changelogs/%40mastra%2Fevals.md +10 -10
  16. package/.docs/organized/changelogs/%40mastra%2Flance.md +14 -14
  17. package/.docs/organized/changelogs/%40mastra%2Flibsql.md +11 -11
  18. package/.docs/organized/changelogs/%40mastra%2Floggers.md +10 -10
  19. package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +27 -27
  20. package/.docs/organized/changelogs/%40mastra%2Fmcp.md +23 -23
  21. package/.docs/organized/changelogs/%40mastra%2Fmemory.md +10 -10
  22. package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +11 -11
  23. package/.docs/organized/changelogs/%40mastra%2Fmssql.md +26 -26
  24. package/.docs/organized/changelogs/%40mastra%2Fpg.md +11 -11
  25. package/.docs/organized/changelogs/%40mastra%2Fpinecone.md +11 -11
  26. package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +48 -48
  27. package/.docs/organized/changelogs/%40mastra%2Frag.md +11 -11
  28. package/.docs/organized/changelogs/%40mastra%2Freact.md +15 -15
  29. package/.docs/organized/changelogs/%40mastra%2Fserver.md +17 -17
  30. package/.docs/organized/changelogs/%40mastra%2Fupstash.md +14 -14
  31. package/.docs/organized/changelogs/%40mastra%2Fvoice-google-gemini-live.md +12 -12
  32. package/.docs/organized/changelogs/%40mastra%2Fvoice-openai.md +10 -10
  33. package/.docs/organized/changelogs/create-mastra.md +15 -15
  34. package/.docs/organized/changelogs/mastra.md +37 -37
  35. package/.docs/organized/code-examples/ai-elements.md +1 -1
  36. package/.docs/organized/code-examples/ai-sdk-useChat.md +1 -1
  37. package/.docs/organized/code-examples/ai-sdk-v5.md +1 -1
  38. package/.docs/organized/code-examples/assistant-ui.md +1 -1
  39. package/.docs/organized/code-examples/bird-checker-with-express.md +1 -1
  40. package/.docs/organized/code-examples/bird-checker-with-nextjs-and-eval.md +1 -1
  41. package/.docs/organized/code-examples/bird-checker-with-nextjs.md +1 -1
  42. package/.docs/organized/code-examples/client-side-tools.md +1 -1
  43. package/.docs/organized/code-examples/crypto-chatbot.md +1 -1
  44. package/.docs/organized/code-examples/fireworks-r1.md +1 -1
  45. package/.docs/organized/code-examples/heads-up-game.md +1 -1
  46. package/.docs/organized/code-examples/mcp-configuration.md +0 -3
  47. package/.docs/organized/code-examples/memory-per-resource-example.md +1 -1
  48. package/.docs/organized/code-examples/openapi-spec-writer.md +1 -1
  49. package/.docs/organized/code-examples/quick-start.md +1 -1
  50. package/.docs/organized/code-examples/stock-price-tool.md +1 -21
  51. package/.docs/organized/code-examples/workflow-ai-recruiter.md +1 -1
  52. package/.docs/organized/code-examples/workflow-with-inline-steps.md +1 -1
  53. package/.docs/organized/code-examples/workflow-with-memory.md +1 -1
  54. package/.docs/organized/code-examples/workflow-with-separate-steps.md +1 -1
  55. package/.docs/organized/code-examples/workflow-with-suspend-resume.md +1 -1
  56. package/.docs/raw/agents/adding-voice.mdx +1 -1
  57. package/.docs/raw/agents/agent-memory.mdx +1 -1
  58. package/.docs/raw/agents/guardrails.mdx +1 -1
  59. package/.docs/raw/agents/human-in-the-loop-with-tools.mdx +90 -0
  60. package/.docs/raw/agents/networks.mdx +1 -1
  61. package/.docs/raw/agents/overview.mdx +8 -13
  62. package/.docs/raw/agents/using-tools.mdx +10 -9
  63. package/.docs/raw/auth/auth0.mdx +1 -1
  64. package/.docs/raw/auth/clerk.mdx +1 -1
  65. package/.docs/raw/auth/firebase.mdx +1 -1
  66. package/.docs/raw/auth/index.mdx +1 -1
  67. package/.docs/raw/auth/jwt.mdx +1 -1
  68. package/.docs/raw/auth/supabase.mdx +1 -1
  69. package/.docs/raw/auth/workos.mdx +1 -1
  70. package/.docs/raw/community/contributing-templates.mdx +1 -1
  71. package/.docs/raw/community/discord.mdx +2 -2
  72. package/.docs/raw/community/licensing.mdx +1 -1
  73. package/.docs/raw/deployment/{server-deployment.mdx → building-mastra.mdx} +4 -4
  74. package/.docs/raw/deployment/cloud-providers/amazon-ec2.mdx +2 -2
  75. package/.docs/raw/deployment/cloud-providers/aws-lambda.mdx +3 -3
  76. package/.docs/raw/deployment/cloud-providers/azure-app-services.mdx +2 -2
  77. package/.docs/raw/deployment/{serverless-platforms → cloud-providers}/cloudflare-deployer.mdx +1 -1
  78. package/.docs/raw/deployment/cloud-providers/digital-ocean.mdx +2 -2
  79. package/.docs/raw/deployment/cloud-providers/index.mdx +8 -4
  80. package/.docs/raw/deployment/{serverless-platforms → cloud-providers}/netlify-deployer.mdx +1 -1
  81. package/.docs/raw/deployment/{serverless-platforms → cloud-providers}/vercel-deployer.mdx +1 -1
  82. package/.docs/raw/{mastra-cloud → deployment/mastra-cloud}/dashboard.mdx +3 -3
  83. package/.docs/raw/{mastra-cloud → deployment/mastra-cloud}/observability.mdx +2 -2
  84. package/.docs/raw/{mastra-cloud → deployment/mastra-cloud}/overview.mdx +3 -3
  85. package/.docs/raw/{mastra-cloud → deployment/mastra-cloud}/setting-up.mdx +4 -4
  86. package/.docs/raw/deployment/monorepo.mdx +3 -3
  87. package/.docs/raw/deployment/overview.mdx +5 -5
  88. package/.docs/raw/deployment/web-framework.mdx +1 -1
  89. package/.docs/raw/evals/{off-the-shelf-scorers.mdx → built-in-scorers.mdx} +17 -15
  90. package/.docs/raw/evals/custom-scorers.mdx +1 -1
  91. package/.docs/raw/evals/overview.mdx +3 -3
  92. package/.docs/raw/evals/running-in-ci.mdx +2 -2
  93. package/.docs/raw/frameworks/agentic-uis/ai-sdk.mdx +15 -128
  94. package/.docs/raw/frameworks/agentic-uis/assistant-ui.mdx +71 -19
  95. package/.docs/raw/frameworks/agentic-uis/cedar-os.mdx +8 -29
  96. package/.docs/raw/frameworks/agentic-uis/copilotkit.mdx +91 -267
  97. package/.docs/raw/frameworks/agentic-uis/openrouter.mdx +3 -3
  98. package/.docs/raw/frameworks/servers/express.mdx +1 -1
  99. package/.docs/raw/frameworks/web-frameworks/astro.mdx +1 -1
  100. package/.docs/raw/frameworks/web-frameworks/next-js.mdx +1 -1
  101. package/.docs/raw/frameworks/web-frameworks/sveltekit.mdx +1 -1
  102. package/.docs/raw/frameworks/web-frameworks/vite-react.mdx +1 -1
  103. package/.docs/raw/getting-started/mcp-docs-server.mdx +6 -6
  104. package/.docs/raw/getting-started/project-structure.mdx +1 -1
  105. package/.docs/raw/getting-started/quickstart.mdx +27 -0
  106. package/.docs/raw/getting-started/studio.mdx +3 -3
  107. package/.docs/raw/getting-started/templates.mdx +1 -1
  108. package/.docs/raw/guides/guide/ai-recruiter.mdx +1 -1
  109. package/.docs/raw/guides/guide/chef-michel.mdx +1 -1
  110. package/.docs/raw/{getting-started/installation.mdx → guides/guide/manual-install.mdx} +6 -80
  111. package/.docs/raw/guides/guide/notes-mcp-server.mdx +2 -2
  112. package/.docs/raw/guides/guide/research-assistant.mdx +2 -2
  113. package/.docs/raw/guides/guide/stock-agent.mdx +1 -1
  114. package/.docs/raw/guides/guide/web-search.mdx +1 -1
  115. package/.docs/raw/guides/migrations/ai-sdk-v4-to-v5.mdx +119 -0
  116. package/.docs/raw/guides/migrations/upgrade-to-v1/agent.mdx +11 -1
  117. package/.docs/raw/guides/migrations/upgrade-to-v1/client.mdx +42 -2
  118. package/.docs/raw/guides/migrations/upgrade-to-v1/evals.mdx +31 -1
  119. package/.docs/raw/guides/migrations/upgrade-to-v1/mastra.mdx +27 -3
  120. package/.docs/raw/guides/migrations/upgrade-to-v1/mcp.mdx +1 -1
  121. package/.docs/raw/guides/migrations/upgrade-to-v1/memory.mdx +28 -0
  122. package/.docs/raw/guides/migrations/upgrade-to-v1/overview.mdx +25 -3
  123. package/.docs/raw/guides/migrations/upgrade-to-v1/storage.mdx +80 -0
  124. package/.docs/raw/guides/migrations/upgrade-to-v1/tools.mdx +60 -0
  125. package/.docs/raw/guides/migrations/upgrade-to-v1/vectors.mdx +25 -1
  126. package/.docs/raw/guides/migrations/upgrade-to-v1/workflows.mdx +43 -1
  127. package/.docs/raw/guides/quickstarts/nextjs.mdx +18 -17
  128. package/.docs/raw/guides/quickstarts/standalone-server.mdx +86 -0
  129. package/.docs/raw/index.mdx +3 -3
  130. package/.docs/raw/logging.mdx +7 -7
  131. package/.docs/raw/mcp/overview.mdx +360 -0
  132. package/.docs/raw/mcp/publishing-mcp-server.mdx +139 -0
  133. package/.docs/raw/memory/conversation-history.mdx +1 -1
  134. package/.docs/raw/memory/memory-processors.mdx +1 -1
  135. package/.docs/raw/memory/overview.mdx +2 -2
  136. package/.docs/raw/memory/semantic-recall.mdx +2 -2
  137. package/.docs/raw/memory/storage/memory-with-libsql.mdx +1 -4
  138. package/.docs/raw/memory/storage/memory-with-mongodb.mdx +152 -0
  139. package/.docs/raw/memory/storage/memory-with-pg.mdx +1 -4
  140. package/.docs/raw/memory/storage/memory-with-upstash.mdx +1 -4
  141. package/.docs/raw/memory/threads-and-resources.mdx +1 -1
  142. package/.docs/raw/memory/working-memory.mdx +1 -1
  143. package/.docs/raw/observability/overview.mdx +2 -2
  144. package/.docs/raw/observability/tracing/exporters/arize.mdx +1 -1
  145. package/.docs/raw/observability/tracing/exporters/braintrust.mdx +1 -1
  146. package/.docs/raw/observability/tracing/exporters/cloud.mdx +2 -2
  147. package/.docs/raw/observability/tracing/exporters/default.mdx +1 -1
  148. package/.docs/raw/observability/tracing/exporters/langfuse.mdx +1 -1
  149. package/.docs/raw/observability/tracing/exporters/langsmith.mdx +1 -1
  150. package/.docs/raw/observability/tracing/exporters/otel.mdx +1 -1
  151. package/.docs/raw/observability/tracing/overview.mdx +2 -2
  152. package/.docs/raw/observability/tracing/processors/sensitive-data-filter.mdx +2 -2
  153. package/.docs/raw/rag/overview.mdx +1 -1
  154. package/.docs/raw/rag/retrieval.mdx +1 -1
  155. package/.docs/raw/rag/vector-databases.mdx +1 -1
  156. package/.docs/raw/reference/agents/agent.mdx +1 -2
  157. package/.docs/raw/reference/agents/generate.mdx +1 -1
  158. package/.docs/raw/reference/agents/generateLegacy.mdx +1 -1
  159. package/.docs/raw/reference/agents/getDefaultGenerateOptions.mdx +1 -1
  160. package/.docs/raw/reference/agents/getDefaultOptions.mdx +1 -1
  161. package/.docs/raw/reference/agents/getDefaultStreamOptions.mdx +1 -1
  162. package/.docs/raw/reference/agents/getDescription.mdx +1 -1
  163. package/.docs/raw/reference/agents/getInstructions.mdx +1 -1
  164. package/.docs/raw/reference/agents/getLLM.mdx +1 -1
  165. package/.docs/raw/reference/agents/getMemory.mdx +1 -1
  166. package/.docs/raw/reference/agents/getModel.mdx +1 -1
  167. package/.docs/raw/reference/agents/getTools.mdx +69 -0
  168. package/.docs/raw/reference/agents/getVoice.mdx +1 -1
  169. package/.docs/raw/reference/agents/listAgents.mdx +1 -1
  170. package/.docs/raw/reference/agents/listScorers.mdx +1 -1
  171. package/.docs/raw/reference/agents/listTools.mdx +2 -2
  172. package/.docs/raw/reference/agents/listWorkflows.mdx +1 -1
  173. package/.docs/raw/reference/agents/network.mdx +1 -1
  174. package/.docs/raw/reference/auth/auth0.mdx +1 -1
  175. package/.docs/raw/reference/auth/clerk.mdx +1 -1
  176. package/.docs/raw/reference/auth/firebase.mdx +1 -1
  177. package/.docs/raw/reference/auth/jwt.mdx +1 -1
  178. package/.docs/raw/reference/auth/supabase.mdx +1 -1
  179. package/.docs/raw/reference/auth/workos.mdx +1 -1
  180. package/.docs/raw/reference/cli/create-mastra.mdx +1 -1
  181. package/.docs/raw/reference/cli/mastra.mdx +4 -4
  182. package/.docs/raw/reference/client-js/agents.mdx +1 -1
  183. package/.docs/raw/reference/client-js/error-handling.mdx +1 -1
  184. package/.docs/raw/reference/client-js/logs.mdx +1 -1
  185. package/.docs/raw/reference/client-js/mastra-client.mdx +2 -2
  186. package/.docs/raw/reference/client-js/memory.mdx +1 -1
  187. package/.docs/raw/reference/client-js/observability.mdx +1 -1
  188. package/.docs/raw/reference/client-js/telemetry.mdx +1 -1
  189. package/.docs/raw/reference/client-js/tools.mdx +1 -1
  190. package/.docs/raw/reference/client-js/vectors.mdx +1 -1
  191. package/.docs/raw/reference/client-js/workflows.mdx +1 -1
  192. package/.docs/raw/reference/core/addGateway.mdx +59 -0
  193. package/.docs/raw/reference/core/getAgent.mdx +1 -1
  194. package/.docs/raw/reference/core/getAgentById.mdx +1 -1
  195. package/.docs/raw/reference/core/getDeployer.mdx +1 -1
  196. package/.docs/raw/reference/core/getGateway.mdx +59 -0
  197. package/.docs/raw/reference/core/getGatewayById.mdx +62 -0
  198. package/.docs/raw/reference/core/getLogger.mdx +1 -1
  199. package/.docs/raw/reference/core/getMCPServer.mdx +2 -2
  200. package/.docs/raw/reference/core/getMCPServerById.mdx +2 -2
  201. package/.docs/raw/reference/core/getScorer.mdx +1 -1
  202. package/.docs/raw/reference/core/getScorerById.mdx +1 -1
  203. package/.docs/raw/reference/core/getServer.mdx +2 -2
  204. package/.docs/raw/reference/core/getStorage.mdx +1 -1
  205. package/.docs/raw/reference/core/getTelemetry.mdx +1 -1
  206. package/.docs/raw/reference/core/getVector.mdx +1 -1
  207. package/.docs/raw/reference/core/getWorkflow.mdx +1 -1
  208. package/.docs/raw/reference/core/listAgents.mdx +1 -1
  209. package/.docs/raw/reference/core/listGateways.mdx +53 -0
  210. package/.docs/raw/reference/core/listLogs.mdx +1 -1
  211. package/.docs/raw/reference/core/listLogsByRunId.mdx +1 -1
  212. package/.docs/raw/reference/core/listMCPServers.mdx +2 -2
  213. package/.docs/raw/reference/core/listScorers.mdx +1 -1
  214. package/.docs/raw/reference/core/listVectors.mdx +1 -1
  215. package/.docs/raw/reference/core/listWorkflows.mdx +1 -1
  216. package/.docs/raw/reference/core/mastra-class.mdx +9 -1
  217. package/.docs/raw/reference/core/mastra-model-gateway.mdx +241 -0
  218. package/.docs/raw/reference/core/setLogger.mdx +1 -1
  219. package/.docs/raw/reference/core/setStorage.mdx +1 -1
  220. package/.docs/raw/reference/core/setTelemetry.mdx +1 -1
  221. package/.docs/raw/reference/deployer/cloudflare.mdx +1 -1
  222. package/.docs/raw/reference/deployer/deployer.mdx +1 -1
  223. package/.docs/raw/reference/deployer/netlify.mdx +1 -1
  224. package/.docs/raw/reference/deployer/vercel.mdx +1 -1
  225. package/.docs/raw/reference/evals/answer-relevancy.mdx +1 -1
  226. package/.docs/raw/reference/evals/answer-similarity.mdx +1 -1
  227. package/.docs/raw/reference/evals/bias.mdx +1 -1
  228. package/.docs/raw/reference/evals/completeness.mdx +1 -1
  229. package/.docs/raw/reference/evals/content-similarity.mdx +1 -1
  230. package/.docs/raw/reference/evals/context-precision.mdx +1 -1
  231. package/.docs/raw/reference/evals/context-relevance.mdx +1 -1
  232. package/.docs/raw/reference/evals/create-scorer.mdx +1 -1
  233. package/.docs/raw/reference/evals/faithfulness.mdx +1 -1
  234. package/.docs/raw/reference/evals/hallucination.mdx +1 -1
  235. package/.docs/raw/reference/evals/keyword-coverage.mdx +1 -1
  236. package/.docs/raw/reference/evals/mastra-scorer.mdx +1 -1
  237. package/.docs/raw/reference/evals/noise-sensitivity.mdx +1 -1
  238. package/.docs/raw/reference/evals/prompt-alignment.mdx +1 -1
  239. package/.docs/raw/reference/evals/run-evals.mdx +1 -1
  240. package/.docs/raw/reference/evals/textual-difference.mdx +1 -1
  241. package/.docs/raw/reference/evals/tone-consistency.mdx +1 -1
  242. package/.docs/raw/reference/evals/tool-call-accuracy.mdx +1 -1
  243. package/.docs/raw/reference/evals/toxicity.mdx +1 -1
  244. package/.docs/raw/reference/logging/pino-logger.mdx +2 -2
  245. package/.docs/raw/reference/memory/createThread.mdx +1 -1
  246. package/.docs/raw/reference/memory/deleteMessages.mdx +1 -1
  247. package/.docs/raw/reference/memory/getThreadById.mdx +1 -1
  248. package/.docs/raw/reference/memory/listThreadsByResourceId.mdx +1 -1
  249. package/.docs/raw/reference/memory/memory-class.mdx +1 -1
  250. package/.docs/raw/reference/memory/query.mdx +1 -1
  251. package/.docs/raw/reference/memory/recall.mdx +1 -1
  252. package/.docs/raw/reference/observability/tracing/configuration.mdx +2 -2
  253. package/.docs/raw/reference/observability/tracing/exporters/arize.mdx +1 -1
  254. package/.docs/raw/reference/observability/tracing/exporters/braintrust.mdx +1 -1
  255. package/.docs/raw/reference/observability/tracing/exporters/cloud-exporter.mdx +1 -1
  256. package/.docs/raw/reference/observability/tracing/exporters/console-exporter.mdx +1 -1
  257. package/.docs/raw/reference/observability/tracing/exporters/default-exporter.mdx +1 -1
  258. package/.docs/raw/reference/observability/tracing/exporters/langfuse.mdx +1 -1
  259. package/.docs/raw/reference/observability/tracing/exporters/langsmith.mdx +1 -1
  260. package/.docs/raw/reference/observability/tracing/exporters/otel.mdx +1 -1
  261. package/.docs/raw/reference/observability/tracing/instances.mdx +2 -2
  262. package/.docs/raw/reference/observability/tracing/interfaces.mdx +2 -2
  263. package/.docs/raw/reference/observability/tracing/processors/sensitive-data-filter.mdx +1 -1
  264. package/.docs/raw/reference/observability/tracing/spans.mdx +2 -2
  265. package/.docs/raw/reference/processors/batch-parts-processor.mdx +1 -1
  266. package/.docs/raw/reference/processors/language-detector.mdx +1 -1
  267. package/.docs/raw/reference/processors/moderation-processor.mdx +1 -1
  268. package/.docs/raw/reference/processors/pii-detector.mdx +1 -1
  269. package/.docs/raw/reference/processors/prompt-injection-detector.mdx +1 -1
  270. package/.docs/raw/reference/processors/system-prompt-scrubber.mdx +1 -1
  271. package/.docs/raw/reference/processors/token-limiter-processor.mdx +1 -1
  272. package/.docs/raw/reference/processors/unicode-normalizer.mdx +1 -1
  273. package/.docs/raw/reference/rag/chunk.mdx +1 -1
  274. package/.docs/raw/reference/rag/database-config.mdx +1 -1
  275. package/.docs/raw/reference/rag/document.mdx +1 -1
  276. package/.docs/raw/reference/rag/embeddings.mdx +1 -1
  277. package/.docs/raw/reference/rag/extract-params.mdx +1 -1
  278. package/.docs/raw/reference/rag/graph-rag.mdx +1 -1
  279. package/.docs/raw/reference/rag/metadata-filters.mdx +1 -1
  280. package/.docs/raw/reference/rag/rerank.mdx +1 -1
  281. package/.docs/raw/reference/rag/rerankWithScorer.mdx +1 -1
  282. package/.docs/raw/reference/storage/cloudflare-d1.mdx +1 -1
  283. package/.docs/raw/reference/storage/cloudflare.mdx +1 -1
  284. package/.docs/raw/reference/storage/dynamodb.mdx +1 -1
  285. package/.docs/raw/reference/storage/lance.mdx +1 -1
  286. package/.docs/raw/reference/storage/libsql.mdx +1 -1
  287. package/.docs/raw/reference/storage/mongodb.mdx +1 -1
  288. package/.docs/raw/reference/storage/mssql.mdx +1 -1
  289. package/.docs/raw/reference/storage/postgresql.mdx +1 -1
  290. package/.docs/raw/reference/storage/upstash.mdx +1 -1
  291. package/.docs/raw/reference/streaming/ChunkType.mdx +1 -1
  292. package/.docs/raw/reference/streaming/agents/MastraModelOutput.mdx +1 -1
  293. package/.docs/raw/reference/streaming/agents/stream.mdx +1 -1
  294. package/.docs/raw/reference/streaming/agents/streamLegacy.mdx +1 -1
  295. package/.docs/raw/reference/streaming/workflows/observeStream.mdx +1 -1
  296. package/.docs/raw/reference/streaming/workflows/observeStreamVNext.mdx +1 -1
  297. package/.docs/raw/reference/streaming/workflows/resumeStreamVNext.mdx +1 -1
  298. package/.docs/raw/reference/streaming/workflows/stream.mdx +1 -1
  299. package/.docs/raw/reference/streaming/workflows/streamVNext.mdx +1 -1
  300. package/.docs/raw/reference/templates/overview.mdx +1 -1
  301. package/.docs/raw/reference/tools/client.mdx +1 -1
  302. package/.docs/raw/reference/tools/create-tool.mdx +3 -4
  303. package/.docs/raw/reference/tools/document-chunker-tool.mdx +1 -1
  304. package/.docs/raw/reference/tools/graph-rag-tool.mdx +2 -2
  305. package/.docs/raw/reference/tools/mcp-client.mdx +1 -1
  306. package/.docs/raw/reference/tools/mcp-server.mdx +55 -6
  307. package/.docs/raw/reference/tools/vector-query-tool.mdx +2 -2
  308. package/.docs/raw/reference/vectors/astra.mdx +1 -1
  309. package/.docs/raw/reference/vectors/chroma.mdx +1 -1
  310. package/.docs/raw/reference/vectors/couchbase.mdx +1 -1
  311. package/.docs/raw/reference/vectors/lance.mdx +1 -1
  312. package/.docs/raw/reference/vectors/libsql.mdx +1 -1
  313. package/.docs/raw/reference/vectors/mongodb.mdx +1 -1
  314. package/.docs/raw/reference/vectors/opensearch.mdx +1 -1
  315. package/.docs/raw/reference/vectors/pg.mdx +1 -1
  316. package/.docs/raw/reference/vectors/pinecone.mdx +22 -2
  317. package/.docs/raw/reference/vectors/qdrant.mdx +1 -1
  318. package/.docs/raw/reference/vectors/s3vectors.mdx +1 -1
  319. package/.docs/raw/reference/vectors/turbopuffer.mdx +1 -1
  320. package/.docs/raw/reference/vectors/upstash.mdx +1 -1
  321. package/.docs/raw/reference/vectors/vectorize.mdx +1 -1
  322. package/.docs/raw/reference/voice/azure.mdx +96 -81
  323. package/.docs/raw/reference/voice/cloudflare.mdx +1 -1
  324. package/.docs/raw/reference/voice/composite-voice.mdx +1 -1
  325. package/.docs/raw/reference/voice/deepgram.mdx +1 -1
  326. package/.docs/raw/reference/voice/elevenlabs.mdx +1 -1
  327. package/.docs/raw/reference/voice/google-gemini-live.mdx +1 -1
  328. package/.docs/raw/reference/voice/google.mdx +1 -1
  329. package/.docs/raw/reference/voice/mastra-voice.mdx +1 -1
  330. package/.docs/raw/reference/voice/murf.mdx +1 -1
  331. package/.docs/raw/reference/voice/openai-realtime.mdx +1 -1
  332. package/.docs/raw/reference/voice/openai.mdx +1 -1
  333. package/.docs/raw/reference/voice/playai.mdx +1 -1
  334. package/.docs/raw/reference/voice/sarvam.mdx +1 -1
  335. package/.docs/raw/reference/voice/speechify.mdx +1 -1
  336. package/.docs/raw/reference/voice/voice.addInstructions.mdx +1 -1
  337. package/.docs/raw/reference/voice/voice.addTools.mdx +1 -1
  338. package/.docs/raw/reference/voice/voice.answer.mdx +1 -1
  339. package/.docs/raw/reference/voice/voice.close.mdx +1 -1
  340. package/.docs/raw/reference/voice/voice.connect.mdx +1 -1
  341. package/.docs/raw/reference/voice/voice.events.mdx +1 -1
  342. package/.docs/raw/reference/voice/voice.getSpeakers.mdx +1 -1
  343. package/.docs/raw/reference/voice/voice.listen.mdx +1 -1
  344. package/.docs/raw/reference/voice/voice.off.mdx +1 -1
  345. package/.docs/raw/reference/voice/voice.on.mdx +1 -1
  346. package/.docs/raw/reference/voice/voice.send.mdx +1 -1
  347. package/.docs/raw/reference/voice/voice.speak.mdx +1 -1
  348. package/.docs/raw/reference/voice/voice.updateConfig.mdx +1 -1
  349. package/.docs/raw/reference/workflows/run-methods/cancel.mdx +1 -1
  350. package/.docs/raw/reference/workflows/run-methods/resume.mdx +1 -1
  351. package/.docs/raw/reference/workflows/run-methods/start.mdx +1 -1
  352. package/.docs/raw/reference/workflows/run.mdx +1 -1
  353. package/.docs/raw/reference/workflows/step.mdx +1 -1
  354. package/.docs/raw/reference/workflows/workflow-methods/branch.mdx +1 -1
  355. package/.docs/raw/reference/workflows/workflow-methods/commit.mdx +1 -1
  356. package/.docs/raw/reference/workflows/workflow-methods/create-run.mdx +1 -1
  357. package/.docs/raw/reference/workflows/workflow-methods/dountil.mdx +1 -1
  358. package/.docs/raw/reference/workflows/workflow-methods/dowhile.mdx +1 -1
  359. package/.docs/raw/reference/workflows/workflow-methods/foreach.mdx +1 -1
  360. package/.docs/raw/reference/workflows/workflow-methods/map.mdx +1 -1
  361. package/.docs/raw/reference/workflows/workflow-methods/parallel.mdx +1 -1
  362. package/.docs/raw/reference/workflows/workflow-methods/sendEvent.mdx +1 -1
  363. package/.docs/raw/reference/workflows/workflow-methods/sleep.mdx +1 -1
  364. package/.docs/raw/reference/workflows/workflow-methods/sleepUntil.mdx +1 -1
  365. package/.docs/raw/reference/workflows/workflow-methods/then.mdx +1 -1
  366. package/.docs/raw/reference/workflows/workflow-methods/waitForEvent.mdx +1 -1
  367. package/.docs/raw/reference/workflows/workflow.mdx +2 -2
  368. package/.docs/raw/server-db/custom-api-routes.mdx +1 -1
  369. package/.docs/raw/server-db/mastra-client.mdx +2 -2
  370. package/.docs/raw/server-db/{production-server.mdx → mastra-server.mdx} +2 -2
  371. package/.docs/raw/server-db/middleware.mdx +31 -31
  372. package/.docs/raw/server-db/request-context.mdx +3 -3
  373. package/.docs/raw/server-db/storage.mdx +1 -1
  374. package/.docs/raw/streaming/events.mdx +1 -1
  375. package/.docs/raw/streaming/overview.mdx +1 -1
  376. package/.docs/raw/streaming/tool-streaming.mdx +1 -1
  377. package/.docs/raw/streaming/workflow-streaming.mdx +1 -1
  378. package/.docs/raw/tools-mcp/advanced-usage.mdx +1 -1
  379. package/.docs/raw/tools-mcp/mcp-overview.mdx +1 -1
  380. package/.docs/raw/tools-mcp/overview.mdx +1 -1
  381. package/.docs/raw/voice/overview.mdx +1 -1
  382. package/.docs/raw/voice/speech-to-speech.mdx +1 -1
  383. package/.docs/raw/voice/speech-to-text.mdx +1 -1
  384. package/.docs/raw/voice/text-to-speech.mdx +1 -1
  385. package/.docs/raw/workflows/agents-and-tools.mdx +2 -4
  386. package/.docs/raw/workflows/control-flow.mdx +6 -1
  387. package/.docs/raw/workflows/error-handling.mdx +4 -4
  388. package/.docs/raw/workflows/human-in-the-loop.mdx +160 -213
  389. package/.docs/raw/workflows/inngest-workflow.mdx +1 -1
  390. package/.docs/raw/workflows/input-data-mapping.mdx +1 -1
  391. package/.docs/raw/workflows/overview.mdx +10 -2
  392. package/.docs/raw/workflows/snapshots.mdx +4 -3
  393. package/.docs/raw/workflows/suspend-and-resume.mdx +72 -224
  394. package/CHANGELOG.md +26 -0
  395. package/dist/stdio.js +16 -18
  396. package/package.json +10 -14
  397. package/.docs/raw/deployment/serverless-platforms/index.mdx +0 -58
@@ -1,6 +1,6 @@
1
1
  ---
2
- title: "Integrate CopilotKit with Mastra | Frameworks | Mastra Docs"
3
- description: "Learn how Mastra leverages the CopilotKit's AGUI library and how you can leverage it to build user experiences"
2
+ title: "Using CopilotKit | Frameworks"
3
+ description: "Learn how to integrate CopilotKit with Mastra"
4
4
  ---
5
5
 
6
6
  import Tabs from "@theme/Tabs";
@@ -8,125 +8,99 @@ import TabItem from "@theme/TabItem";
8
8
  import Steps from "@site/src/components/Steps";
9
9
  import StepItem from "@site/src/components/StepItem";
10
10
 
11
- # Integrate CopilotKit with Mastra
11
+ # Using CopilotKit
12
12
 
13
- CopilotKit provides React components to quickly integrate customizable AI copilots into your application. Combined with Mastra, you can build sophisticated AI apps featuring bidirectional state synchronization and interactive UIs.
13
+ [CopilotKit](https://www.copilotkit.ai/) provides React components to quickly integrate customizable AI copilots into your application. Combined with Mastra, you can build sophisticated AI apps featuring bidirectional state synchronization and interactive UIs.
14
14
 
15
15
  Visit the [CopilotKit documentation](https://docs.copilotkit.ai/) to learn more about CopilotKit concepts, components, and advanced usage patterns.
16
16
 
17
- This guide shows two distinct integration approaches:
17
+ :::info
18
18
 
19
- 1. Integrate CopilotKit in your Mastra server with a separate React frontend.
20
- 2. Integrate CopilotKit in your Next.js app
19
+ For a full-stack integration approach where Mastra runs directly in your Next.js API routes, see the [CopilotKit Quickstart](https://docs.copilotkit.ai/mastra/quickstart) guide.
21
20
 
22
- <Tabs>
23
- <TabItem value="mastra-server" label="Mastra Server">
21
+ :::
24
22
 
25
- <Steps>
23
+ :::tip
26
24
 
27
- <StepItem>
25
+ Visit Mastra's [**"UI Dojo"**](https://ui-dojo.mastra.ai/) to see real-world examples of CopilotKit integrated with Mastra.
28
26
 
29
- In your React frontend, install the required CopilotKit packages:
27
+ :::
30
28
 
31
- <Tabs>
32
- <TabItem value="npm" label="npm">
29
+ ## Integration Guide
33
30
 
34
- ```bash copy
35
- npm install @copilotkit/react-core @copilotkit/react-ui
36
- ```
37
-
38
- </TabItem>
39
- <TabItem value="yarn" label="yarn">
40
-
41
- ```bash copy
42
- yarn add @copilotkit/react-core @copilotkit/react-ui
43
- ```
31
+ Run Mastra as a standalone server and connect your Next.js frontend (with CopilotKit) to its API endpoints.
44
32
 
45
- </TabItem>
46
- <TabItem value="pnpm" label="pnpm">
47
-
48
- ```bash copy
49
- pnpm add @copilotkit/react-core @copilotkit/react-ui
50
- ```
51
-
52
- </TabItem>
53
- </Tabs>
54
-
55
- </StepItem>
33
+ <Steps>
56
34
 
57
35
  <StepItem>
58
36
 
59
- Create a CopilotKit component in your React frontend:
37
+ Set up your directory structure. A possible directory structure could look like this:
60
38
 
61
- ```tsx title="components/copilotkit-component.tsx" copy
62
- import { CopilotChat } from "@copilotkit/react-ui";
63
- import { CopilotKit } from "@copilotkit/react-core";
64
- import "@copilotkit/react-ui/styles.css";
65
-
66
- export function CopilotKitComponent({ runtimeUrl }: { runtimeUrl: string }) {
67
- return (
68
- <CopilotKit runtimeUrl={runtimeUrl} agent="weatherAgent">
69
- <CopilotChat
70
- labels={{
71
- title: "Your Assistant",
72
- initial: "Hi! 👋 How can I assist you today?",
73
- }}
74
- />
75
- </CopilotKit>
76
- );
77
- }
39
+ ```shell
40
+ project-root
41
+ ├── mastra-server
42
+ │ ├── src
43
+ │ │ └── mastra
44
+ │ └── package.json
45
+ └── my-copilot-app
46
+ └── package.json
78
47
  ```
79
48
 
80
- </StepItem>
81
-
82
- <StepItem>
49
+ Bootstrap your Mastra server:
83
50
 
84
- If you have not yet set up your Mastra server, follow the [getting started guide](/docs/v1/getting-started/installation) to set up a new Mastra project.
51
+ ```bash copy
52
+ npx create-mastra@latest
53
+ ```
85
54
 
86
- In your Mastra server, install additional packages for CopilotKit integration:
55
+ This command will launch an interactive wizard to help you scaffold a new Mastra project, including prompting you for a project name and setting up basic configurations. Follow the prompts to create your server project.
87
56
 
88
- <Tabs>
89
- <TabItem value="npm" label="npm">
57
+ Navigate to your newly created Mastra server directory:
90
58
 
91
59
  ```bash copy
92
- npm install @copilotkit/runtime @ag-ui/mastra@beta
60
+ cd mastra-server # Replace with the actual directory name you provided
93
61
  ```
94
62
 
95
- </TabItem>
96
- <TabItem value="yarn" label="yarn">
63
+ You now have a basic Mastra server project ready. You should have the following files and folders:
97
64
 
98
- ```bash copy
99
- yarn add @copilotkit/runtime @ag-ui/mastra@beta
65
+ ```shell
66
+ src
67
+ └── mastra
68
+ ├── agents
69
+ │ └── weather-agent.ts
70
+ ├── scorers
71
+ │ └── weather-scorer.ts
72
+ ├── tools
73
+ │ └── weather-tool.ts
74
+ ├── workflows
75
+ │ └── weather-workflow.ts
76
+ └── index.ts
100
77
  ```
101
78
 
102
- </TabItem>
103
- <TabItem value="pnpm" label="pnpm">
79
+ :::note
104
80
 
105
- ```bash copy
106
- pnpm add @copilotkit/runtime @ag-ui/mastra@beta
107
- ```
81
+ Ensure that you have set the appropriate environment variables for your LLM provider in the `.env` file.
108
82
 
109
- </TabItem>
110
- </Tabs>
83
+ :::
111
84
 
112
85
  </StepItem>
113
86
 
114
87
  <StepItem>
115
88
 
116
- Configure your Mastra instance to include CopilotKit's runtime endpoint:
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
+
91
+ ```bash copy
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
+ ```
117
94
 
118
- ```typescript title="src/mastra/index.ts" copy {2,5-8,12-28}
119
- import { Mastra } from "@mastra/core";
120
- import { registerCopilotKit } from "@ag-ui/mastra/copilotkit";
121
- import { weatherAgent } from "./agents/weather-agent";
95
+ In your `src/mastra/index.ts` file, register the chat route:
122
96
 
123
- type WeatherRequestContext = {
124
- "user-id": string;
125
- "temperature-scale": "celsius" | "fahrenheit";
126
- };
97
+ ```typescript copy title="src/mastra/index.ts" {2,7-19}
98
+ import { Mastra } from '@mastra/core/mastra';
99
+ import { registerCopilotKit } from '@ag-ui/mastra/copilotkit';
100
+ // Rest of the imports...
127
101
 
128
102
  export const mastra = new Mastra({
129
- agents: { weatherAgent },
103
+ // Rest of the configuration...
130
104
  server: {
131
105
  cors: {
132
106
  origin: "*",
@@ -134,99 +108,78 @@ export const mastra = new Mastra({
134
108
  allowHeaders: ["*"],
135
109
  },
136
110
  apiRoutes: [
137
- registerCopilotKit<WeatherRequestContext>({
138
- path: "/copilotkit",
139
- resourceId: "weatherAgent",
140
- setContext: (c, requestContext) => {
141
- requestContext.set(
142
- "user-id",
143
- c.req.header("X-User-ID") || "anonymous",
144
- );
145
- requestContext.set("temperature-scale", "celsius");
146
- },
147
- }),
148
- ],
149
- },
111
+ registerCopilotKit({
112
+ path: '/chat',
113
+ resourceId: 'weatherAgent'
114
+ })
115
+ ]
116
+ }
150
117
  });
151
118
  ```
152
119
 
120
+ This will make the `weatherAgent` available at `/chat` in a CopilotKit-compatible format. You have to add the CORS configuration to allow the CopilotKit frontend to access the Mastra server. For production deployments, make sure to restrict the CORS origins to only your frontend domain.
121
+
153
122
  </StepItem>
154
123
 
155
124
  <StepItem>
156
125
 
157
- Use the component in your React app with your Mastra server URL:
158
-
159
- ```tsx title="App.tsx" copy {5}
160
- import { CopilotKitComponent } from "./components/copilotkit-component";
161
-
162
- function App() {
163
- return <CopilotKitComponent runtimeUrl="http://localhost:4111/copilotkit" />;
164
- }
126
+ Run the Mastra server using the following command:
165
127
 
166
- export default App;
128
+ ```bash copy
129
+ npm run dev
167
130
  ```
168
131
 
169
- Now start both the Mastra server and your frontend.
132
+ By default, the Mastra server will run on `http://localhost:4111`. Keep this server running for the next steps where we'll set up the CopilotKit frontend to connect to it.
170
133
 
171
134
  </StepItem>
172
135
 
173
- </Steps>
174
- </TabItem>
175
-
176
- <TabItem value="nextjs" label="Next.js">
177
-
178
- <Steps>
179
-
180
136
  <StepItem>
181
137
 
182
- In your Next.js app, install the required packages:
183
-
184
- <Tabs>
185
- <TabItem value="npm" label="npm">
138
+ Go up one directory to your project root.
186
139
 
187
140
  ```bash copy
188
- npm install @copilotkit/react-core @copilotkit/react-ui @copilotkit/runtime @ag-ui/mastra@beta
141
+ cd ..
189
142
  ```
190
143
 
191
- </TabItem>
192
- <TabItem value="yarn" label="yarn">
144
+ Create a new Next.js project with the name `my-copilot-app`:
193
145
 
194
146
  ```bash copy
195
- yarn add @copilotkit/react-core @copilotkit/react-ui @copilotkit/runtime @ag-ui/mastra@beta
147
+ npx create-next-app@latest my-copilot-app
196
148
  ```
197
149
 
198
- </TabItem>
199
- <TabItem value="pnpm" label="pnpm">
150
+ Navigate to your newly created Next.js project directory:
200
151
 
201
152
  ```bash copy
202
- pnpm add @copilotkit/react-core @copilotkit/react-ui @copilotkit/runtime @ag-ui/mastra@beta
153
+ cd my-copilot-app
203
154
  ```
204
155
 
205
- </TabItem>
206
- </Tabs>
207
-
208
156
  </StepItem>
209
157
 
210
158
  <StepItem>
211
159
 
212
- Create a CopilotKit component:
160
+ Install the CopilotKit UI packages which you'll use to display a chat interface:
161
+
162
+ ```bash copy
163
+ npm install @copilotkit/react-ui @copilotkit/react-core
164
+ ```
165
+
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:
213
167
 
214
- ```tsx title="components/copilotkit-component.tsx" copy
215
- 'use client';
168
+ ```typescript copy title="app/page.tsx"
216
169
  import { CopilotChat } from "@copilotkit/react-ui";
217
170
  import { CopilotKit } from "@copilotkit/react-core";
218
171
  import "@copilotkit/react-ui/styles.css";
219
172
 
220
- export function CopilotKitComponent({ runtimeUrl }: { runtimeUrl: string}) {
173
+ export default function Home() {
221
174
  return (
222
175
  <CopilotKit
223
- runtimeUrl={runtimeUrl}
176
+ runtimeUrl="http://localhost:4111/chat"
224
177
  agent="weatherAgent"
225
178
  >
226
179
  <CopilotChat
227
180
  labels={{
228
- title: "Your Assistant",
229
- initial: "Hi! 👋 How can I assist you today?",
181
+ title: "Weather Agent",
182
+ initial: "Hi! 👋 Ask me about the weather, forecasts, and climate.",
230
183
  }}
231
184
  />
232
185
  </CopilotKit>
@@ -238,145 +191,16 @@ export function CopilotKitComponent({ runtimeUrl }: { runtimeUrl: string}) {
238
191
 
239
192
  <StepItem>
240
193
 
241
- There are two approaches for the API route determined by how you're integrating Mastra in your Next.js application.
242
-
243
- 1. For a full-stack Next.js app with an instance of Mastra integrated into the app.
244
- 2. For a Next.js app with a separate Mastra server and the Mastra Client SDK.
245
-
246
- <Tabs>
247
- <TabItem value="mastra-instance" label="With a Mastra instance">
248
-
249
- Create an API route that connects to local Mastra agents.
250
-
251
- ```typescript title="app/api/copilotkit/route.ts" copy {1-7,11-26}
252
- import { mastra } from "../../mastra";
253
- import {
254
- CopilotRuntime,
255
- ExperimentalEmptyAdapter,
256
- copilotRuntimeNextJSAppRouterEndpoint,
257
- } from "@copilotkit/runtime";
258
- import { MastraAgent } from "@ag-ui/mastra";
259
- import { NextRequest } from "next/server";
260
-
261
- export const POST = async (req: NextRequest) => {
262
- const mastraAgents = MastraAgent.getLocalAgents({
263
- mastra,
264
- agentId: "weatherAgent",
265
- });
266
-
267
- const runtime = new CopilotRuntime({
268
- agents: mastraAgents,
269
- });
270
-
271
- const { handleRequest } = copilotRuntimeNextJSAppRouterEndpoint({
272
- runtime,
273
- serviceAdapter: new ExperimentalEmptyAdapter(),
274
- endpoint: "/api/copilotkit",
275
- });
276
-
277
- return handleRequest(req);
278
- };
279
- ```
280
-
281
- </TabItem>
282
- <TabItem value="mastra-client" label="With the Mastra Client SDK">
283
-
284
- Install the Mastra Client SDK.
285
-
286
- <Tabs>
287
- <TabItem value="npm" label="npm">
288
-
289
- ```bash copy
290
- npm install @mastra/client-js@beta
291
- ```
292
-
293
- </TabItem>
294
- <TabItem value="yarn" label="yarn">
295
-
296
- ```bash copy
297
- yarn add @mastra/client-js@beta
298
- ```
299
-
300
- </TabItem>
301
- <TabItem value="pnpm" label="pnpm">
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:
302
195
 
303
196
  ```bash copy
304
- pnpm add @mastra/client-js@beta
197
+ npm run dev
305
198
  ```
306
199
 
307
- </TabItem>
308
- </Tabs>
309
-
310
- Create an API route that connects to remote Mastra agents:
311
-
312
- ```typescript title="app/api/copilotkit/route.ts" copy {1-7,12-26}
313
- import { MastraClient } from "@mastra/client-js";
314
- import {
315
- CopilotRuntime,
316
- ExperimentalEmptyAdapter,
317
- copilotRuntimeNextJSAppRouterEndpoint,
318
- } from "@copilotkit/runtime";
319
- import { MastraAgent } from "@ag-ui/mastra";
320
- import { NextRequest } from "next/server";
321
-
322
- export const POST = async (req: NextRequest) => {
323
- const baseUrl = process.env.MASTRA_BASE_URL || "http://localhost:4111";
324
- const mastraClient = new MastraClient({ baseUrl });
325
-
326
- const mastraAgents = await MastraAgent.getRemoteAgents({ mastraClient });
327
-
328
- const runtime = new CopilotRuntime({
329
- agents: mastraAgents,
330
- });
331
-
332
- const { handleRequest } = copilotRuntimeNextJSAppRouterEndpoint({
333
- runtime,
334
- serviceAdapter: new ExperimentalEmptyAdapter(),
335
- endpoint: "/api/copilotkit",
336
- });
337
-
338
- return handleRequest(req);
339
- };
340
- ```
341
-
342
- </TabItem>
343
- </Tabs>
200
+ You should now be able to chat with your agent in the browser.
344
201
 
345
202
  </StepItem>
346
203
 
347
- <StepItem>
348
-
349
- Use the component with the local API endpoint:
350
-
351
- ```tsx title="App.tsx" copy {5}
352
- import { CopilotKitComponent } from "./components/copilotkit-component";
353
-
354
- function App() {
355
- return <CopilotKitComponent runtimeUrl="/api/copilotkit" />;
356
- }
357
-
358
- export default App;
359
- ```
360
-
361
- </StepItem>
362
-
363
- </Steps>
364
- </TabItem>
365
- </Tabs>
366
-
367
- Start building the future!
368
-
369
- <br />
370
-
371
- <img
372
- className="rounded-lg"
373
- src="/img/copilotkit/cpkoutput.jpg"
374
- alt="CopilotKit output"
375
- style={{ maxWidth: "700px", width: "100%" }}
376
- />
377
-
378
- ## Next Steps
204
+ </Steps>
379
205
 
380
- - [CopilotKit Documentation](https://docs.copilotkit.ai) - Complete CopilotKit reference
381
- - [React Hooks with CopilotKit](https://docs.copilotkit.ai/reference/hooks/useCoAgent) - Advanced React integration patterns
382
- - [Next.js Integration with Mastra](/docs/v1/frameworks/web-frameworks/next-js) - Full-stack Next.js setup guide
206
+ Congratulations! You have successfully integrated Mastra with CopilotKit using a separate server approach. Your CopilotKit frontend now communicates with a standalone Mastra agent server.
@@ -1,14 +1,14 @@
1
1
  ---
2
- title: "Use OpenRouter with Mastra | Frameworks | Mastra Docs"
2
+ title: "Using OpenRouter | Frameworks"
3
3
  description: "Learn how to integrate OpenRouter with Mastra"
4
4
  ---
5
5
 
6
6
  import Steps from "@site/src/components/Steps";
7
7
  import StepItem from "@site/src/components/StepItem";
8
8
 
9
- # Use OpenRouter with Mastra
9
+ # Using OpenRouter
10
10
 
11
- Integrate OpenRouter with Mastra to leverage the numerous models available on OpenRouter.
11
+ Integrate [OpenRouter](https://openrouter.ai/) with Mastra to leverage the numerous models available on OpenRouter.
12
12
 
13
13
  <Steps>
14
14
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- title: "Integrate Mastra in your Express project | Frameworks | Mastra Docs"
2
+ title: "Integrate Mastra in your Express project | Frameworks"
3
3
  description: A step-by-step guide to integrating Mastra with an Express backend.
4
4
  ---
5
5
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- title: "Integrate Mastra in your Astro project | Frameworks | Mastra Docs"
2
+ title: "Integrate Mastra in your Astro project | Frameworks"
3
3
  description: A step-by-step guide to integrating Mastra with Astro.
4
4
  ---
5
5
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- title: "Integrate Mastra in your Next.js project | Frameworks | Mastra Docs"
2
+ title: "Integrate Mastra in your Next.js project | Frameworks"
3
3
  description: A step-by-step guide to integrating Mastra with Next.js.
4
4
  ---
5
5
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- title: "Integrate Mastra in your SvelteKit project | Frameworks | Mastra Docs"
2
+ title: "Integrate Mastra in your SvelteKit project | Frameworks"
3
3
  description: A step-by-step guide to integrating Mastra with SvelteKit.
4
4
  ---
5
5
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- title: "Integrate Mastra in your Vite/React project | Frameworks | Mastra Docs"
2
+ title: "Integrate Mastra in your Vite/React project | Frameworks"
3
3
  description: A step-by-step guide to integrating Mastra with Vite and React.
4
4
  ---
5
5
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- title: "Mastra Docs Server | Getting Started | Mastra Docs"
2
+ title: "Mastra Docs Server | Getting Started"
3
3
  description: "Learn how to use the Mastra MCP documentation server in your IDE to turn it into an agentic Mastra expert."
4
4
  ---
5
5
 
@@ -31,7 +31,7 @@ If there are no specific instructions for your tool below, you may be able to ad
31
31
  "mastra": {
32
32
  "type": "stdio",
33
33
  "command": "npx",
34
- "args": ["-y", "@mastra/mcp-docs-server"]
34
+ "args": ["-y", "@mastra/mcp-docs-server@beta"]
35
35
  }
36
36
  }
37
37
  }
@@ -42,7 +42,7 @@ If there are no specific instructions for your tool below, you may be able to ad
42
42
  Install using the terminal command:
43
43
 
44
44
  ```bash copy
45
- claude mcp add mastra -- npx -y @mastra/mcp-docs-server
45
+ claude mcp add mastra -- npx -y @mastra/mcp-docs-server@beta
46
46
  ```
47
47
 
48
48
  [More info on using MCP servers with Claude Code](https://docs.claude.com/en/docs/claude-code/mcp)
@@ -52,7 +52,7 @@ claude mcp add mastra -- npx -y @mastra/mcp-docs-server
52
52
  1. Register it from the terminal:
53
53
 
54
54
  ```bash copy
55
- codex mcp add mastra-docs -- npx -y @mastra/mcp-docs-server
55
+ codex mcp add mastra-docs -- npx -y @mastra/mcp-docs-server@beta
56
56
  ```
57
57
 
58
58
  2. Run `codex mcp list` to confirm the server shows as `enabled`.
@@ -86,7 +86,7 @@ If you followed the automatic installation, you'll see a popup when you open cur
86
86
  "mastra": {
87
87
  "type": "stdio",
88
88
  "command": "npx",
89
- "args": ["-y", "@mastra/mcp-docs-server"]
89
+ "args": ["-y", "@mastra/mcp-docs-server@beta"]
90
90
  }
91
91
  }
92
92
  }
@@ -135,7 +135,7 @@ After starting the MCP server, click the tools button in the Copilot pane to see
135
135
  "mcpServers": {
136
136
  "mastra": {
137
137
  "command": "npx",
138
- "args": ["-y", "@mastra/mcp-docs-server"]
138
+ "args": ["-y", "@mastra/mcp-docs-server@beta"]
139
139
  }
140
140
  }
141
141
  }
@@ -1,5 +1,5 @@
1
1
  ---
2
- title: "Project Structure | Getting Started | Mastra Docs"
2
+ title: "Project Structure | Getting Started"
3
3
  description: Guide on organizing folders and files in Mastra, including best practices and recommended structures.
4
4
  ---
5
5
 
@@ -0,0 +1,27 @@
1
+ ---
2
+ title: "Quickstart | Getting Started"
3
+ description: Choose how to get started with Mastra - standalone server or Next.js integration.
4
+ ---
5
+
6
+ import { CardGrid, CardGridItem } from "@site/src/components/cards/card-grid";
7
+
8
+ # Quickstart
9
+
10
+ Choose how you want to get started with Mastra:
11
+
12
+ <CardGrid columns={2}>
13
+ <CardGridItem
14
+ title="Standalone Server (Recommended)"
15
+ href="/guides/v1/quickstarts/standalone-server"
16
+ >
17
+ The fastest way to get started - spin up a standalone Mastra server and interact with your agents in Studio
18
+ </CardGridItem>
19
+ <CardGridItem
20
+ title="Next.js"
21
+ href="/guides/v1/quickstarts/nextjs"
22
+ >
23
+ Integrate Mastra into a Next.js app and use the AI SDK UI to build an in-app chat interface for your agents
24
+ </CardGridItem>
25
+ </CardGrid>
26
+
27
+ For more control over setup, or to add Mastra to an existing project, see the [manual installation guide](/guides/v1/guide/manual-install). You can also use [`mastra init`](/reference/v1/cli/mastra#mastra-init) for existing projects.
@@ -1,5 +1,5 @@
1
1
  ---
2
- title: "Studio | Getting Started | Mastra Docs"
2
+ title: "Studio | Getting Started"
3
3
  description: Guide on installing Mastra and setting up the necessary prerequisites for running it with various LLM providers.
4
4
  ---
5
5
 
@@ -73,7 +73,7 @@ Visualize your workflow as a graph and run it step by step with a custom input.
73
73
 
74
74
  <VideoPlayer src="https://res.cloudinary.com/mastra-assets/video/upload/v1751406027/local-dev-workflows-playground_100_rbc466.mp4" />
75
75
 
76
- When running a workflow, you can also view detailed traces showing tool calls, raw JSON outputs, and any errors that might have occured along the way.
76
+ When running a workflow, you can also view detailed traces showing tool calls, raw JSON outputs, and any errors that might have occurred along the way.
77
77
 
78
78
  ### Tools
79
79
 
@@ -99,7 +99,7 @@ The Scorers tab displays the results of your agent's scorers as they run. When m
99
99
 
100
100
  ## REST API
101
101
 
102
- The local development server exposes a complete set of REST API routes, allowing you to programmatically interact with your agents, workflows, and tools during development. This is particularly helpful if you plan to deploy the Mastra server, since the local development server uses the exact same API routes as the [production server](/docs/v1/server-db/production-server), allowing you to develop and test against it with full parity.
102
+ The local development server exposes a complete set of REST API routes, allowing you to programmatically interact with your agents, workflows, and tools during development. This is particularly helpful if you plan to deploy the Mastra server, since the local development server uses the exact same API routes as the [Mastra Server](/docs/v1/server-db/mastra-server), allowing you to develop and test against it with full parity.
103
103
 
104
104
  You can explore all available endpoints in the OpenAPI specification at http://localhost:4111/openapi.json, which details every endpoint and its request and response schemas.
105
105
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- title: "Templates | Getting Started | Mastra Docs"
2
+ title: "Templates | Getting Started"
3
3
  description: Pre-built project structures that demonstrate common Mastra use cases and patterns
4
4
  ---
5
5
 
@@ -16,7 +16,7 @@ You'll create a workflow that gathers information from a candidate's resume, the
16
16
 
17
17
  - Node.js `v22.13.0` or later installed
18
18
  - An API key from a supported [Model Provider](/models/v1)
19
- - An existing Mastra project (Follow the [installation guide](/docs/v1/getting-started/installation) to set up a new project)
19
+ - An existing Mastra project (Follow the [installation guide](/guides/v1/quickstarts/standalone-server) to set up a new project)
20
20
 
21
21
  ## Building the Workflow
22
22
 
@@ -19,7 +19,7 @@ You'll learn how to create the agent and register it with Mastra. Next, you'll i
19
19
 
20
20
  - Node.js `v22.13.0` or later installed
21
21
  - An API key from a supported [Model Provider](/models/v1)
22
- - An existing Mastra project (Follow the [installation guide](/docs/v1/getting-started/installation) to set up a new project)
22
+ - An existing Mastra project (Follow the [installation guide](/guides/v1/quickstarts/standalone-server) to set up a new project)
23
23
 
24
24
  ## Creating the Agent
25
25