@mastra/mcp-docs-server 0.0.1-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (246) hide show
  1. package/.docs/organized/changelogs/%40mastra%2Fastra.md +302 -0
  2. package/.docs/organized/changelogs/%40mastra%2Fchroma.md +302 -0
  3. package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +302 -0
  4. package/.docs/organized/changelogs/%40mastra%2Fcomposio.md +302 -0
  5. package/.docs/organized/changelogs/%40mastra%2Fcore.md +302 -0
  6. package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +302 -0
  7. package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +302 -0
  8. package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +302 -0
  9. package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +302 -0
  10. package/.docs/organized/changelogs/%40mastra%2Fevals.md +302 -0
  11. package/.docs/organized/changelogs/%40mastra%2Ffirecrawl.md +302 -0
  12. package/.docs/organized/changelogs/%40mastra%2Fgithub.md +302 -0
  13. package/.docs/organized/changelogs/%40mastra%2Floggers.md +302 -0
  14. package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +11 -0
  15. package/.docs/organized/changelogs/%40mastra%2Fmcp.md +302 -0
  16. package/.docs/organized/changelogs/%40mastra%2Fmemory.md +302 -0
  17. package/.docs/organized/changelogs/%40mastra%2Fpg.md +302 -0
  18. package/.docs/organized/changelogs/%40mastra%2Fpinecone.md +302 -0
  19. package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +302 -0
  20. package/.docs/organized/changelogs/%40mastra%2Fqdrant.md +302 -0
  21. package/.docs/organized/changelogs/%40mastra%2Frag.md +302 -0
  22. package/.docs/organized/changelogs/%40mastra%2Fragie.md +302 -0
  23. package/.docs/organized/changelogs/%40mastra%2Fspeech-azure.md +302 -0
  24. package/.docs/organized/changelogs/%40mastra%2Fspeech-deepgram.md +302 -0
  25. package/.docs/organized/changelogs/%40mastra%2Fspeech-elevenlabs.md +302 -0
  26. package/.docs/organized/changelogs/%40mastra%2Fspeech-google.md +302 -0
  27. package/.docs/organized/changelogs/%40mastra%2Fspeech-ibm.md +302 -0
  28. package/.docs/organized/changelogs/%40mastra%2Fspeech-murf.md +302 -0
  29. package/.docs/organized/changelogs/%40mastra%2Fspeech-openai.md +302 -0
  30. package/.docs/organized/changelogs/%40mastra%2Fspeech-playai.md +302 -0
  31. package/.docs/organized/changelogs/%40mastra%2Fspeech-replicate.md +302 -0
  32. package/.docs/organized/changelogs/%40mastra%2Fspeech-speechify.md +302 -0
  33. package/.docs/organized/changelogs/%40mastra%2Fstabilityai.md +302 -0
  34. package/.docs/organized/changelogs/%40mastra%2Fturbopuffer.md +59 -0
  35. package/.docs/organized/changelogs/%40mastra%2Fupstash.md +302 -0
  36. package/.docs/organized/changelogs/%40mastra%2Fvectorize.md +302 -0
  37. package/.docs/organized/changelogs/%40mastra%2Fvoice-deepgram.md +302 -0
  38. package/.docs/organized/changelogs/%40mastra%2Fvoice-elevenlabs.md +302 -0
  39. package/.docs/organized/changelogs/%40mastra%2Fvoice-google.md +302 -0
  40. package/.docs/organized/changelogs/%40mastra%2Fvoice-murf.md +302 -0
  41. package/.docs/organized/changelogs/%40mastra%2Fvoice-openai-realtime.md +24 -0
  42. package/.docs/organized/changelogs/%40mastra%2Fvoice-openai.md +302 -0
  43. package/.docs/organized/changelogs/%40mastra%2Fvoice-playai.md +302 -0
  44. package/.docs/organized/changelogs/%40mastra%2Fvoice-sarvam.md +12 -0
  45. package/.docs/organized/changelogs/%40mastra%2Fvoice-speechify.md +302 -0
  46. package/.docs/organized/changelogs/create-mastra.md +302 -0
  47. package/.docs/organized/changelogs/mastra.md +302 -0
  48. package/.docs/organized/code-examples/agent.md +385 -0
  49. package/.docs/organized/code-examples/ai-sdk-useChat.md +377 -0
  50. package/.docs/organized/code-examples/assistant-ui.md +37 -0
  51. package/.docs/organized/code-examples/bird-checker-with-express.md +235 -0
  52. package/.docs/organized/code-examples/bird-checker-with-nextjs-and-eval.md +360 -0
  53. package/.docs/organized/code-examples/bird-checker-with-nextjs.md +250 -0
  54. package/.docs/organized/code-examples/crypto-chatbot.md +96 -0
  55. package/.docs/organized/code-examples/fireworks-r1.md +159 -0
  56. package/.docs/organized/code-examples/integrations.md +184 -0
  57. package/.docs/organized/code-examples/mcp-configuration.md +341 -0
  58. package/.docs/organized/code-examples/memory-todo-agent.md +161 -0
  59. package/.docs/organized/code-examples/memory-with-context.md +167 -0
  60. package/.docs/organized/code-examples/memory-with-libsql.md +204 -0
  61. package/.docs/organized/code-examples/memory-with-pg.md +224 -0
  62. package/.docs/organized/code-examples/memory-with-upstash.md +268 -0
  63. package/.docs/organized/code-examples/quick-start.md +127 -0
  64. package/.docs/organized/code-examples/stock-price-tool.md +124 -0
  65. package/.docs/organized/code-examples/weather-agent.md +352 -0
  66. package/.docs/organized/code-examples/workflow-ai-recruiter.md +159 -0
  67. package/.docs/organized/code-examples/workflow-with-inline-steps.md +111 -0
  68. package/.docs/organized/code-examples/workflow-with-memory.md +393 -0
  69. package/.docs/organized/code-examples/workflow-with-separate-steps.md +131 -0
  70. package/.docs/raw/agents/00-overview.mdx +185 -0
  71. package/.docs/raw/agents/01-agent-memory.mdx +610 -0
  72. package/.docs/raw/agents/02-adding-tools.mdx +224 -0
  73. package/.docs/raw/agents/03-adding-voice.mdx +170 -0
  74. package/.docs/raw/deployment/deployment.mdx +156 -0
  75. package/.docs/raw/deployment/logging-and-tracing.mdx +242 -0
  76. package/.docs/raw/deployment/server.mdx +114 -0
  77. package/.docs/raw/evals/00-overview.mdx +106 -0
  78. package/.docs/raw/evals/01-supported-evals.mdx +31 -0
  79. package/.docs/raw/evals/02-custom-eval.mdx +187 -0
  80. package/.docs/raw/faq/index.mdx +63 -0
  81. package/.docs/raw/frameworks/01-next-js.mdx +238 -0
  82. package/.docs/raw/frameworks/02-ai-sdk.mdx +218 -0
  83. package/.docs/raw/getting-started/installation.mdx +436 -0
  84. package/.docs/raw/getting-started/project-structure.mdx +80 -0
  85. package/.docs/raw/guides/01-chef-michel.mdx +242 -0
  86. package/.docs/raw/guides/02-stock-agent.mdx +182 -0
  87. package/.docs/raw/guides/03-recruiter.mdx +187 -0
  88. package/.docs/raw/index.mdx +22 -0
  89. package/.docs/raw/local-dev/creating-projects.mdx +74 -0
  90. package/.docs/raw/local-dev/integrations.mdx +127 -0
  91. package/.docs/raw/local-dev/mastra-dev.mdx +65 -0
  92. package/.docs/raw/rag/chunking-and-embedding.mdx +128 -0
  93. package/.docs/raw/rag/overview.mdx +85 -0
  94. package/.docs/raw/rag/retrieval.mdx +362 -0
  95. package/.docs/raw/rag/vector-databases.mdx +271 -0
  96. package/.docs/raw/reference/agents/createTool.mdx +190 -0
  97. package/.docs/raw/reference/agents/generate.mdx +327 -0
  98. package/.docs/raw/reference/agents/getAgent.mdx +54 -0
  99. package/.docs/raw/reference/agents/stream.mdx +361 -0
  100. package/.docs/raw/reference/cli/build.mdx +48 -0
  101. package/.docs/raw/reference/cli/deploy.mdx +22 -0
  102. package/.docs/raw/reference/cli/dev.mdx +97 -0
  103. package/.docs/raw/reference/cli/init.mdx +43 -0
  104. package/.docs/raw/reference/client-js/agents.mdx +90 -0
  105. package/.docs/raw/reference/client-js/error-handling.mdx +38 -0
  106. package/.docs/raw/reference/client-js/index.mdx +127 -0
  107. package/.docs/raw/reference/client-js/logs.mdx +24 -0
  108. package/.docs/raw/reference/client-js/memory.mdx +94 -0
  109. package/.docs/raw/reference/client-js/telemetry.mdx +20 -0
  110. package/.docs/raw/reference/client-js/tools.mdx +44 -0
  111. package/.docs/raw/reference/client-js/vectors.mdx +79 -0
  112. package/.docs/raw/reference/client-js/workflows.mdx +137 -0
  113. package/.docs/raw/reference/core/mastra-class.mdx +232 -0
  114. package/.docs/raw/reference/deployer/cloudflare.mdx +176 -0
  115. package/.docs/raw/reference/deployer/deployer.mdx +159 -0
  116. package/.docs/raw/reference/deployer/netlify.mdx +88 -0
  117. package/.docs/raw/reference/deployer/vercel.mdx +97 -0
  118. package/.docs/raw/reference/evals/answer-relevancy.mdx +186 -0
  119. package/.docs/raw/reference/evals/bias.mdx +186 -0
  120. package/.docs/raw/reference/evals/completeness.mdx +174 -0
  121. package/.docs/raw/reference/evals/content-similarity.mdx +183 -0
  122. package/.docs/raw/reference/evals/context-position.mdx +190 -0
  123. package/.docs/raw/reference/evals/context-precision.mdx +189 -0
  124. package/.docs/raw/reference/evals/context-relevancy.mdx +188 -0
  125. package/.docs/raw/reference/evals/contextual-recall.mdx +191 -0
  126. package/.docs/raw/reference/evals/faithfulness.mdx +193 -0
  127. package/.docs/raw/reference/evals/hallucination.mdx +219 -0
  128. package/.docs/raw/reference/evals/keyword-coverage.mdx +176 -0
  129. package/.docs/raw/reference/evals/prompt-alignment.mdx +238 -0
  130. package/.docs/raw/reference/evals/summarization.mdx +205 -0
  131. package/.docs/raw/reference/evals/textual-difference.mdx +161 -0
  132. package/.docs/raw/reference/evals/tone-consistency.mdx +181 -0
  133. package/.docs/raw/reference/evals/toxicity.mdx +165 -0
  134. package/.docs/raw/reference/index.mdx +8 -0
  135. package/.docs/raw/reference/memory/Memory.mdx +186 -0
  136. package/.docs/raw/reference/memory/createThread.mdx +93 -0
  137. package/.docs/raw/reference/memory/getThreadById.mdx +43 -0
  138. package/.docs/raw/reference/memory/getThreadsByResourceId.mdx +45 -0
  139. package/.docs/raw/reference/memory/query.mdx +164 -0
  140. package/.docs/raw/reference/observability/create-logger.mdx +106 -0
  141. package/.docs/raw/reference/observability/logger.mdx +55 -0
  142. package/.docs/raw/reference/observability/otel-config.mdx +120 -0
  143. package/.docs/raw/reference/observability/providers/braintrust.mdx +40 -0
  144. package/.docs/raw/reference/observability/providers/index.mdx +15 -0
  145. package/.docs/raw/reference/observability/providers/laminar.mdx +41 -0
  146. package/.docs/raw/reference/observability/providers/langfuse.mdx +51 -0
  147. package/.docs/raw/reference/observability/providers/langsmith.mdx +46 -0
  148. package/.docs/raw/reference/observability/providers/langwatch.mdx +45 -0
  149. package/.docs/raw/reference/observability/providers/new-relic.mdx +40 -0
  150. package/.docs/raw/reference/observability/providers/signoz.mdx +40 -0
  151. package/.docs/raw/reference/observability/providers/traceloop.mdx +40 -0
  152. package/.docs/raw/reference/rag/astra.mdx +258 -0
  153. package/.docs/raw/reference/rag/chroma.mdx +281 -0
  154. package/.docs/raw/reference/rag/chunk.mdx +237 -0
  155. package/.docs/raw/reference/rag/document.mdx +129 -0
  156. package/.docs/raw/reference/rag/embeddings.mdx +160 -0
  157. package/.docs/raw/reference/rag/extract-params.mdx +72 -0
  158. package/.docs/raw/reference/rag/graph-rag.mdx +182 -0
  159. package/.docs/raw/reference/rag/libsql.mdx +357 -0
  160. package/.docs/raw/reference/rag/metadata-filters.mdx +298 -0
  161. package/.docs/raw/reference/rag/pg.mdx +477 -0
  162. package/.docs/raw/reference/rag/pinecone.mdx +249 -0
  163. package/.docs/raw/reference/rag/qdrant.mdx +236 -0
  164. package/.docs/raw/reference/rag/rerank.mdx +212 -0
  165. package/.docs/raw/reference/rag/turbopuffer.mdx +249 -0
  166. package/.docs/raw/reference/rag/upstash.mdx +198 -0
  167. package/.docs/raw/reference/rag/vectorize.mdx +253 -0
  168. package/.docs/raw/reference/storage/libsql.mdx +74 -0
  169. package/.docs/raw/reference/storage/postgresql.mdx +48 -0
  170. package/.docs/raw/reference/storage/upstash.mdx +86 -0
  171. package/.docs/raw/reference/tools/client.mdx +180 -0
  172. package/.docs/raw/reference/tools/document-chunker-tool.mdx +141 -0
  173. package/.docs/raw/reference/tools/graph-rag-tool.mdx +154 -0
  174. package/.docs/raw/reference/tools/mcp-configuration.mdx +206 -0
  175. package/.docs/raw/reference/tools/vector-query-tool.mdx +212 -0
  176. package/.docs/raw/reference/voice/composite-voice.mdx +140 -0
  177. package/.docs/raw/reference/voice/deepgram.mdx +164 -0
  178. package/.docs/raw/reference/voice/elevenlabs.mdx +216 -0
  179. package/.docs/raw/reference/voice/google.mdx +198 -0
  180. package/.docs/raw/reference/voice/mastra-voice.mdx +394 -0
  181. package/.docs/raw/reference/voice/murf.mdx +251 -0
  182. package/.docs/raw/reference/voice/openai-realtime.mdx +431 -0
  183. package/.docs/raw/reference/voice/openai.mdx +168 -0
  184. package/.docs/raw/reference/voice/playai.mdx +159 -0
  185. package/.docs/raw/reference/voice/speechify.mdx +145 -0
  186. package/.docs/raw/reference/workflows/after.mdx +88 -0
  187. package/.docs/raw/reference/workflows/commit.mdx +37 -0
  188. package/.docs/raw/reference/workflows/createRun.mdx +77 -0
  189. package/.docs/raw/reference/workflows/else.mdx +72 -0
  190. package/.docs/raw/reference/workflows/execute.mdx +110 -0
  191. package/.docs/raw/reference/workflows/if.mdx +107 -0
  192. package/.docs/raw/reference/workflows/resume.mdx +155 -0
  193. package/.docs/raw/reference/workflows/start.mdx +84 -0
  194. package/.docs/raw/reference/workflows/step-class.mdx +100 -0
  195. package/.docs/raw/reference/workflows/step-condition.mdx +134 -0
  196. package/.docs/raw/reference/workflows/step-function.mdx +92 -0
  197. package/.docs/raw/reference/workflows/step-options.mdx +69 -0
  198. package/.docs/raw/reference/workflows/suspend.mdx +80 -0
  199. package/.docs/raw/reference/workflows/then.mdx +74 -0
  200. package/.docs/raw/reference/workflows/until.mdx +165 -0
  201. package/.docs/raw/reference/workflows/watch.mdx +118 -0
  202. package/.docs/raw/reference/workflows/while.mdx +168 -0
  203. package/.docs/raw/reference/workflows/workflow.mdx +233 -0
  204. package/.docs/raw/workflows/00-overview.mdx +168 -0
  205. package/.docs/raw/workflows/control-flow.mdx +712 -0
  206. package/.docs/raw/workflows/dynamic-workflows.mdx +232 -0
  207. package/.docs/raw/workflows/steps.mdx +98 -0
  208. package/.docs/raw/workflows/suspend-and-resume.mdx +196 -0
  209. package/.docs/raw/workflows/variables.mdx +248 -0
  210. package/LICENSE +44 -0
  211. package/README.md +129 -0
  212. package/dist/index.d.ts +3 -0
  213. package/dist/index.js +19 -0
  214. package/dist/prepare-docs/code-examples.d.ts +4 -0
  215. package/dist/prepare-docs/code-examples.js +91 -0
  216. package/dist/prepare-docs/copy-raw.d.ts +1 -0
  217. package/dist/prepare-docs/copy-raw.js +41 -0
  218. package/dist/prepare-docs/index.d.ts +1 -0
  219. package/dist/prepare-docs/index.js +8 -0
  220. package/dist/prepare-docs/package-changes.d.ts +4 -0
  221. package/dist/prepare-docs/package-changes.js +92 -0
  222. package/dist/prepare-docs/prepare.d.ts +1 -0
  223. package/dist/prepare-docs/prepare.js +13 -0
  224. package/dist/sse.d.ts +1 -0
  225. package/dist/sse.js +9 -0
  226. package/dist/stdio.d.ts +1 -0
  227. package/dist/stdio.js +8 -0
  228. package/dist/tools/__tests__/blog.test.d.ts +1 -0
  229. package/dist/tools/__tests__/blog.test.js +48 -0
  230. package/dist/tools/__tests__/changes.test.d.ts +1 -0
  231. package/dist/tools/__tests__/changes.test.js +36 -0
  232. package/dist/tools/__tests__/docs.test.d.ts +1 -0
  233. package/dist/tools/__tests__/docs.test.js +46 -0
  234. package/dist/tools/__tests__/examples.test.d.ts +1 -0
  235. package/dist/tools/__tests__/examples.test.js +52 -0
  236. package/dist/tools/blog.d.ts +15 -0
  237. package/dist/tools/blog.js +73 -0
  238. package/dist/tools/changes.d.ts +11 -0
  239. package/dist/tools/changes.js +69 -0
  240. package/dist/tools/docs.d.ts +11 -0
  241. package/dist/tools/docs.js +176 -0
  242. package/dist/tools/examples.d.ts +11 -0
  243. package/dist/tools/examples.js +61 -0
  244. package/dist/utils.d.ts +6 -0
  245. package/dist/utils.js +9 -0
  246. package/package.json +66 -0
