@mastra/mcp-docs-server 1.2.23-alpha.6 → 1.2.23-alpha.9
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/docs/agents/code-mode.md +1 -1
- package/.docs/docs/agents/human-in-the-loop.md +1 -1
- package/.docs/docs/agents/networks.md +1 -1
- package/.docs/docs/agents/processors.md +1 -1
- package/.docs/docs/agents/structured-output.md +1 -1
- package/.docs/docs/auth/fga.md +1 -1
- package/.docs/docs/channels.md +2 -2
- package/.docs/docs/connections/mcp.md +1 -1
- package/.docs/docs/datasets/running-experiments.md +1 -1
- package/.docs/docs/deployment/sandbox.md +2 -2
- package/.docs/docs/deployment/workers.md +2 -2
- package/.docs/docs/evals/custom-scorers.md +1 -1
- package/.docs/docs/evals/multi-turn.md +1 -1
- package/.docs/docs/evals/overview.md +2 -2
- package/.docs/docs/evals/quick-checks.md +1 -1
- package/.docs/docs/evals/vitest-integration.md +136 -0
- package/.docs/docs/guides/context-engineering.md +1 -1
- package/.docs/docs/guides/multi-agent-systems.md +1 -1
- package/.docs/docs/guides/streaming.md +72 -52
- package/.docs/docs/harness/agent-controller.md +1 -1
- package/.docs/docs/harness/background-tasks.md +1 -1
- package/.docs/docs/harness/durable-agents.md +1 -1
- package/.docs/docs/harness/schedules.md +1 -1
- package/.docs/docs/harness/signal-providers.md +1 -1
- package/.docs/docs/harness/signals.md +1 -1
- package/.docs/docs/index.md +1 -1
- package/.docs/docs/mastra-platform/deploy.md +15 -15
- package/.docs/docs/mastra-platform/environments.md +2 -2
- package/.docs/docs/mastra-platform/github.md +2 -2
- package/.docs/docs/mastra-platform/regions.md +1 -1
- package/.docs/docs/mastra-platform/server.md +4 -4
- package/.docs/docs/mastra-platform/studio.md +1 -1
- package/.docs/docs/mastra-platform/trace-intelligence.md +1 -1
- package/.docs/docs/mastra-platform/workspaces.md +1 -1
- package/.docs/docs/memory/message-history.md +3 -3
- package/.docs/docs/memory/observational-memory.md +18 -18
- package/.docs/docs/memory/overview.md +1 -1
- package/.docs/docs/memory/working-memory.md +1 -1
- package/.docs/docs/observability/feedback.md +1 -1
- package/.docs/docs/observability/logging.md +1 -1
- package/.docs/docs/observability/tracing/overview.md +1 -1
- package/.docs/docs/sandbox/lsp.md +1 -1
- package/.docs/docs/sandbox/overview.md +1 -1
- package/.docs/docs/server/mastra-client.md +1 -1
- package/.docs/docs/server/overview.md +1 -1
- package/.docs/docs/server/pubsub.md +1 -1
- package/.docs/docs/server/request-context.md +2 -2
- package/.docs/docs/server/server-adapters.md +1 -1
- package/.docs/docs/skills.md +1 -1
- package/.docs/docs/studio/deployment.md +1 -1
- package/.docs/docs/studio/editor.md +1 -1
- package/.docs/docs/studio/overview.md +1 -1
- package/.docs/docs/subagents.md +2 -2
- package/.docs/docs/workflows/control-flow.md +1 -1
- package/.docs/docs/workflows/overview.md +1 -1
- package/.docs/docs/workflows/scheduled-workflows.md +1 -1
- package/.docs/docs/workflows/suspend-and-resume.md +2 -2
- package/.docs/integrations/sandboxes/agentcore.md +2 -0
- package/.docs/integrations/sandboxes/apple-container.md +5 -3
- package/.docs/integrations/sandboxes/blaxel.md +2 -0
- package/.docs/integrations/sandboxes/cloudflare-sandbox.md +1 -1
- package/.docs/integrations/sandboxes/daytona.md +2 -0
- package/.docs/integrations/sandboxes/docker.md +3 -1
- package/.docs/integrations/sandboxes/e2b.md +2 -0
- package/.docs/integrations/sandboxes/modal.md +3 -1
- package/.docs/integrations/sandboxes/railway.md +2 -0
- package/.docs/integrations/sandboxes/vercel.md +4 -0
- package/.docs/models/gateways/vercel.md +2 -1
- package/.docs/models/providers/chutes.md +1 -1
- package/.docs/models/providers/cortecs.md +3 -4
- package/.docs/models/providers/edenai.md +2 -1
- package/.docs/models/providers/iteracompute.md +8 -7
- package/.docs/models/providers/kilo.md +4 -4
- package/.docs/models/providers/vancine.md +4 -6
- package/.docs/reference/agent-controller/agent-controller-class.md +2 -2
- package/.docs/reference/agent-controller/session.md +3 -3
- package/.docs/reference/agents/durable-agent.md +1 -1
- package/.docs/reference/agents/getDefaultGenerateOptions.md +1 -1
- package/.docs/reference/agents/listSuspendedRuns.md +2 -2
- package/.docs/reference/ai-sdk/chat-route.md +1 -1
- package/.docs/reference/ai-sdk/network-route.md +1 -1
- package/.docs/reference/ai-sdk/workflow-route.md +1 -1
- package/.docs/reference/browser/browser-viewer.md +1 -1
- package/.docs/reference/cli/mastra.md +4 -4
- package/.docs/reference/core/mastra-class.md +1 -1
- package/.docs/reference/datasets/createExperiment.md +1 -1
- package/.docs/reference/editor/tool-provider.md +1 -1
- package/.docs/reference/editor/versioning.md +1 -1
- package/.docs/reference/evals/multi-turn-judge.md +1 -1
- package/.docs/reference/evals/rubric.md +1 -1
- package/.docs/reference/file-based-agents/schedules.md +2 -2
- package/.docs/reference/file-based-agents/workspace.md +1 -1
- package/.docs/reference/manual-install.md +3 -3
- package/.docs/reference/memory/observational-memory.md +4 -4
- package/.docs/reference/memory/settled.md +1 -1
- package/.docs/reference/migrations/mastra-cloud.md +9 -9
- package/.docs/reference/migrations/upgrade-to-v1/overview.md +1 -1
- package/.docs/reference/observability/tracing/exporters/cloud-exporter.md +1 -1
- package/.docs/reference/processors/processor-interface.md +1 -1
- package/.docs/reference/processors/regex-filter-processor.md +3 -3
- package/.docs/reference/processors/token-cost-control.md +2 -2
- package/.docs/reference/processors/token-limiter-processor.md +1 -1
- package/.docs/reference/processors/tool-search-processor.md +1 -1
- package/.docs/reference/processors/working-memory-processor.md +1 -1
- package/.docs/reference/pubsub/base.md +2 -2
- package/.docs/reference/pubsub/lease-provider.md +2 -2
- package/.docs/reference/rag/vector-databases.md +33 -33
- package/.docs/reference/server/create-route.md +1 -1
- package/.docs/reference/signals/task-signal-provider.md +1 -1
- package/.docs/reference/storage/composite.md +1 -1
- package/.docs/reference/storage/retention.md +4 -4
- package/.docs/reference/streaming/ChunkType.md +1 -1
- package/.docs/reference/tools/isolated-vm-transport.md +1 -1
- package/.docs/reference/tools/mcp-client.md +2 -2
- package/.docs/reference/vectors/couchbase.md +1 -1
- package/.docs/reference/vectors/mongodb.md +2 -2
- package/.docs/reference/voice/overview.md +1 -1
- package/.docs/reference/workflows/workflow-methods/foreach.md +1 -1
- package/.docs/reference/workspace/platform-sandbox.md +3 -1
- package/.docs/reference/workspace/process-manager.md +1 -1
- package/.docs/reference/workspace/sandbox.md +20 -3
- package/.docs/reference/workspace/workspace-class.md +3 -3
- package/package.json +5 -6
- package/CHANGELOG.md +0 -5936
package/.docs/docs/subagents.md
CHANGED
|
@@ -138,7 +138,7 @@ Called after a delegation finishes. Use it to inspect results or provide feedbac
|
|
|
138
138
|
- Return `{ feedback: '...' }`: Add feedback that gets saved to the parent agent's memory and is visible to subsequent iterations
|
|
139
139
|
- Return `{ resultText: '...' }`: Replace the tool result text the parent model sees for this delegation, within the current run
|
|
140
140
|
|
|
141
|
-
|
|
141
|
+
Set `resultText` when the subagent's own result would give the parent a misleading signal. For example, empty text from a subagent stopped on a tool-calls step looks like a successful but empty delegation to the parent model. Unlike `feedback` on the next turn, `resultText` affects the parent's reasoning immediately.
|
|
142
142
|
|
|
143
143
|
```typescript
|
|
144
144
|
const stream = await parentAgent.stream('Research AI trends', {
|
|
@@ -196,7 +196,7 @@ await parentAgent.generate('Research AI trends', { maxSteps: 10, requestContext
|
|
|
196
196
|
const hookErrors = requestContext.get('__mastra_delegationHookErrors') ?? []
|
|
197
197
|
```
|
|
198
198
|
|
|
199
|
-
When `hookErrorStrategy` is `'throw'`, a throwing `onDelegationStart` blocks the subagent from running at all, and a throwing `messageFilter` or `onDelegationComplete` surfaces to the parent as a failed tool call. If `onDelegationComplete` throws while handling a failed delegation, the original delegation error
|
|
199
|
+
When `hookErrorStrategy` is `'throw'`, a throwing `onDelegationStart` blocks the subagent from running at all, and a throwing `messageFilter` or `onDelegationComplete` surfaces to the parent as a failed tool call. If `onDelegationComplete` throws while handling a failed delegation, the original delegation error remains the surfaced error. The hook isn't invoked again for its own failure.
|
|
200
200
|
|
|
201
201
|
## Message filtering
|
|
202
202
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Control flow
|
|
6
6
|
|
|
7
|
-
Workflows
|
|
7
|
+
Workflows give you control over predefined tasks by dividing each task into **steps**. Those steps can run sequentially or in parallel, and they can follow conditional paths.
|
|
8
8
|
|
|
9
9
|
Each step connects to the next in the workflow through defined schemas that keep data controlled and consistent.
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Workflows
|
|
6
6
|
|
|
7
|
-
Workflows let you define complex sequences
|
|
7
|
+
Workflows let you define complex task sequences with clear, structured steps instead of relying on one agent to reason through the entire process. You control the task breakdown along with the flow and timing of data. Workflows use the built-in execution engine by default, while managed infrastructure is available through [workflow runners](https://mastra.ai/docs/deployment/workflow-runners) such as Inngest.
|
|
8
8
|
|
|
9
9
|
**For AI agents:** Run `npx mastra api workflow run start test-workflow '{"inputData":{"message":"Hello, world!"}}'` to start this workflow directly instead of writing a temporary script. The command requires a running Mastra server; start the local server with `npx mastra dev`, or pass the reachable server's base URL with `--url`. Run `npx mastra api workflow run start --schema` before constructing different input. Install Mastra's skill with `npx skills add mastra-ai/skills --skill mastra` for complete API CLI discovery, targeting, schema, authentication, and error-handling guidance.
|
|
10
10
|
|
|
@@ -44,7 +44,7 @@ A separate "register schedule" call won't happen. The scheduler reads `schedule`
|
|
|
44
44
|
|
|
45
45
|
A workflow that declares `schedule` is auto-promoted to the **evented execution engine**. The public API (`workflow.start()`, `workflow.startAsync()`, `streamLegacy()`, `resume()`) is unchanged, `EventedWorkflow extends Workflow` and overrides each method with matching signatures. From your code, scheduled fires and manual runs are indistinguishable.
|
|
46
46
|
|
|
47
|
-
The promotion
|
|
47
|
+
The promotion means evented runs require a storage adapter with concurrent-update support, such as `@mastra/libsql`; otherwise, `createRun()` throws a clear error that points to the `schedule` field. Switch adapters or remove the schedule.
|
|
48
48
|
|
|
49
49
|
## Single schedule
|
|
50
50
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Suspend and resume
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Pause a workflow at any step to collect additional data, wait for an API callback, throttle a costly operation, or request [human-in-the-loop](https://mastra.ai/docs/workflows/human-in-the-loop) input. Suspension saves the current execution state as a snapshot. Later, resume from a [specific step ID](https://mastra.ai/docs/workflows/snapshots) to restore the exact captured state. [Snapshots](https://mastra.ai/docs/workflows/snapshots) are stored in your configured storage provider and persist across deployments and application restarts.
|
|
8
8
|
|
|
9
9
|
## Pausing a workflow with `suspend()`
|
|
10
10
|
|
|
@@ -98,7 +98,7 @@ const stream = run.resume({
|
|
|
98
98
|
})
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
-
You can call `resume()` from anywhere in your application,
|
|
101
|
+
You can call `resume()` from anywhere in your application, such as an HTTP endpoint or event handler. Timers and code responding to [human input](https://mastra.ai/docs/workflows/human-in-the-loop) can also resume a workflow.
|
|
102
102
|
|
|
103
103
|
```typescript
|
|
104
104
|
const midnight = new Date()
|
|
@@ -92,6 +92,8 @@ if (!result?.success) {
|
|
|
92
92
|
|
|
93
93
|
**accept** (`string`): Accept header used for command event streams. (Default: `application/vnd.amazon.eventstream`)
|
|
94
94
|
|
|
95
|
+
**workingDirectory** (`string`): Default directory for command execution when no per-command cwd is given, applied as a shell cd prefix. A per-command cwd always wins. The path is shell-quoted, so \~ is not expanded — use an absolute path.
|
|
96
|
+
|
|
95
97
|
**commandTimeout** (`number`): Default command timeout in milliseconds. (Default: `300000`)
|
|
96
98
|
|
|
97
99
|
**stopSessionOnLifecycle** (`boolean`): Whether stop() and destroy() should call StopRuntimeSession. Defaults to false because AgentCore Runtime sessions are often shared with agent invocations outside the sandbox instance. (Default: `false`)
|
|
@@ -53,7 +53,7 @@ const workspace = new Workspace({
|
|
|
53
53
|
volumes: {
|
|
54
54
|
'/Users/me/project': '/workspace',
|
|
55
55
|
},
|
|
56
|
-
|
|
56
|
+
workingDirectory: '/workspace',
|
|
57
57
|
}),
|
|
58
58
|
})
|
|
59
59
|
|
|
@@ -125,7 +125,9 @@ console.log(response.text)
|
|
|
125
125
|
|
|
126
126
|
**labels** (`Record<string, string>`): Additional container labels. Mastra labels (mastra.sandbox, mastra.sandbox.id) are always included.
|
|
127
127
|
|
|
128
|
-
**
|
|
128
|
+
**workingDirectory** (`string`): Working directory inside the container, used as the default for command execution when no per-command cwd is given. A per-command cwd always wins. (Default: `'/workspace'`)
|
|
129
|
+
|
|
130
|
+
**workingDir** (`string`): Deprecated alias for workingDirectory. When both are set, workingDirectory wins.
|
|
129
131
|
|
|
130
132
|
**timeout** (`number`): Default command timeout in milliseconds. (Default: `300000 (5 minutes)`)
|
|
131
133
|
|
|
@@ -198,7 +200,7 @@ const sandbox = new AppleContainerSandbox({
|
|
|
198
200
|
})
|
|
199
201
|
```
|
|
200
202
|
|
|
201
|
-
These options are only applied when a new container is created. If the sandbox reconnects to an existing container with the same name, destroy and recreate the sandbox to apply changed runtime options. Apple `--tmpfs` accepts container paths only, such as `/tmp`; it doesn't accept Docker-style option specs like `/tmp:rw,size=256m`. When `readonlyRootfs` is enabled, make sure `
|
|
203
|
+
These options are only applied when a new container is created. If the sandbox reconnects to an existing container with the same name, destroy and recreate the sandbox to apply changed runtime options. Apple `--tmpfs` accepts container paths only, such as `/tmp`; it doesn't accept Docker-style option specs like `/tmp:rw,size=256m`. When `readonlyRootfs` is enabled, make sure `workingDirectory` points to a path supplied by the image or a bind mount. A writable tmpfs is also supported.
|
|
202
204
|
|
|
203
205
|
## Security model
|
|
204
206
|
|
|
@@ -83,6 +83,8 @@ const workspace = new Workspace({
|
|
|
83
83
|
|
|
84
84
|
**env** (`Record<string, string>`): Environment variables to set in the sandbox.
|
|
85
85
|
|
|
86
|
+
**workingDirectory** (`string`): Default directory for command execution when no per-command cwd is given. A per-command cwd always wins. Use an absolute path.
|
|
87
|
+
|
|
86
88
|
**labels** (`Record<string, string>`): Custom labels for the sandbox.
|
|
87
89
|
|
|
88
90
|
**runtimes** (`SandboxRuntime[]`): Supported runtimes. Valid values: 'node', 'python', 'bash', 'ruby', 'go', 'rust', 'java', 'cpp', 'r'. (Default: `['node', 'python', 'bash']`)
|
|
@@ -103,7 +103,7 @@ await workspace.sandbox?.writeFiles?.([
|
|
|
103
103
|
|
|
104
104
|
**env** (`Record<string, string>`): Environment variables applied to every command.
|
|
105
105
|
|
|
106
|
-
**workingDirectory** (`string`):
|
|
106
|
+
**workingDirectory** (`string`): Default directory for command execution when no per-command cwd is given. A per-command cwd always wins.
|
|
107
107
|
|
|
108
108
|
**commandTimeout** (`number`): Default command timeout in milliseconds. (Default: `300000`)
|
|
109
109
|
|
|
@@ -353,6 +353,8 @@ For Daytona-specific desktop APIs (regions, compressed screenshots, screen recor
|
|
|
353
353
|
|
|
354
354
|
**env** (`Record<string, string>`): Environment variables to set in the sandbox. (Default: `{}`)
|
|
355
355
|
|
|
356
|
+
**workingDirectory** (`string`): Default directory for command execution when no per-command cwd is given. A per-command cwd always wins. When set, the sandbox skips its automatic working-directory probe; when omitted, the probe fills the workingDirectory getter after start.
|
|
357
|
+
|
|
356
358
|
**labels** (`Record<string, string>`): Custom metadata labels. (Default: `{}`)
|
|
357
359
|
|
|
358
360
|
**name** (`string`): Sandbox display name. (Default: `Sandbox id`)
|
|
@@ -99,7 +99,9 @@ const agent = new Agent({
|
|
|
99
99
|
|
|
100
100
|
**tmpfs** (`Record<string, string>`): tmpfs mount paths and options. Maps to Docker HostConfig.Tmpfs.
|
|
101
101
|
|
|
102
|
-
**
|
|
102
|
+
**workingDirectory** (`string`): Working directory inside the container, used as the default for command execution when no per-command cwd is given. A per-command cwd always wins. (Default: `'/workspace'`)
|
|
103
|
+
|
|
104
|
+
**workingDir** (`string`): Deprecated alias for workingDirectory. When both are set, workingDirectory wins.
|
|
103
105
|
|
|
104
106
|
**labels** (`Record<string, string>`): Additional container labels. Mastra labels (mastra.sandbox, mastra.sandbox.id) are always included.
|
|
105
107
|
|
|
@@ -68,6 +68,8 @@ const agent = new Agent({
|
|
|
68
68
|
|
|
69
69
|
**env** (`Record<string, string>`): Environment variables to set in the sandbox
|
|
70
70
|
|
|
71
|
+
**workingDirectory** (`string`): Default directory for command execution when no per-command cwd is given. A per-command cwd always wins; when neither is set, commands run from the sandbox home directory. Use an absolute path.
|
|
72
|
+
|
|
71
73
|
**id** (`string`): Unique identifier for this sandbox instance (Default: `Auto-generated`)
|
|
72
74
|
|
|
73
75
|
**sandboxId** (`string`): Persisted E2B provider sandbox ID to reattach to deterministically. When set, start() connects to this exact sandbox (resuming it if paused) instead of discovering by logical id metadata. Only a typed "sandbox gone" error (not found, killed, or not running) falls through to the usual logical-id lookup and create ladder; auth, quota, rate-limit, timeout, and network errors propagate without creating a new sandbox. A sandbox tagged with a different logical id is refused. Read the resolved provider ID from the sandboxId property after start.
|
|
@@ -88,7 +88,9 @@ Get your credentials from the [Modal dashboard](https://modal.com/settings/token
|
|
|
88
88
|
|
|
89
89
|
**env** (`Record<string, string>`): Environment variables baked into the sandbox at create time.
|
|
90
90
|
|
|
91
|
-
**
|
|
91
|
+
**workingDirectory** (`string`): Default working directory inside the sandbox, used for command execution when no per-command cwd is given. A per-command cwd always wins.
|
|
92
|
+
|
|
93
|
+
**workdir** (`string`): Deprecated alias for workingDirectory. When both are set, workingDirectory wins.
|
|
92
94
|
|
|
93
95
|
**tokenId** (`string`): Modal token ID. Falls back to MODAL\_TOKEN\_ID environment variable.
|
|
94
96
|
|
|
@@ -221,6 +221,8 @@ const result = await sandbox.executeCommand('cat', ['/tmp/state.txt'])
|
|
|
221
221
|
|
|
222
222
|
**env** (`Record<string, string>`): Environment variables baked into the sandbox, available to every command. (Default: `{}`)
|
|
223
223
|
|
|
224
|
+
**workingDirectory** (`string`): Default directory for command execution when no per-command cwd is given. A per-command cwd always wins. Use an absolute path.
|
|
225
|
+
|
|
224
226
|
**template** (`SandboxTemplate | (base: SandboxTemplate) => SandboxTemplate`): Provision the sandbox from a custom base image built with the Railway template builder. Accepts a builder callback or a pre-built template. Ignored when sandboxId is set.
|
|
225
227
|
|
|
226
228
|
**timeout** (`number`): Default execution timeout in milliseconds applied to commands that do not specify their own timeout. Commands run until they exit when omitted.
|
|
@@ -156,6 +156,8 @@ Both callbacks are optional and can be used independently.
|
|
|
156
156
|
|
|
157
157
|
**env** (`Record<string, string>`): Default environment variables inherited by all commands. (Default: `{}`)
|
|
158
158
|
|
|
159
|
+
**workingDirectory** (`string`): Default directory for command execution when no per-command cwd is given. A per-command cwd always wins. Use an absolute path.
|
|
160
|
+
|
|
159
161
|
**metadata** (`Record<string, unknown>`): Custom metadata surfaced via getInfo(). (Default: `{}`)
|
|
160
162
|
|
|
161
163
|
**instructions** (`string | ((opts) => string)`): Override the default instructions returned by getInstructions(). Pass a string to replace them, or a function to extend the defaults.
|
|
@@ -301,6 +303,8 @@ const workspace = new Workspace({
|
|
|
301
303
|
|
|
302
304
|
**env** (`Record<string, string>`): Environment variables baked into the deployed function source. These are embedded at deploy time, not set dynamically.
|
|
303
305
|
|
|
306
|
+
**workingDirectory** (`string`): Default directory for command execution when no per-command cwd is given. A per-command cwd always wins. When omitted, commands fall back to /tmp and sandbox.workingDirectory stays undefined.
|
|
307
|
+
|
|
304
308
|
**commandTimeout** (`number`): Per-invocation command timeout in milliseconds. (Default: `55000`)
|
|
305
309
|
|
|
306
310
|
**instructions** (`string | ((opts) => string)`): Custom instructions that override the default instructions returned by getInstructions(). Pass a string to fully replace, or a function to extend the defaults.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Vercel
|
|
6
6
|
|
|
7
|
-
Vercel aggregates models from multiple providers with enhanced features like rate limiting and failover. Access
|
|
7
|
+
Vercel aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 363 models through Mastra's model router.
|
|
8
8
|
|
|
9
9
|
Learn more in the [Vercel documentation](https://ai-sdk.dev/providers/ai-sdk-providers).
|
|
10
10
|
|
|
@@ -385,6 +385,7 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
385
385
|
| `voyage/voyage-law-2` |
|
|
386
386
|
| `xiaomi/mimo-v2.5` |
|
|
387
387
|
| `xiaomi/mimo-v2.5-pro` |
|
|
388
|
+
| `xiaomi/mimo-v2.5-pro-ultraspeed` |
|
|
388
389
|
| `zai/glm-4.5` |
|
|
389
390
|
| `zai/glm-4.5-air` |
|
|
390
391
|
| `zai/glm-4.5v` |
|
|
@@ -48,7 +48,7 @@ for await (const chunk of stream) {
|
|
|
48
48
|
| `chutes/Qwen/Qwen3-32B-TEE` | 41K | | | | | | $0.10 | $0.42 |
|
|
49
49
|
| `chutes/Qwen/Qwen3.5-397B-A17B-TEE` | 262K | | | | | | $0.45 | $3 |
|
|
50
50
|
| `chutes/Qwen/Qwen3.6-27B-TEE` | 262K | | | | | | $0.30 | $2 |
|
|
51
|
-
| `chutes/Qwen/Qwen3.8-27B-TEE` | 262K | | | | | | $0.
|
|
51
|
+
| `chutes/Qwen/Qwen3.8-27B-TEE` | 262K | | | | | | $0.32 | $3 |
|
|
52
52
|
| `chutes/unsloth/Mistral-Nemo-Instruct-2407-TEE` | 131K | | | | | | $0.02 | $0.10 |
|
|
53
53
|
| `chutes/zai-org/GLM-5.1-TEE` | 203K | | | | | | $0.98 | $3 |
|
|
54
54
|
| `chutes/zai-org/GLM-5.2-TEE` | 1.0M | | | | | | $1 | $4 |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Cortecs
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 111 Cortecs models through Mastra's model router. Authentication is handled automatically using the `CORTECS_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [Cortecs documentation](https://cortecs.ai).
|
|
10
10
|
|
|
@@ -56,7 +56,7 @@ for await (const chunk of stream) {
|
|
|
56
56
|
| `cortecs/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.13 | $0.28 |
|
|
57
57
|
| `cortecs/deepseek-v4-pro` | 1.0M | | | | | | $2 | $3 |
|
|
58
58
|
| `cortecs/deepseek-v4-pro-0813` | 1.0M | | | | | | $2 | $4 |
|
|
59
|
-
| `cortecs/devstral-2512` |
|
|
59
|
+
| `cortecs/devstral-2512` | 256K | | | | | | $0.48 | $2 |
|
|
60
60
|
| `cortecs/gemini-2.5-flash` | 1.0M | | | | | | $0.30 | $2 |
|
|
61
61
|
| `cortecs/gemini-2.5-pro` | 1.0M | | | | | | $1 | $10 |
|
|
62
62
|
| `cortecs/gemini-3.1-flash-lite` | 1.0M | | | | | | $0.27 | $2 |
|
|
@@ -105,7 +105,7 @@ for await (const chunk of stream) {
|
|
|
105
105
|
| `cortecs/minicpm-v-4.5` | 32K | | | | | | $0.65 | $1 |
|
|
106
106
|
| `cortecs/minimax-m2` | 400K | | | | | | $0.35 | $1 |
|
|
107
107
|
| `cortecs/minimax-m2.1` | 196K | | | | | | $0.36 | $1 |
|
|
108
|
-
| `cortecs/minimax-m2.5` |
|
|
108
|
+
| `cortecs/minimax-m2.5` | 196K | | | | | | $0.30 | $1 |
|
|
109
109
|
| `cortecs/minimax-m2.7` | 197K | | | | | | $0.67 | $3 |
|
|
110
110
|
| `cortecs/minimax-m3` | 1.0M | | | | | | $0.40 | $2 |
|
|
111
111
|
| `cortecs/ministral-14b-2512` | 256K | | | | | | $0.22 | $0.22 |
|
|
@@ -115,7 +115,6 @@ for await (const chunk of stream) {
|
|
|
115
115
|
| `cortecs/mistral-7b-instruct-v0.3` | 127K | | | | | | $0.11 | $0.11 |
|
|
116
116
|
| `cortecs/mistral-large-2402` | 32K | | | | | | $4 | $13 |
|
|
117
117
|
| `cortecs/mistral-large-2512` | 256K | | | | | | $0.56 | $2 |
|
|
118
|
-
| `cortecs/mistral-medium-2508` | 128K | | | | | | $0.45 | $2 |
|
|
119
118
|
| `cortecs/mistral-medium-3.5` | 256K | | | | | | $1 | $7 |
|
|
120
119
|
| `cortecs/mistral-nemo-instruct-2407` | 128K | | | | | | $0.14 | $0.14 |
|
|
121
120
|
| `cortecs/mistral-small-2503` | 128K | | | | | | $0.11 | $0.33 |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Eden AI
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 240 Eden AI models through Mastra's model router. Authentication is handled automatically using the `EDENAI_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [Eden AI documentation](https://docs.edenai.co).
|
|
10
10
|
|
|
@@ -112,6 +112,7 @@ for await (const chunk of stream) {
|
|
|
112
112
|
| `edenai/flexai/gpt-oss-20b` | 131K | | | | | | $0.02 | $0.10 |
|
|
113
113
|
| `edenai/flexai/Muse-Glimmer-30B` | 131K | | | | | | $0.30 | $1 |
|
|
114
114
|
| `edenai/flexai/Nemotron-3-Super-120B-A12B` | 262K | | | | | | $0.09 | $0.40 |
|
|
115
|
+
| `edenai/flexai/Step-3.7-Flash` | 262K | | | | | | $0.20 | $1 |
|
|
115
116
|
| `edenai/google/gemini-2.5-flash-image` | 33K | | | | | | $0.30 | $3 |
|
|
116
117
|
| `edenai/google/gemini-3-flash-preview` | 1.0M | | | | | | $0.50 | $3 |
|
|
117
118
|
| `edenai/google/gemini-3-pro-image` | 66K | | | | | | $2 | $12 |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# IteraCompute
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 2 IteraCompute models through Mastra's model router. Authentication is handled automatically using the `ITERACOMPUTE_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [IteraCompute documentation](https://iteracompute.com/docs.html).
|
|
10
10
|
|
|
@@ -19,7 +19,7 @@ const agent = new Agent({
|
|
|
19
19
|
id: "my-agent",
|
|
20
20
|
name: "My Agent",
|
|
21
21
|
instructions: "You are a helpful assistant",
|
|
22
|
-
model: "iteracompute/iteracompute/
|
|
22
|
+
model: "iteracompute/iteracompute/ornith-1.5-35b-a3b"
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
// Generate a response
|
|
@@ -36,9 +36,10 @@ for await (const chunk of stream) {
|
|
|
36
36
|
|
|
37
37
|
## Models
|
|
38
38
|
|
|
39
|
-
| Model
|
|
40
|
-
|
|
|
41
|
-
| `iteracompute/iteracompute/
|
|
39
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
40
|
+
| ---------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
41
|
+
| `iteracompute/iteracompute/ornith-1.5-35b-a3b` | 328K | | | | | | $0.30 | $3 |
|
|
42
|
+
| `iteracompute/iteracompute/qwen3.8-27b` | 328K | | | | | | $0.30 | $3 |
|
|
42
43
|
|
|
43
44
|
## Advanced configuration
|
|
44
45
|
|
|
@@ -50,7 +51,7 @@ const agent = new Agent({
|
|
|
50
51
|
name: "custom-agent",
|
|
51
52
|
model: {
|
|
52
53
|
url: "https://api.iteracompute.com/v1",
|
|
53
|
-
id: "iteracompute/iteracompute/
|
|
54
|
+
id: "iteracompute/iteracompute/ornith-1.5-35b-a3b",
|
|
54
55
|
apiKey: process.env.ITERACOMPUTE_API_KEY,
|
|
55
56
|
headers: {
|
|
56
57
|
"X-Custom-Header": "value"
|
|
@@ -69,7 +70,7 @@ const agent = new Agent({
|
|
|
69
70
|
const useAdvanced = requestContext.task === "complex";
|
|
70
71
|
return useAdvanced
|
|
71
72
|
? "iteracompute/iteracompute/qwen3.8-27b"
|
|
72
|
-
: "iteracompute/iteracompute/
|
|
73
|
+
: "iteracompute/iteracompute/ornith-1.5-35b-a3b";
|
|
73
74
|
}
|
|
74
75
|
});
|
|
75
76
|
```
|
|
@@ -150,7 +150,7 @@ for await (const chunk of stream) {
|
|
|
150
150
|
| `kilo/kwaipilot/kat-coder-pro-v2` | 262K | | | | | | $0.30 | $1 |
|
|
151
151
|
| `kilo/kwaipilot/kat-coder-pro-v2.5` | 262K | | | | | | $0.74 | $3 |
|
|
152
152
|
| `kilo/liquid/lfm-2.5-2.6b:free` | 66K | | | | | | — | — |
|
|
153
|
-
| `kilo/mancer/weaver` | 8K | | | | | | $0.
|
|
153
|
+
| `kilo/mancer/weaver` | 8K | | | | | | $0.40 | $0.75 |
|
|
154
154
|
| `kilo/meituan/longcat-2.0` | 1.0M | | | | | | $0.75 | $3 |
|
|
155
155
|
| `kilo/meituan/longcat-2.0-free` | 1.0M | | | | | | — | — |
|
|
156
156
|
| `kilo/meta-llama/llama-3.1-70b-instruct` | 131K | | | | | | $0.40 | $0.40 |
|
|
@@ -159,7 +159,7 @@ for await (const chunk of stream) {
|
|
|
159
159
|
| `kilo/meta-llama/llama-3.2-3b-instruct` | 131K | | | | | | $0.05 | $0.33 |
|
|
160
160
|
| `kilo/meta-llama/llama-3.3-70b-instruct` | 128K | | | | | | $0.10 | $0.32 |
|
|
161
161
|
| `kilo/meta-llama/llama-4-maverick` | 128K | | | | | | $0.20 | $0.70 |
|
|
162
|
-
| `kilo/meta-llama/llama-4-scout` |
|
|
162
|
+
| `kilo/meta-llama/llama-4-scout` | 328K | | | | | | $0.10 | $0.30 |
|
|
163
163
|
| `kilo/meta-llama/llama-guard-4-12b` | 164K | | | | | | $0.18 | $0.18 |
|
|
164
164
|
| `kilo/meta/muse-glimmer-30b` | 131K | | | | | | $0.30 | $1 |
|
|
165
165
|
| `kilo/meta/muse-spark-1.1` | 1.0M | | | | | | $1 | $4 |
|
|
@@ -365,7 +365,7 @@ for await (const chunk of stream) {
|
|
|
365
365
|
| `kilo/tencent/hy-mt2-1.8b` | 8K | | | | | | $0.04 | $0.18 |
|
|
366
366
|
| `kilo/tencent/hy-mt2-30b-a3b` | 8K | | | | | | $0.07 | $0.29 |
|
|
367
367
|
| `kilo/tencent/hy-mt2-7b` | 8K | | | | | | $0.07 | $0.29 |
|
|
368
|
-
| `kilo/tencent/hy3` | 262K | | | | | | $0.
|
|
368
|
+
| `kilo/tencent/hy3` | 262K | | | | | | $0.14 | $0.58 |
|
|
369
369
|
| `kilo/tencent/hy3-preview` | 262K | | | | | | $0.18 | $0.60 |
|
|
370
370
|
| `kilo/tencent/hy4-preview` | 1.0M | | | | | | $0.83 | $3 |
|
|
371
371
|
| `kilo/thedrummer/cydonia-24b-v4.1` | 131K | | | | | | $0.30 | $0.50 |
|
|
@@ -375,7 +375,7 @@ for await (const chunk of stream) {
|
|
|
375
375
|
| `kilo/thinkingmachines/inkling-small` | 524K | | | | | | $0.45 | $1 |
|
|
376
376
|
| `kilo/thinkingmachines/inkling-small:free` | 1.0M | | | | | | — | — |
|
|
377
377
|
| `kilo/thinkingmachines/inkling:free` | 1.0M | | | | | | — | — |
|
|
378
|
-
| `kilo/undi95/remm-slerp-l2-13b` | 6K | | | | | | $0.
|
|
378
|
+
| `kilo/undi95/remm-slerp-l2-13b` | 6K | | | | | | $0.35 | $0.65 |
|
|
379
379
|
| `kilo/upstage/solar-pro-3` | 131K | | | | | | $0.15 | $0.60 |
|
|
380
380
|
| `kilo/upstage/solar-pro4` | 524K | | | | | | $0.30 | $1 |
|
|
381
381
|
| `kilo/writer/palmyra-x5` | 1.0M | | | | | | $0.60 | $6 |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Vancine
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 10 Vancine models through Mastra's model router. Authentication is handled automatically using the `VANCINE_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [Vancine documentation](https://vancine.com/docs).
|
|
10
10
|
|
|
@@ -19,7 +19,7 @@ const agent = new Agent({
|
|
|
19
19
|
id: "my-agent",
|
|
20
20
|
name: "My Agent",
|
|
21
21
|
instructions: "You are a helpful assistant",
|
|
22
|
-
model: "vancine/
|
|
22
|
+
model: "vancine/MiniMax-M3"
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
// Generate a response
|
|
@@ -45,8 +45,6 @@ for await (const chunk of stream) {
|
|
|
45
45
|
| `vancine/glm-5.3-flash` | 1.0M | | | | | | $0.06 | $0.20 |
|
|
46
46
|
| `vancine/hy4-preview` | 1.0M | | | | | | $0.67 | $2 |
|
|
47
47
|
| `vancine/kimi-k3` | 1.0M | | | | | | $2 | $12 |
|
|
48
|
-
| `vancine/LongCat-2.0` | 1.0M | | | | | | $0.24 | $0.96 |
|
|
49
|
-
| `vancine/mimo-v2.5-pro` | 1.0M | | | | | | $0.35 | $0.70 |
|
|
50
48
|
| `vancine/MiniMax-M3` | 1.0M | | | | | | $0.24 | $0.96 |
|
|
51
49
|
| `vancine/qwen3.8-flash` | 1.0M | | | | | | $0.12 | $0.38 |
|
|
52
50
|
| `vancine/qwen3.8-max` | 1.0M | | | | | | $2 | $5 |
|
|
@@ -61,7 +59,7 @@ const agent = new Agent({
|
|
|
61
59
|
name: "custom-agent",
|
|
62
60
|
model: {
|
|
63
61
|
url: "https://vancine.com/v1",
|
|
64
|
-
id: "vancine/
|
|
62
|
+
id: "vancine/MiniMax-M3",
|
|
65
63
|
apiKey: process.env.VANCINE_API_KEY,
|
|
66
64
|
headers: {
|
|
67
65
|
"X-Custom-Header": "value"
|
|
@@ -80,7 +78,7 @@ const agent = new Agent({
|
|
|
80
78
|
const useAdvanced = requestContext.task === "complex";
|
|
81
79
|
return useAdvanced
|
|
82
80
|
? "vancine/qwen3.8-max"
|
|
83
|
-
: "vancine/
|
|
81
|
+
: "vancine/MiniMax-M3";
|
|
84
82
|
}
|
|
85
83
|
});
|
|
86
84
|
```
|
|
@@ -200,7 +200,7 @@ Returns: `Promise<Session<TState> | undefined>`
|
|
|
200
200
|
|
|
201
201
|
#### `onSessionCreated(listener, options?)`
|
|
202
202
|
|
|
203
|
-
Subscribe to process-local notifications after `createSession()` materializes a new live session
|
|
203
|
+
Subscribe to process-local notifications after `createSession()` materializes a new live session, with isolated listener errors prevented from affecting other listeners. Call the returned function to unsubscribe.
|
|
204
204
|
|
|
205
205
|
By default listeners are fire-and-forget. Pass `{ blocking: true }` to make `createSession()` await the listener before resolving the new session, so the host can prepare session state before the caller can start a run. Blocking listeners run sequentially in registration order, before fire-and-forget listeners are notified. A blocking listener must not call `createSession()` for the same `(resourceId, scope)` pair. That call would await its own hydration and deadlock.
|
|
206
206
|
|
|
@@ -225,7 +225,7 @@ Returns: `() => void`
|
|
|
225
225
|
|
|
226
226
|
#### `onSessionDeleted(listener)`
|
|
227
227
|
|
|
228
|
-
Subscribe to process-local notifications after `deleteSession()` tears down a live session
|
|
228
|
+
Subscribe to process-local notifications after `deleteSession()` tears down a live session, with isolated listener errors prevented from affecting other listeners. Call the returned function to unsubscribe.
|
|
229
229
|
|
|
230
230
|
```typescript
|
|
231
231
|
const unsubscribe = controller.onSessionDeleted(session => {
|
|
@@ -745,7 +745,7 @@ const state = session.state.get()
|
|
|
745
745
|
|
|
746
746
|
### `session.state.set(updates)`
|
|
747
747
|
|
|
748
|
-
Merge a partial update into the state.
|
|
748
|
+
Merge a partial update into the state. The queue applies concurrent calls in order and validates them against the schema before emitting `state_changed` with the changed keys.
|
|
749
749
|
|
|
750
750
|
```typescript
|
|
751
751
|
await session.state.set({ yolo: true })
|
|
@@ -753,7 +753,7 @@ await session.state.set({ yolo: true })
|
|
|
753
753
|
|
|
754
754
|
### `session.state.update(updater)`
|
|
755
755
|
|
|
756
|
-
Run an updater against the current snapshot and apply its result atomically within the write queue. Use this for read-modify-write changes that must see the latest state. The updater returns `updates`
|
|
756
|
+
Run an updater against the current snapshot and apply its result atomically within the write queue. Use this for read-modify-write changes that must see the latest state. The updater returns mergeable `updates` and optional `events`, plus the `result` value that `update()` resolves to.
|
|
757
757
|
|
|
758
758
|
```typescript
|
|
759
759
|
const added = await session.state.update(current => ({
|
|
@@ -766,7 +766,7 @@ const added = await session.state.update(current => ({
|
|
|
766
766
|
|
|
767
767
|
A `Session` is a live runtime object. Its event bus, arbitrary `session.state`, permission rules, permission grants, pending approvals, suspensions, follow-ups, run state, and stream state don't automatically survive controller or process recreation. The host must restore any of this state when recreating a session.
|
|
768
768
|
|
|
769
|
-
|
|
769
|
+
Configured storage persists threads and messages along with token usage, while thread settings restore mode and model choices. Restored settings can include observational memory and subagent model selections with per-agent-type overrides. A chat channel can map back to stored threads. However, `AgentControllerChannels` keeps channel-to-session and auto-approval state in memory.
|
|
770
770
|
|
|
771
771
|
## Related
|
|
772
772
|
|
|
@@ -178,7 +178,7 @@ const { output, cleanup } = await durableAgent.observe(runId, {
|
|
|
178
178
|
await output.text
|
|
179
179
|
```
|
|
180
180
|
|
|
181
|
-
By default `observe()` waits indefinitely for events. If the process running the run stops unexpectedly, the run stops producing events but never emits a completion event, so the observed stream would wait forever. Pass `idleTimeoutMs` to
|
|
181
|
+
By default `observe()` waits indefinitely for events. If the process running the run stops unexpectedly, the run stops producing events but never emits a completion event, so the observed stream would wait forever. Pass `idleTimeoutMs` to end the stream after a bounded period of silence. Before timing out, `observe()` can consult an optional `isAlive` check. Return `true` while work continues, such as during a long-running tool call or a pause for human input. A `false` result ends the stream with an error, as does omitting `isAlive`. A transient throw from `isAlive` is treated as "still alive", so a momentary check failure never ends a live stream.
|
|
182
182
|
|
|
183
183
|
```typescript
|
|
184
184
|
const { output } = await durableAgent.observe(runId, {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
> **Warning:** **Deprecated**: This method is deprecated and only works with V1 models. For V2 models, use the new [`.getDefaultOptions()`](https://mastra.ai/reference/agents/getDefaultOptions) method instead.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Configure agents with default generation options that control model behavior and output formatting, including tool and workflow calls. The `.getDefaultGenerateOptionsLegacy()` method retrieves these defaults and resolves any functions. These options apply to all `generateLegacy()` calls unless overridden and are useful for inspecting an agent’s unknown defaults.
|
|
10
10
|
|
|
11
11
|
## Usage example
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
**Added in:** `@mastra/core@1.43.0`
|
|
8
8
|
|
|
9
|
-
The `.listSuspendedRuns()` method
|
|
9
|
+
The `.listSuspendedRuns()` method uses workflow snapshot storage to find suspended agent runs, including runs awaiting [approval](https://mastra.ai/docs/agents/human-in-the-loop) for a tool call and runs paused by a tool that called `suspend()`. Storage-backed discovery continues to work after a server restart and across multiple server instances.
|
|
10
10
|
|
|
11
11
|
Pass the returned `runId` to [`resumeStream()`](https://mastra.ai/docs/agents/human-in-the-loop), `approveToolCall()`, or `declineToolCall()` to continue the run.
|
|
12
12
|
|
|
@@ -85,7 +85,7 @@ interface AgentRunToolCall {
|
|
|
85
85
|
|
|
86
86
|
## Discovery scope
|
|
87
87
|
|
|
88
|
-
Results are scoped to
|
|
88
|
+
Results are scoped to the agent you call `listSuspendedRuns()` on because snapshots persist the owning agent's id. Runs started by other agents on the same Mastra instance aren't returned. In [supervisor setups](https://mastra.ai/docs/agents/human-in-the-loop), the supervisor sees its outer run to resume, while a subagent's inner run is visible only from the subagent itself. Filter by `threadId` and `resourceId` to limit results to one conversation.
|
|
89
89
|
|
|
90
90
|
Run snapshots are only persisted while a run is waiting on input and are deleted when it finishes, so suspended runs are the only runs discoverable from storage. Suspended runs only survive restarts when the Mastra instance has a persistent [storage provider](https://mastra.ai/docs/storage) configured. With the default in-memory store, snapshots are lost on restart.
|
|
91
91
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# chatRoute()
|
|
6
6
|
|
|
7
|
-
Creates a chat route handler for streaming agent conversations
|
|
7
|
+
Creates a chat route handler for streaming agent conversations in AI SDK format. The function registers an HTTP `POST` endpoint that accepts messages and executes an agent before streaming the response to the client in AI SDK-compatible format. Use it inside a [custom API route](https://mastra.ai/docs/server/custom-api-routes).
|
|
8
8
|
|
|
9
9
|
Use [`handleChatStream()`](https://mastra.ai/reference/ai-sdk/handle-chat-stream) if you need a framework-agnostic handler.
|
|
10
10
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
> **Deprecated:** Agent networks are deprecated and will be removed in a future release. Use [supervisor agents](https://mastra.ai/docs/subagents) with `agent.stream()` or `agent.generate()` instead. See the [migration guide](https://mastra.ai/reference/migrations/network-to-supervisor) to upgrade.
|
|
8
8
|
|
|
9
|
-
Creates a network route handler for streaming network execution
|
|
9
|
+
Creates a network route handler for streaming network execution in AI SDK format. The function registers an HTTP `POST` endpoint that accepts messages and executes an agent network before streaming the response to the client in AI SDK-compatible format. Agent networks let a routing agent delegate tasks to other agents. Use this function inside a [custom API route](https://mastra.ai/docs/server/custom-api-routes).
|
|
10
10
|
|
|
11
11
|
Use [`handleNetworkStream()`](https://mastra.ai/reference/ai-sdk/handle-network-stream) if you need a framework-agnostic handler.
|
|
12
12
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# workflowRoute()
|
|
6
6
|
|
|
7
|
-
Creates a workflow route handler for streaming workflow execution
|
|
7
|
+
Creates a workflow route handler for streaming workflow execution in AI SDK format. The function registers an HTTP `POST` endpoint that accepts input data and executes a workflow before streaming the response to the client in AI SDK-compatible format. Use it inside a [custom API route](https://mastra.ai/docs/server/custom-api-routes).
|
|
8
8
|
|
|
9
9
|
Use [`handleWorkflowStream()`](https://mastra.ai/reference/ai-sdk/handle-workflow-stream) if you need a framework-agnostic handler.
|
|
10
10
|
|
|
@@ -88,7 +88,7 @@ When `cdpUrl` is provided, `BrowserViewer` connects to the existing browser inst
|
|
|
88
88
|
|
|
89
89
|
#### `launch(threadId?)`
|
|
90
90
|
|
|
91
|
-
Launches Chrome
|
|
91
|
+
Launches Chrome with either a single shared browser for `'shared'` scope or a browser for the specified thread when using `'thread'` scope.
|
|
92
92
|
|
|
93
93
|
```typescript
|
|
94
94
|
await viewer.launch()
|