@mastra/mcp-docs-server 1.2.5-alpha.1 → 1.2.5-alpha.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 (198) hide show
  1. package/.docs/docs/agent-builder/deploying.md +1 -1
  2. package/.docs/docs/agent-controller/overview.md +1 -1
  3. package/.docs/docs/agent-controller/session.md +1 -1
  4. package/.docs/docs/agents/overview.md +1 -1
  5. package/.docs/docs/agents/processors.md +1 -1
  6. package/.docs/docs/agents/supervisor-agents.md +3 -3
  7. package/.docs/docs/agents/using-tools.md +1 -1
  8. package/.docs/docs/{agents → long-running-agents}/background-tasks.md +2 -2
  9. package/.docs/docs/{agents → long-running-agents}/durable-agents.md +2 -2
  10. package/.docs/docs/{agents → long-running-agents}/goals.md +1 -1
  11. package/.docs/docs/{agents → long-running-agents}/heartbeats.md +5 -5
  12. package/.docs/docs/{agents → long-running-agents}/signal-providers.md +4 -4
  13. package/.docs/docs/memory/working-memory.md +1 -1
  14. package/.docs/docs/observability/config.md +1 -2
  15. package/.docs/docs/server/pubsub.md +2 -2
  16. package/.docs/docs/voice/overview.md +3 -3
  17. package/.docs/docs/voice/speech-to-speech.md +81 -1
  18. package/.docs/docs/voice/speech-to-text.md +19 -1
  19. package/.docs/docs/voice/text-to-speech.md +21 -1
  20. package/.docs/docs/workflows/control-flow.md +1 -1
  21. package/.docs/docs/workflows/error-handling.md +1 -1
  22. package/.docs/docs/workflows/human-in-the-loop.md +1 -1
  23. package/.docs/docs/workflows/overview.md +1 -1
  24. package/.docs/docs/workflows/snapshots.md +1 -1
  25. package/.docs/docs/workflows/suspend-and-resume.md +1 -1
  26. package/.docs/docs/workflows/time-travel.md +1 -1
  27. package/.docs/docs/workflows/workflow-state.md +1 -1
  28. package/.docs/guides/build-your-ui/copilotkit/channels.md +76 -0
  29. package/.docs/guides/build-your-ui/copilotkit/generative-ui.md +174 -0
  30. package/.docs/guides/build-your-ui/copilotkit/overview.md +411 -0
  31. package/.docs/guides/concepts/streaming.md +1 -1
  32. package/.docs/guides/deployment/vercel.md +1 -2
  33. package/.docs/guides/guide/signal-provider.md +5 -5
  34. package/.docs/models/environment-variables.md +1 -0
  35. package/.docs/models/index.md +1 -1
  36. package/.docs/models/providers/alibaba-cn.md +2 -1
  37. package/.docs/models/providers/friendli.md +1 -2
  38. package/.docs/models/providers/tencent-token-plan.md +7 -7
  39. package/.docs/models/providers/tencent-tokenhub.md +5 -4
  40. package/.docs/models/providers.md +1 -0
  41. package/.docs/reference/acp/acp-agent.md +5 -5
  42. package/.docs/reference/acp/create-acp-tool.md +5 -5
  43. package/.docs/reference/agent-controller/agent-controller-class.md +27 -27
  44. package/.docs/reference/agents/agent.md +34 -34
  45. package/.docs/reference/agents/channels.md +19 -19
  46. package/.docs/reference/agents/createSkill.md +2 -2
  47. package/.docs/reference/agents/durable-agent.md +22 -22
  48. package/.docs/reference/agents/generate.md +10 -10
  49. package/.docs/reference/agents/generateLegacy.md +12 -12
  50. package/.docs/reference/agents/getMetadata.md +1 -1
  51. package/.docs/reference/agents/getVoice.md +1 -1
  52. package/.docs/reference/agents/inngest-agent.md +9 -9
  53. package/.docs/reference/agents/network.md +1 -1
  54. package/.docs/reference/ai-sdk/chat-route.md +4 -4
  55. package/.docs/reference/ai-sdk/handle-chat-stream.md +6 -6
  56. package/.docs/reference/ai-sdk/handle-network-stream.md +3 -3
  57. package/.docs/reference/ai-sdk/handle-workflow-stream.md +1 -1
  58. package/.docs/reference/ai-sdk/network-route.md +4 -4
  59. package/.docs/reference/ai-sdk/to-ai-sdk-messages.md +1 -1
  60. package/.docs/reference/ai-sdk/to-ai-sdk-stream.md +1 -1
  61. package/.docs/reference/ai-sdk/with-mastra.md +2 -2
  62. package/.docs/reference/ai-sdk/workflow-route.md +2 -2
  63. package/.docs/reference/ai-sdk/workflow-snapshot-to-stream.md +1 -1
  64. package/.docs/reference/auth/google.md +10 -10
  65. package/.docs/reference/auth/okta.md +11 -11
  66. package/.docs/reference/auth/workos.md +3 -3
  67. package/.docs/reference/channels/slack-provider.md +15 -15
  68. package/.docs/reference/cli/mastra.md +145 -0
  69. package/.docs/reference/client-js/agents.md +9 -9
  70. package/.docs/reference/client-js/mastra-client.md +5 -5
  71. package/.docs/reference/client-js/responses.md +3 -3
  72. package/.docs/reference/configuration.md +1 -1
  73. package/.docs/reference/core/getAgentById.md +3 -3
  74. package/.docs/reference/core/getWorkflow.md +1 -1
  75. package/.docs/reference/core/listWorkflows.md +1 -1
  76. package/.docs/reference/core/mastra-class.md +3 -3
  77. package/.docs/reference/core/removeWorkspace.md +2 -2
  78. package/.docs/reference/datasets/compareExperiments.md +1 -1
  79. package/.docs/reference/datasets/getItemHistory.md +1 -1
  80. package/.docs/reference/datasets/list.md +5 -5
  81. package/.docs/reference/datasets/listExperimentResults.md +4 -4
  82. package/.docs/reference/datasets/listExperiments.md +4 -4
  83. package/.docs/reference/datasets/listItems.md +5 -5
  84. package/.docs/reference/datasets/listVersions.md +3 -3
  85. package/.docs/reference/datasets/startExperiment.md +8 -8
  86. package/.docs/reference/datasets/startExperimentAsync.md +1 -1
  87. package/.docs/reference/editor/agent-builder/agent-builder-options.md +4 -4
  88. package/.docs/reference/editor/agent-builder/builder-agent-defaults.md +7 -7
  89. package/.docs/reference/editor/agent-builder/builder-models.md +4 -4
  90. package/.docs/reference/editor/blob-store-provider.md +2 -2
  91. package/.docs/reference/editor/browser-provider.md +2 -2
  92. package/.docs/reference/editor/filesystem-provider.md +2 -2
  93. package/.docs/reference/editor/mastra-editor.md +2 -2
  94. package/.docs/reference/editor/processor-provider.md +4 -4
  95. package/.docs/reference/editor/sandbox-provider.md +2 -2
  96. package/.docs/reference/editor/storage-browser-ref.md +2 -2
  97. package/.docs/reference/editor/storage-workspace-ref.md +7 -7
  98. package/.docs/reference/evals/create-scorer.md +8 -8
  99. package/.docs/reference/evals/rubric.md +1 -1
  100. package/.docs/reference/evals/run-evals.md +7 -7
  101. package/.docs/reference/evals/trajectory-accuracy.md +1 -1
  102. package/.docs/reference/index.md +2 -2
  103. package/.docs/reference/logging/pino-logger.md +4 -4
  104. package/.docs/reference/memory/cloneThread.md +35 -4
  105. package/.docs/reference/memory/memory-class.md +5 -5
  106. package/.docs/reference/memory/observational-memory.md +43 -43
  107. package/.docs/reference/memory/recall.md +4 -4
  108. package/.docs/reference/memory/serialized-memory-config.md +6 -6
  109. package/.docs/reference/observability/tracing/configuration.md +4 -4
  110. package/.docs/reference/processors/language-detector.md +1 -1
  111. package/.docs/reference/processors/moderation-processor.md +1 -1
  112. package/.docs/reference/processors/pii-detector.md +1 -1
  113. package/.docs/reference/processors/processor-interface.md +20 -20
  114. package/.docs/reference/processors/prompt-injection-detector.md +1 -1
  115. package/.docs/reference/processors/response-cache.md +6 -6
  116. package/.docs/reference/processors/unicode-normalizer.md +1 -1
  117. package/.docs/reference/pubsub/base.md +7 -7
  118. package/.docs/reference/pubsub/caching-pubsub.md +1 -1
  119. package/.docs/reference/pubsub/event-emitter.md +2 -2
  120. package/.docs/reference/pubsub/google-cloud-pubsub.md +1 -1
  121. package/.docs/reference/pubsub/lease-provider.md +3 -3
  122. package/.docs/reference/pubsub/redis-streams.md +6 -6
  123. package/.docs/reference/pubsub/unix-socket-pubsub.md +1 -1
  124. package/.docs/reference/rag/chunk.md +2 -2
  125. package/.docs/reference/server/create-route.md +3 -3
  126. package/.docs/reference/server/express-adapter.md +4 -4
  127. package/.docs/reference/server/fastify-adapter.md +4 -4
  128. package/.docs/reference/server/hono-adapter.md +4 -4
  129. package/.docs/reference/server/koa-adapter.md +4 -4
  130. package/.docs/reference/server/mastra-server.md +1 -1
  131. package/.docs/reference/server/nestjs-adapter.md +3 -3
  132. package/.docs/reference/server/register-api-route.md +3 -3
  133. package/.docs/reference/signals/create-notification-inbox-tool.md +3 -3
  134. package/.docs/reference/signals/signal-provider.md +7 -7
  135. package/.docs/reference/signals/webhook-signal-provider.md +2 -2
  136. package/.docs/reference/storage/clickhouse.md +7 -7
  137. package/.docs/reference/storage/composite.md +2 -2
  138. package/.docs/reference/storage/duckdb.md +1 -1
  139. package/.docs/reference/storage/dynamodb.md +1 -1
  140. package/.docs/reference/storage/libsql.md +1 -1
  141. package/.docs/reference/storage/postgresql.md +2 -2
  142. package/.docs/reference/storage/redis.md +2 -2
  143. package/.docs/reference/storage/retention.md +5 -5
  144. package/.docs/reference/storage/spanner.md +6 -6
  145. package/.docs/reference/streaming/ChunkType.md +3 -3
  146. package/.docs/reference/streaming/agents/stream.md +14 -14
  147. package/.docs/reference/streaming/agents/streamLegacy.md +10 -10
  148. package/.docs/reference/streaming/agents/streamUntilIdle.md +1 -1
  149. package/.docs/reference/streaming/workflows/resumeStream.md +1 -1
  150. package/.docs/reference/templates/overview.md +1 -140
  151. package/.docs/reference/tools/brightdata.md +4 -4
  152. package/.docs/reference/tools/create-code-mode.md +5 -5
  153. package/.docs/reference/tools/create-tool.md +15 -15
  154. package/.docs/reference/tools/graph-rag-tool.md +1 -1
  155. package/.docs/reference/tools/mcp-client.md +2 -2
  156. package/.docs/reference/tools/mcp-server.md +12 -12
  157. package/.docs/reference/tools/perplexity.md +3 -3
  158. package/.docs/reference/tools/tavily.md +1 -1
  159. package/.docs/reference/tools/vector-query-tool.md +1 -1
  160. package/.docs/reference/vectors/chroma.md +1 -1
  161. package/.docs/reference/vectors/mongodb.md +1 -1
  162. package/.docs/reference/vectors/pg.md +1 -1
  163. package/.docs/reference/vectors/s3vectors.md +4 -4
  164. package/.docs/reference/voice/google-gemini-live.md +3 -3
  165. package/.docs/reference/voice/inworld-realtime.md +12 -12
  166. package/.docs/reference/voice/inworld.md +2 -2
  167. package/.docs/reference/voice/voice.on.md +1 -1
  168. package/.docs/reference/workflows/run-methods/resume.md +1 -1
  169. package/.docs/reference/workflows/run-methods/timeTravel.md +1 -1
  170. package/.docs/reference/workspace/agentcore-runtime-sandbox.md +4 -4
  171. package/.docs/reference/workspace/agentfs-filesystem.md +1 -1
  172. package/.docs/reference/workspace/apple-container-sandbox.md +5 -5
  173. package/.docs/reference/workspace/archil-filesystem.md +5 -5
  174. package/.docs/reference/workspace/blaxel-sandbox.md +1 -1
  175. package/.docs/reference/workspace/daytona-sandbox.md +1 -1
  176. package/.docs/reference/workspace/docker-sandbox.md +2 -2
  177. package/.docs/reference/workspace/e2b-sandbox.md +2 -2
  178. package/.docs/reference/workspace/files-sdk-filesystem.md +1 -1
  179. package/.docs/reference/workspace/filesystem.md +1 -1
  180. package/.docs/reference/workspace/local-filesystem.md +3 -3
  181. package/.docs/reference/workspace/local-sandbox.md +1 -1
  182. package/.docs/reference/workspace/mesa-filesystem.md +3 -3
  183. package/.docs/reference/workspace/modal-sandbox.md +1 -1
  184. package/.docs/reference/workspace/railway-sandbox.md +1 -1
  185. package/.docs/reference/workspace/s3-filesystem.md +4 -4
  186. package/.docs/reference/workspace/sandbox.md +1 -1
  187. package/.docs/reference/workspace/{vercel-microvm-sandbox.md → vercel-sandbox.md} +21 -15
  188. package/.docs/reference/workspace/{vercel.md → vercel-serverless.md} +21 -14
  189. package/.docs/reference/workspace/workspace-class.md +15 -15
  190. package/CHANGELOG.md +8 -0
  191. package/package.json +5 -5
  192. package/.docs/docs/agents/adding-voice.md +0 -383
  193. package/.docs/docs/community/contributing-templates.md +0 -5
  194. package/.docs/docs/community/discord.md +0 -11
  195. package/.docs/guides/build-your-ui/copilotkit.md +0 -291
  196. package/LICENSE.md +0 -30
  197. /package/.docs/docs/{community/licensing.md → license.md} +0 -0
  198. /package/.docs/docs/{agents → long-running-agents}/signals.md +0 -0
