@mastra/mcp-docs-server 1.2.7-alpha.12 → 1.2.7-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.
- package/.docs/docs/agent-builder/integrations.md +2 -44
- package/.docs/docs/agent-builder/overview.md +3 -4
- package/.docs/docs/agent-builder/skill-registries.md +3 -1
- package/.docs/docs/agent-controller/overview.md +2 -3
- package/.docs/docs/agent-controller/session.md +3 -1
- package/.docs/docs/agents/a2a.md +1 -2
- package/.docs/docs/agents/channels.md +225 -0
- package/.docs/docs/agents/code-mode.md +1 -1
- package/.docs/docs/agents/file-based-agents.md +297 -0
- package/.docs/docs/agents/guardrails.md +9 -10
- package/.docs/docs/agents/overview.md +4 -4
- package/.docs/docs/agents/skills.md +5 -3
- package/.docs/docs/agents/structured-output.md +1 -1
- package/.docs/docs/agents/supervisor-agents.md +4 -3
- package/.docs/docs/agents/using-tools.md +4 -2
- package/.docs/docs/browser/agent-browser.md +3 -1
- package/.docs/docs/browser/browser-viewer.md +3 -1
- package/.docs/docs/browser/overview.md +1 -2
- package/.docs/docs/browser/stagehand.md +1 -1
- package/.docs/docs/deployment/mastra-server.md +4 -2
- package/.docs/docs/editor/overview.md +6 -2
- package/.docs/docs/editor/prompts.md +1 -1
- package/.docs/docs/editor/tools.md +5 -3
- package/.docs/docs/evals/custom-scorers.md +3 -1
- package/.docs/docs/evals/datasets/overview.md +5 -4
- package/.docs/docs/evals/datasets/running-experiments.md +2 -4
- package/.docs/docs/evals/evals-with-memory.md +3 -1
- package/.docs/docs/evals/gates-and-verdicts.md +3 -1
- package/.docs/docs/evals/overview.md +1 -4
- package/.docs/docs/evals/quick-checks.md +3 -1
- package/.docs/docs/long-running-agents/background-tasks.md +1 -1
- package/.docs/docs/long-running-agents/durable-agents.md +5 -3
- package/.docs/docs/long-running-agents/goals.md +3 -1
- package/.docs/docs/long-running-agents/signal-providers.md +3 -1
- package/.docs/docs/long-running-agents/signals.md +22 -11
- package/.docs/docs/mastra-platform/observability.md +1 -5
- package/.docs/docs/mcp/mcp-apps.md +3 -3
- package/.docs/docs/mcp/overview.md +10 -6
- package/.docs/docs/memory/observational-memory.md +1 -2
- package/.docs/docs/memory/overview.md +4 -6
- package/.docs/docs/memory/semantic-recall.md +1 -1
- package/.docs/docs/memory/working-memory.md +3 -3
- package/.docs/docs/observability/integrations/exporters/mastra-platform.md +3 -1
- package/.docs/docs/observability/logging.md +1 -1
- package/.docs/docs/observability/tracing/overview.md +1 -1
- package/.docs/docs/server/auth/auth0.md +1 -1
- package/.docs/docs/server/auth/better-auth.md +2 -2
- package/.docs/docs/server/auth/clerk.md +1 -1
- package/.docs/docs/server/auth/firebase.md +1 -1
- package/.docs/docs/server/auth/google.md +2 -2
- package/.docs/docs/server/auth/jwt.md +2 -2
- package/.docs/docs/server/auth/okta.md +2 -2
- package/.docs/docs/server/auth/workos.md +1 -1
- package/.docs/docs/server/mastra-client.md +1 -1
- package/.docs/docs/server/mastra-server.md +1 -1
- package/.docs/docs/server/pubsub.md +1 -1
- package/.docs/docs/server/request-context.md +4 -4
- package/.docs/docs/server/server-adapters.md +8 -8
- package/.docs/docs/studio/auth.md +3 -1
- package/.docs/docs/studio/overview.md +1 -1
- package/.docs/docs/voice/livekit.md +3 -100
- package/.docs/docs/workflows/agents-and-tools.md +5 -3
- package/.docs/docs/workflows/control-flow.md +3 -1
- package/.docs/docs/workflows/overview.md +7 -6
- package/.docs/docs/workspace/overview.md +1 -2
- package/.docs/docs/workspace/sandbox.md +0 -2
- package/.docs/guides/build-your-ui/assistant-ui.md +1 -1
- package/.docs/guides/build-your-ui/copilotkit/overview.md +1 -1
- package/.docs/guides/concepts/streaming.md +3 -3
- package/.docs/guides/getting-started/quickstart.md +1 -3
- package/.docs/guides/guide/chef-michel.md +2 -0
- package/.docs/guides/guide/slack-assistant.md +2 -2
- package/.docs/guides/guide/stock-agent.md +2 -0
- package/.docs/models/environment-variables.md +0 -7
- package/.docs/models/gateways/netlify.md +1 -4
- package/.docs/models/gateways/openrouter.md +7 -10
- package/.docs/models/gateways/vercel.md +1 -8
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/abacus.md +14 -44
- package/.docs/models/providers/google.md +1 -2
- package/.docs/models/providers/llmgateway.md +181 -185
- package/.docs/models/providers/nano-gpt.md +2 -2
- package/.docs/models/providers/neon.md +29 -40
- package/.docs/models/providers/nvidia.md +3 -1
- package/.docs/models/providers/openai.md +1 -6
- package/.docs/models/providers/opencode.md +2 -6
- package/.docs/models/providers/poolside.md +5 -6
- package/.docs/models/providers/routing-run.md +34 -23
- package/.docs/models/providers/the-grid-ai.md +3 -3
- package/.docs/models/providers/wandb.md +14 -21
- package/.docs/models/providers/xai.md +1 -2
- package/.docs/models/providers.md +0 -7
- package/.docs/reference/agents/channels.md +2 -2
- package/.docs/reference/channels/channel-provider.md +1 -1
- package/.docs/reference/channels/slack-provider.md +2 -2
- package/.docs/reference/cli/mastra.md +10 -117
- package/.docs/reference/evals/create-scorer.md +0 -8
- package/.docs/reference/index.md +0 -17
- package/.docs/reference/memory/memory-class.md +1 -1
- package/.docs/reference/memory/serialized-memory-config.md +1 -1
- package/.docs/reference/project-structure.md +1 -1
- package/.docs/reference/pubsub/lease-provider.md +1 -1
- package/.docs/reference/server/express-adapter.md +3 -1
- package/.docs/reference/server/fastify-adapter.md +3 -1
- package/.docs/reference/server/hono-adapter.md +3 -1
- package/.docs/reference/server/koa-adapter.md +3 -1
- package/.docs/reference/server/nestjs-adapter.md +3 -1
- package/.docs/reference/storage/clickhouse.md +0 -32
- package/.docs/reference/storage/composite.md +1 -27
- package/.docs/reference/storage/retention.md +0 -11
- package/.docs/reference/tools/mcp-client.md +0 -22
- package/.docs/reference/tools/mcp-server.md +4 -161
- package/.docs/reference/voice/livekit.md +8 -272
- package/.docs/reference/workspace/agentcore-runtime-sandbox.md +3 -1
- package/.docs/reference/workspace/agentfs-filesystem.md +3 -1
- package/.docs/reference/workspace/apple-container-sandbox.md +3 -1
- package/.docs/reference/workspace/archil-filesystem.md +3 -1
- package/.docs/reference/workspace/azure-blob-filesystem.md +3 -1
- package/.docs/reference/workspace/blaxel-sandbox.md +3 -1
- package/.docs/reference/workspace/daytona-sandbox.md +3 -1
- package/.docs/reference/workspace/docker-sandbox.md +3 -1
- package/.docs/reference/workspace/e2b-sandbox.md +3 -1
- package/.docs/reference/workspace/files-sdk-filesystem.md +3 -1
- package/.docs/reference/workspace/gcs-filesystem.md +3 -1
- package/.docs/reference/workspace/google-drive-filesystem.md +3 -1
- package/.docs/reference/workspace/local-filesystem.md +3 -1
- package/.docs/reference/workspace/local-sandbox.md +3 -1
- package/.docs/reference/workspace/modal-sandbox.md +3 -1
- package/.docs/reference/workspace/railway-sandbox.md +3 -1
- package/.docs/reference/workspace/s3-filesystem.md +3 -1
- package/.docs/reference/workspace/vercel-sandbox.md +7 -5
- package/.docs/reference/workspace/vercel-serverless.md +3 -1
- package/CHANGELOG.md +0 -29
- package/package.json +5 -5
- package/.docs/docs/capabilities/channels/discord.md +0 -98
- package/.docs/docs/capabilities/channels/other-adapters.md +0 -68
- package/.docs/docs/capabilities/channels/overview.md +0 -255
- package/.docs/docs/capabilities/channels/slack.md +0 -225
- package/.docs/docs/capabilities/channels/teams.md +0 -100
- package/.docs/docs/capabilities/channels/telegram.md +0 -98
- package/.docs/docs/capabilities/channels/whatsapp.md +0 -99
- package/.docs/docs/getting-started/file-based-agents.md +0 -116
- package/.docs/models/providers/crossmodel.md +0 -109
- package/.docs/models/providers/empiriolabs.md +0 -106
- package/.docs/models/providers/meta.md +0 -101
- package/.docs/models/providers/model-oracle-ai.md +0 -87
- package/.docs/models/providers/pioneer.md +0 -148
- package/.docs/models/providers/unorouter.md +0 -95
- package/.docs/models/providers/zenifra.md +0 -73
- package/.docs/reference/file-based-agents/config.md +0 -97
- package/.docs/reference/file-based-agents/instructions.md +0 -54
- package/.docs/reference/file-based-agents/logger.md +0 -26
- package/.docs/reference/file-based-agents/memory.md +0 -58
- package/.docs/reference/file-based-agents/observability.md +0 -32
- package/.docs/reference/file-based-agents/processors.md +0 -56
- package/.docs/reference/file-based-agents/scorers.md +0 -54
- package/.docs/reference/file-based-agents/server.md +0 -37
- package/.docs/reference/file-based-agents/skills.md +0 -56
- package/.docs/reference/file-based-agents/storage.md +0 -30
- package/.docs/reference/file-based-agents/studio.md +0 -56
- package/.docs/reference/file-based-agents/subagents.md +0 -123
- package/.docs/reference/file-based-agents/tools.md +0 -63
- package/.docs/reference/file-based-agents/workflows.md +0 -52
- package/.docs/reference/file-based-agents/workspace.md +0 -74
- package/.docs/reference/memory/summarizeConversation.md +0 -99
- package/.docs/reference/memory/summarizeThread.md +0 -93
|
@@ -82,7 +82,7 @@ export const mastra = new Mastra({
|
|
|
82
82
|
})
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
-
Visit [Middleware](https://mastra.ai/docs/server/middleware) for how to use server middleware.
|
|
85
|
+
> **Info:** Visit [Middleware](https://mastra.ai/docs/server/middleware) for how to use server middleware.
|
|
86
86
|
|
|
87
87
|
## Studio
|
|
88
88
|
|
|
@@ -188,7 +188,7 @@ export const registryAgent = new Agent({
|
|
|
188
188
|
})
|
|
189
189
|
```
|
|
190
190
|
|
|
191
|
-
Visit [Agent](https://mastra.ai/reference/agents/agent) for a full list of configuration options.
|
|
191
|
+
> **Info:** Visit [Agent](https://mastra.ai/reference/agents/agent) for a full list of configuration options.
|
|
192
192
|
|
|
193
193
|
## Accessing values from workflow steps
|
|
194
194
|
|
|
@@ -210,7 +210,7 @@ const stepOne = createStep({
|
|
|
210
210
|
})
|
|
211
211
|
```
|
|
212
212
|
|
|
213
|
-
Visit [createStep()](https://mastra.ai/reference/workflows/step) for a full list of configuration options.
|
|
213
|
+
> **Info:** Visit [createStep()](https://mastra.ai/reference/workflows/step) for a full list of configuration options.
|
|
214
214
|
|
|
215
215
|
## Accessing values with tools
|
|
216
216
|
|
|
@@ -232,7 +232,7 @@ export const weatherTool = createTool({
|
|
|
232
232
|
})
|
|
233
233
|
```
|
|
234
234
|
|
|
235
|
-
Visit [createTool()](https://mastra.ai/reference/tools/create-tool) for a full list of configuration options.
|
|
235
|
+
> **Info:** Visit [createTool()](https://mastra.ai/reference/tools/create-tool) for a full list of configuration options.
|
|
236
236
|
|
|
237
237
|
## Reserved keys
|
|
238
238
|
|
|
@@ -303,7 +303,7 @@ app.listen(4111, () => {
|
|
|
303
303
|
})
|
|
304
304
|
```
|
|
305
305
|
|
|
306
|
-
See the [Express Adapter](https://mastra.ai/reference/server/express-adapter) documentation for full configuration options.
|
|
306
|
+
> **Info:** See the [Express Adapter](https://mastra.ai/reference/server/express-adapter) documentation for full configuration options.
|
|
307
307
|
|
|
308
308
|
**Hono**:
|
|
309
309
|
|
|
@@ -324,7 +324,7 @@ serve({ fetch: app.fetch, port: 4111 }, () => {
|
|
|
324
324
|
})
|
|
325
325
|
```
|
|
326
326
|
|
|
327
|
-
See the [Hono Adapter](https://mastra.ai/reference/server/hono-adapter) documentation for full configuration options.
|
|
327
|
+
> **Info:** See the [Hono Adapter](https://mastra.ai/reference/server/hono-adapter) documentation for full configuration options.
|
|
328
328
|
|
|
329
329
|
**Fastify**:
|
|
330
330
|
|
|
@@ -352,7 +352,7 @@ app.listen({ port }, () => {
|
|
|
352
352
|
})
|
|
353
353
|
```
|
|
354
354
|
|
|
355
|
-
See the [Fastify Adapter](https://mastra.ai/reference/server/fastify-adapter) documentation for full configuration options.
|
|
355
|
+
> **Info:** See the [Fastify Adapter](https://mastra.ai/reference/server/fastify-adapter) documentation for full configuration options.
|
|
356
356
|
|
|
357
357
|
**Koa**:
|
|
358
358
|
|
|
@@ -387,7 +387,7 @@ app.listen(port, () => {
|
|
|
387
387
|
})
|
|
388
388
|
```
|
|
389
389
|
|
|
390
|
-
See the [Koa Adapter](https://mastra.ai/reference/server/koa-adapter) documentation for full configuration options.
|
|
390
|
+
> **Info:** See the [Koa Adapter](https://mastra.ai/reference/server/koa-adapter) documentation for full configuration options.
|
|
391
391
|
|
|
392
392
|
**NestJS**:
|
|
393
393
|
|
|
@@ -418,7 +418,7 @@ async function bootstrap() {
|
|
|
418
418
|
bootstrap()
|
|
419
419
|
```
|
|
420
420
|
|
|
421
|
-
See the [NestJS Adapter](https://mastra.ai/reference/server/nestjs-adapter) documentation for full configuration options.
|
|
421
|
+
> **Info:** See the [NestJS Adapter](https://mastra.ai/reference/server/nestjs-adapter) documentation for full configuration options.
|
|
422
422
|
|
|
423
423
|
## Initialization flow
|
|
424
424
|
|
|
@@ -460,7 +460,7 @@ You can add your own routes to the app alongside Mastra's routes.
|
|
|
460
460
|
- When you want Mastra-managed auth and route metadata such as `requiresAuth`, prefer `registerApiRoute()`.
|
|
461
461
|
- When you mount routes directly on the framework app, use the adapter's exported `createAuthMiddleware()` helper if those routes need Mastra auth.
|
|
462
462
|
|
|
463
|
-
Visit "Adding custom routes" for [Express](https://mastra.ai/reference/server/express-adapter) and [Hono](https://mastra.ai/reference/server/hono-adapter) for more information.
|
|
463
|
+
> **Info:** Visit "Adding custom routes" for [Express](https://mastra.ai/reference/server/express-adapter) and [Hono](https://mastra.ai/reference/server/hono-adapter) for more information.
|
|
464
464
|
|
|
465
465
|
## Route prefixes
|
|
466
466
|
|
|
@@ -513,7 +513,7 @@ const server = new MastraServer({
|
|
|
513
513
|
})
|
|
514
514
|
```
|
|
515
515
|
|
|
516
|
-
See [MastraServer](https://mastra.ai/reference/server/mastra-server) for full configuration options.
|
|
516
|
+
> **Info:** See [MastraServer](https://mastra.ai/reference/server/mastra-server) for full configuration options.
|
|
517
517
|
|
|
518
518
|
## Per-route auth overrides
|
|
519
519
|
|
|
@@ -540,7 +540,7 @@ const server = new MastraServer({
|
|
|
540
540
|
})
|
|
541
541
|
```
|
|
542
542
|
|
|
543
|
-
See [MastraServer](https://mastra.ai/reference/server/mastra-server) for full configuration options.
|
|
543
|
+
> **Info:** See [MastraServer](https://mastra.ai/reference/server/mastra-server) for full configuration options.
|
|
544
544
|
|
|
545
545
|
## Accessing the app
|
|
546
546
|
|
|
@@ -35,7 +35,9 @@ export const mastra = new Mastra({
|
|
|
35
35
|
})
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
Once configured, Studio shows a login screen and requires authentication for all API requests.
|
|
38
|
+
Once configured, Studio shows a login screen and requires authentication for all API requests.
|
|
39
|
+
|
|
40
|
+
> **Note:** Visit the [Auth docs](https://mastra.ai/docs/server/auth) for a full list of supported providers.
|
|
39
41
|
|
|
40
42
|
## How it works
|
|
41
43
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Studio provides an interactive UI for building, testing, and managing your agents, workflows, and tools. Run it locally during development, add [authentication](https://mastra.ai/docs/studio/auth), or [deploy it](https://mastra.ai/docs/studio/deployment) to production so your team can manage agents, monitor performance, and gain insights through built-in observability.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
[YouTube video player](https://www.youtube-nocookie.com/embed/ojGu6Bi4wYk)
|
|
8
8
|
|
|
9
9
|
## Start Studio
|
|
10
10
|
|
|
@@ -162,45 +162,6 @@ export default createLiveKitWorker({
|
|
|
162
162
|
|
|
163
163
|
See the [LiveKit turn detection docs](https://docs.livekit.io/agents/logic/turns/) for all options.
|
|
164
164
|
|
|
165
|
-
## Per-call voices and transcription
|
|
166
|
-
|
|
167
|
-
The top-level `stt` and `tts` options apply to every call. To pick them per call — one voice or language per tenant — set the `configuration.stt` and `configuration.tts` resolvers instead. Each resolver runs once per call with the dispatch metadata, request context, room name, and job context, and returns anything the matching top-level option accepts: a plugin instance or an inference model string. Return `undefined` to fall back to the top-level option.
|
|
168
|
-
|
|
169
|
-
The following example gives each tenant its own text-to-speech voice, keyed off the `tenant` entry in the dispatch metadata:
|
|
170
|
-
|
|
171
|
-
```typescript
|
|
172
|
-
import * as cartesia from '@livekit/agents-plugin-cartesia'
|
|
173
|
-
|
|
174
|
-
// One voice id per tenant, resolved from the dispatch metadata on each call.
|
|
175
|
-
const tenantVoices: Record<string, string> = {
|
|
176
|
-
meridian: 'your-cartesia-voice-id-1',
|
|
177
|
-
coastal: 'your-cartesia-voice-id-2',
|
|
178
|
-
}
|
|
179
|
-
// The resolver runs during call setup, so cache plugin instances across calls.
|
|
180
|
-
const ttsByVoice = new Map<string, cartesia.TTS>()
|
|
181
|
-
|
|
182
|
-
export default createLiveKitWorker({
|
|
183
|
-
mastra,
|
|
184
|
-
agent: 'support',
|
|
185
|
-
stt: 'deepgram/nova-3',
|
|
186
|
-
tts: 'cartesia/sonic-3',
|
|
187
|
-
configuration: {
|
|
188
|
-
tts: ({ requestContext }) => {
|
|
189
|
-
const voice = tenantVoices[requestContext?.tenant as string]
|
|
190
|
-
if (!voice) return undefined // fall back to the top-level `tts`
|
|
191
|
-
let tts = ttsByVoice.get(voice)
|
|
192
|
-
if (!tts) {
|
|
193
|
-
tts = new cartesia.TTS({ voice })
|
|
194
|
-
ttsByVoice.set(voice, tts)
|
|
195
|
-
}
|
|
196
|
-
return tts
|
|
197
|
-
},
|
|
198
|
-
},
|
|
199
|
-
})
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
`configuration.stt` works the same way for per-call transcription, for example a different transcription model or language per tenant. The greeting has a matching per-call form: `configuration.greeting.text` accepts a resolver with the same call context, so one worker can open with each tenant's own phrasing.
|
|
203
|
-
|
|
204
165
|
## Memory and threads
|
|
205
166
|
|
|
206
167
|
When the resolved Mastra agent has memory configured, each call becomes one memory thread:
|
|
@@ -211,7 +172,7 @@ When the resolved Mastra agent has memory configured, each call becomes one memo
|
|
|
211
172
|
|
|
212
173
|
Each turn sends only the new user input; Mastra Memory supplies history, semantic recall, and working memory. Pin a session to an existing thread by passing `threadId` in the connection request body, which is useful for continuing a text conversation by voice. In Studio, starting a call from an open chat binds the call to that thread, and the transcript fills into the chat after each exchange.
|
|
213
174
|
|
|
214
|
-
|
|
175
|
+
One caveat: when a user interrupts the agent, Mastra Memory stores the full generated reply even though the user only heard part of it. LiveKit's own transcript is truncated to what was spoken.
|
|
215
176
|
|
|
216
177
|
## Speak while tools run
|
|
217
178
|
|
|
@@ -228,13 +189,13 @@ export default createLiveKitWorker({
|
|
|
228
189
|
})
|
|
229
190
|
```
|
|
230
191
|
|
|
231
|
-
The phrase is spoken as part of the reply and
|
|
192
|
+
The phrase is spoken as part of the reply and shown in the transcript.
|
|
232
193
|
|
|
233
194
|
## Generate replies with a workflow
|
|
234
195
|
|
|
235
196
|
By default the worker generates each reply with a Mastra agent. To run multi-step logic per turn (for example classify intent, route, call tools in sequence, then compose a reply), generate replies with a Mastra [workflow](https://mastra.ai/docs/workflows/overview) instead. Set `workflow` in place of `agent`.
|
|
236
197
|
|
|
237
|
-
LiveKit still owns the audio loop and calls into Mastra once per turn, so the workflow runs to completion each turn.
|
|
198
|
+
LiveKit still owns the audio loop and calls into Mastra once per turn, so the workflow runs to completion each turn. Suspend and resume aren't available, and conversation state isn't carried between turns. Pass the transcript in through `workflowInput` so the workflow stays stateless:
|
|
238
199
|
|
|
239
200
|
```typescript
|
|
240
201
|
import { createLiveKitWorker, chatContextToMessages } from '@mastra/livekit/worker'
|
|
@@ -272,64 +233,6 @@ const generateResponse = createStep({
|
|
|
272
233
|
|
|
273
234
|
With a workflow, the worker doesn't persist turns automatically the way an agent's `stream()` does. Persist conversation history inside the workflow, or keep the LiveKit transcript as the source of truth and pass it in each turn.
|
|
274
235
|
|
|
275
|
-
## Use Mastra as the LLM component
|
|
276
|
-
|
|
277
|
-
`createLiveKitWorker()` owns the LiveKit session for you. To own the session yourself, use [`MastraLLM`](https://mastra.ai/reference/voice/livekit) instead: a standard LiveKit LLM plugin that puts a Mastra agent in the `llm` slot of your own `voice.AgentSession`. The Mastra app — agent loop, tools, memory, observability — runs on your Mastra server, and the worker reaches it over HTTP. The worker process needs no Mastra app, database, or model provider keys.
|
|
278
|
-
|
|
279
|
-
```typescript
|
|
280
|
-
import { fileURLToPath } from 'node:url'
|
|
281
|
-
import { defineAgent, voice } from '@livekit/agents'
|
|
282
|
-
import * as silero from '@livekit/agents-plugin-silero'
|
|
283
|
-
import { MastraLLM } from '@mastra/livekit/plugin'
|
|
284
|
-
import { runLiveKitWorker } from '@mastra/livekit/worker'
|
|
285
|
-
|
|
286
|
-
export default defineAgent({
|
|
287
|
-
entry: async ctx => {
|
|
288
|
-
await ctx.connect()
|
|
289
|
-
|
|
290
|
-
const session = new voice.AgentSession({
|
|
291
|
-
llm: new MastraLLM({
|
|
292
|
-
remote: { baseUrl: process.env.MASTRA_URL!, agentId: 'support' },
|
|
293
|
-
memory: { thread: ctx.room.name!, resource: 'user-7' },
|
|
294
|
-
}),
|
|
295
|
-
stt: 'deepgram/nova-3',
|
|
296
|
-
tts: 'cartesia/sonic-3',
|
|
297
|
-
vad: await silero.VAD.load(),
|
|
298
|
-
// Required with `memory`: LiveKit enables preemptive generation by default.
|
|
299
|
-
turnHandling: { preemptiveGeneration: { enabled: false } },
|
|
300
|
-
})
|
|
301
|
-
|
|
302
|
-
await session.start({
|
|
303
|
-
// These instructions never reach the Mastra agent; its own instructions apply.
|
|
304
|
-
agent: new voice.Agent({ instructions: 'Replies come from the Mastra agent.' }),
|
|
305
|
-
room: ctx.room,
|
|
306
|
-
})
|
|
307
|
-
|
|
308
|
-
session.say('Hi! How can I help you today?')
|
|
309
|
-
},
|
|
310
|
-
})
|
|
311
|
-
|
|
312
|
-
if (process.argv[1] === fileURLToPath(import.meta.url)) {
|
|
313
|
-
runLiveKitWorker({ entry: import.meta.url, agentName: 'mastra-voice' })
|
|
314
|
-
}
|
|
315
|
-
```
|
|
316
|
-
|
|
317
|
-
Both paths share the same reply pipeline underneath; choose by who should own the session:
|
|
318
|
-
|
|
319
|
-
| | `createLiveKitWorker()` | `MastraLLM` |
|
|
320
|
-
| ------------------------- | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------- |
|
|
321
|
-
| Session ownership | The worker helper builds and manages the `AgentSession` | Your code builds the session; every LiveKit option and hook is yours |
|
|
322
|
-
| Where the Mastra app runs | In the worker process | On your Mastra server, reached over HTTP (or in-process via `agent`) |
|
|
323
|
-
| Worker process needs | Your Mastra app, storage, and model provider keys | Only the LiveKit SDK and network access to your server |
|
|
324
|
-
| Built-in conveniences | Greeting, consent gating, agent-initiated hang-up, thread bootstrap, observability roll-up | Rebuild what you need with the [session helpers](https://mastra.ai/reference/voice/livekit) |
|
|
325
|
-
| Best for | Fastest path to a working voice agent; Studio voice mode | Existing LiveKit apps and full control over the session |
|
|
326
|
-
|
|
327
|
-
Tools stay on the Mastra agent and execute on the server; LiveKit-side tools passed to the session are ignored. Tool activity reaches the worker through `toolFeedback` (spoken filler), `onToolCall` (fires as each tool call starts), and `onTurnComplete` (fires after each reply with the text, tool calls, and token usage). Agent-initiated hang-up takes a few lines: pair `onToolCall` with [`runEndCall()`](https://mastra.ai/reference/voice/livekit).
|
|
328
|
-
|
|
329
|
-
> **Warning:** Don't combine the `memory` option with LiveKit's `preemptiveGeneration`, which LiveKit enables by default in sessions you build yourself. A speculative turn that completes before LiveKit discards it persists a user message and a never-spoken reply to the thread. Set `turnHandling: { preemptiveGeneration: { enabled: false } }` as shown above, or run without `memory` and pass the full transcript each turn.
|
|
330
|
-
|
|
331
|
-
`MastraLLM` also accepts an in-process Mastra `agent` instance — session ownership without a second deployment — or a custom `generate` function. The remote transport is available standalone as [`createRemoteAgentReplyGenerator()`](https://mastra.ai/reference/voice/livekit), which also plugs into `createLiveKitWorker`'s `generate` option to run the batteries-included worker against a remote server.
|
|
332
|
-
|
|
333
236
|
## Server-initiated sessions
|
|
334
237
|
|
|
335
238
|
Use `dispatchVoiceSession()` to add a voice agent to a room from your own code, for example to join an existing room or to drive an outbound [SIP call](https://docs.livekit.io/sip/):
|
|
@@ -57,7 +57,7 @@ export const testWorkflow = createWorkflow({})
|
|
|
57
57
|
.commit()
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
Visit [Input Data Mapping](https://mastra.ai/docs/workflows/control-flow) for more information.
|
|
60
|
+
> **Info:** Visit [Input Data Mapping](https://mastra.ai/docs/workflows/control-flow) for more information.
|
|
61
61
|
|
|
62
62
|
When no `structuredOutput` option is provided, Mastra agents use a default schema that expects a `prompt` string as input and returns a `text` string as output:
|
|
63
63
|
|
|
@@ -106,7 +106,9 @@ export const testWorkflow = createWorkflow({})
|
|
|
106
106
|
.commit()
|
|
107
107
|
```
|
|
108
108
|
|
|
109
|
-
The `structuredOutput.schema` option accepts any Standard JSON Schema. The agent will generate output conforming to this schema, and the step's `outputSchema` will be automatically set to match.
|
|
109
|
+
The `structuredOutput.schema` option accepts any Standard JSON Schema. The agent will generate output conforming to this schema, and the step's `outputSchema` will be automatically set to match.
|
|
110
|
+
|
|
111
|
+
> **Info:** Visit [Structured Output](https://mastra.ai/docs/agents/structured-output) for more options like error handling strategies and streaming with structured output.
|
|
110
112
|
|
|
111
113
|
## Using tools in workflows
|
|
112
114
|
|
|
@@ -155,7 +157,7 @@ export const testWorkflow = createWorkflow({})
|
|
|
155
157
|
.commit()
|
|
156
158
|
```
|
|
157
159
|
|
|
158
|
-
Visit [Input Data Mapping](https://mastra.ai/docs/workflows/control-flow) for more information.
|
|
160
|
+
> **Info:** Visit [Input Data Mapping](https://mastra.ai/docs/workflows/control-flow) for more information.
|
|
159
161
|
|
|
160
162
|
## Related
|
|
161
163
|
|
|
@@ -101,6 +101,8 @@ export const testWorkflow = createWorkflow({
|
|
|
101
101
|
.commit()
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
+
> **📹 Watch:** How to run steps in parallel and optimize your Mastra workflow → [YouTube (3 minutes)](https://youtu.be/GQJxve5Hki4)
|
|
105
|
+
|
|
104
106
|
### Output structure
|
|
105
107
|
|
|
106
108
|
When steps run in parallel, the output is an object where each key is the step's `id` and the value is that step's output. This allows you to access each parallel step's result independently.
|
|
@@ -208,7 +210,7 @@ const writerStep = createStep({
|
|
|
208
210
|
})
|
|
209
211
|
```
|
|
210
212
|
|
|
211
|
-
Visit [Choosing the right pattern](#choosing-the-right-pattern) to understand when to use `.parallel()` vs `.foreach()`.
|
|
213
|
+
> **Info:** Visit [Choosing the right pattern](#choosing-the-right-pattern) to understand when to use `.parallel()` vs `.foreach()`.
|
|
212
214
|
|
|
213
215
|
## Conditional logic with `.branch()`
|
|
214
216
|
|
|
@@ -10,6 +10,8 @@ Workflows let you define complex sequences of tasks using clear, structured step
|
|
|
10
10
|
|
|
11
11
|
Use workflows for tasks that are clearly defined upfront and involve multiple steps with a specific execution order. They give you fine-grained control over how data flows and transforms between steps, and which primitives are called at each stage.
|
|
12
12
|
|
|
13
|
+
> **Tip:** Watch an introduction to workflows, and how they compare to agents on [YouTube (7 minutes)](https://youtu.be/0jg2g3sNvgw).
|
|
14
|
+
|
|
13
15
|
## Core principles
|
|
14
16
|
|
|
15
17
|
Mastra workflows operate using these principles:
|
|
@@ -101,7 +103,7 @@ const step1 = createStep({
|
|
|
101
103
|
})
|
|
102
104
|
```
|
|
103
105
|
|
|
104
|
-
Visit [`Step`](https://mastra.ai/reference/workflows/step) for a full list of configuration options.
|
|
106
|
+
> **Info:** Visit [`Step`](https://mastra.ai/reference/workflows/step) for a full list of configuration options.
|
|
105
107
|
|
|
106
108
|
### Using agents and tools
|
|
107
109
|
|
|
@@ -175,7 +177,7 @@ export const testWorkflow = createWorkflow({
|
|
|
175
177
|
.commit();
|
|
176
178
|
```
|
|
177
179
|
|
|
178
|
-
Visit [Workflow Class](https://mastra.ai/reference/workflows/workflow) for a full list of configuration options.
|
|
180
|
+
> **Info:** Visit [Workflow Class](https://mastra.ai/reference/workflows/workflow) for a full list of configuration options.
|
|
179
181
|
|
|
180
182
|
### Understanding control flow
|
|
181
183
|
|
|
@@ -212,7 +214,7 @@ const step1 = createStep({
|
|
|
212
214
|
})
|
|
213
215
|
```
|
|
214
216
|
|
|
215
|
-
Visit [Workflow State](https://mastra.ai/docs/workflows/workflow-state) for complete documentation on state schemas, initial state, persistence across suspend/resume, and nested workflows.
|
|
217
|
+
> **Info:** Visit [Workflow State](https://mastra.ai/docs/workflows/workflow-state) for complete documentation on state schemas, initial state, persistence across suspend/resume, and nested workflows.
|
|
216
218
|
|
|
217
219
|
## Workflows as steps
|
|
218
220
|
|
|
@@ -533,7 +535,7 @@ const step1 = createStep({
|
|
|
533
535
|
})
|
|
534
536
|
```
|
|
535
537
|
|
|
536
|
-
Visit [Request Context](https://mastra.ai/docs/server/request-context) for more information.
|
|
538
|
+
> **Info:** Visit [Request Context](https://mastra.ai/docs/server/request-context) for more information.
|
|
537
539
|
|
|
538
540
|
> **Tip:** For type-safe request context schema validation, see [Schema Validation](https://mastra.ai/docs/server/request-context).
|
|
539
541
|
|
|
@@ -544,5 +546,4 @@ For a closer look at workflows, see our [Workflow Guide](https://mastra.ai/guide
|
|
|
544
546
|
- [Workflow State](https://mastra.ai/docs/workflows/workflow-state)
|
|
545
547
|
- [Control Flow](https://mastra.ai/docs/workflows/control-flow)
|
|
546
548
|
- [Suspend and Resume](https://mastra.ai/docs/workflows/suspend-and-resume)
|
|
547
|
-
- [Error Handling](https://mastra.ai/docs/workflows/error-handling)
|
|
548
|
-
- 📹 [Agentic workflows with Mastra workshop](https://www.youtube.com/watch?v=HGt8pVPpX9g)
|
|
549
|
+
- [Error Handling](https://mastra.ai/docs/workflows/error-handling)
|
|
@@ -411,5 +411,4 @@ External providers may perform additional setup like establishing connections or
|
|
|
411
411
|
- [LSP inspection](https://mastra.ai/docs/workspace/lsp)
|
|
412
412
|
- [Skills](https://mastra.ai/docs/workspace/skills)
|
|
413
413
|
- [Search and indexing](https://mastra.ai/docs/workspace/search)
|
|
414
|
-
- [Workspace class reference](https://mastra.ai/reference/workspace/workspace-class)
|
|
415
|
-
- 📹 [Introduction to Mastra Workspaces workshop](https://www.youtube.com/watch?v=QcQLiYlJuNQ)
|
|
414
|
+
- [Workspace class reference](https://mastra.ai/reference/workspace/workspace-class)
|
|
@@ -15,8 +15,6 @@ A sandbox provider executes commands in a controlled environment:
|
|
|
15
15
|
- **Timeouts**: Prevent long-running commands from hanging
|
|
16
16
|
- **Isolation**: Optional OS-level sandboxing for security
|
|
17
17
|
|
|
18
|
-
> **📹 Watch:** Watch [Mastra remote sandboxes overview](https://www.youtube.com/watch?v=Ix2X-sjVXjw) to see how remote sandboxes give agents an isolated computer to work in.
|
|
19
|
-
|
|
20
18
|
## Supported providers
|
|
21
19
|
|
|
22
20
|
- [`LocalSandbox`](https://mastra.ai/reference/workspace/local-sandbox): Executes commands on the local machine
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
> **Info:** For a full-stack integration approach where Mastra runs directly in your Next.js API routes, see the [Full-Stack Integration Guide](https://www.assistant-ui.com/docs/integrations/frameworks/mastra/full-stack) on Assistant UI's documentation site.
|
|
8
8
|
|
|
9
|
-
Visit Mastra's [**"UI Dojo"**](https://ui-dojo.mastra.ai/) to see real-world examples of Assistant UI integrated with Mastra.
|
|
9
|
+
> **Tip:** Visit Mastra's [**"UI Dojo"**](https://ui-dojo.mastra.ai/) to see real-world examples of Assistant UI integrated with Mastra.
|
|
10
10
|
|
|
11
11
|
## Integration guide
|
|
12
12
|
|
|
@@ -10,7 +10,7 @@ Visit the [CopilotKit documentation](https://docs.copilotkit.ai/) to learn more
|
|
|
10
10
|
|
|
11
11
|
> **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.
|
|
12
12
|
|
|
13
|
-
Visit Mastra's ["UI Dojo"](https://ui-dojo.mastra.ai/) to see real-world examples of CopilotKit integrated with Mastra.
|
|
13
|
+
> **Tip:** Visit Mastra's ["UI Dojo"](https://ui-dojo.mastra.ai/) to see real-world examples of CopilotKit integrated with Mastra.
|
|
14
14
|
|
|
15
15
|
## Integration guide
|
|
16
16
|
|
|
@@ -29,7 +29,7 @@ for await (const chunk of stream.textStream) {
|
|
|
29
29
|
}
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
Visit [Agent.stream()](https://mastra.ai/reference/streaming/agents/stream) for more information.
|
|
32
|
+
> **Info:** Visit [Agent.stream()](https://mastra.ai/reference/streaming/agents/stream) for more information.
|
|
33
33
|
|
|
34
34
|
> **Tip:** For agents that dispatch [background tasks](https://mastra.ai/docs/long-running-agents/background-tasks), use [`Agent.streamUntilIdle()`](https://mastra.ai/reference/streaming/agents/streamUntilIdle) to keep the stream open until those tasks complete and the agent has had a chance to respond to their results.
|
|
35
35
|
|
|
@@ -101,7 +101,7 @@ for await (const chunk of stream) {
|
|
|
101
101
|
}
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
-
Visit [Run.stream()](https://mastra.ai/reference/streaming/workflows/stream) for more information.
|
|
104
|
+
> **Info:** Visit [Run.stream()](https://mastra.ai/reference/streaming/workflows/stream) for more information.
|
|
105
105
|
|
|
106
106
|
### Output from `Run.stream()`
|
|
107
107
|
|
|
@@ -160,7 +160,7 @@ for await (const chunk of stream) {
|
|
|
160
160
|
}
|
|
161
161
|
```
|
|
162
162
|
|
|
163
|
-
Visit [Agent.stream()](https://mastra.ai/reference/streaming/agents/stream) for more information.
|
|
163
|
+
> **Info:** Visit [Agent.stream()](https://mastra.ai/reference/streaming/agents/stream) for more information.
|
|
164
164
|
|
|
165
165
|
### Example agent output
|
|
166
166
|
|
|
@@ -8,8 +8,6 @@ The `create mastra` CLI command is the quickest way to get started. It walks you
|
|
|
8
8
|
|
|
9
9
|
If you need more control over the setup, see the [manual installation guide](https://mastra.ai/docs/getting-started/manual-install). You can also use [`mastra init`](https://mastra.ai/reference/cli/mastra) for existing projects.
|
|
10
10
|
|
|
11
|
-
> **📹 Watch:** Watch [Mastra AI agent course](https://www.youtube.com/watch?v=lCmf_qrGfGA) for a guided introduction to building agents with Mastra.
|
|
12
|
-
|
|
13
11
|
## Before you begin
|
|
14
12
|
|
|
15
13
|
- You'll need an API key from a supported [model provider](https://mastra.ai/models). If you don't have a preference, use [OpenAI](https://mastra.ai/models/providers/openai).
|
|
@@ -60,7 +58,7 @@ Depending on your choices, you'll also end up with [Mastra Skills](https://mastr
|
|
|
60
58
|
|
|
61
59
|
Once setup is complete, follow the instructions in your terminal to start the Mastra dev server, then open Studio at [localhost:4111](http://localhost:4111).
|
|
62
60
|
|
|
63
|
-
Try asking about the weather. If your API key is set up correctly, you'll get a response
|
|
61
|
+
Try asking about the weather. If your API key is set up correctly, you'll get a response:
|
|
64
62
|
|
|
65
63
|
[Studio](https://mastra.ai/docs/studio/overview) lets you rapidly build and prototype agents without needing to build a UI. Once you're ready, you can integrate your Mastra agent into your app using the guides below.
|
|
66
64
|
|
|
@@ -6,6 +6,8 @@ In this guide, you'll create a "Chef Assistant" agent that helps users cook meal
|
|
|
6
6
|
|
|
7
7
|
You'll learn how to create the agent and register it with Mastra. Next, you'll interact with the agent through your terminal and get to know different response formats. Lastly, you'll access the agent through Mastra's local API endpoints.
|
|
8
8
|
|
|
9
|
+
[YouTube video player](https://www.youtube-nocookie.com/embed/_tZhOqHCrF0)
|
|
10
|
+
|
|
9
11
|
## Prerequisites
|
|
10
12
|
|
|
11
13
|
- Node.js `v22.13.0` or later installed
|
|
@@ -182,12 +182,12 @@ You can extend this agent to:
|
|
|
182
182
|
|
|
183
183
|
- [Deploy your application](https://mastra.ai/docs/deployment/overview) and update the Slack **Request URL** to your production endpoint
|
|
184
184
|
- Add more adapters (Discord, Telegram) to the same agent so it responds on multiple platforms
|
|
185
|
-
- Configure [multimodal content](https://mastra.ai/docs/
|
|
185
|
+
- Configure [multimodal content](https://mastra.ai/docs/agents/channels) to let your agent process images, video, and audio shared in chat
|
|
186
186
|
- Add [tools](https://mastra.ai/docs/agents/using-tools) to give the agent access to external APIs and data
|
|
187
187
|
|
|
188
188
|
Learn more:
|
|
189
189
|
|
|
190
|
-
- [Channels overview](https://mastra.ai/docs/
|
|
190
|
+
- [Channels overview](https://mastra.ai/docs/agents/channels)
|
|
191
191
|
- [Studio](https://mastra.ai/docs/studio/overview)
|
|
192
192
|
- [Deployment overview](https://mastra.ai/docs/deployment/overview)
|
|
193
193
|
- [Chat SDK adapter docs](https://chat-sdk.dev)
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
In this guide, you're going to create an agent that fetches the last day's closing stock price for a given symbol. You'll learn how to create a tool, add it to an agent, and use the agent to fetch stock prices.
|
|
6
6
|
|
|
7
|
+
[YouTube video player](https://www.youtube-nocookie.com/embed/rIaZ4l7y9wo)
|
|
8
|
+
|
|
7
9
|
## Prerequisites
|
|
8
10
|
|
|
9
11
|
- Node.js `v22.13.0` or later installed
|
|
@@ -31,14 +31,12 @@ List of required environment variables for each model provider and gateway suppo
|
|
|
31
31
|
| [Cloudflare Workers AI](https://mastra.ai/models/providers/cloudflare-workers-ai) | `cloudflare-workers-ai/*` | `CLOUDFLARE_ACCOUNT_ID`, `CLOUDFLARE_API_KEY` |
|
|
32
32
|
| [Cortecs](https://mastra.ai/models/providers/cortecs) | `cortecs/*` | `CORTECS_API_KEY` |
|
|
33
33
|
| [CrofAI](https://mastra.ai/models/providers/crof) | `crof/*` | `CROF_API_KEY` |
|
|
34
|
-
| [CrossModel](https://mastra.ai/models/providers/crossmodel) | `crossmodel/*` | `CROSSMODEL_API_KEY` |
|
|
35
34
|
| [D.Run (China)](https://mastra.ai/models/providers/drun) | `drun/*` | `DRUN_API_KEY` |
|
|
36
35
|
| [Databricks](https://mastra.ai/models/providers/databricks) | `databricks/*` | `DATABRICKS_HOST`, `DATABRICKS_TOKEN` |
|
|
37
36
|
| [Deep Infra](https://mastra.ai/models/providers/deepinfra) | `deepinfra/*` | `DEEPINFRA_API_KEY` |
|
|
38
37
|
| [DeepSeek](https://mastra.ai/models/providers/deepseek) | `deepseek/*` | `DEEPSEEK_API_KEY` |
|
|
39
38
|
| [DigitalOcean](https://mastra.ai/models/providers/digitalocean) | `digitalocean/*` | `DIGITALOCEAN_ACCESS_TOKEN` |
|
|
40
39
|
| [DInference](https://mastra.ai/models/providers/dinference) | `dinference/*` | `DINFERENCE_API_KEY` |
|
|
41
|
-
| [EmpirioLabs AI](https://mastra.ai/models/providers/empiriolabs) | `empiriolabs/*` | `EMPIRIOLABS_API_KEY` |
|
|
42
40
|
| [evroc](https://mastra.ai/models/providers/evroc) | `evroc/*` | `EVROC_API_KEY` |
|
|
43
41
|
| [FastRouter](https://mastra.ai/models/providers/fastrouter) | `fastrouter/*` | `FASTROUTER_API_KEY` |
|
|
44
42
|
| [Fireworks AI](https://mastra.ai/models/providers/fireworks-ai) | `fireworks-ai/*` | `FIREWORKS_API_KEY` |
|
|
@@ -70,7 +68,6 @@ List of required environment variables for each model provider and gateway suppo
|
|
|
70
68
|
| [LongCat](https://mastra.ai/models/providers/longcat) | `longcat/*` | `LONGCAT_API_KEY` |
|
|
71
69
|
| [LucidQuery](https://mastra.ai/models/providers/lucidquery) | `lucidquery/*` | `LUCIDQUERY_API_KEY` |
|
|
72
70
|
| [Meganova](https://mastra.ai/models/providers/meganova) | `meganova/*` | `MEGANOVA_API_KEY` |
|
|
73
|
-
| [Meta](https://mastra.ai/models/providers/meta) | `meta/*` | `META_MODEL_API_KEY` |
|
|
74
71
|
| [MiniMax (minimax.io)](https://mastra.ai/models/providers/minimax) | `minimax/*` | `MINIMAX_API_KEY` |
|
|
75
72
|
| [MiniMax (minimaxi.com)](https://mastra.ai/models/providers/minimax-cn) | `minimax-cn/*` | `MINIMAX_API_KEY` |
|
|
76
73
|
| [MiniMax Token Plan (minimax.io)](https://mastra.ai/models/providers/minimax-coding-plan) | `minimax-coding-plan/*` | `MINIMAX_API_KEY` |
|
|
@@ -78,7 +75,6 @@ List of required environment variables for each model provider and gateway suppo
|
|
|
78
75
|
| [Mistral](https://mastra.ai/models/providers/mistral) | `mistral/*` | `MISTRAL_API_KEY` |
|
|
79
76
|
| [Mixlayer](https://mastra.ai/models/providers/mixlayer) | `mixlayer/*` | `MIXLAYER_API_KEY` |
|
|
80
77
|
| [Moark](https://mastra.ai/models/providers/moark) | `moark/*` | `MOARK_API_KEY` |
|
|
81
|
-
| [Model Oracle AI](https://mastra.ai/models/providers/model-oracle-ai) | `model-oracle-ai/*` | `MODEL_ORACLE_API_KEY` |
|
|
82
78
|
| [ModelScope](https://mastra.ai/models/providers/modelscope) | `modelscope/*` | `MODELSCOPE_API_KEY` |
|
|
83
79
|
| [Moonshot AI](https://mastra.ai/models/providers/moonshotai) | `moonshotai/*` | `MOONSHOT_API_KEY` |
|
|
84
80
|
| [Moonshot AI (China)](https://mastra.ai/models/providers/moonshotai-cn) | `moonshotai-cn/*` | `MOONSHOT_API_KEY` |
|
|
@@ -99,7 +95,6 @@ List of required environment variables for each model provider and gateway suppo
|
|
|
99
95
|
| [OVHcloud AI Endpoints](https://mastra.ai/models/providers/ovhcloud) | `ovhcloud/*` | `OVHCLOUD_API_KEY` |
|
|
100
96
|
| [Perplexity](https://mastra.ai/models/providers/perplexity) | `perplexity/*` | `PERPLEXITY_API_KEY` |
|
|
101
97
|
| [Perplexity Agent](https://mastra.ai/models/providers/perplexity-agent) | `perplexity-agent/*` | `PERPLEXITY_API_KEY` |
|
|
102
|
-
| [Pioneer](https://mastra.ai/models/providers/pioneer) | `pioneer/*` | `PIONEER_API_KEY` |
|
|
103
98
|
| [Poe](https://mastra.ai/models/providers/poe) | `poe/*` | `POE_API_KEY` |
|
|
104
99
|
| [Poolside](https://mastra.ai/models/providers/poolside) | `poolside/*` | `POOLSIDE_API_KEY` |
|
|
105
100
|
| [Privatemode AI](https://mastra.ai/models/providers/privatemode-ai) | `privatemode-ai/*` | `PRIVATEMODE_API_KEY` |
|
|
@@ -129,7 +124,6 @@ List of required environment variables for each model provider and gateway suppo
|
|
|
129
124
|
| [TrustedRouter](https://mastra.ai/models/providers/trustedrouter) | `trustedrouter/*` | `TRUSTEDROUTER_API_KEY` |
|
|
130
125
|
| [Umans AI](https://mastra.ai/models/providers/umans-ai) | `umans-ai/*` | `UMANS_AI_API_KEY` |
|
|
131
126
|
| [Umans AI Coding Plan](https://mastra.ai/models/providers/umans-ai-coding-plan) | `umans-ai-coding-plan/*` | `UMANS_AI_CODING_PLAN_API_KEY` |
|
|
132
|
-
| [UnoRouter](https://mastra.ai/models/providers/unorouter) | `unorouter/*` | `UNOROUTER_API_KEY` |
|
|
133
127
|
| [Upstage](https://mastra.ai/models/providers/upstage) | `upstage/*` | `UPSTAGE_API_KEY` |
|
|
134
128
|
| [Vivgrid](https://mastra.ai/models/providers/vivgrid) | `vivgrid/*` | `VIVGRID_API_KEY` |
|
|
135
129
|
| [Vultr](https://mastra.ai/models/providers/vultr) | `vultr/*` | `VULTR_API_KEY` |
|
|
@@ -144,7 +138,6 @@ List of required environment variables for each model provider and gateway suppo
|
|
|
144
138
|
| [Z.AI](https://mastra.ai/models/providers/zai) | `zai/*` | `ZHIPU_API_KEY` |
|
|
145
139
|
| [Z.AI Coding Plan](https://mastra.ai/models/providers/zai-coding-plan) | `zai-coding-plan/*` | `ZHIPU_API_KEY` |
|
|
146
140
|
| [Zeldoc](https://mastra.ai/models/providers/zeldoc) | `zeldoc/*` | `ZELDOC_API_KEY` |
|
|
147
|
-
| [Zenifra](https://mastra.ai/models/providers/zenifra) | `zenifra/*` | `ZENIFRA_AI_KEY` |
|
|
148
141
|
| [ZenMux](https://mastra.ai/models/providers/zenmux) | `zenmux/*` | `ZENMUX_API_KEY` |
|
|
149
142
|
| [Zhipu AI](https://mastra.ai/models/providers/zhipuai) | `zhipuai/*` | `ZHIPU_API_KEY` |
|
|
150
143
|
| [Zhipu AI Coding Plan](https://mastra.ai/models/providers/zhipuai-coding-plan) | `zhipuai-coding-plan/*` | `ZHIPU_API_KEY` |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Netlify
|
|
4
4
|
|
|
5
|
-
Netlify AI Gateway provides unified access to multiple providers with built-in caching and observability. Access
|
|
5
|
+
Netlify AI Gateway provides unified access to multiple providers with built-in caching and observability. Access 67 models through Mastra's model router.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Netlify documentation](https://docs.netlify.com/build/ai-gateway/overview/).
|
|
8
8
|
|
|
@@ -101,9 +101,6 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
101
101
|
| `openai/gpt-5.5-2026-04-23` |
|
|
102
102
|
| `openai/gpt-5.5-pro` |
|
|
103
103
|
| `openai/gpt-5.5-pro-2026-04-23` |
|
|
104
|
-
| `openai/gpt-5.6-luna` |
|
|
105
|
-
| `openai/gpt-5.6-sol` |
|
|
106
|
-
| `openai/gpt-5.6-terra` |
|
|
107
104
|
| `openai/o3` |
|
|
108
105
|
| `openai/o3-mini` |
|
|
109
106
|
| `openai/o4-mini` |
|