Agent Builder overview
The Agent Builder is part of the Mastra Enterprise Edition. Production deployments require a valid EE license. Contact sales for more information.
The Agent Builder lets you build, configure, and operate Mastra agents all within the UI. It runs inside your Mastra server, persists everything to Mastra.storage, and supports multi-tenant agent workflows with RBAC and channel integrations.
- Configuration: Toggle UI sections and pin admin-controlled defaults for every new agent.
- Model policy: Restrict which providers and models the Builder exposes, and pin a default.
- Memory: Configure the default memory shape for every Builder-created agent.
- Access control: Gate the Builder behind Mastra RBAC roles and permissions.
- Channels: Connect Builder-created agents to Slack and other channels.
- Skill registries: Browse and install community skills from opt-in registries.
- Deploying: Swap local primitives for cloud-backed storage, filesystems, and sandboxes.
For building agents entirely in code, see the Agents overview. For editing code-defined agents through Studio, see the Editor overview.
Get startedDirect link to Get started
Install @mastra/editor alongside a storage adapter:
- npm
- pnpm
- Yarn
- Bun
npm install @mastra/editor @mastra/libsql
pnpm add @mastra/editor @mastra/libsql
yarn add @mastra/editor @mastra/libsql
bun add @mastra/editor @mastra/libsql
Wire the Agent Builder onto a Mastra instance:
import { Mastra } from '@mastra/core/mastra'
import { MastraEditor } from '@mastra/editor'
import { createBuilderAgent } from '@mastra/editor/ee'
import { LibSQLStore } from '@mastra/libsql'
export const mastra = new Mastra({
storage: new LibSQLStore({ url: 'file:./mastra.db' }),
agents: { builderAgent: createBuilderAgent() },
editor: new MastraEditor({
builder: {
enabled: true,
configuration: {
agent: {
memory: { observationalMemory: true },
},
},
},
}),
})
Start the dev server:
npx mastra dev
The Agent Builder is mounted at http://localhost:4111/agent-builder.
PrerequisitesDirect link to Prerequisites
The Agent Builder requires:
- Storage: An
@mastra/corestorage adapter on theMastrainstance. Agents, memory, and workspace state all persist throughMastra.storage. - The Builder agent: Register a Builder agent created with the
createBuilderAgent()factory from@mastra/editor/eeonMastra.agents. The chat-based editor invokes it through the sameMastra.getAgent(id)lookup as any other agent. Without this registration, the chat-based editor returns 404. OPENAI_API_KEY: The Builder agent created bycreateBuilderAgent()runs on an OpenAI model, so anOPENAI_API_KEYenvironment variable is required.
Disabling the BuilderDirect link to Disabling the Builder
Set enabled: false to keep the config in place but turn the surface off:
new MastraEditor({
builder: {
enabled: false,
},
})
Omitting the builder field has the same effect.