@@ -1,291 +0,0 @@
1
- > Discover all available pages from the documentation index: https://mastra.ai/llms.txt
2
-
3
- # Using CopilotKit
4
-
5
- [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.
6
-
7
- Visit the [CopilotKit documentation](https://docs.copilotkit.ai/) to learn more about CopilotKit concepts, components, and advanced usage patterns.
8
-
9
- > **Info:** 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.
10
-
11
- > **Tip:** Visit Mastra's [**"UI Dojo"**](https://ui-dojo.mastra.ai/) to see real-world examples of CopilotKit integrated with Mastra.
12
-
13
- ## Integration guide
14
-
15
- Run Mastra as a standalone server and connect your Next.js frontend (with CopilotKit) to its API endpoints.
16
-
17
- 1. Set up your directory structure. A possible directory structure could look like this:
18
-
19
- ```bash
20
- project-root
21
- ├── mastra-server
22
- │ ├── src
23
- │ │ └── mastra
24
- │ └── package.json
25
- └── my-copilot-app
26
- └── package.json
27
- ```
28
-
29
- Bootstrap your Mastra server:
30
-
31
- **npm**:
32
-
33
- ```bash
34
- npx create-mastra@latest
35
- ```
36
-
37
- **pnpm**:
38
-
39
- ```bash
40
- pnpm dlx create-mastra@latest
41
- ```
42
-
43
- **Yarn**:
44
-
45
- ```bash
46
- yarn dlx create-mastra@latest
47
- ```
48
-
49
- **Bun**:
50
-
51
- ```bash
52
- bun x create-mastra@latest
53
- ```
54
-
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.
56
-
57
- Navigate to your newly created Mastra server directory:
58
-
59
- ```bash
60
- cd mastra-server # Replace with the actual directory name you provided
61
- ```
62
-
63
- You now have a basic Mastra server project ready. You should have the following files and folders:
64
-
65
- ```bash
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
77
- ```
78
-
79
- > **Note:** Ensure that you have set the appropriate environment variables for your LLM provider in the `.env` file.
80
-
81
- 2. 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):
82
-
83
- **npm**:
84
-
85
- ```bash
86
- npm install @ag-ui/mastra @mastra/client-js @mastra/core @ag-ui/core @ag-ui/client @copilotkit/runtime
87
- ```
88
-
89
- **pnpm**:
90
-
91
- ```bash
92
- pnpm add @ag-ui/mastra @mastra/client-js @mastra/core @ag-ui/core @ag-ui/client @copilotkit/runtime
93
- ```
94
-
95
- **Yarn**:
96
-
97
- ```bash
98
- yarn add @ag-ui/mastra @mastra/client-js @mastra/core @ag-ui/core @ag-ui/client @copilotkit/runtime
99
- ```
100
-
101
- **Bun**:
102
-
103
- ```bash
104
- bun add @ag-ui/mastra @mastra/client-js @mastra/core @ag-ui/core @ag-ui/client @copilotkit/runtime
105
- ```
106
-
107
- In your `src/mastra/index.ts` file, register the chat route:
108
-
109
- ```typescript
110
- import { Mastra } from '@mastra/core/mastra'
111
- import { registerCopilotKit } from '@ag-ui/mastra/copilotkit'
112
- // Rest of the imports...
113
-
114
- export const mastra = new Mastra({
115
- // Rest of the configuration...
116
- server: {
117
- cors: {
118
- origin: '*',
119
- allowMethods: ['*'],
120
- allowHeaders: ['*'],
121
- },
122
- apiRoutes: [
123
- registerCopilotKit({
124
- path: '/chat',
125
- resourceId: 'weatherAgent',
126
- }),
127
- ],
128
- },
129
- })
130
- ```
131
-
132
- 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.
133
-
134
- 3. Run the Mastra server using the following command:
135
-
136
- **npm**:
137
-
138
- ```bash
139
- npm run dev
140
- ```
141
-
142
- **pnpm**:
143
-
144
- ```bash
145
- pnpm run dev
146
- ```
147
-
148
- **Yarn**:
149
-
150
- ```bash
151
- yarn dev
152
- ```
153
-
154
- **Bun**:
155
-
156
- ```bash
157
- bun run dev
158
- ```
159
-
160
- 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.
161
-
162
- 4. Go up one directory to your project root.
163
-
164
- ```bash
165
- cd ..
166
- ```
167
-
168
- Create a new Next.js project with the name `my-copilot-app`:
169
-
170
- **npm**:
171
-
172
- ```bash
173
- npx create-next-app@latest my-copilot-app
174
- ```
175
-
176
- **pnpm**:
177
-
178
- ```bash
179
- pnpm dlx create-next-app@latest my-copilot-app
180
- ```
181
-
182
- **Yarn**:
183
-
184
- ```bash
185
- yarn dlx create-next-app@latest my-copilot-app
186
- ```
187
-
188
- **Bun**:
189
-
190
- ```bash
191
- bun x create-next-app@latest my-copilot-app
192
- ```
193
-
194
- Navigate to your newly created Next.js project directory:
195
-
196
- ```bash
197
- cd my-copilot-app
198
- ```
199
-
200
- 5. Install the CopilotKit UI packages which you'll use to display a chat interface:
201
-
202
- **npm**:
203
-
204
- ```bash
205
- npm install @copilotkit/react-ui @copilotkit/react-core
206
- ```
207
-
208
- **pnpm**:
209
-
210
- ```bash
211
- pnpm add @copilotkit/react-ui @copilotkit/react-core
212
- ```
213
-
214
- **Yarn**:
215
-
216
- ```bash
217
- yarn add @copilotkit/react-ui @copilotkit/react-core
218
- ```
219
-
220
- **Bun**:
221
-
222
- ```bash
223
- bun add @copilotkit/react-ui @copilotkit/react-core
224
- ```
225
-
226
- 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:
227
-
228
- ```typescript
229
- import { CopilotChat } from '@copilotkit/react-ui'
230
- import { CopilotKit } from '@copilotkit/react-core'
231
- import '@copilotkit/react-ui/styles.css'
232
-
233
- export default function Home() {
234
- return (
235
- <CopilotKit runtimeUrl="http://localhost:4111/chat" agent="weatherAgent">
236
- <CopilotChat
237
- labels={{
238
- title: 'Weather Agent',
239
- initial: 'Hi! 👋 Ask me about the weather, forecasts, and climate.',
240
- }}
241
- />
242
- </CopilotKit>
243
- )
244
- }
245
- ```
246
-
247
- 6. 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:
248
-
249
- **npm**:
250
-
251
- ```bash
252
- npm run dev
253
- ```
254
-
255
- **pnpm**:
256
-
257
- ```bash
258
- pnpm run dev
259
- ```
260
-
261
- **Yarn**:
262
-
263
- ```bash
264
- yarn dev
265
- ```
266
-
267
- **Bun**:
268
-
269
- ```bash
270
- bun run dev
271
- ```
272
-
273
- You should now be able to chat with your agent in the browser.
274
-
275
- Congratulations! You have successfully integrated Mastra with CopilotKit using a separate server approach. Your CopilotKit frontend now communicates with a standalone Mastra agent server.
276
-
277
- ## Deployment
278
-
279
- When deploying your Mastra server with CopilotKit, you must exclude `@copilotkit/runtime` from the bundle. This package contains dependencies that aren't compatible with bundling and will cause 500 errors if included.
280
-
281
- > **Note:** This issue doesn't occur during development with `mastra dev` since it doesn't require bundling. However, anyone running `mastra build` for deployment will encounter this issue.
282
-
283
- Add the `@copilotkit/runtime` package to your bundler externals configuration:
284
-
285
- ```typescript
286
- export const mastra = new Mastra({
287
- bundler: {
288
- externals: ['@copilotkit/runtime'],
289
- },
290
- })
291
- ```
package/LICENSE.md DELETED
@@ -1,30 +0,0 @@
1
- Portions of this software are licensed as follows:
2
-
3
- - All content that resides under any directory named "ee/" within this
4
- repository, including but not limited to:
5
- - `packages/core/src/auth/ee/`
6
- - `packages/server/src/server/auth/ee/`
7
- is licensed under the license defined in `ee/LICENSE`.
8
-
9
- - All third-party components incorporated into the Mastra Software are
10
- licensed under the original license provided by the owner of the
11
- applicable component.
12
-
13
- - Content outside of the above-mentioned directories or restrictions is
14
- available under the "Apache License 2.0" as defined below.
15
-
16
- # Apache License 2.0
17
-
18
- Copyright (c) 2025 Kepler Software, Inc.
19
-
20
- Licensed under the Apache License, Version 2.0 (the "License");
21
- you may not use this file except in compliance with the License.
22
- You may obtain a copy of the License at
23
-
24
- http://www.apache.org/licenses/LICENSE-2.0
25
-
26
- Unless required by applicable law or agreed to in writing, software
27
- distributed under the License is distributed on an "AS IS" BASIS,
28
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29
- See the License for the specific language governing permissions and
30
- limitations under the License.