@mastra/mcp-docs-server 0.13.5 → 0.13.7-alpha.0
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.
- package/.docs/organized/changelogs/%40internal%2Fstorage-test-utils.md +84 -84
- package/.docs/organized/changelogs/%40mastra%2Fastra.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fchroma.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +61 -61
- package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +210 -210
- package/.docs/organized/changelogs/%40mastra%2Fcloud.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +99 -99
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +98 -98
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +189 -189
- package/.docs/organized/changelogs/%40mastra%2Fcouchbase.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +241 -241
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +170 -170
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +170 -170
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +236 -236
- package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +109 -109
- package/.docs/organized/changelogs/%40mastra%2Fevals.md +80 -80
- package/.docs/organized/changelogs/%40mastra%2Ffastembed.md +7 -0
- package/.docs/organized/changelogs/%40mastra%2Ffirecrawl.md +90 -90
- package/.docs/organized/changelogs/%40mastra%2Fgithub.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Flance.md +62 -0
- package/.docs/organized/changelogs/%40mastra%2Flibsql.md +83 -83
- package/.docs/organized/changelogs/%40mastra%2Floggers.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +50 -50
- package/.docs/organized/changelogs/%40mastra%2Fmcp-registry-registry.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fmcp.md +32 -32
- package/.docs/organized/changelogs/%40mastra%2Fmem0.md +26 -26
- package/.docs/organized/changelogs/%40mastra%2Fmemory.md +145 -145
- package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +83 -83
- package/.docs/organized/changelogs/%40mastra%2Fmssql.md +76 -0
- package/.docs/organized/changelogs/%40mastra%2Fopensearch.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fpg.md +126 -126
- package/.docs/organized/changelogs/%40mastra%2Fpinecone.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +245 -245
- package/.docs/organized/changelogs/%40mastra%2Fqdrant.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Frag.md +87 -87
- package/.docs/organized/changelogs/%40mastra%2Fragie.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +18 -0
- package/.docs/organized/changelogs/%40mastra%2Fserver.md +208 -208
- package/.docs/organized/changelogs/%40mastra%2Fturbopuffer.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fupstash.md +101 -101
- package/.docs/organized/changelogs/%40mastra%2Fvectorize.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fvoice-azure.md +26 -26
- package/.docs/organized/changelogs/%40mastra%2Fvoice-cloudflare.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fvoice-deepgram.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fvoice-elevenlabs.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fvoice-murf.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai-realtime.md +71 -71
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai.md +26 -26
- package/.docs/organized/changelogs/%40mastra%2Fvoice-playai.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fvoice-sarvam.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fvoice-speechify.md +8 -8
- package/.docs/organized/changelogs/create-mastra.md +127 -127
- package/.docs/organized/changelogs/mastra.md +250 -250
- package/.docs/organized/code-examples/a2a.md +1 -1
- package/.docs/organized/code-examples/agent.md +6 -0
- package/.docs/organized/code-examples/agui.md +5 -5
- package/.docs/organized/code-examples/ai-sdk-useChat.md +3 -3
- package/.docs/organized/code-examples/ai-sdk-v5.md +201 -0
- package/.docs/organized/code-examples/assistant-ui.md +3 -3
- package/.docs/organized/code-examples/bird-checker-with-express.md +1 -1
- package/.docs/organized/code-examples/bird-checker-with-nextjs-and-eval.md +3 -3
- package/.docs/organized/code-examples/bird-checker-with-nextjs.md +3 -3
- package/.docs/organized/code-examples/client-side-tools.md +3 -3
- package/.docs/organized/code-examples/crypto-chatbot.md +6 -6
- package/.docs/organized/code-examples/fireworks-r1.md +1 -1
- package/.docs/organized/code-examples/memory-with-mem0.md +1 -1
- package/.docs/organized/code-examples/memory-with-pg.md +1 -0
- package/.docs/organized/code-examples/openapi-spec-writer.md +3 -3
- package/.docs/organized/code-examples/quick-start.md +1 -1
- package/.docs/organized/code-examples/workflow-ai-recruiter.md +1 -1
- package/.docs/organized/code-examples/workflow-with-inline-steps.md +1 -1
- package/.docs/organized/code-examples/workflow-with-memory.md +1 -1
- package/.docs/organized/code-examples/workflow-with-separate-steps.md +1 -1
- package/.docs/organized/code-examples/workflow-with-suspend-resume.md +181 -0
- package/.docs/raw/agents/agent-memory.mdx +126 -0
- package/.docs/raw/agents/dynamic-agents.mdx +34 -2
- package/.docs/raw/agents/overview.mdx +5 -0
- package/.docs/raw/agents/runtime-variables.mdx +1 -1
- package/.docs/raw/auth/index.mdx +24 -0
- package/.docs/raw/auth/jwt.mdx +99 -0
- package/.docs/raw/deployment/cloud-providers/amazon-ec2.mdx +60 -26
- package/.docs/raw/deployment/cloud-providers/azure-app-services.mdx +6 -5
- package/.docs/raw/deployment/cloud-providers/digital-ocean.mdx +84 -14
- package/.docs/raw/deployment/cloud-providers/index.mdx +44 -9
- package/.docs/raw/deployment/serverless-platforms/cloudflare-deployer.mdx +9 -30
- package/.docs/raw/deployment/serverless-platforms/index.mdx +13 -13
- package/.docs/raw/evals/custom-eval.mdx +12 -12
- package/.docs/raw/frameworks/agentic-uis/ai-sdk.mdx +291 -216
- package/.docs/raw/frameworks/agentic-uis/assistant-ui.mdx +0 -34
- package/.docs/raw/frameworks/agentic-uis/copilotkit.mdx +162 -181
- package/.docs/raw/frameworks/servers/express.mdx +1 -1
- package/.docs/raw/frameworks/web-frameworks/astro.mdx +2 -2
- package/.docs/raw/frameworks/web-frameworks/next-js.mdx +1 -1
- package/.docs/raw/frameworks/web-frameworks/sveltekit.mdx +4 -4
- package/.docs/raw/frameworks/web-frameworks/vite-react.mdx +1 -1
- package/.docs/raw/getting-started/installation.mdx +10 -7
- package/.docs/raw/getting-started/model-capability.mdx +1 -1
- package/.docs/raw/index.mdx +2 -2
- package/.docs/raw/memory/overview.mdx +8 -0
- package/.docs/raw/memory/semantic-recall.mdx +6 -0
- package/.docs/raw/observability/tracing.mdx +30 -0
- package/.docs/raw/reference/agents/agent.mdx +2 -2
- package/.docs/raw/reference/auth/jwt.mdx +42 -0
- package/.docs/raw/reference/cli/create-mastra.mdx +7 -0
- package/.docs/raw/reference/cli/dev.mdx +4 -3
- package/.docs/raw/reference/client-js/agents.mdx +10 -10
- package/.docs/raw/reference/client-js/error-handling.mdx +1 -21
- package/.docs/raw/reference/client-js/logs.mdx +2 -10
- package/.docs/raw/reference/client-js/mastra-client.mdx +141 -0
- package/.docs/raw/reference/client-js/memory.mdx +6 -18
- package/.docs/raw/reference/client-js/telemetry.mdx +1 -9
- package/.docs/raw/reference/client-js/tools.mdx +2 -10
- package/.docs/raw/reference/client-js/vectors.mdx +1 -9
- package/.docs/raw/reference/client-js/workflows-legacy.mdx +3 -11
- package/.docs/raw/reference/client-js/workflows.mdx +5 -13
- package/.docs/raw/reference/core/mastra-class.mdx +6 -0
- package/.docs/raw/reference/memory/query.mdx +35 -14
- package/.docs/raw/reference/observability/providers/dash0.mdx +2 -2
- package/.docs/raw/reference/observability/providers/keywordsai.mdx +73 -0
- package/.docs/raw/reference/storage/mssql.mdx +108 -0
- package/.docs/raw/reference/tools/vector-query-tool.mdx +29 -0
- package/.docs/raw/server-db/custom-api-routes.mdx +38 -26
- package/.docs/raw/tools-mcp/mcp-overview.mdx +24 -1
- package/.docs/raw/tools-mcp/overview.mdx +1 -1
- package/.docs/raw/workflows/control-flow.mdx +85 -87
- package/.docs/raw/workflows/input-data-mapping.mdx +31 -43
- package/.docs/raw/workflows/overview.mdx +22 -12
- package/.docs/raw/workflows/pausing-execution.mdx +49 -4
- package/.docs/raw/workflows/suspend-and-resume.mdx +17 -16
- package/.docs/raw/workflows/using-with-agents-and-tools.mdx +16 -13
- package/.docs/raw/workflows-legacy/overview.mdx +11 -0
- package/package.json +7 -9
- package/.docs/organized/changelogs/%40mastra%2Fagui.md +0 -302
- package/.docs/raw/frameworks/ai-sdk-v5.mdx +0 -91
|
@@ -7,7 +7,6 @@ description: "Suspend and resume in Mastra workflows allows you to pause executi
|
|
|
7
7
|
|
|
8
8
|
Workflows can be paused at any step, with their current state persisted as a snapshot in storage. Execution can then be resumed from this saved snapshot when ready. Persisting the snapshot ensures the workflow state is maintained across sessions, deployments, and server restarts, essential for workflows that may remain suspended while awaiting external input or resources.
|
|
9
9
|
|
|
10
|
-
|
|
11
10
|
Common scenarios for suspending workflows include:
|
|
12
11
|
|
|
13
12
|
- Waiting for human approval or input
|
|
@@ -16,7 +15,7 @@ Common scenarios for suspending workflows include:
|
|
|
16
15
|
- Rate limiting or throttling expensive operations
|
|
17
16
|
- Handling event-driven processes with external triggers
|
|
18
17
|
|
|
19
|
-
## Workflow
|
|
18
|
+
## Workflow status types
|
|
20
19
|
|
|
21
20
|
When running a workflow, its `status` can be one of the following:
|
|
22
21
|
|
|
@@ -25,11 +24,13 @@ When running a workflow, its `status` can be one of the following:
|
|
|
25
24
|
- `success` - The workflow has completed
|
|
26
25
|
- `failed` - The workflow has failed
|
|
27
26
|
|
|
28
|
-
##
|
|
27
|
+
## Suspending a workflow with `suspend()`
|
|
29
28
|
|
|
30
29
|
When the state is `suspended`, you can identify any and all steps that have been suspended by looking at the `suspended` array of the workflow result output.
|
|
31
30
|
|
|
32
|
-
|
|
31
|
+