@@ -0,0 +1,302 @@
1
+ # mastra
2
+
3
+ ## 0.4.0-alpha.2
4
+
5
+ ### Patch Changes
6
+
7
+ - da8d9bb: Enable public dir copying if it exists
8
+ - 5baf1ec: animate new traces
9
+ - 65f2a4c: Add Mastra Docs MCP to the pnpm create mastra TUI with the option to install in Cursor or Windsurf
10
+ - 9116d70: Handle the different workflow methods in workflow graph
11
+ - 0709d99: add prop for dynamic empty text
12
+ - Updated dependencies [cc7f392]
13
+ - Updated dependencies [fc2f89c]
14
+ - Updated dependencies [dfbb131]
15
+ - Updated dependencies [0850b4c]
16
+ - Updated dependencies [da8d9bb]
17
+ - Updated dependencies [9116d70]
18
+ - @mastra/deployer@0.2.1-alpha.2
19
+ - @mastra/core@0.6.1-alpha.2
20
+
21
+ ## 0.4.0-alpha.1
22
+
23
+ ### Minor Changes
24
+
25
+ - f9b6ab5: add Cerebras as a llm provider to create-mastra@latest
26
+
27
+ ### Patch Changes
28
+
29
+ - 5052613: Added a new `mastra create --project-name <string>` flag so coder agents can create new Mastra projects with a one line command.
30
+ - 1291e89: Add resizable-panel to playground-ui and use in agent and workflow sidebars
31
+ - 9ba1e97: update playground ui for mastra and create-mastra
32
+ - Updated dependencies [f4854ee]
33
+ - Updated dependencies [afaf73f]
34
+ - Updated dependencies [44631b1]
35
+ - Updated dependencies [6e559a0]
36
+ - Updated dependencies [5f43505]
37
+ - Updated dependencies [61ad5a4]
38
+ - @mastra/core@0.6.1-alpha.1
39
+ - @mastra/deployer@0.2.1-alpha.1
40
+
41
+ ## 0.3.2-alpha.0
42
+
43
+ ### Patch Changes
44
+
45
+ - 1405e46: update the Groq model the create-mastra@latest sets
46
+ - Updated dependencies [7bcfaee]
47
+ - @mastra/core@0.6.1-alpha.0
48
+ - @mastra/deployer@0.2.1-alpha.0
49
+
50
+ ## 0.3.1
51
+
52
+ ### Patch Changes
53
+
54
+ - c49f798: remove hardcoded localhost url in playground
55
+ - 63cebd4: Fixed a bug with the new tool discovery feature where a missing tools/index.ts would crash the process
56
+ - d3d6fae: Deprecate mastra dev --env flag
57
+ - Updated dependencies [16b98d9]
58
+ - Updated dependencies [1c8cda4]
59
+ - Updated dependencies [95b4144]
60
+ - Updated dependencies [3729dbd]
61
+ - Updated dependencies [c2144f4]
62
+ - @mastra/core@0.6.0
63
+ - @mastra/deployer@0.2.0
64
+
65
+ ## 0.3.1-alpha.1
66
+
67
+ ### Patch Changes
68
+
69
+ - c49f798: remove hardcoded localhost url in playground
70
+ - 63cebd4: Fixed a bug with the new tool discovery feature where a missing tools/index.ts would crash the process
71
+ - Updated dependencies [16b98d9]
72
+ - Updated dependencies [1c8cda4]
73
+ - Updated dependencies [95b4144]
74
+ - Updated dependencies [c2144f4]
75
+ - @mastra/core@0.6.0-alpha.1
76
+ - @mastra/deployer@0.2.0-alpha.1
77
+
78
+ ## 0.3.1-alpha.0
79
+
80
+ ### Patch Changes
81
+
82
+ - d3d6fae: Deprecate mastra dev --env flag
83
+ - Updated dependencies [3729dbd]
84
+ - @mastra/core@0.5.1-alpha.0
85
+ - @mastra/deployer@0.1.9-alpha.0
86
+
87
+ ## 0.3.0
88
+
89
+ ### Minor Changes
90
+
91
+ - dd7a09a: Added new MCPConfiguration class for managing multiple MCP server tools/toolsets. Fixed a bug where MCPClient env would overwrite PATH env var. Fixed a bug where MCP servers would be killed non-gracefully leading to printing huge errors on every code save when running mastra dev
92
+
93
+ ### Patch Changes
94
+
95
+ - 5fae49e: Configurable timeout on npm create mastra
96
+ - 91d2e30: Fix init in non npm project
97
+ - 960690d: Improve client-js workflow watch dx
98
+ - af7466e: fixes in playground ui
99
+ - dbd9f2d: Handle different condition types on workflow graph
100
+ - 07a7470: Move WorkflowTrigger to playground-ui package and use in dev playground
101
+ - 52e0418: Split up action types between tools and workflows
102
+ - a80bdaf: persist data in run tab in dev
103
+ - e5149bb: Fix playground-ui agent-evals tab-content
104
+ - 8deb34c: Better workflow watch api + watch workflow by runId
105
+ - 36d970e: Make tools discovery work in mastra dev
106
+ - 144b3d5: Update traces table UI, agent Chat UI
107
+ Fix get workflows breaking
108
+ - 62565c1: --no-timeout npm create mastra flag
109
+ - 9035565: Update tools dev playground inputs for different fieldtypes
110
+ - fd4a1d7: Update cjs bundling to make sure files are split
111
+ - Updated dependencies [a910463]
112
+ - Updated dependencies [59df7b6]
113
+ - Updated dependencies [22643eb]
114
+ - Updated dependencies [6feb23f]
115
+ - Updated dependencies [f2d6727]
116
+ - Updated dependencies [7a7a547]
117
+ - Updated dependencies [29f3a82]
118
+ - Updated dependencies [3d0e290]
119
+ - Updated dependencies [e9fbac5]
120
+ - Updated dependencies [301e4ee]
121
+ - Updated dependencies [ee667a2]
122
+ - Updated dependencies [dfbe4e9]
123
+ - Updated dependencies [dab255b]
124
+ - Updated dependencies [1e8bcbc]
125
+ - Updated dependencies [f6678e4]
126
+ - Updated dependencies [9e81f35]
127
+ - Updated dependencies [c93798b]
128
+ - Updated dependencies [a85ab24]
129
+ - Updated dependencies [dbd9f2d]
130
+ - Updated dependencies [59df7b6]
131
+ - Updated dependencies [caefaa2]
132
+ - Updated dependencies [c151ae6]
133
+ - Updated dependencies [52e0418]
134
+ - Updated dependencies [d79aedf]
135
+ - Updated dependencies [8deb34c]
136
+ - Updated dependencies [c2dde91]
137
+ - Updated dependencies [5d41958]
138
+ - Updated dependencies [144b3d5]
139
+ - Updated dependencies [03236ec]
140
+ - Updated dependencies [3764e71]
141
+ - Updated dependencies [df982db]
142
+ - Updated dependencies [a171b37]
143
+ - Updated dependencies [506f1d5]
144
+ - Updated dependencies [02ffb7b]
145
+ - Updated dependencies [731dd8a]
146
+ - Updated dependencies [0461849]
147
+ - Updated dependencies [2259379]
148
+ - Updated dependencies [aeb5e36]
149
+ - Updated dependencies [f2301de]
150
+ - Updated dependencies [358f069]
151
+ - Updated dependencies [fd4a1d7]
152
+ - Updated dependencies [960690d]
153
+ - Updated dependencies [c139344]
154
+ - @mastra/core@0.5.0
155
+ - @mastra/deployer@0.1.8
156
+
157
+ ## 0.3.0-alpha.12
158
+
159
+ ### Patch Changes
160
+
161
+ - 07a7470: Move WorkflowTrigger to playground-ui package and use in dev playground
162
+ - Updated dependencies [a85ab24]
163
+ - @mastra/core@0.5.0-alpha.12
164
+ - @mastra/deployer@0.1.8-alpha.12
165
+
166
+ ## 0.3.0-alpha.11
167
+
168
+ ### Patch Changes
169
+
170
+ - dbd9f2d: Handle different condition types on workflow graph
171
+ - 8deb34c: Better workflow watch api + watch workflow by runId
172
+ - 36d970e: Make tools discovery work in mastra dev
173
+ - fd4a1d7: Update cjs bundling to make sure files are split
174
+ - Updated dependencies [7a7a547]
175
+ - Updated dependencies [c93798b]
176
+ - Updated dependencies [dbd9f2d]
177
+ - Updated dependencies [8deb34c]
178
+ - Updated dependencies [5d41958]
179
+ - Updated dependencies [a171b37]
180
+ - Updated dependencies [fd4a1d7]
181
+ - @mastra/deployer@0.1.8-alpha.11
182
+ - @mastra/core@0.5.0-alpha.11
183
+
184
+ ## 0.3.0-alpha.10
185
+
186
+ ### Minor Changes
187
+
188
+ - dd7a09a: Added new MCPConfiguration class for managing multiple MCP server tools/toolsets. Fixed a bug where MCPClient env would overwrite PATH env var. Fixed a bug where MCP servers would be killed non-gracefully leading to printing huge errors on every code save when running mastra dev
189
+
190
+ ### Patch Changes
191
+
192
+ - Updated dependencies [a910463]
193
+ - @mastra/core@0.5.0-alpha.10
194
+ - @mastra/deployer@0.1.8-alpha.10
195
+
196
+ ## 0.2.9-alpha.9
197
+
198
+ ### Patch Changes
199
+
200
+ - Updated dependencies [e9fbac5]
201
+ - Updated dependencies [1e8bcbc]
202
+ - Updated dependencies [aeb5e36]
203
+ - Updated dependencies [f2301de]
204
+ - @mastra/deployer@0.1.8-alpha.9
205
+ - @mastra/core@0.5.0-alpha.9
206
+
207
+ ## 0.2.9-alpha.8
208
+
209
+ ### Patch Changes
210
+
211
+ - Updated dependencies [506f1d5]
212
+ - @mastra/core@0.5.0-alpha.8
213
+ - @mastra/deployer@0.1.8-alpha.8
214
+
215
+ ## 0.2.9-alpha.7
216
+
217
+ ### Patch Changes
218
+
219
+ - Updated dependencies [ee667a2]
220
+ - @mastra/core@0.5.0-alpha.7
221
+ - @mastra/deployer@0.1.8-alpha.7
222
+
223
+ ## 0.2.9-alpha.6
224
+
225
+ ### Patch Changes
226
+
227
+ - Updated dependencies [f6678e4]
228
+ - @mastra/core@0.5.0-alpha.6
229
+ - @mastra/deployer@0.1.8-alpha.6
230
+
231
+ ## 0.2.9-alpha.5
232
+
233
+ ### Patch Changes
234
+
235
+ - 91d2e30: Fix init in non npm project
236
+ - af7466e: fixes in playground ui
237
+ - 52e0418: Split up action types between tools and workflows
238
+ - a80bdaf: persist data in run tab in dev
239
+ - 9035565: Update tools dev playground inputs for different fieldtypes
240
+ - Updated dependencies [22643eb]
241
+ - Updated dependencies [6feb23f]
242
+ - Updated dependencies [f2d6727]
243
+ - Updated dependencies [301e4ee]
244
+ - Updated dependencies [dfbe4e9]
245
+ - Updated dependencies [9e81f35]
246
+ - Updated dependencies [caefaa2]
247
+ - Updated dependencies [c151ae6]
248
+ - Updated dependencies [52e0418]
249
+ - Updated dependencies [03236ec]
250
+ - Updated dependencies [3764e71]
251
+ - Updated dependencies [df982db]
252
+ - Updated dependencies [0461849]
253
+ - Updated dependencies [2259379]
254
+ - Updated dependencies [358f069]
255
+ - @mastra/core@0.5.0-alpha.5
256
+ - @mastra/deployer@0.1.8-alpha.5
257
+
258
+ ## 0.2.9-alpha.4
259
+
260
+ ### Patch Changes
261
+
262
+ - 144b3d5: Update traces table UI, agent Chat UI
263
+ Fix get workflows breaking
264
+ - Updated dependencies [d79aedf]
265
+ - Updated dependencies [144b3d5]
266
+ - @mastra/core@0.5.0-alpha.4
267
+ - @mastra/deployer@0.1.8-alpha.4
268
+
269
+ ## 0.2.9-alpha.3
270
+
271
+ ### Patch Changes
272
+
273
+ - Updated dependencies [3d0e290]
274
+ - @mastra/core@0.5.0-alpha.3
275
+ - @mastra/deployer@0.1.8-alpha.3
276
+
277
+ ## 0.2.9-alpha.2
278
+
279
+ ### Patch Changes
280
+
281
+ - Updated dependencies [02ffb7b]
282
+ - @mastra/core@0.5.0-alpha.2
283
+ - @mastra/deployer@0.1.8-alpha.2
284
+
285
+ ## 0.2.9-alpha.1
286
+
287
+ ### Patch Changes
288
+
289
+ - e5149bb: Fix playground-ui agent-evals tab-content
290
+ - Updated dependencies [dab255b]
291
+ - @mastra/core@0.5.0-alpha.1
292
+ - @mastra/deployer@0.1.8-alpha.1
293
+
294
+ ## 0.2.9-alpha.0
295
+
296
+ ### Patch Changes
297
+
298
+ - 5fae49e: Configurable timeout on npm create mastra
299
+ - 960690d: Improve client-js workflow watch dx
300
+ - 62565c1: --no-timeout npm create mastra flag
301
+
302
+ ... 1959 more lines hidden. See full changelog in package directory.
@@ -0,0 +1,385 @@
1
+ ### package.json
2
+ ```json
3
+ {
4
+ "name": "examples-agent",
5
+ "type": "module",
6
+ "private": true,
7
+ "description": "",
8
+ "main": "index.js",
9
+ "version": "0.0.1",
10
+ "scripts": {
11
+ "start-deployed": "npx bun src/with-deployed.ts",
12
+ "start": "npx bun src/index.ts"
13
+ },
14
+ "keywords": [],
15
+ "author": "",
16
+ "license": "ISC",
17
+ "dependencies": {
18
+ "@ai-sdk/openai": "latest",
19
+ "@mastra/core": "workspace:*",
20
+ "zod": "^3.24.2"
21
+ }
22
+ }
23
+
24
+ ```
25
+
26
+ ### index.ts
27
+ ```typescript
28
+ import { z } from 'zod';
29
+ import { mastra } from './mastra';
30
+
31
+ const agent = mastra.getAgent('chefAgent');
32
+ const responsesAgent = mastra.getAgent('chefAgentResponses');
33
+
34
+ async function text() {
35
+ // Query 1: Basic pantry ingredients
36
+ const query1 =
37
+ 'In my kitchen I have: pasta, canned tomatoes, garlic, olive oil, and some dried herbs (basil and oregano). What can I make?';
38
+ console.log(`Query 1: ${query1}`);
39
+
40
+ const pastaResponse = await agent.generate(query1);
41
+ console.log('\nšŸ‘Øā€šŸ³ Chef Michel:', pastaResponse.text);
42
+ console.log('\n-------------------\n');
43
+ }
44
+
45
+ async function generateText() {
46
+ // Query 1: Basic pantry ingredients
47
+
48
+ const query1 =
49
+ 'In my kitchen I have: pasta, canned tomatoes, garlic, olive oil, and some dried herbs (basil and oregano). What can I make?';
50
+ console.log(`Query 1: ${query1}`);
51
+
52
+ const pastaResponse = await agent.generate(query1);
53
+
54
+ console.log('\nšŸ‘Øā€šŸ³ Chef Michel:', pastaResponse.text);
55
+ console.log('\n-------------------\n');
56
+ }
57
+
58
+ async function textStream() {
59
+ // Query 2: More ingredients
60
+ const query2 =
61
+ "Now I'm over at my friend's house, and they have: chicken thighs, coconut milk, sweet potatoes, and some curry powder.";
62
+ console.log(`Query 2: ${query2}`);
63
+
64
+ const curryResponse = await agent.stream(query2);
65
+
66
+ console.log('\nšŸ‘Øā€šŸ³ Chef Michel: ');
67
+
68
+ // Handle the stream
69
+ for await (const chunk of curryResponse.textStream) {
70
+ // Write each chunk without a newline to create a continuous stream
71
+ process.stdout.write(chunk);
72
+ }
73
+
74
+ console.log('\n\nāœ… Recipe complete!');
75
+ }
76
+
77
+ async function generateStream() {
78
+ // Query 2: More ingredients
79
+ const query2 =
80
+ "Now I'm over at my friend's house, and they have: chicken thighs, coconut milk, sweet potatoes, and some curry powder.";
81
+ console.log(`Query 2: ${query2}`);
82
+
83
+ const curryResponse = await agent.stream([query2]);
84
+
85
+ console.log('\nšŸ‘Øā€šŸ³ Chef Michel: ');
86
+
87
+ // Handle the stream
88
+ for await (const chunk of curryResponse.textStream) {
89
+ // Write each chunk without a newline to create a continuous stream
90
+ process.stdout.write(chunk);
91
+ }
92
+
93
+ console.log('\n\nāœ… Recipe complete!');
94
+ }
95
+
96
+ async function textObject() {
97
+ // Query 3: Generate a lasagna recipe
98
+ const query3 = 'I want to make lasagna, can you generate a lasagna recipe for me?';
99
+ console.log(`Query 3: ${query3}`);
100
+
101
+ const lasagnaResponse = await agent.generate(query3, {
102
+ output: z.object({
103
+ ingredients: z.array(
104
+ z.object({
105
+ name: z.string(),
106
+ amount: z.number(),
107
+ }),
108
+ ),
109
+ steps: z.array(z.string()),
110
+ }),
111
+ });
112
+ console.log('\nšŸ‘Øā€šŸ³ Chef Michel:', lasagnaResponse.object);
113
+ console.log('\n-------------------\n');
114
+ }
115
+
116
+ async function experimentalTextObject() {
117
+ // Query 3: Generate a lasagna recipe
118
+ const query3 = 'I want to make lasagna, can you generate a lasagna recipe for me?';
119
+ console.log(`Query 3: ${query3}`);
120
+
121
+ const lasagnaResponse = await agent.generate(query3, {
122
+ experimental_output: z.object({
123
+ ingredients: z.array(
124
+ z.object({
125
+ name: z.string(),
126
+ amount: z.number(),
127
+ }),
128
+ ),
129
+ steps: z.array(z.string()),
130
+ }),
131
+ });
132
+ console.log('\nšŸ‘Øā€šŸ³ Chef Michel:', lasagnaResponse.object);
133
+ console.log('\n-------------------\n');
134
+ }
135
+
136
+ async function textObjectJsonSchema() {
137
+ // Query 3: Generate a lasagna recipe
138
+ const query3 = 'I want to make lasagna, can you generate a lasagna recipe for me?';
139
+ console.log(`Query 3: ${query3}`);
140
+
141
+ const lasagnaResponse = await agent.generate(query3, {
142
+ output: {
143
+ type: 'object',
144
+ additionalProperties: false,
145
+ required: ['ingredients', 'steps'],
146
+ properties: {
147
+ ingredients: {
148
+ type: 'array',
149
+ items: {
150
+ type: 'object',
151
+ additionalProperties: false,
152
+ properties: {
153
+ name: { type: 'string' },
154
+ amount: { type: 'number' },
155
+ },
156
+ required: ['name', 'amount'],
157
+ },
158
+ },
159
+ steps: {
160
+ type: 'array',
161
+ items: { type: 'string' },
162
+ },
163
+ },
164
+ },
165
+ });
166
+
167
+ console.log('\nšŸ‘Øā€šŸ³ Chef Michel:', lasagnaResponse.object);
168
+ console.log('\n-------------------\n');
169
+ }
170
+
171
+ async function generateObject() {
172
+ // Query 3: Generate a lasagna recipe
173
+ const query3 = 'I want to make lasagna, can you generate a lasagna recipe for me?';
174
+ console.log(`Query 3: ${query3}`);
175
+
176
+ const lasagnaResponse = await agent.generate([query3], {
177
+ output: z.object({
178
+ ingredients: z.array(
179
+ z.object({
180
+ name: z.string(),
181
+ amount: z.number(),
182
+ }),
183
+ ),
184
+ steps: z.array(z.string()),
185
+ }),
186
+ });
187
+ console.log('\nšŸ‘Øā€šŸ³ Chef Michel:', lasagnaResponse.object);
188
+ console.log('\n-------------------\n');
189
+ }
190
+
191
+ async function streamObject() {
192
+ // Query 8: Generate a lasagna recipe
193
+ const query8 = 'I want to make lasagna, can you generate a lasagna recipe for me?';
194
+ console.log(`Query 8: ${query8}`);
195
+
196
+ const lasagnaStreamResponse = await agent.stream(query8, {
197
+ output: z.object({
198
+ ingredients: z.array(
199
+ z.object({
200
+ name: z.string(),
201
+ amount: z.number(),
202
+ }),
203
+ ),
204
+ steps: z.array(z.string()),
205
+ }),
206
+ });
207
+
208
+ console.log('\nšŸ‘Øā€šŸ³ Chef Michel: ');
209
+
210
+ // Handle the stream
211
+ for await (const chunk of lasagnaStreamResponse.textStream) {
212
+ // Write each chunk without a newline to create a continuous stream
213
+ process.stdout.write(chunk);
214
+ }
215
+
216
+ console.log('\n\nāœ… Recipe complete!');
217
+ }
218
+
219
+ async function generateStreamObject() {
220
+ // Query 9: Generate a lasagna recipe
221
+ const query9 = 'I want to make lasagna, can you generate a lasagna recipe for me?';
222
+ console.log(`Query 9: ${query9}`);
223
+
224
+ const lasagnaStreamResponse = await agent.stream([query9], {
225
+ output: z.object({
226
+ ingredients: z.array(
227
+ z.object({
228
+ name: z.string(),
229
+ amount: z.number(),
230
+ }),
231
+ ),
232
+ steps: z.array(z.string()),
233
+ }),
234
+ });
235
+
236
+ console.log('\nšŸ‘Øā€šŸ³ Chef Michel: ');
237
+
238
+ // Handle the stream
239
+ for await (const chunk of lasagnaStreamResponse.textStream) {
240
+ // Write each chunk without a newline to create a continuous stream
241
+ process.stdout.write(chunk);
242
+ }
243
+
244
+ console.log('\n\nāœ… Recipe complete!');
245
+ }
246
+
247
+ async function generateExperimentalStreamObject() {
248
+ // Query 9: Generate a lasagna recipe
249
+ const query9 = 'I want to make lasagna, can you generate a lasagna recipe for me?';
250
+ console.log(`Query 9: ${query9}`);
251
+
252
+ const lasagnaStreamResponse = await agent.stream([query9], {
253
+ experimental_output: z.object({
254
+ ingredients: z.array(
255
+ z.object({
256
+ name: z.string(),
257
+ amount: z.number(),
258
+ }),
259
+ ),
260
+ steps: z.array(z.string()),
261
+ }),
262
+ });
263
+
264
+ console.log('\nšŸ‘Øā€šŸ³ Chef Michel: ');
265
+
266
+ // Handle the stream
267
+ for await (const chunk of lasagnaStreamResponse.textStream) {
268
+ // Write each chunk without a newline to create a continuous stream
269
+ process.stdout.write(chunk);
270
+ }
271
+
272
+ console.log('\n\nāœ… Recipe complete!');
273
+ }
274
+
275
+ async function main() {
276
+ // await text();
277
+
278
+ // await experimentalTextObject();
279
+
280
+ // await generateExperimentalStreamObject();
281
+
282
+ // await generateText();
283
+
284
+ // await textStream();
285
+
286
+ // await generateStream();
287
+
288
+ // await textObject();
289
+
290
+ // await textObjectJsonSchema();
291
+
292
+ // await generateObject();
293
+
294
+ // await streamObject();
295
+
296
+ // await generateStreamObject();
297
+
298
+ const query1 = 'What happened in San Francisco last week?';
299
+
300
+ const pastaResponse = await responsesAgent.generate(query1, {
301
+ instructions: 'You take every recipe you get an exaggerate it and use weird ingredients.',
302
+ });
303
+
304
+ console.log(pastaResponse.text);
305
+ }
306
+
307
+ main();
308
+
309
+ ```
310
+
311
+ ### mastra/agents/index.ts
312
+ ```typescript
313
+ import { openai } from '@ai-sdk/openai';
314
+ import { Agent } from '@mastra/core/agent';
315
+
316
+ import { cookingTool } from '../tools/index.js';
317
+ import { makeCoreTool } from '@mastra/core';
318
+
319
+ export const chefAgent = new Agent({
320
+ name: 'Chef Agent',
321
+ instructions: `
322
+ YOU MUST USE THE TOOL cooking-tool
323
+ You are Michel, a practical and experienced home chef who helps people cook great meals with whatever
324
+ ingredients they have available. Your first priority is understanding what ingredients and equipment the user has access to, then suggesting achievable recipes.
325
+ You explain cooking steps clearly and offer substitutions when needed, maintaining a friendly and encouraging tone throughout.
326
+ `,
327
+ model: openai('gpt-4o-mini'),
328
+ tools: {
329
+ cookingTool,
330
+ },
331
+ });
332
+
333
+ export const chefAgentResponses = new Agent({
334
+ name: 'Chef Agent',
335
+ instructions: `
336
+ You are Michel, a practical and experienced home chef who helps people cook great meals with whatever
337
+ ingredients they have available. Your first priority is understanding what ingredients and equipment the user has access to, then suggesting achievable recipes.
338
+ You explain cooking steps clearly and offer substitutions when needed, maintaining a friendly and encouraging tone throughout.
339
+ `,
340
+ model: openai.responses('gpt-4o'),
341
+ tools: {
342
+ web_search_preview: openai.tools.webSearchPreview(),
343
+ },
344
+ });
345
+
346
+ ```
347
+
348
+ ### mastra/index.ts
349
+ ```typescript
350
+ import { Mastra } from '@mastra/core';
351
+ import { createLogger } from '@mastra/core/logger';
352
+
353
+ import { chefAgent, chefAgentResponses } from './agents/index';
354
+
355
+ export const mastra = new Mastra({
356
+ agents: { chefAgent, chefAgentResponses },
357
+ logger: createLogger({ name: 'Chef', level: 'info' }),
358
+ serverMiddleware: [
359
+ {
360
+ handler: (c, next) => {
361
+ console.log('Middleware called');
362
+ return next();
363
+ },
364
+ },
365
+ ],
366
+ });
367
+
368
+ ```
369
+
370
+ ### mastra/tools/index.ts
371
+ ```typescript
372
+ import { createTool } from '@mastra/core/tools';
373
+ import { z } from 'zod';
374
+
375
+ export const cookingTool = createTool({
376
+ id: 'cooking-tool',
377
+ description: 'My tool description',
378
+ inputSchema: z.object({}),
379
+ execute: async () => {
380
+ console.log('My tool is running!');
381
+ return 'My tool result';
382
+ },
383
+ });
384
+
385
+ ```