@mastra/mcp-docs-server 1.1.41 → 1.1.42-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/.docs/docs/agent-builder/access-control.md +97 -0
  2. package/.docs/docs/agent-builder/browser.md +61 -0
  3. package/.docs/docs/agent-builder/channels.md +76 -0
  4. package/.docs/docs/agent-builder/configuration.md +147 -0
  5. package/.docs/docs/agent-builder/deploying.md +121 -0
  6. package/.docs/docs/agent-builder/memory.md +65 -0
  7. package/.docs/docs/agent-builder/model-policy.md +48 -0
  8. package/.docs/docs/agent-builder/overview.md +97 -0
  9. package/.docs/docs/agent-builder/skill-registries.md +31 -0
  10. package/.docs/docs/agent-builder/workspace.md +60 -0
  11. package/.docs/docs/agents/channels.md +2 -0
  12. package/.docs/docs/memory/observational-memory.md +19 -0
  13. package/.docs/guides/deployment/inngest.md +69 -0
  14. package/.docs/reference/agents/channels.md +1 -1
  15. package/.docs/reference/client-js/agent-builder.md +161 -0
  16. package/.docs/reference/client-js/mastra-client.md +4 -0
  17. package/.docs/reference/editor/agent-builder/agent-builder-options.md +74 -0
  18. package/.docs/reference/editor/agent-builder/builder-agent-defaults.md +77 -0
  19. package/.docs/reference/editor/agent-builder/builder-models.md +64 -0
  20. package/.docs/reference/editor/blob-store-provider.md +59 -0
  21. package/.docs/reference/editor/browser-provider.md +75 -0
  22. package/.docs/reference/editor/filesystem-provider.md +62 -0
  23. package/.docs/reference/editor/mastra-editor.md +44 -0
  24. package/.docs/reference/editor/processor-provider.md +64 -0
  25. package/.docs/reference/editor/sandbox-provider.md +61 -0
  26. package/.docs/reference/editor/storage-browser-ref.md +80 -0
  27. package/.docs/reference/editor/storage-workspace-ref.md +93 -0
  28. package/.docs/reference/evals/create-scorer.md +2 -0
  29. package/.docs/reference/index.md +12 -0
  30. package/.docs/reference/memory/observational-memory.md +2 -0
  31. package/.docs/reference/memory/serialized-memory-config.md +72 -0
  32. package/CHANGELOG.md +21 -0
  33. package/package.json +4 -4