|
|
32
|
+
|
|
33
|
+
```typescript {18} filename="src/mastra/workflows/test-workflow.ts" showLineNumbers copy
|
|
33
34
|
const step1 = createStep({
|
|
34
35
|
id: "step-1",
|
|
35
36
|
description: "Test suspend",
|
|
@@ -44,14 +45,14 @@ const step1 = createStep({
|
|
|
44
45
|
city: z.string()
|
|
45
46
|
}),
|
|
46
47
|
execute: async ({ resumeData, suspend }) => {
|
|
47
|
-
|
|
48
|
+
const { city } = resumeData ?? {};
|
|
49
|
+
|
|
50
|
+
if (!city) {
|
|
48
51
|
await suspend({});
|
|
49
52
|
return { output: "" };
|
|
50
53
|
}
|
|
51
54
|
|
|
52
|
-
return {
|
|
53
|
-
output: ""
|
|
54
|
-
};
|
|
55
|
+
return { output: "" };
|
|
55
56
|
}
|
|
56
57
|
});
|
|
57
58
|
|
|
@@ -62,11 +63,11 @@ export const testWorkflow = createWorkflow({})
|
|
|
62
63
|
|
|
63
64
|
> See [Define Suspendable workflow](/examples/workflows/human-in-the-loop#define-suspendable-workflow) for more information.
|
|
64
65
|
|
|
65
|
-
### Identifying
|
|
66
|
+
### Identifying suspended steps
|
|
66
67
|
|
|
67
68
|
To resume a suspended workflow, inspect the `suspended` array in the result to determine which step needs input:
|
|
68
69
|
|
|
69
|
-
```typescript {15} filename="src/test-workflow.ts" showLineNumbers copy
|
|
70
|
+
```typescript {15} filename="src/mastra/workflows/test-workflow.ts" showLineNumbers copy
|
|
70
71
|
import { mastra } from "./mastra";
|
|
71
72
|
|
|
72
73
|
const run = await mastra.getWorkflow("testWorkflow").createRunAsync();
|
|
@@ -112,11 +113,11 @@ In this case, the logic resumes the first step listed in the `suspended` array.
|
|
|
112
113
|
|
|
113
114
|
> See [Run Workflow Results](/workflows/overview#run-workflow-results) for more details.
|
|
114
115
|
|
|
115
|
-
##
|
|
116
|
+
## Resuming a workflow with `resume()`
|
|
116
117
|
|
|
117
118
|
A workflow can be resumed by calling `resume` and providing the required `resumeData`.
|
|
118
119
|
|
|
119
|
-
```typescript {16-18} filename="src/test-workflow.ts" showLineNumbers copy
|
|
120
|
+
```typescript {16-18} filename="src/mastra/workflows/test-workflow.ts" showLineNumbers copy
|
|
120
121
|
import { mastra } from "./mastra";
|
|
121
122
|
|
|
122
123
|
const run = await mastra.getWorkflow("testWorkflow").createRunAsync();
|
|
@@ -141,11 +142,11 @@ if (result.status === "suspended") {
|
|
|
141
142
|
}
|
|
142
143
|
```
|
|
143
144
|
|
|
144
|
-
###
|
|
145
|
+
### Resuming nested workflows
|
|
145
146
|
|
|
146
147
|
To resume a suspended nested workflow pass the workflow instance to the `step` parameter of the `resume` function.
|
|
147
148
|
|
|
148
|
-
```typescript {
|
|
149
|
+
```typescript {33-34} filename="src/mastra/workflows/test-workflow.ts" showLineNumbers copy
|
|
149
150
|
const dowhileWorkflow = createWorkflow({
|
|
150
151
|
id: 'dowhile-workflow',
|
|
151
152
|
inputSchema: z.object({ value: z.number() }),
|
|
@@ -186,12 +187,12 @@ if (result.status === "suspended") {
|
|
|
186
187
|
}
|
|
187
188
|
```
|
|
188
189
|
|
|
189
|
-
## RuntimeContext
|
|
190
|
+
## Using `RuntimeContext` with suspend/resume
|
|
190
191
|
|
|
191
192
|
When using suspend/resume with `RuntimeContext`, you can create the instance yourself, and pass it to the `start` and `resume` functions.
|
|
192
193
|
`RuntimeContext` is not automatically shared on a workflow run.
|
|
193
194
|
|
|
194
|
-
```typescript {1,4,9,16} filename="src/test-workflow.
|
|
195
|
+
```typescript {1,4,9,16} filename="src/mastra/workflows/test-workflow.tss" showLineNumbers copy
|
|
195
196
|
import { RuntimeContext } from "@mastra/core/di";
|
|
196
197
|
import { mastra } from "./mastra";
|
|
197
198
|
|
|
@@ -11,14 +11,13 @@ Workflow steps are composable and typically run logic directly within the `execu
|
|
|
11
11
|
- Abstracting complex or reusable logic into a dedicated tool.
|
|
12
12
|
- Interacting with third-party APIs in a structured or reusable way.
|
|
13
13
|
|
|
14
|
-
|
|
15
14
|
Workflows can use Mastra agents or tools directly as steps, for example: `createStep(testAgent)` or `createStep(testTool)`.
|
|
16
15
|
|
|
17
|
-
##
|
|
16
|
+
## Using agents in workflows
|
|
18
17
|
|
|
19
18
|
To include an agent in a workflow, define it in the usual way, then either add it directly to the workflow using `createStep(testAgent)` or, invoke it from within a step's `execute` function using `.generate()`.
|
|
20
19
|
|
|
21
|
-
### Example
|
|
20
|
+
### Example agent
|
|
22
21
|
|
|
23
22
|
This agent uses OpenAI to generate a fact about a city, country, and timezone.
|
|
24
23
|
|
|
@@ -34,7 +33,7 @@ export const testAgent = new Agent({
|
|
|
34
33
|
});
|
|
35
34
|
```
|
|
36
35
|
|
|
37
|
-
###
|
|
36
|
+
### Adding an agent as a step
|
|
38
37
|
|
|
39
38
|
In this example, `step1` uses the `testAgent` to generate an interesting fact about the country based on a given city.
|
|
40
39
|
|
|
@@ -43,6 +42,9 @@ The `.map` method transforms the workflow input into a `prompt` string compatibl
|
|
|
43
42
|
The step is composed into the workflow using `.then()`, allowing it to receive the mapped input and return the agent's structured output. The workflow is finalized with `.commit()`.
|
|
44
43
|
|
|
45
44
|
|
|
45
|
+

|
|
46
|
+
|
|
47
|
+
|
|
46
48
|
```typescript {3} filename="src/mastra/workflows/test-workflow.ts" showLineNumbers copy
|
|
47
49
|
import { testAgent } from "../agents/test-agent";
|
|
48
50
|
|
|
@@ -68,7 +70,7 @@ export const testWorkflow = createWorkflow({
|
|
|
68
70
|
.commit();
|
|
69
71
|
```
|
|
70
72
|
|
|
71
|
-
###
|
|
73
|
+
### Calling an agent with `.generate()`
|
|
72
74
|
|
|
73
75
|
In this example, the `step1` builds a prompt using the provided `input` and passes it to the `testAgent`, which returns a plain-text response containing facts about the city and its country.
|
|
74
76
|
|
|
@@ -107,11 +109,11 @@ export const testWorkflow = createWorkflow({...})
|
|
|
107
109
|
.commit();
|
|
108
110
|
```
|
|
109
111
|
|
|
110
|
-
##
|
|
112
|
+
## Using tools in workflows
|
|
111
113
|
|
|
112
114
|
To use a tool within a workflow, define it in the usual way, then either add it directly to the workflow using `createStep(testTool)` or, invoke it from within a step's `execute` function using `.execute()`.
|
|
113
115
|
|
|
114
|
-
### Example
|
|
116
|
+
### Example tool
|
|
115
117
|
|
|
116
118
|
The example below uses the Open Meteo API to retrieve geolocation details for a city, returning its name, country, and timezone.
|
|
117
119
|
|
|
@@ -142,13 +144,14 @@ export const testTool = createTool({
|
|
|
142
144
|
});
|
|
143
145
|
```
|
|
144
146
|
|
|
145
|
-
|
|
146
|
-
### Tools as Step
|
|
147
|
+
### Adding a tool as a step
|
|
147
148
|
|
|
148
149
|
In this example, `step1` uses the `testTool`, which performs a geocoding lookup using the provided `city` and returns the resolved `country`.
|
|
149
150
|
|
|
150
151
|
The step is added to the workflow using the sequential `.then()` method, allowing it to receive input from the workflow and return structured output. The workflow is finalized with `.commit()`.
|
|
151
152
|
|
|
153
|
+

|
|
154
|
+
|
|
152
155
|
```typescript {1,3,6} filename="src/mastra/workflows/test-workflow.ts" showLineNumbers copy
|
|
153
156
|
import { testTool } from "../tools/test-tool";
|
|
154
157
|
|
|
@@ -159,7 +162,7 @@ export const testWorkflow = createWorkflow({...})
|
|
|
159
162
|
.commit();
|
|
160
163
|
```
|
|
161
164
|
|
|
162
|
-
###
|
|
165
|
+
### Calling a tool with `.execute()`
|
|
163
166
|
|
|
164
167
|
In this example, `step1` directly invokes `testTool` using its `.execute()` method. The tool performs a geocoding lookup with the provided `city` and returns the corresponding `country`.
|
|
165
168
|
|
|
@@ -201,7 +204,7 @@ export const testWorkflow = createWorkflow({...})
|
|
|
201
204
|
.commit();
|
|
202
205
|
```
|
|
203
206
|
|
|
204
|
-
##
|
|
207
|
+
## Using workflows as tools
|
|
205
208
|
|
|
206
209
|
In this example the `cityStringWorkflow` workflow has been added to the main Mastra instance.
|
|
207
210
|
|
|
@@ -255,7 +258,7 @@ export const cityCoordinatesTool = createTool({
|
|
|
255
258
|
});
|
|
256
259
|
```
|
|
257
260
|
|
|
258
|
-
##
|
|
261
|
+
## Exposing workflows with `MCPServer`
|
|
259
262
|
|
|
260
263
|
You can convert your workflows into tools by passing them into an instance of a Mastra `MCPServer`. This allows any MCP-compatible client to access your workflow.
|
|
261
264
|
|
|
@@ -316,7 +319,7 @@ Run the client script to see your workflow tool.
|
|
|
316
319
|
npx tsx src/test-mcp-client.ts
|
|
317
320
|
```
|
|
318
321
|
|
|
319
|
-
## More
|
|
322
|
+
## More resources
|
|
320
323
|
|
|
321
324
|
- [MCPServer reference documentation](/reference/tools/mcp-server).
|
|
322
325
|
- [MCPClient reference documentation](/reference/tools/mcp-client).
|
|
@@ -5,6 +5,17 @@ description: "Workflows in Mastra help you orchestrate complex sequences of oper
|
|
|
5
5
|
|
|
6
6
|
# Handling Complex LLM Operations with Workflows (Legacy)
|
|
7
7
|
|
|
8
|
+
All the legacy workflow documentation is available on the links below.
|
|
9
|
+
|
|
10
|
+
- [Steps](/docs/workflows-legacy/steps/)
|
|
11
|
+
- [Control Flow](/docs/workflows-legacy/control-flow/)
|
|
12
|
+
- [Variables](/docs/workflows-legacy/variables/)
|
|
13
|
+
- [Suspend & Resume](/docs/workflows-legacy/suspend-and-resume/)
|
|
14
|
+
- [Dynamic Workflows](/docs/workflows-legacy/dynamic-workflows/)
|
|
15
|
+
- [Error Handling](/docs/workflows-legacy/error-handling/)
|
|
16
|
+
- [Nested Workflows](/docs/workflows-legacy/nested-workflows/)
|
|
17
|
+
- [Runtime/Dynamic Variables](/docs/workflows-legacy/runtime-variables/)
|
|
18
|
+
|
|
8
19
|
Workflows in Mastra help you orchestrate complex sequences of operations with features like branching, parallel execution, resource suspension, and more.
|
|
9
20
|
|
|
10
21
|
## When to use workflows
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/mcp-docs-server",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.7-alpha.0",
|
|
4
4
|
"description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -32,26 +32,24 @@
|
|
|
32
32
|
"uuid": "^11.1.0",
|
|
33
33
|
"zod": "^3.25.67",
|
|
34
34
|
"zod-to-json-schema": "^3.24.5",
|
|
35
|
-
"@mastra/
|
|
35
|
+
"@mastra/core": "0.12.0-alpha.0",
|
|
36
|
+
"@mastra/mcp": "^0.10.7"
|
|
36
37
|
},
|
|
37
38
|
"devDependencies": {
|
|
38
|
-
"@hono/node-server": "^1.
|
|
39
|
+
"@hono/node-server": "^1.17.1",
|
|
39
40
|
"@types/jsdom": "^21.1.7",
|
|
40
41
|
"@types/node": "^20.19.0",
|
|
41
42
|
"@types/turndown": "^5.0.5",
|
|
42
43
|
"@wong2/mcp-cli": "^1.10.0",
|
|
43
44
|
"cross-env": "^7.0.3",
|
|
44
|
-
"eslint": "^9.
|
|
45
|
+
"eslint": "^9.30.1",
|
|
45
46
|
"hono": "^4.8.4",
|
|
46
47
|
"tsup": "^8.5.0",
|
|
47
48
|
"tsx": "^4.19.4",
|
|
48
49
|
"typescript": "^5.8.3",
|
|
49
50
|
"vitest": "^3.2.4",
|
|
50
|
-
"@internal/lint": "0.0.
|
|
51
|
-
"@mastra/core": "0.
|
|
52
|
-
},
|
|
53
|
-
"peerDependencies": {
|
|
54
|
-
"@mastra/core": "^0.10.0-alpha.0"
|
|
51
|
+
"@internal/lint": "0.0.23",
|
|
52
|
+
"@mastra/core": "0.12.0-alpha.0"
|
|
55
53
|
},
|
|
56
54
|
"scripts": {
|
|
57
55
|
"prepare-docs": "cross-env PREPARE=true node dist/prepare-docs/prepare.js",
|
|
@@ -1,302 +0,0 @@
|
|
|
1
|
-
# @mastra/agui
|
|
2
|
-
|
|
3
|
-
## 1.0.6-alpha.0
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- 1c1c6a1: dependencies updates:
|
|
8
|
-
- Updated dependency [`hono@^4.8.4` ↗︎](https://www.npmjs.com/package/hono/v/4.8.4) (from `^4.8.3`, in `dependencies`)
|
|
9
|
-
- Updated dependencies [2873c7f]
|
|
10
|
-
- Updated dependencies [1c1c6a1]
|
|
11
|
-
- Updated dependencies [565cc0c]
|
|
12
|
-
- @mastra/core@0.10.11-alpha.2
|
|
13
|
-
|
|
14
|
-
## 1.0.5
|
|
15
|
-
|
|
16
|
-
### Patch Changes
|
|
17
|
-
|
|
18
|
-
- 9dda1ac: dependencies updates:
|
|
19
|
-
- Updated dependency [`hono@^4.8.3` ↗︎](https://www.npmjs.com/package/hono/v/4.8.3) (from `^4.7.11`, in `dependencies`)
|
|
20
|
-
- Updated dependencies [9dda1ac]
|
|
21
|
-
- Updated dependencies [c984582]
|
|
22
|
-
- Updated dependencies [7e801dd]
|
|
23
|
-
- Updated dependencies [a606c75]
|
|
24
|
-
- Updated dependencies [7aa70a4]
|
|
25
|
-
- Updated dependencies [764f86a]
|
|
26
|
-
- Updated dependencies [1760a1c]
|
|
27
|
-
- Updated dependencies [038e5ae]
|
|
28
|
-
- Updated dependencies [7dda16a]
|
|
29
|
-
- Updated dependencies [5ebfcdd]
|
|
30
|
-
- Updated dependencies [b2d0c91]
|
|
31
|
-
- Updated dependencies [4e809ad]
|
|
32
|
-
- Updated dependencies [57929df]
|
|
33
|
-
- Updated dependencies [b7852ed]
|
|
34
|
-
- Updated dependencies [6320a61]
|
|
35
|
-
- @mastra/core@0.10.9
|
|
36
|
-
|
|
37
|
-
## 1.0.5-alpha.0
|
|
38
|
-
|
|
39
|
-
### Patch Changes
|
|
40
|
-
|
|
41
|
-
- 9dda1ac: dependencies updates:
|
|
42
|
-
- Updated dependency [`hono@^4.8.3` ↗︎](https://www.npmjs.com/package/hono/v/4.8.3) (from `^4.7.11`, in `dependencies`)
|
|
43
|
-
- Updated dependencies [9dda1ac]
|
|
44
|
-
- Updated dependencies [c984582]
|
|
45
|
-
- Updated dependencies [7e801dd]
|
|
46
|
-
- Updated dependencies [a606c75]
|
|
47
|
-
- Updated dependencies [7aa70a4]
|
|
48
|
-
- Updated dependencies [764f86a]
|
|
49
|
-
- Updated dependencies [1760a1c]
|
|
50
|
-
- Updated dependencies [038e5ae]
|
|
51
|
-
- Updated dependencies [7dda16a]
|
|
52
|
-
- Updated dependencies [5ebfcdd]
|
|
53
|
-
- Updated dependencies [b2d0c91]
|
|
54
|
-
- Updated dependencies [4e809ad]
|
|
55
|
-
- Updated dependencies [57929df]
|
|
56
|
-
- Updated dependencies [b7852ed]
|
|
57
|
-
- Updated dependencies [6320a61]
|
|
58
|
-
- @mastra/core@0.10.9-alpha.0
|
|
59
|
-
|
|
60
|
-
## 1.0.4
|
|
61
|
-
|
|
62
|
-
### Patch Changes
|
|
63
|
-
|
|
64
|
-
- 362446a: dependencies updates:
|
|
65
|
-
- Updated dependency [`@copilotkit/runtime@^1.9.1` ↗︎](https://www.npmjs.com/package/@copilotkit/runtime/v/1.9.1) (from `^1.8.14`, in `dependencies`)
|
|
66
|
-
- Updated dependencies [15e9d26]
|
|
67
|
-
- Updated dependencies [d1baedb]
|
|
68
|
-
- Updated dependencies [d8f2d19]
|
|
69
|
-
- Updated dependencies [4d21bf2]
|
|
70
|
-
- Updated dependencies [07d6d88]
|
|
71
|
-
- Updated dependencies [9d52b17]
|
|
72
|
-
- Updated dependencies [2097952]
|
|
73
|
-
- Updated dependencies [792c4c0]
|
|
74
|
-
- Updated dependencies [5d74aab]
|
|
75
|
-
- Updated dependencies [a8b194f]
|
|
76
|
-
- Updated dependencies [4fb0cc2]
|
|
77
|
-
- Updated dependencies [d2a7a31]
|
|
78
|
-
- Updated dependencies [502fe05]
|
|
79
|
-
- Updated dependencies [144eb0b]
|
|
80
|
-
- Updated dependencies [8ba1b51]
|
|
81
|
-
- Updated dependencies [4efcfa0]
|
|
82
|
-
- Updated dependencies [0e17048]
|
|
83
|
-
- @mastra/core@0.10.7
|
|
84
|
-
|
|
85
|
-
## 1.0.4-alpha.0
|
|
86
|
-
|
|
87
|
-
### Patch Changes
|
|
88
|
-
|
|
89
|
-
- 362446a: dependencies updates:
|
|
90
|
-
- Updated dependency [`@copilotkit/runtime@^1.9.1` ↗︎](https://www.npmjs.com/package/@copilotkit/runtime/v/1.9.1) (from `^1.8.14`, in `dependencies`)
|
|
91
|
-
- Updated dependencies [15e9d26]
|
|
92
|
-
- Updated dependencies [07d6d88]
|
|
93
|
-
- Updated dependencies [5d74aab]
|
|
94
|
-
- Updated dependencies [144eb0b]
|
|
95
|
-
- @mastra/core@0.10.7-alpha.2
|
|
96
|
-
|
|
97
|
-
## 1.0.3
|
|
98
|
-
|
|
99
|
-
### Patch Changes
|
|
100
|
-
|
|
101
|
-
- 63f6b7d: dependencies updates:
|
|
102
|
-
- Updated dependency [`@ai-sdk/ui-utils@^1.2.11` ↗︎](https://www.npmjs.com/package/@ai-sdk/ui-utils/v/1.2.11) (from `^1.1.19`, in `dependencies`)
|
|
103
|
-
- Updated dependency [`@copilotkit/runtime@^1.8.14` ↗︎](https://www.npmjs.com/package/@copilotkit/runtime/v/1.8.14) (from `^1.8.13`, in `dependencies`)
|
|
104
|
-
- Updated dependency [`hono@^4.7.11` ↗︎](https://www.npmjs.com/package/hono/v/4.7.11) (from `^4.5.1`, in `dependencies`)
|
|
105
|
-
- Updated dependencies [63f6b7d]
|
|
106
|
-
- Updated dependencies [12a95fc]
|
|
107
|
-
- Updated dependencies [4b0f8a6]
|
|
108
|
-
- Updated dependencies [51264a5]
|
|
109
|
-
- Updated dependencies [8e6f677]
|
|
110
|
-
- Updated dependencies [d70c420]
|
|
111
|
-
- Updated dependencies [ee9af57]
|
|
112
|
-
- Updated dependencies [36f1c36]
|
|
113
|
-
- Updated dependencies [2a16996]
|
|
114
|
-
- Updated dependencies [10d352e]
|
|
115
|
-
- Updated dependencies [9589624]
|
|
116
|
-
- Updated dependencies [53d3c37]
|
|
117
|
-
- Updated dependencies [751c894]
|
|
118
|
-
- Updated dependencies [577ce3a]
|
|
119
|
-
- Updated dependencies [9260b3a]
|
|
120
|
-
- @mastra/core@0.10.6
|
|
121
|
-
|
|
122
|
-
## 1.0.3-alpha.0
|
|
123
|
-
|
|
124
|
-
### Patch Changes
|
|
125
|
-
|
|
126
|
-
- 63f6b7d: dependencies updates:
|
|
127
|
-
- Updated dependency [`@ai-sdk/ui-utils@^1.2.11` ↗︎](https://www.npmjs.com/package/@ai-sdk/ui-utils/v/1.2.11) (from `^1.1.19`, in `dependencies`)
|
|
128
|
-
- Updated dependency [`@copilotkit/runtime@^1.8.14` ↗︎](https://www.npmjs.com/package/@copilotkit/runtime/v/1.8.14) (from `^1.8.13`, in `dependencies`)
|
|
129
|
-
- Updated dependency [`hono@^4.7.11` ↗︎](https://www.npmjs.com/package/hono/v/4.7.11) (from `^4.5.1`, in `dependencies`)
|
|
130
|
-
- Updated dependencies [63f6b7d]
|
|
131
|
-
- Updated dependencies [36f1c36]
|
|
132
|
-
- Updated dependencies [10d352e]
|
|
133
|
-
- Updated dependencies [53d3c37]
|
|
134
|
-
- @mastra/core@0.10.6-alpha.0
|
|
135
|
-
|
|
136
|
-
## 1.0.2
|
|
137
|
-
|
|
138
|
-
### Patch Changes
|
|
139
|
-
|
|
140
|
-
- 187b17d: Bump for runtimecontext
|
|
141
|
-
- f0d559f: Fix peerdeps for alpha channel
|
|
142
|
-
- Updated dependencies [ee77e78]
|
|
143
|
-
- Updated dependencies [592a2db]
|
|
144
|
-
- Updated dependencies [e5dc18d]
|
|
145
|
-
- Updated dependencies [ab5adbe]
|
|
146
|
-
- Updated dependencies [1e8bb40]
|
|
147
|
-
- Updated dependencies [1b5fc55]
|
|
148
|
-
- Updated dependencies [195c428]
|
|
149
|
-
- Updated dependencies [f73e11b]
|
|
150
|
-
- Updated dependencies [37643b8]
|
|
151
|
-
- Updated dependencies [99fd6cf]
|
|
152
|
-
- Updated dependencies [c5bf1ce]
|
|
153
|
-
- Updated dependencies [add596e]
|
|
154
|
-
- Updated dependencies [8dc94d8]
|
|
155
|
-
- Updated dependencies [ecebbeb]
|
|
156
|
-
- Updated dependencies [79d5145]
|
|
157
|
-
- Updated dependencies [12b7002]
|
|
158
|
-
- Updated dependencies [2901125]
|
|
159
|
-
- @mastra/core@0.10.2
|
|
160
|
-
|
|
161
|
-
## 1.0.2-alpha.2
|
|
162
|
-
|
|
163
|
-
### Patch Changes
|
|
164
|
-
|
|
165
|
-
- f0d559f: Fix peerdeps for alpha channel
|
|
166
|
-
- Updated dependencies [1e8bb40]
|
|
167
|
-
- @mastra/core@0.10.2-alpha.2
|
|
168
|
-
|
|
169
|
-
## 1.0.2-alpha.1
|
|
170
|
-
|
|
171
|
-
### Patch Changes
|
|
172
|
-
|
|
173
|
-
- Updated dependencies [ee77e78]
|
|
174
|
-
- Updated dependencies [2901125]
|
|
175
|
-
- @mastra/core@0.10.2-alpha.1
|
|
176
|
-
|
|
177
|
-
## 1.0.2-alpha.0
|
|
178
|
-
|
|
179
|
-
### Patch Changes
|
|
180
|
-
|
|
181
|
-
- 187b17d: Bump for runtimecontext
|
|
182
|
-
- Updated dependencies [592a2db]
|
|
183
|
-
- Updated dependencies [e5dc18d]
|
|
184
|
-
- @mastra/client-js@0.10.2-alpha.0
|
|
185
|
-
- @mastra/core@0.10.2-alpha.0
|
|
186
|
-
|
|
187
|
-
## 1.0.1
|
|
188
|
-
|
|
189
|
-
### Patch Changes
|
|
190
|
-
|
|
191
|
-
- a4bd9cf: Make these return abstract agents
|
|
192
|
-
- cc86d51: Fix missing result messages
|
|
193
|
-
- Updated dependencies [d70b807]
|
|
194
|
-
- Updated dependencies [6d16390]
|
|
195
|
-
- Updated dependencies [1e4a421]
|
|
196
|
-
- Updated dependencies [200d0da]
|
|
197
|
-
- Updated dependencies [267773e]
|
|
198
|
-
- Updated dependencies [bf5f17b]
|
|
199
|
-
- Updated dependencies [5343f93]
|
|
200
|
-
- Updated dependencies [f622cfa]
|
|
201
|
-
- Updated dependencies [38aee50]
|
|
202
|
-
- Updated dependencies [5c41100]
|
|
203
|
-
- Updated dependencies [d6a759b]
|
|
204
|
-
- Updated dependencies [6015bdf]
|
|
205
|
-
- @mastra/core@0.10.1
|
|
206
|
-
- @mastra/client-js@0.10.1
|
|
207
|
-
|
|
208
|
-
## 1.0.1-alpha.4
|
|
209
|
-
|
|
210
|
-
### Patch Changes
|
|
211
|
-
|
|
212
|
-
- Updated dependencies [267773e]
|
|
213
|
-
- @mastra/client-js@0.10.1-alpha.3
|
|
214
|
-
|
|
215
|
-
## 1.0.1-alpha.3
|
|
216
|
-
|
|
217
|
-
### Patch Changes
|
|
218
|
-
|
|
219
|
-
- Updated dependencies [d70b807]
|
|
220
|
-
- @mastra/core@0.10.1-alpha.3
|
|
221
|
-
|
|
222
|
-
## 1.0.1-alpha.2
|
|
223
|
-
|
|
224
|
-
### Patch Changes
|
|
225
|
-
|
|
226
|
-
- Updated dependencies [6015bdf]
|
|
227
|
-
- @mastra/client-js@0.10.1-alpha.2
|
|
228
|
-
- @mastra/core@0.10.1-alpha.2
|
|
229
|
-
|
|
230
|
-
## 1.0.1-alpha.1
|
|
231
|
-
|
|
232
|
-
### Patch Changes
|
|
233
|
-
|
|
234
|
-
- Updated dependencies [200d0da]
|
|
235
|
-
- Updated dependencies [bf5f17b]
|
|
236
|
-
- Updated dependencies [5343f93]
|
|
237
|
-
- Updated dependencies [38aee50]
|
|
238
|
-
- Updated dependencies [5c41100]
|
|
239
|
-
- Updated dependencies [d6a759b]
|
|
240
|
-
- @mastra/core@0.10.1-alpha.1
|
|
241
|
-
- @mastra/client-js@0.10.1-alpha.1
|
|
242
|
-
|
|
243
|
-
## 1.0.1-alpha.0
|
|
244
|
-
|
|
245
|
-
### Patch Changes
|
|
246
|
-
|
|
247
|
-
- a4bd9cf: Make these return abstract agents
|
|
248
|
-
- cc86d51: Fix missing result messages
|
|
249
|
-
- Updated dependencies [6d16390]
|
|
250
|
-
- Updated dependencies [1e4a421]
|
|
251
|
-
- Updated dependencies [f622cfa]
|
|
252
|
-
- @mastra/core@0.10.1-alpha.0
|
|
253
|
-
- @mastra/client-js@0.10.1-alpha.0
|
|
254
|
-
|
|
255
|
-
## 1.0.0
|
|
256
|
-
|
|
257
|
-
### Patch Changes
|
|
258
|
-
|
|
259
|
-
- ceb47cb: Move AGUI to server instead of client
|
|
260
|
-
- Updated dependencies [b3a3d63]
|
|
261
|
-
- Updated dependencies [344f453]
|
|
262
|
-
- Updated dependencies [0215b0b]
|
|
263
|
-
- Updated dependencies [0a3ae6d]
|
|
264
|
-
- Updated dependencies [95911be]
|
|
265
|
-
- Updated dependencies [83da932]
|
|
266
|
-
- Updated dependencies [f53a6ac]
|
|
267
|
-
- Updated dependencies [5eb5a99]
|
|
268
|
-
- Updated dependencies [7e632c5]
|
|
269
|
-
- Updated dependencies [1e9fbfa]
|
|
270
|
-
- Updated dependencies [eabdcd9]
|
|
271
|
-
- Updated dependencies [90be034]
|
|
272
|
-
- Updated dependencies [ccdabdc]
|
|
273
|
-
- Updated dependencies [99f050a]
|
|
274
|
-
- Updated dependencies [d0ee3c6]
|
|
275
|
-
- Updated dependencies [b2ae5aa]
|
|
276
|
-
- Updated dependencies [a6e3881]
|
|
277
|
-
- Updated dependencies [fddae56]
|
|
278
|
-
- Updated dependencies [23f258c]
|
|
279
|
-
- Updated dependencies [a7292b0]
|
|
280
|
-
- Updated dependencies [0dcb9f0]
|
|
281
|
-
- Updated dependencies [5063646]
|
|
282
|
-
- Updated dependencies [2672a05]
|
|
283
|
-
- @mastra/client-js@0.10.0
|
|
284
|
-
- @mastra/core@0.10.0
|
|
285
|
-
|
|
286
|
-
## 1.0.0-alpha.3
|
|
287
|
-
|
|
288
|
-
### Patch Changes
|
|
289
|
-
|
|
290
|
-
- Updated dependencies [b3a3d63]
|
|
291
|
-
- Updated dependencies [344f453]
|
|
292
|
-
- Updated dependencies [0215b0b]
|
|
293
|
-
- Updated dependencies [0a3ae6d]
|
|
294
|
-
- Updated dependencies [95911be]
|
|
295
|
-
- Updated dependencies [83da932]
|
|
296
|
-
- Updated dependencies [5eb5a99]
|
|
297
|
-
- Updated dependencies [7e632c5]
|
|
298
|
-
- Updated dependencies [1e9fbfa]
|
|
299
|
-
- Updated dependencies [b2ae5aa]
|
|
300
|
-
- Updated dependencies [a7292b0]
|
|
301
|
-
|
|
302
|
-
... 23 more lines hidden. See full changelog in package directory.
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
# AI SDK v5 (beta) Migration Guide
|
|
2
|
-
|
|
3
|
-
This guide covers Mastra-specific considerations when migrating from AI SDK v4 to v5 beta.
|
|
4
|
-
|
|
5
|
-
Please add any feedback or bug reports to the [AI SDK v5 mega issue in Github.](https://github.com/mastra-ai/mastra/issues/5470)
|
|
6
|
-
|
|
7
|
-
## Official Migration Guide
|
|
8
|
-
|
|
9
|
-
**Follow the official [AI SDK v5 Migration Guide](https://v5.ai-sdk.dev/docs/migration-guides/migration-guide-5-0)** for all AI SDK core breaking changes, package updates, and API changes.
|
|
10
|
-
|
|
11
|
-
This guide covers only the Mastra-specific aspects of the migration.
|
|
12
|
-
|
|
13
|
-
## Warnings
|
|
14
|
-
|
|
15
|
-
- **Data compatibility**: New data stored in v5 format will no longer work if you downgrade from the beta
|
|
16
|
-
- **Backup recommendation**: Keep DB backups from before you upgrade to v5 beta
|
|
17
|
-
- **Production use**: Wait for the AI SDK v5 stable release before using in production applications
|
|
18
|
-
- **Prerelease status**: The Mastra `ai-v5` tag is a prerelease version and may have bugs
|
|
19
|
-
|
|
20
|
-
## Memory Storage
|
|
21
|
-
|
|
22
|
-
Your existing AI SDK v4 data will run through our internal `MessageList` class which handles converting to/from various message formats.
|
|
23
|
-
This includes converting from AI SDK v4->v5. This means you don't need to run any DB migrations and your data will be translated on the fly and will just work when you upgrade.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
## Migration Strategy
|
|
27
|
-
|
|
28
|
-
Migrating to AI SDK v5 with Mastra involves updating both your **backend** (Mastra server) and **frontend**.
|
|
29
|
-
We provide a compatibility mode to handle stream format conversion during the transition.
|
|
30
|
-
|
|
31
|
-
### Backend Upgrade
|
|
32
|
-
|
|
33
|
-
Bump Mastra to the new `ai-v5` prerelease version for all Mastra packages:
|
|
34
|
-
|
|
35
|
-
```bash npm2yarn copy
|
|
36
|
-
npm i mastra@ai-v5 @mastra/core@ai-v5 @mastra/memory@ai-v5 [etc]
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Then configure your Mastra instance with v4 compatibility so your existing frontend will continue to work:
|
|
40
|
-
|
|
41
|
-
```typescript
|
|
42
|
-
import { Mastra } from '@mastra/core';
|
|
43
|
-
|
|
44
|
-
export const mastra = new Mastra({
|
|
45
|
-
agents: { myAgent },
|
|
46
|
-
aiSdkCompat: 'v4', // <- add this for compatibility
|
|
47
|
-
});
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
#### Dependencies
|
|
51
|
-
|
|
52
|
-
You will need to upgrade all AI SDK dependencies to use the new v5 beta versions in your backend when you bump to the Mastra `ai-v5` prerelease tag.
|
|
53
|
-
|
|
54
|
-
In most cases this will only involve bumping your model provider packages. For example: `npm i @ai-sdk/openai@2.0.0-beta.1` - refer to the [AI SDK v5 documentation](https://v5.ai-sdk.dev/docs/migration-guides/migration-guide-5-0) for more info. Some model providers do not yet have V5 versions (Openrouter for example).
|
|
55
|
-
|
|
56
|
-
Also note that you need to bump all your Mastra dependencies to the new `ai-v5` tag, and you must upgrade `zod` to the latest version if you have it installed.
|
|
57
|
-
|
|
58
|
-
#### Using Stream Compatibility Manually
|
|
59
|
-
|
|
60
|
-
If you have a frontend that calls Mastra agents in an endpoint, you can wrap the new `response.toUIMessageStreamResponse()` manually.
|
|
61
|
-
|
|
62
|
-
```ts
|
|
63
|
-
import { mastra } from "@/src/mastra";
|
|
64
|
-
import { createV4CompatibleResponse } from "@mastra/core/agent";
|
|
65
|
-
|
|
66
|
-
const myAgent = mastra.getAgent("weatherAgent");
|
|
67
|
-
export async function POST(req: Request) {
|
|
68
|
-
const { messages } = await req.json();
|
|
69
|
-
const stream = await myAgent.stream(messages);
|
|
70
|
-
|
|
71
|
-
return createV4CompatibleResponse(stream.toUIMessageStreamResponse().body!);
|
|
72
|
-
}
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
### Using Mastra Playground
|
|
76
|
-
|
|
77
|
-
Currently playground is still an AI SDK v4 frontend. For now you need to set `aiSdkCompat: 'v4'` for it to work.
|
|
78
|
-
We'll handle this automatically for you soon.
|
|
79
|
-
|
|
80
|
-
### Frontend Upgrade
|
|
81
|
-
|
|
82
|
-
When you're ready, remove the compatibility flag and upgrade your frontend:
|
|
83
|
-
|
|
84
|
-
1. Remove `aiSdkCompat: 'v4'` from your Mastra configuration
|
|
85
|
-
2. Follow the AI SDK guide on upgrading your frontend dependencies
|
|
86
|
-
3. Update your frontend code for v5 breaking changes
|
|
87
|
-
|
|
88
|
-
## Discussion and Bug Reports
|
|
89
|
-
|
|
90
|
-
Please add any feedback or bug reports to the [AI SDK v5 mega issue in Github.](https://github.com/mastra-ai/mastra/issues/5470)
|
|
91
|
-
|