@mastra/mcp-docs-server 1.2.13-alpha.9 → 1.2.13
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/overview.md +1 -1
- package/.docs/docs/agents/supervisor-agents.md +2 -2
- package/.docs/docs/agents/using-tools.md +29 -0
- package/.docs/docs/capabilities/channels/imessage.md +181 -0
- package/.docs/docs/capabilities/channels/overview.md +1 -0
- package/.docs/docs/{evals/datasets → datasets}/overview.md +3 -3
- package/.docs/docs/{evals/datasets → datasets}/running-experiments.md +59 -2
- package/.docs/docs/editor/overview.md +201 -206
- package/.docs/docs/evals/evals-with-memory.md +1 -1
- package/.docs/docs/getting-started/develop.md +196 -0
- package/.docs/docs/index.md +78 -1
- package/.docs/docs/mastra-platform/workspaces.md +13 -13
- package/.docs/docs/memory/observational-memory.md +23 -0
- package/.docs/docs/studio/observability.md +4 -0
- package/.docs/docs/studio/overview.md +2 -2
- package/.docs/docs/workspace/search.md +1 -1
- package/.docs/guides/getting-started/quickstart.md +3 -3
- package/.docs/{docs → guides}/rag/chunking-and-embedding.md +1 -1
- package/.docs/{docs → guides}/rag/graph-rag.md +1 -1
- package/.docs/{docs → guides}/rag/overview.md +2 -2
- package/.docs/{docs → guides}/rag/retrieval.md +1 -1
- package/.docs/{docs → guides}/voice/overview.md +4 -4
- package/.docs/{docs → guides}/voice/realtime-voice.md +2 -2
- package/.docs/{docs → guides}/voice/speech-to-speech.md +1 -1
- package/.docs/{docs → guides}/voice/speech-to-text.md +1 -1
- package/.docs/{docs → guides}/voice/text-to-speech.md +2 -2
- package/.docs/models/embeddings.md +63 -65
- package/.docs/models/environment-variables.md +5 -1
- package/.docs/models/gateways/netlify.md +1 -2
- package/.docs/models/gateways/openrouter.md +3 -1
- package/.docs/models/gateways/vercel.md +6 -1
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/alibaba-cn.md +3 -1
- package/.docs/models/providers/alibaba-token-plan-cn.md +27 -25
- package/.docs/models/providers/alibaba-token-plan.md +27 -25
- package/.docs/models/providers/alibaba.md +2 -1
- package/.docs/models/providers/ambient.md +13 -12
- package/.docs/models/providers/baseten.md +3 -1
- package/.docs/models/providers/chutes.md +6 -8
- package/.docs/models/providers/crof.md +2 -1
- package/.docs/models/providers/crossmodel.md +4 -1
- package/.docs/models/providers/deepinfra.md +9 -2
- package/.docs/models/providers/digitalocean.md +34 -27
- package/.docs/models/providers/empiriolabs.md +4 -1
- package/.docs/models/providers/fireworks-ai.md +20 -19
- package/.docs/models/providers/greenpt.md +17 -8
- package/.docs/models/providers/groq.md +20 -20
- package/.docs/models/providers/huggingface.md +3 -1
- package/.docs/models/providers/hyper.md +9 -7
- package/.docs/models/providers/impossibl.md +148 -0
- package/.docs/models/providers/infomaniak.md +83 -0
- package/.docs/models/providers/kilo.md +349 -350
- package/.docs/models/providers/llmgateway.md +3 -1
- package/.docs/models/providers/mistral.md +5 -2
- package/.docs/models/providers/modal.md +5 -4
- package/.docs/models/providers/modelis.md +81 -0
- package/.docs/models/providers/nano-gpt.md +146 -148
- package/.docs/models/providers/neuralwatt.md +2 -1
- package/.docs/models/providers/ofox.md +2 -2
- package/.docs/models/providers/ollama-cloud.md +23 -22
- package/.docs/models/providers/opencode-go.md +3 -2
- package/.docs/models/providers/requesty.md +54 -45
- package/.docs/models/providers/scx.md +74 -0
- package/.docs/models/providers/tensorx.md +97 -0
- package/.docs/models/providers/togetherai.md +2 -1
- package/.docs/models/providers/umans-ai-coding-plan.md +11 -9
- package/.docs/models/providers/umans-ai.md +11 -9
- package/.docs/models/providers/wandb.md +2 -2
- package/.docs/models/providers/zai-coding-plan.md +7 -7
- package/.docs/models/providers/zhipuai-coding-plan.md +9 -9
- package/.docs/models/providers.md +5 -1
- package/.docs/reference/agents/agent.md +1 -1
- package/.docs/reference/agents/generate.md +1 -1
- package/.docs/reference/agents/getVoice.md +1 -1
- package/.docs/{docs/getting-started → reference}/build-with-ai.md +5 -110
- package/.docs/reference/cli/create-mastra.md +2 -0
- package/.docs/reference/cli/mastra.md +66 -1
- package/.docs/reference/client-js/agents.md +1 -1
- package/.docs/reference/configuration.md +2 -2
- package/.docs/reference/core/getEditor.md +1 -1
- package/.docs/reference/core/getVector.md +2 -2
- package/.docs/reference/core/listVectors.md +2 -2
- package/.docs/reference/core/mastra-class.md +1 -1
- package/.docs/reference/datasets/startExperiment.md +6 -0
- package/.docs/reference/datasets/startExperimentAsync.md +4 -0
- package/.docs/reference/editor/browser-provider.md +2 -2
- package/.docs/reference/editor/filesystem-provider.md +1 -1
- package/.docs/reference/editor/mastra-editor.md +31 -18
- package/.docs/reference/editor/prompt-blocks.md +137 -0
- package/.docs/reference/editor/sandbox-provider.md +1 -1
- package/.docs/reference/editor/storage-browser-ref.md +3 -3
- package/.docs/reference/editor/storage-workspace-ref.md +3 -3
- package/.docs/reference/editor/tool-provider.md +44 -10
- package/.docs/reference/editor/tools.md +100 -0
- package/.docs/reference/editor/versioning.md +130 -0
- package/.docs/reference/evals/mastra-scorer.md +68 -8
- package/.docs/reference/file-based-agents/config.md +39 -1
- package/.docs/reference/index.md +3 -4
- package/.docs/reference/memory/observational-memory.md +3 -1
- package/.docs/reference/memory/serialized-memory-config.md +3 -3
- package/.docs/reference/observability/tracing/interfaces.md +3 -1
- package/.docs/reference/processors/token-limiter-processor.md +15 -1
- package/.docs/reference/project-structure.md +1 -1
- package/.docs/reference/rag/database-config.md +1 -1
- package/.docs/reference/storage/composite.md +2 -0
- package/.docs/reference/streaming/agents/stream.md +1 -1
- package/.docs/reference/voice/livekit.md +3 -3
- package/.docs/reference/workspace/platform-filesystem.md +3 -3
- package/.docs/reference/workspace/platform-sandbox.md +5 -5
- package/CHANGELOG.md +23 -0
- package/README.md +1 -1
- package/package.json +6 -6
- package/.docs/docs/agent-builder/access-control.md +0 -99
- package/.docs/docs/agent-builder/browser.md +0 -63
- package/.docs/docs/agent-builder/channels.md +0 -78
- package/.docs/docs/agent-builder/configuration.md +0 -132
- package/.docs/docs/agent-builder/deploying.md +0 -124
- package/.docs/docs/agent-builder/integrations.md +0 -115
- package/.docs/docs/agent-builder/memory.md +0 -69
- package/.docs/docs/agent-builder/model-policy.md +0 -50
- package/.docs/docs/agent-builder/overview.md +0 -114
- package/.docs/docs/agent-builder/skill-registries.md +0 -31
- package/.docs/docs/agent-builder/workspace.md +0 -62
- package/.docs/docs/editor/prompts.md +0 -140
- package/.docs/docs/editor/tools.md +0 -148
- package/.docs/docs/getting-started/file-based-agents.md +0 -121
- package/.docs/docs/what-is-mastra.md +0 -161
- package/.docs/reference/client-js/agent-builder.md +0 -163
- package/.docs/reference/editor/agent-builder/agent-builder-options.md +0 -76
- package/.docs/reference/editor/agent-builder/builder-agent-defaults.md +0 -79
- package/.docs/reference/editor/agent-builder/builder-models.md +0 -66
- /package/.docs/{docs → guides}/getting-started/manual-install.md +0 -0
- /package/.docs/{docs → guides}/rag/vector-databases.md +0 -0
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
-
|
|
3
|
-
# Agent Builder API
|
|
4
|
-
|
|
5
|
-
The Agent Builder API provides methods to interact with [Agent Builder](https://mastra.ai/docs/agent-builder/overview) actions on the server. Each action is a workflow exposed under `/agent-builder/:actionId/*`. The Builder must be enabled on the server via `MastraEditor.builder.enabled`, with a valid `MASTRA_EE_LICENSE` in production.
|
|
6
|
-
|
|
7
|
-
## Getting all actions
|
|
8
|
-
|
|
9
|
-
Retrieve a record of available Agent Builder actions:
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
const actions = await mastraClient.getAgentBuilderActions()
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Returns a `Record<string, WorkflowInfo>` keyed by action ID.
|
|
16
|
-
|
|
17
|
-
## Working with a specific action
|
|
18
|
-
|
|
19
|
-
Get an instance of a specific action by its ID:
|
|
20
|
-
|
|
21
|
-
```typescript
|
|
22
|
-
const action = mastraClient.getAgentBuilderAction('create-agent')
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Action methods
|
|
26
|
-
|
|
27
|
-
### `details()`
|
|
28
|
-
|
|
29
|
-
Retrieve metadata about an Agent Builder action:
|
|
30
|
-
|
|
31
|
-
```typescript
|
|
32
|
-
const info = await action.details()
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### `createRun()`
|
|
36
|
-
|
|
37
|
-
Create a new run for this action and receive a `runId`. Use the returned id with `startActionRun()`, `stream()`, `resume()`, or `observeStream()`.
|
|
38
|
-
|
|
39
|
-
```typescript
|
|
40
|
-
const { runId } = await action.createRun()
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
You can also pass an explicit `runId`:
|
|
44
|
-
|
|
45
|
-
```typescript
|
|
46
|
-
const { runId } = await action.createRun({ runId: 'my-run-id' })
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
### `startAsync()`
|
|
50
|
-
|
|
51
|
-
Start the action and wait for completion. Returns the final `AgentBuilderActionResult` with `success`, `applied`, `branchName`, `message`, `validationResults`, `error`, `errors`, and `stepResults`.
|
|
52
|
-
|
|
53
|
-
```typescript
|
|
54
|
-
const result = await action.startAsync({
|
|
55
|
-
inputData: { agentName: 'support-bot' },
|
|
56
|
-
})
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
Pass an existing `runId` as the second argument to start a previously created run:
|
|
60
|
-
|
|
61
|
-
```typescript
|
|
62
|
-
const { runId } = await action.createRun()
|
|
63
|
-
const result = await action.startAsync({ inputData }, runId)
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### `startActionRun()`
|
|
67
|
-
|
|
68
|
-
Start an existing run without waiting for completion. Returns `{ message }`.
|
|
69
|
-
|
|
70
|
-
```typescript
|
|
71
|
-
const { runId } = await action.createRun()
|
|
72
|
-
await action.startActionRun({ inputData }, runId)
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
### `stream()`
|
|
76
|
-
|
|
77
|
-
Start an existing run and stream progress events as a `ReadableStream<{ type, payload }>`.
|
|
78
|
-
|
|
79
|
-
```typescript
|
|
80
|
-
const { runId } = await action.createRun()
|
|
81
|
-
const stream = await action.stream({ inputData }, runId)
|
|
82
|
-
|
|
83
|
-
for await (const event of stream) {
|
|
84
|
-
console.log(event.type, event.payload)
|
|
85
|
-
}
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### `resume()`
|
|
89
|
-
|
|
90
|
-
Resume a suspended step on a run. Returns `{ message }`.
|
|
91
|
-
|
|
92
|
-
```typescript
|
|
93
|
-
await action.resume({ step: 'review', resumeData: { approved: true } }, runId)
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
### `resumeAsync()`
|
|
97
|
-
|
|
98
|
-
Resume a suspended step and wait for completion. Returns an `AgentBuilderActionResult`.
|
|
99
|
-
|
|
100
|
-
```typescript
|
|
101
|
-
const result = await action.resumeAsync({ step: 'review', resumeData: { approved: true } }, runId)
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
### `resumeStream()`
|
|
105
|
-
|
|
106
|
-
Resume a suspended step and stream subsequent events.
|
|
107
|
-
|
|
108
|
-
```typescript
|
|
109
|
-
const stream = await action.resumeStream({
|
|
110
|
-
runId,
|
|
111
|
-
step: 'review',
|
|
112
|
-
resumeData: { approved: true },
|
|
113
|
-
})
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
### `observeStream()`
|
|
117
|
-
|
|
118
|
-
Attach to an existing run, replaying cached events from the beginning, then continuing with live events. Use this to recover after a page refresh or hot reload.
|
|
119
|
-
|
|
120
|
-
```typescript
|
|
121
|
-
const stream = await action.observeStream({ runId })
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
### `observeStreamLegacy()`
|
|
125
|
-
|
|
126
|
-
Same as `observeStream()` but uses the legacy streaming endpoint. Prefer `observeStream()` for new code.
|
|
127
|
-
|
|
128
|
-
```typescript
|
|
129
|
-
const stream = await action.observeStreamLegacy({ runId })
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
### `runs()`
|
|
133
|
-
|
|
134
|
-
List runs for this action with optional filters.
|
|
135
|
-
|
|
136
|
-
```typescript
|
|
137
|
-
const runs = await action.runs({ page: 0, perPage: 20 })
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
Accepts `fromDate`, `toDate`, `page`, `perPage`, `resourceId`, and legacy `limit`/`offset`.
|
|
141
|
-
|
|
142
|
-
### `runById()`
|
|
143
|
-
|
|
144
|
-
Fetch a specific run by ID. Use `fields` to limit the returned payload and `withNestedWorkflows` to skip nested workflow data.
|
|
145
|
-
|
|
146
|
-
```typescript
|
|
147
|
-
const run = await action.runById(runId, {
|
|
148
|
-
fields: ['result', 'steps'],
|
|
149
|
-
withNestedWorkflows: false,
|
|
150
|
-
})
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
### `cancelRun()`
|
|
154
|
-
|
|
155
|
-
Cancel an in-flight run.
|
|
156
|
-
|
|
157
|
-
```typescript
|
|
158
|
-
await action.cancelRun(runId)
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
## Access control
|
|
162
|
-
|
|
163
|
-
The `/agent-builder/*` routes are gated by the `agent-builder` permission resource. Calling clients need at minimum `agent-builder:read` and `agent-builder:execute`, plus any picker resources the action touches (`stored-agents`, `stored-skills`, `tools`, `workflows`, `memory`). See [Access control](https://mastra.ai/docs/agent-builder/access-control) for the full grant list.
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
-
|
|
3
|
-
# AgentBuilderOptions
|
|
4
|
-
|
|
5
|
-
`AgentBuilderOptions` configures the Agent Builder. Pass it as `MastraEditor.builder` to enable the Builder UI, toggle visible surfaces, pin admin defaults, and opt into skill registries.
|
|
6
|
-
|
|
7
|
-
See the [Configuration](https://mastra.ai/docs/agent-builder/configuration) page for concepts and worked examples.
|
|
8
|
-
|
|
9
|
-
## Usage example
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
import { MastraEditor } from '@mastra/editor'
|
|
13
|
-
|
|
14
|
-
new MastraEditor({
|
|
15
|
-
builder: {
|
|
16
|
-
enabled: true,
|
|
17
|
-
features: {
|
|
18
|
-
agent: { browser: false },
|
|
19
|
-
},
|
|
20
|
-
configuration: {
|
|
21
|
-
agent: {
|
|
22
|
-
memory: { observationalMemory: true },
|
|
23
|
-
models: {
|
|
24
|
-
allowed: [
|
|
25
|
-
{ provider: 'openai', modelId: 'gpt-5.4-mini' },
|
|
26
|
-
{ provider: 'openai', modelId: 'gpt-5.4' },
|
|
27
|
-
{ provider: 'anthropic', modelId: 'claude-opus-4-7' },
|
|
28
|
-
],
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
registries: {
|
|
33
|
-
skillsSh: { enabled: true },
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
})
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Properties
|
|
40
|
-
|
|
41
|
-
**enabled** (`boolean`): Master switch. When false, the Builder UI is disabled and MastraEditor.resolveBuilder() returns undefined. (Default: `true`)
|
|
42
|
-
|
|
43
|
-
**features** (`{ agent?: AgentFeatures }`): UI toggles. Each key on features.agent defaults to true when omitted.
|
|
44
|
-
|
|
45
|
-
**features.agent.tools** (`boolean`): Show the tools tab in the agent editor.
|
|
46
|
-
|
|
47
|
-
**features.agent.agents** (`boolean`): Show the sub-agents picker in the agent editor.
|
|
48
|
-
|
|
49
|
-
**features.agent.workflows** (`boolean`): Show the workflows picker in the agent editor.
|
|
50
|
-
|
|
51
|
-
**features.agent.skills** (`boolean`): Show the skills tab and library for the agent.
|
|
52
|
-
|
|
53
|
-
**features.agent.memory** (`boolean`): Show the memory configuration in the agent editor.
|
|
54
|
-
|
|
55
|
-
**features.agent.model** (`boolean`): Show the model picker in the agent editor. When false, the admin-pinned default model applies.
|
|
56
|
-
|
|
57
|
-
**features.agent.browser** (`boolean`): Show the browser tab. Resolves to true only when a valid browser provider is registered on MastraEditor.browsers; otherwise it is downgraded to false and a warning is logged.
|
|
58
|
-
|
|
59
|
-
**features.agent.avatarUpload** (`boolean`): Allow end users to upload an avatar for stored agents.
|
|
60
|
-
|
|
61
|
-
**features.agent.favorites** (`boolean`): Show favorite agents and skills with per-user state and aggregate counts.
|
|
62
|
-
|
|
63
|
-
**configuration** (`{ agent?: BuilderAgentDefaults }`): Admin-pinned defaults applied to every Builder-created agent. End users cannot override these values. See the BuilderAgentDefaults reference for the full schema.
|
|
64
|
-
|
|
65
|
-
**registries** (`{ skillsSh?: { enabled: boolean } }`): Opt-in third-party skill registries. When no registry is enabled, the Builder hides registry browse UI.
|
|
66
|
-
|
|
67
|
-
**registries.skillsSh** (`{ enabled: boolean }`): Enable the skills.sh registry. When enabled, the Builder shows registry browse UI for skills.sh skills.
|
|
68
|
-
|
|
69
|
-
**registries.skillsSh.enabled** (`boolean`): Set to true to opt in. Defaults to false.
|
|
70
|
-
|
|
71
|
-
## Related
|
|
72
|
-
|
|
73
|
-
- [Configuration](https://mastra.ai/docs/agent-builder/configuration): Concept and worked examples.
|
|
74
|
-
- [BuilderAgentDefaults](https://mastra.ai/reference/editor/agent-builder/builder-agent-defaults): Full schema for `configuration.agent`.
|
|
75
|
-
- [builder.configuration.agent.models](https://mastra.ai/reference/editor/agent-builder/builder-models): Model allowlist and default model.
|
|
76
|
-
- [MastraEditor class](https://mastra.ai/reference/editor/mastra-editor): The parent surface that hosts `builder`.
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
-
|
|
3
|
-
# BuilderAgentDefaults
|
|
4
|
-
|
|
5
|
-
`BuilderAgentDefaults` describes the admin-pinned defaults applied to every agent the Agent Builder produces. Pass it as `builder.configuration.agent`. End users can't override these values from the Builder UI.
|
|
6
|
-
|
|
7
|
-
See [Configuration](https://mastra.ai/docs/agent-builder/configuration) and [Memory](https://mastra.ai/docs/agent-builder/memory) for worked examples.
|
|
8
|
-
|
|
9
|
-
## Usage example
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
import { MastraEditor } from '@mastra/editor'
|
|
13
|
-
|
|
14
|
-
new MastraEditor({
|
|
15
|
-
builder: {
|
|
16
|
-
enabled: true,
|
|
17
|
-
configuration: {
|
|
18
|
-
agent: {
|
|
19
|
-
memory: { observationalMemory: true },
|
|
20
|
-
workspace: {
|
|
21
|
-
type: 'inline',
|
|
22
|
-
config: {
|
|
23
|
-
name: 'builder-workspace',
|
|
24
|
-
filesystem: {
|
|
25
|
-
provider: 'local',
|
|
26
|
-
config: { basePath: './workspace' },
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
models: {
|
|
31
|
-
allowed: [
|
|
32
|
-
{ provider: 'openai', modelId: 'gpt-5.4-mini' },
|
|
33
|
-
{ provider: 'openai', modelId: 'gpt-5.4' },
|
|
34
|
-
{ provider: 'anthropic', modelId: 'claude-opus-4-7' },
|
|
35
|
-
],
|
|
36
|
-
},
|
|
37
|
-
tools: { allowed: ['weather-info'] },
|
|
38
|
-
agents: { allowed: ['weather-agent'] },
|
|
39
|
-
workflows: { allowed: ['greet-workflow'] },
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
})
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## Properties
|
|
47
|
-
|
|
48
|
-
**memory** (`SerializedMemoryConfig`): Default memory configuration for new agents. Pass { observationalMemory: true } to enable long-lived fact extraction. Requires Mastra.storage. See the SerializedMemoryConfig reference for the full schema.
|
|
49
|
-
|
|
50
|
-
**workspace** (`StorageWorkspaceRef`): Default workspace reference for new agents. Pass { type: 'inline', config } to embed a snapshot, or { type: 'id', workspaceId } to point at a workspace registered on Mastra.workspace. See the StorageWorkspaceRef reference for both variants.
|
|
51
|
-
|
|
52
|
-
**browser** (`StorageBrowserRef`): Default browser configuration for new agents. Pass { type: 'inline', config: { provider } } to attach a registered browser provider. See the StorageBrowserRef reference for the full schema.
|
|
53
|
-
|
|
54
|
-
**models** (`{ allowed?: ProviderModelEntry[]; default?: DefaultModelEntry }`): Model allowlist and default applied to every Builder-created agent. See the BuilderModels reference for the full schema and validation rules.
|
|
55
|
-
|
|
56
|
-
**models.allowed** (`ProviderModelEntry[]`): Allowlist of providers and models. Omit to allow every registered model. ProviderModelEntry is a discriminated union (known providers vs. custom).
|
|
57
|
-
|
|
58
|
-
**models.default** (`DefaultModelEntry`): Pre-selected model on new-agent create. Required when the model picker is hidden. DefaultModelEntry requires provider and modelId, with an optional kind.
|
|
59
|
-
|
|
60
|
-
**tools** (`{ allowed?: string[] }`): Allowlist of tool IDs visible in the Builder tools picker. Unknown IDs are dropped and surfaced as warnings.
|
|
61
|
-
|
|
62
|
-
**tools.allowed** (`string[]`): Allowlist of tool.id values. Omit for unrestricted, pass \[] to lock the picker down, pass \[...ids] to restrict to the listed tools.
|
|
63
|
-
|
|
64
|
-
**agents** (`{ allowed?: string[] }`): Allowlist of agent IDs visible in the Builder sub-agents picker. Unknown IDs are dropped and surfaced as warnings.
|
|
65
|
-
|
|
66
|
-
**agents.allowed** (`string[]`): Allowlist of Agent.id values. Omit for unrestricted, pass \[] to lock the picker down, pass \[...ids] to restrict to the listed agents.
|
|
67
|
-
|
|
68
|
-
**workflows** (`{ allowed?: string[] }`): Allowlist of workflow IDs visible in the Builder workflows picker. Unknown IDs are dropped and surfaced as warnings.
|
|
69
|
-
|
|
70
|
-
**workflows.allowed** (`string[]`): Allowlist of workflow\.id values. Omit for unrestricted, pass \[] to lock the picker down, pass \[...ids] to restrict to the listed workflows.
|
|
71
|
-
|
|
72
|
-
## Related
|
|
73
|
-
|
|
74
|
-
- [AgentBuilderOptions](https://mastra.ai/reference/editor/agent-builder/agent-builder-options): The parent options object.
|
|
75
|
-
- [builder.configuration.agent.models](https://mastra.ai/reference/editor/agent-builder/builder-models): Admin-facing model allowlist and default.
|
|
76
|
-
- [SerializedMemoryConfig](https://mastra.ai/reference/memory/serialized-memory-config): Memory shape for new agents.
|
|
77
|
-
- [StorageWorkspaceRef](https://mastra.ai/reference/editor/storage-workspace-ref): Workspace reference shape.
|
|
78
|
-
- [StorageBrowserRef](https://mastra.ai/reference/editor/storage-browser-ref): Browser reference shape.
|
|
79
|
-
- [Configuration](https://mastra.ai/docs/agent-builder/configuration): Concept and worked examples.
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
-
|
|
3
|
-
# builder.configuration.agent.models
|
|
4
|
-
|
|
5
|
-
`builder.configuration.agent.models` is the admin-facing model policy input on `AgentBuilderOptions`. It controls which providers and models the Agent Builder exposes, and which model is pre-selected on new-agent create.
|
|
6
|
-
|
|
7
|
-
See [Model policy](https://mastra.ai/docs/agent-builder/model-policy) for concepts and worked examples.
|
|
8
|
-
|
|
9
|
-
## Usage example
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
import { MastraEditor } from '@mastra/editor'
|
|
13
|
-
|
|
14
|
-
new MastraEditor({
|
|
15
|
-
builder: {
|
|
16
|
-
enabled: true,
|
|
17
|
-
configuration: {
|
|
18
|
-
agent: {
|
|
19
|
-
models: {
|
|
20
|
-
allowed: [
|
|
21
|
-
{ provider: 'openai', modelId: 'gpt-5.4-mini' },
|
|
22
|
-
{ provider: 'openai', modelId: 'gpt-5.4' },
|
|
23
|
-
{ provider: 'anthropic', modelId: 'claude-opus-4-7' },
|
|
24
|
-
],
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
})
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Properties
|
|
33
|
-
|
|
34
|
-
**allowed** (`ProviderModelEntry[]`): Allowlist of providers and models. Omit to allow every registered model. When non-empty, only the listed entries are selectable in the Builder.
|
|
35
|
-
|
|
36
|
-
**allowed.provider** (`Provider`): Provider id from the generated provider registry (for example, openai, anthropic).
|
|
37
|
-
|
|
38
|
-
**allowed.modelId** (`ModelForProvider<Provider>`): Specific model id for that provider. Omit to allow every model under the provider.
|
|
39
|
-
|
|
40
|
-
**allowed.kind** (`'custom'`): Discriminant marking this entry as a gateway or self-hosted provider not in the registry.
|
|
41
|
-
|
|
42
|
-
**allowed.provider** (`string`): Provider id for the custom provider.
|
|
43
|
-
|
|
44
|
-
**allowed.modelId** (`string`): Specific model id under the custom provider. Omit to allow every model under it.
|
|
45
|
-
|
|
46
|
-
**default** (`DefaultModelEntry`): Pre-selected model on new-agent create. Same shape as ProviderModelEntry, but modelId is required. Must satisfy the allowed list when set.
|
|
47
|
-
|
|
48
|
-
**default.provider** (`Provider | string`): Provider id. Use a Provider literal for known providers, or any string with kind: 'custom'.
|
|
49
|
-
|
|
50
|
-
**default.modelId** (`string`): Required model id. Points at a specific model, not a whole provider.
|
|
51
|
-
|
|
52
|
-
**default.kind** (`'custom'`): Set to custom when targeting a provider that isn't in the generated registry.
|
|
53
|
-
|
|
54
|
-
## Validation rules
|
|
55
|
-
|
|
56
|
-
Mastra validates the admin policy at server boot. Violations surface as warnings on `GET /editor/builder/settings.modelPolicyWarnings`.
|
|
57
|
-
|
|
58
|
-
- `allowed` empty or omitted: no restriction. Every registered model is available.
|
|
59
|
-
- When `allowed` is non-empty and a `default` is set: `default` must satisfy `isModelAllowed(allowed, default)`. A `default` that fails this check is dropped and surfaced as a warning.
|
|
60
|
-
- To hide the end-user model picker, set `features.agent.model: false` in [AgentBuilderOptions](https://mastra.ai/reference/editor/agent-builder/agent-builder-options). When the picker is hidden, provide a `default` so new agents resolve a model.
|
|
61
|
-
|
|
62
|
-
## Related
|
|
63
|
-
|
|
64
|
-
- [BuilderAgentDefaults](https://mastra.ai/reference/editor/agent-builder/builder-agent-defaults): Parent object containing `models`.
|
|
65
|
-
- [AgentBuilderOptions](https://mastra.ai/reference/editor/agent-builder/agent-builder-options): The top-level Builder options.
|
|
66
|
-
- [Model policy](https://mastra.ai/docs/agent-builder/model-policy): Concept and worked examples.
|
|
File without changes
|
|
File without changes
|