@@ -0,0 +1,97 @@
1
+ # Access control
2
+
3
+ > **Note:** The Agent Builder is part of the Mastra Enterprise Edition. Production deployments require a valid EE license. [Contact sales](https://mastra.ai/contact) for more information.
4
+
5
+ The Agent Builder ships with two supported roles: `admin` and `member`. Wire them through `Mastra.server.rbac`. Without an RBAC provider, every authenticated user has full Builder access; without authentication, the Builder is open to anyone who can reach the server.
6
+
7
+ ## Roles
8
+
9
+ | Role | Permissions | What they can do |
10
+ | -------- | ------------------- | ----------------------------------------------------------------------------------------------- |
11
+ | `admin` | `*` | Full access. Create, edit, publish, and delete agents and skills. Manage every Builder surface. |
12
+ | `member` | scoped list (below) | Open the Builder, browse agents and skills, populate pickers, and chat with the Builder agent. |
13
+
14
+ ## Minimum permissions
15
+
16
+ The Builder UI calls several resources on load, so a usable `member` role needs explicit grants on each. The Builder action layer (`/agent-builder/*`) is one resource; the data it reads and writes lives under separate resources.
17
+
18
+ | Permission | Used for |
19
+ | ------------------------------------- | ------------------------------------------------------------- |
20
+ | `agent-builder:*` | Load Builder actions, runs, and stream Builder workflows |
21
+ | `agents:read`, `agents:execute` | List registered agents and chat with the Builder agent |
22
+ | `stored-agents:*` | List, view, create, and edit agents |
23
+ | `stored-skills:*` | List, view, create, and edit stored skills |
24
+ | `stored-workspaces:*` | Pick a workspace when editing an agent |
25
+ | `tools:read`, `tools:execute` | Populate the tool picker and run tools through agents |
26
+ | `workflows:read`, `workflows:execute` | Populate the workflow picker and run workflows through agents |
27
+ | `memory:read` | Preview memory configuration in the picker |
28
+ | `channels:read` | Show Slack/channel chips on agent pages |
29
+ | `infrastructure:read` | Builder diagnostics banner on the shell |
30
+
31
+ Grant `:write`, `:delete`, and `:publish` on `stored-agents` and `stored-skills` for users who should create or modify agents. The `:*` wildcards in the table above cover those actions. `admin` covers everything through the `*` wildcard.
32
+
33
+ ## Quickstart with WorkOS
34
+
35
+ `@mastra/auth-workos` provides `MastraAuthWorkos` for SSO and `MastraRBACWorkos` for role-based access. Map WorkOS organization roles to the Builder's `admin` and `member` roles via `roleMapping`:
36
+
37
+ ```typescript
38
+ import { MastraAuthWorkos, MastraRBACWorkos } from '@mastra/auth-workos'
39
+
40
+ export const mastraAuth = new MastraAuthWorkos({
41
+ redirectUri: process.env.WORKOS_REDIRECT_URI || 'http://localhost:4111/api/auth/callback',
42
+ })
43
+
44
+ export const rbacProvider = new MastraRBACWorkos({
45
+ roleMapping: {
46
+ admin: ['*'],
47
+ member: [
48
+ 'agent-builder:*',
49
+ 'agents:read',
50
+ 'agents:execute',
51
+ 'stored-agents:*',
52
+ 'stored-skills:*',
53
+ 'stored-workspaces:*',
54
+ 'tools:read',
55
+ 'tools:execute',
56
+ 'workflows:read',
57
+ 'workflows:execute',
58
+ 'memory:read',
59
+ 'channels:read',
60
+ 'infrastructure:read',
61
+ ],
62
+ _default: [],
63
+ },
64
+ })
65
+ ```
66
+
67
+ Register both providers on the Mastra server:
68
+
69
+ ```typescript
70
+ import { Mastra } from '@mastra/core/mastra'
71
+ import { mastraAuth, rbacProvider } from './auth'
72
+
73
+ export const mastra = new Mastra({
74
+ server: {
75
+ auth: mastraAuth,
76
+ rbac: rbacProvider,
77
+ },
78
+ // ...storage, agents, editor
79
+ })
80
+ ```
81
+
82
+ `_default` covers WorkOS roles not listed in the mapping. Omit it to deny unmapped users. Set `WORKOS_API_KEY` and `WORKOS_CLIENT_ID` in your environment.
83
+
84
+ ## Permission grammar
85
+
86
+ Permission patterns follow `resource:action`. Wildcards are supported on either side:
87
+
88
+ - `*` — full access (every resource, every action). Used by `admin`.
89
+ - `agent-builder:*` — every action on the `agent-builder` resource.
90
+ - `*:read` — `read` across every resource.
91
+
92
+ Patterns resolve through `matchesPermission()`. The first matching role permission grants the action.
93
+
94
+ ## Related
95
+
96
+ - [Configuration](https://mastra.ai/docs/agent-builder/configuration) — wire RBAC alongside the rest of the Builder config.
97
+ - [Deploying](https://mastra.ai/docs/agent-builder/deploying) — auth, RBAC, and EE license setup for production.
@@ -0,0 +1,61 @@
1
+ # Browser
2
+
3
+ > **Note:** The Agent Builder is part of the Mastra Enterprise Edition. Production deployments require a valid EE license. [Contact sales](https://mastra.ai/contact) for more information.
4
+
5
+ The Agent Builder can give end-user agents a browser tool driven by a registered provider. Unlike filesystems and sandboxes, **there are no built-in browser providers** — you must register one through `MastraEditor.browsers`.
6
+
7
+ ## Quickstart
8
+
9
+ Register a browser provider on `MastraEditor`, then pin it as the Builder default through `builder.configuration.agent.browser`:
10
+
11
+ ```typescript
12
+ import { MastraEditor } from '@mastra/editor'
13
+ import { StagehandBrowser } from '@mastra/stagehand'
14
+
15
+ new MastraEditor({
16
+ browsers: {
17
+ stagehand: {
18
+ id: 'stagehand',
19
+ name: 'Stagehand Browser',
20
+ createBrowser: config =>
21
+ new StagehandBrowser({
22
+ ...config,
23
+ apiKey: process.env.BROWSERBASE_API_KEY ?? '',
24
+ env: 'BROWSERBASE',
25
+ projectId: process.env.BROWSERBASE_PROJECT_ID ?? '',
26
+ }),
27
+ },
28
+ },
29
+ builder: {
30
+ enabled: true,
31
+ configuration: {
32
+ agent: {
33
+ browser: {
34
+ type: 'inline',
35
+ config: { provider: 'stagehand', headless: true },
36
+ },
37
+ },
38
+ },
39
+ },
40
+ })
41
+ ```
42
+
43
+ ## Browser providers
44
+
45
+ `MastraEditor.browsers` accepts a `Record<string, BrowserProvider>`. Each provider exposes:
46
+
47
+ - `id` — provider identifier, matched against `StorageBrowserConfig.provider` (e.g., `'stagehand'`).
48
+ - `name` — display name shown in the Builder UI.
49
+ - `createBrowser(config)` — hydrates a stored browser config into a runtime `MastraBrowser`. This is where you inject runtime-only credentials (API keys, project IDs) that are not stored in the agent snapshot.
50
+
51
+ Browser classes ship as separate packages (e.g., `@mastra/stagehand`, `@mastra/agent-browser`). The provider entry is a plain object wrapping the class — register one entry per browser you want the Builder to expose to end users. See the [StorageBrowserRef reference](https://mastra.ai/reference/editor/storage-browser-ref) for the full `browser` field schema, including all `StorageBrowserConfig` options.
52
+
53
+ ## Feature toggle
54
+
55
+ The `features.agent.browser` toggle controls whether end users can enable browser access per agent in the Builder UI. It defaults to `true` only when a valid `configuration.agent.browser` (with a `config.provider`) is provided. Without a registered provider matching the pinned config, the toggle is forced off.
56
+
57
+ ## Related
58
+
59
+ - [BuilderAgentDefaults reference](https://mastra.ai/reference/editor/agent-builder/builder-agent-defaults) — the full `browser` field schema.
60
+ - [AgentBuilderOptions reference](https://mastra.ai/reference/editor/agent-builder/agent-builder-options) — the full Builder config surface, including `features.agent.browser`.
61
+ - [Configuration](https://mastra.ai/docs/agent-builder/configuration) — wire `browser` alongside the rest of the Builder config.
@@ -0,0 +1,76 @@
1
+ # Channels
2
+
3
+ > **Note:** The Agent Builder is part of the Mastra Enterprise Edition. Production deployments require a valid EE license. [Contact sales](https://mastra.ai/contact) for more information.
4
+
5
+ Channels let Builder-created agents reach users outside the Mastra server. Register a channel provider on `Mastra.channels` and the Builder exposes the channel as an integration option for every agent.
6
+
7
+ Slack is currently the only supported channel.
8
+
9
+ ## Quickstart
10
+
11
+ Install the Slack provider:
12
+
13
+ **npm**:
14
+
15
+ ```bash
16
+ npm install @mastra/slack
17
+ ```
18
+
19
+ **pnpm**:
20
+
21
+ ```bash
22
+ pnpm add @mastra/slack
23
+ ```
24
+
25
+ **Yarn**:
26
+
27
+ ```bash
28
+ yarn add @mastra/slack
29
+ ```
30
+
31
+ **Bun**:
32
+
33
+ ```bash
34
+ bun add @mastra/slack
35
+ ```
36
+
37
+ Register `SlackProvider` on `Mastra.channels`:
38
+
39
+ ```typescript
40
+ import { Mastra } from '@mastra/core/mastra'
41
+ import { MastraEditor } from '@mastra/editor'
42
+ import { createBuilderAgent } from '@mastra/editor/ee'
43
+ import { SlackProvider } from '@mastra/slack'
44
+
45
+ export const mastra = new Mastra({
46
+ storage,
47
+ channels: {
48
+ slack: new SlackProvider({
49
+ refreshToken: process.env.SLACK_APP_CONFIG_REFRESH_TOKEN,
50
+ baseUrl: process.env.SLACK_BASE_URL,
51
+ }),
52
+ },
53
+ agents: { builderAgent: createBuilderAgent() },
54
+ editor: new MastraEditor({
55
+ builder: { enabled: true },
56
+ }),
57
+ })
58
+ ```
59
+
60
+ The Slack provider handles app creation, OAuth, slash commands, and message routing for every Builder-created agent that opts in.
61
+
62
+ ## Configuration
63
+
64
+ `SlackProvider` requires one environment variable and accepts one optional override:
65
+
66
+ - `SLACK_APP_CONFIG_REFRESH_TOKEN` (required): the refresh token from your Slack app configuration tokens, available under **Your App Configuration Tokens** on [api.slack.com/apps](https://api.slack.com/apps). The refresh token does not expire, but the access tokens it issues rotate every 12 hours and are auto-persisted to `Mastra.storage`.
67
+ - `baseUrl` (optional): the public URL Slack should send events and OAuth callbacks to. Defaults to the running Mastra server's host and port (for example, `http://localhost:4111` in local development). Pass `baseUrl` explicitly when the public URL differs from the server's resolved address — typically a tunnel for local development (`cloudflared tunnel --url http://localhost:4111`) or a deployed URL in production.
68
+
69
+ ## Storage requirement
70
+
71
+ `SlackProvider` requires a persistent storage backend on the `Mastra` instance. Without storage, rotated tokens and app installations are lost on restart.
72
+
73
+ ## Related
74
+
75
+ - [Deploying](https://mastra.ai/docs/agent-builder/deploying) — set a public `baseUrl` for production deployments.
76
+ - [Configuration](https://mastra.ai/docs/agent-builder/configuration) — wire channel toggles into the Builder UI.
@@ -0,0 +1,147 @@
1
+ # Configuration
2
+
3
+ > **Note:** The Agent Builder is part of the Mastra Enterprise Edition. Production deployments require a valid EE license. [Contact sales](https://mastra.ai/contact) for more information.
4
+
5
+ The Agent Builder is configured through `MastraEditor.builder`. Two top-level keys control its behavior: `features` toggles UI visibility and `configuration` pins admin-controlled defaults onto every new agent.
6
+
7
+ ## Quickstart
8
+
9
+ ```typescript
10
+ import { MastraEditor } from '@mastra/editor'
11
+
12
+ new MastraEditor({
13
+ builder: {
14
+ enabled: true,
15
+ features: {
16
+ agent: { browser: false },
17
+ },
18
+ configuration: {
19
+ agent: {
20
+ memory: { observationalMemory: true },
21
+ },
22
+ },
23
+ },
24
+ })
25
+ ```
26
+
27
+ This hides the browser tab in the Builder UI and pins observational memory as the default for every Builder-created agent.
28
+
29
+ ## Feature toggles
30
+
31
+ `builder.features.agent` controls which sections appear in the Agent Builder UI. Set a key to `false` to hide the corresponding surface.
32
+
33
+ ```typescript
34
+ new MastraEditor({
35
+ builder: {
36
+ enabled: true,
37
+ features: {
38
+ agent: {
39
+ tools: true,
40
+ agents: true,
41
+ workflows: true,
42
+ skills: true,
43
+ memory: true,
44
+ model: true,
45
+ browser: true,
46
+ avatarUpload: true,
47
+ favorites: true,
48
+ },
49
+ },
50
+ },
51
+ })
52
+ ```
53
+
54
+ The shipping UI consumes these `AgentFeatures` keys: `tools`, `agents`, `workflows`, `skills`, `memory`, `model`, `browser`, `avatarUpload`, and `favorites`. See the [AgentBuilderOptions reference](https://mastra.ai/reference/editor/agent-builder/agent-builder-options) for the full schema.
55
+
56
+ ## Admin defaults
57
+
58
+ `builder.configuration.agent` pins admin-controlled defaults onto every agent the Builder produces.
59
+
60
+ ```typescript
61
+ new MastraEditor({
62
+ builder: {
63
+ enabled: true,
64
+ configuration: {
65
+ agent: {
66
+ models: {
67
+ allowed: [
68
+ { provider: 'openai', modelId: 'gpt-5.4-mini' },
69
+ { provider: 'openai', modelId: 'gpt-5.4' },
70
+ { provider: 'anthropic', modelId: 'claude-opus-4-7' },
71
+ ],
72
+ },
73
+ },
74
+ },
75
+ },
76
+ })
77
+ ```
78
+
79
+ `configuration.agent` accepts `models`, `memory`, `workspace`, `browser`, `tools`, `agents`, and `workflows`. See the [BuilderAgentDefaults reference](https://mastra.ai/reference/editor/agent-builder/builder-agent-defaults) for the full shape.
80
+
81
+ ## Making tools, agents, and workflows available
82
+
83
+ The Builder picks from whatever you register on the `Mastra` instance. Tools registered through `Mastra({ tools })`, agents registered through `Mastra({ agents })`, and workflows registered through `Mastra({ workflows })` are all candidates for Builder-created agents.
84
+
85
+ ```typescript
86
+ import { Mastra } from '@mastra/core/mastra'
87
+ import { MastraEditor } from '@mastra/editor'
88
+ import { createBuilderAgent } from '@mastra/editor/ee'
89
+ import { weatherInfo } from './tools/weather-info'
90
+ import { webSearch } from './tools/web-search'
91
+
92
+ export const mastra = new Mastra({
93
+ tools: {
94
+ weatherInfo,
95
+ webSearch,
96
+ // add MCP tools or additional tools here
97
+ },
98
+ agents: {
99
+ builderAgent: createBuilderAgent(),
100
+ // add additional agents here
101
+ },
102
+ workflows: {
103
+ // add workflows here
104
+ },
105
+ editor: new MastraEditor({
106
+ builder: { enabled: true },
107
+ }),
108
+ })
109
+ ```
110
+
111
+ With no `configuration.agent.tools.allowed` set, both `weather-info` and `web-search` appear in the Builder's tool picker. End users can attach either tool to any agent they create.
112
+
113
+ Entries match on `tool.id`, `Agent.id`, or `workflow.id` — the string the entity reports at runtime, not the export name.
114
+
115
+ MCP tools work the same way: load them via `MCPClient.getTools()` and spread the result into the `tools` map.
116
+
117
+ ## Tool, agent, and workflow allowlists
118
+
119
+ `configuration.agent.tools`, `configuration.agent.agents`, and `configuration.agent.workflows` constrain which registered entries appear in the Builder's pickers. Allowlist semantics are the same for all three:
120
+
121
+ - **Omitted**: unrestricted. The picker shows every registered entry.
122
+ - **`allowed: []`**: explicit lockdown. The picker is empty.
123
+ - **`allowed: [...ids]`**: the picker shows only the listed IDs.
124
+
125
+ Unknown IDs are dropped and surfaced as warnings through `getModelPolicyWarnings()` and the server logs.
126
+
127
+ ```typescript
128
+ new MastraEditor({
129
+ builder: {
130
+ enabled: true,
131
+ configuration: {
132
+ agent: {
133
+ tools: { allowed: ['weather-info', 'web-search'] },
134
+ agents: { allowed: ['weather-agent'] },
135
+ workflows: { allowed: ['greet-workflow'] },
136
+ },
137
+ },
138
+ },
139
+ })
140
+ ```
141
+
142
+ ## Related
143
+
144
+ - [Model policy](https://mastra.ai/docs/agent-builder/model-policy) — pin the allowed models and default model.
145
+ - [Memory](https://mastra.ai/docs/agent-builder/memory) — set the default memory shape for new agents.
146
+ - [AgentBuilderOptions reference](https://mastra.ai/reference/editor/agent-builder/agent-builder-options) — full property list.
147
+ - [BuilderAgentDefaults reference](https://mastra.ai/reference/editor/agent-builder/builder-agent-defaults) — every field on `configuration.agent`.
@@ -0,0 +1,121 @@
1
+ # Deploying
2
+
3
+ > **Note:** The Agent Builder is part of the Mastra Enterprise Edition. Production deployments require a valid EE license. [Contact sales](https://mastra.ai/contact) for more information.
4
+
5
+ Production deployments swap the local primitives in the Quickstart for cloud-backed equivalents. The shape of the `Mastra` and `MastraEditor` config doesn't change — only the providers behind it.
6
+
7
+ ## What a production deployment needs
8
+
9
+ 1. **EE license** — a valid `MASTRA_EE_LICENSE` so the server will start with the Builder enabled.
10
+ 2. **Hosted storage** — a shared store for agents, skills, runs, and memory.
11
+ 3. **Shared workspace filesystem** — survives across instances; `local` is single-node only.
12
+ 4. **Cloud sandbox** — runs agent commands safely; `local` is unsafe in shared environments.
13
+ 5. **Auth and RBAC** — gates the Builder UI and `/agent-builder/*` routes.
14
+ 6. **Public base URL for channels** — Slack and other channel providers need a reachable URL.
15
+
16
+ ## EE license
17
+
18
+ Set `MASTRA_EE_LICENSE` in the deployment environment. The server refuses to start when `builder.enabled` is truthy without a valid license. Treat the license key as a secret.
19
+
20
+ ## Storage
21
+
22
+ Replace the file-backed LibSQL store with a hosted backend. LibSQL Cloud, PostgreSQL, and any other Mastra storage adapter all work.
23
+
24
+ ```typescript
25
+ import { Mastra } from '@mastra/core/mastra'
26
+ import { LibSQLStore } from '@mastra/libsql'
27
+
28
+ new Mastra({
29
+ storage: new LibSQLStore({
30
+ url: process.env.DATABASE_URL!,
31
+ authToken: process.env.DATABASE_AUTH_TOKEN,
32
+ }),
33
+ })
34
+ ```
35
+
36
+ ## Workspace filesystem and sandbox
37
+
38
+ `local` filesystem works only on the node that owns the directory. For multi-instance deployments, register cloud filesystem and sandbox providers on `MastraEditor` and reference them by id in the inline workspace config.
39
+
40
+ **npm**:
41
+
42
+ ```bash
43
+ npm install @mastra/s3 @mastra/e2b
44
+ ```
45
+
46
+ **pnpm**:
47
+
48
+ ```bash
49
+ pnpm add @mastra/s3 @mastra/e2b
50
+ ```
51
+
52
+ **Yarn**:
53
+
54
+ ```bash
55
+ yarn add @mastra/s3 @mastra/e2b
56
+ ```
57
+
58
+ **Bun**:
59
+
60
+ ```bash
61
+ bun add @mastra/s3 @mastra/e2b
62
+ ```
63
+
64
+ ```typescript
65
+ import { Mastra } from '@mastra/core/mastra'
66
+ import { MastraEditor } from '@mastra/editor'
67
+ import { s3FilesystemProvider } from '@mastra/s3'
68
+ import { e2bSandboxProvider } from '@mastra/e2b'
69
+
70
+ new Mastra({
71
+ editor: new MastraEditor({
72
+ filesystems: { [s3FilesystemProvider.id]: s3FilesystemProvider },
73
+ sandboxes: { [e2bSandboxProvider.id]: e2bSandboxProvider },
74
+ builder: {
75
+ enabled: true,
76
+ configuration: {
77
+ agent: {
78
+ workspace: {
79
+ type: 'inline',
80
+ config: {
81
+ name: 'builder-workspace',
82
+ filesystem: {
83
+ provider: s3FilesystemProvider.id,
84
+ config: {
85
+ bucket: process.env.S3_BUCKET!,
86
+ region: process.env.S3_REGION!,
87
+ },
88
+ },
89
+ sandbox: {
90
+ provider: e2bSandboxProvider.id,
91
+ config: { apiKey: process.env.E2B_API_KEY! },
92
+ },
93
+ },
94
+ },
95
+ },
96
+ },
97
+ },
98
+ }),
99
+ })
100
+ ```
101
+
102
+ `S3Filesystem` uses the default AWS credential chain (environment variables, `~/.aws` config, IAM roles, EC2 instance profile). For long-running deployments, use a credential provider function so credentials refresh automatically.
103
+
104
+ `DockerSandbox` and `VercelSandbox` are alternative cloud sandbox providers — pick whichever matches your runtime.
105
+
106
+ > **Warning:** A local sandbox can't run commands safely in a shared environment. Always register a cloud sandbox provider and reference it in the workspace config before deploying.
107
+
108
+ ## Auth and RBAC
109
+
110
+ A production deployment without authentication exposes the Builder to the public internet. Register a `Mastra.server.auth` provider (for example, WorkOS or your own provider) and a `Mastra.server.rbac` provider to gate access.
111
+
112
+ See [Access control](https://mastra.ai/docs/agent-builder/access-control) for the required role permissions and a WorkOS quickstart.
113
+
114
+ ## Public URL for channels
115
+
116
+ Slack needs to reach your server through a public URL. Pass `baseUrl` to `SlackProvider` with the deployed URL (no trailing slash). See [Channels](https://mastra.ai/docs/agent-builder/channels) for the full setup.
117
+
118
+ ## Related
119
+
120
+ - [Access control](https://mastra.ai/docs/agent-builder/access-control) — auth and RBAC setup.
121
+ - [Channels](https://mastra.ai/docs/agent-builder/channels) — Slack `baseUrl` and channel-specific setup.
@@ -0,0 +1,65 @@
1
+ # Memory
2
+
3
+ > **Note:** The Agent Builder is part of the Mastra Enterprise Edition. Production deployments require a valid EE license. [Contact sales](https://mastra.ai/contact) for more information.
4
+
5
+ The Agent Builder pins a default memory shape onto every new agent through `builder.configuration.agent.memory`. The default applies when an end user creates a new agent and doesn't override it.
6
+
7
+ ## Quickstart
8
+
9
+ ```typescript
10
+ import { MastraEditor } from '@mastra/editor'
11
+
12
+ new MastraEditor({
13
+ builder: {
14
+ enabled: true,
15
+ configuration: {
16
+ agent: {
17
+ memory: { observationalMemory: true },
18
+ },
19
+ },
20
+ },
21
+ })
22
+ ```
23
+
24
+ Observational memory lets the agent learn long-lived facts from past conversations. Storage on the `Mastra` instance is required — see the [Memory overview](https://mastra.ai/docs/memory/overview) for the prerequisites.
25
+
26
+ ## Observational memory model
27
+
28
+ Observational memory runs an Observer and Reflector model on top of every conversation. The default model is `google/gemini-2.5-flash`, which requires a `GOOGLE_GENERATIVE_AI_API_KEY` environment variable in any environment where the Builder agent will run.
29
+
30
+ To use a different model, set `observationalMemory.model` to any model ID supported by the Mastra model router (and provide the matching provider credentials):
31
+
32
+ ```typescript
33
+ new MastraEditor({
34
+ builder: {
35
+ enabled: true,
36
+ configuration: {
37
+ agent: {
38
+ memory: {
39
+ observationalMemory: {
40
+ model: 'openai/gpt-5.4',
41
+ },
42
+ },
43
+ },
44
+ },
45
+ },
46
+ })
47
+ ```
48
+
49
+ The `model` field applies to both the Observer and Reflector. You can also override each one independently via `observation.model` and `reflection.model`. See the [SerializedMemoryConfig reference](https://mastra.ai/reference/memory/serialized-memory-config) for the full shape.
50
+
51
+ ## Storage and vector requirements
52
+
53
+ Memory features layer on top of `Mastra.storage`:
54
+
55
+ - **Message history** (`options.lastMessages`) requires storage.
56
+ - **Observational memory** (`observationalMemory: true`) requires storage.
57
+ - **Semantic recall** (`options.semanticRecall`) requires storage plus a registered vector adapter (`vector`) and an embedder (`embedder`).
58
+
59
+ If a required adapter is missing, Mastra throws a descriptive error at agent run time. See [Semantic recall](https://mastra.ai/docs/memory/semantic-recall) for the full list of supported vector stores and embedders.
60
+
61
+ ## Related
62
+
63
+ - [Memory overview](https://mastra.ai/docs/memory/overview) — concepts and core configuration.
64
+ - [BuilderAgentDefaults reference](https://mastra.ai/reference/editor/agent-builder/builder-agent-defaults) — the full `memory` field schema.
65
+ - [Configuration](https://mastra.ai/docs/agent-builder/configuration) — wire `memory` alongside the rest of the Builder config.
@@ -0,0 +1,48 @@
1
+ # Model policy
2
+
3
+ > **Note:** The Agent Builder is part of the Mastra Enterprise Edition. Production deployments require a valid EE license. [Contact sales](https://mastra.ai/contact) for more information.
4
+
5
+ The model policy controls which providers and models Builder-created agents can use, which model is selected by default, and whether end users can change it. The policy lives at `builder.configuration.agent.models`.
6
+
7
+ ## Quickstart
8
+
9
+ ```typescript
10
+ import { MastraEditor } from '@mastra/editor'
11
+
12
+ new MastraEditor({
13
+ builder: {
14
+ enabled: true,
15
+ configuration: {
16
+ agent: {
17
+ models: {
18
+ allowed: [
19
+ { provider: 'openai', modelId: 'gpt-5.4-mini' },
20
+ { provider: 'openai', modelId: 'gpt-5.4' },
21
+ { provider: 'anthropic', modelId: 'claude-opus-4-7' },
22
+ ],
23
+ },
24
+ },
25
+ },
26
+ },
27
+ })
28
+ ```
29
+
30
+ This restricts the Builder's model picker to two OpenAI models and one Anthropic model. End users choose one when creating an agent.
31
+
32
+ ## Validation rules
33
+
34
+ Mastra validates the model policy at server boot. Violations are surfaced as warnings through `getModelPolicyWarnings()`.
35
+
36
+ - When `allowed` is empty or omitted, every registered model is available.
37
+ - When `allowed` is non-empty, `default` (if set) must satisfy the allowlist. A `default` that fails this check is dropped and surfaced as a warning.
38
+ - 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.
39
+
40
+ Registered providers (`provider: 'openai'`, `provider: 'anthropic'`, and so on) can omit `modelId` to allow every model from that provider.
41
+
42
+ See the [`builder.configuration.agent.models`](https://mastra.ai/reference/editor/agent-builder/builder-models) reference for every admin-writable field and validation rules.
43
+
44
+ ## Related
45
+
46
+ - [Configuration](https://mastra.ai/docs/agent-builder/configuration) — wire the model policy into the broader Builder config.
47
+ - [`builder.configuration.agent.models`](https://mastra.ai/reference/editor/agent-builder/builder-models) — full property list.
48
+ - [Provider registry](https://github.com/mastra-ai/mastra/blob/main/packages/core/src/llm/model/provider-registry.json) — every model ID Mastra recognizes out of the box.