How to create an agent from your editor (mm acp-create)
This guide shows how to create an agent.yaml without a terminal, from any editor or tool that speaks the Agent Client Protocol (Zed, a JetBrains IDE, a Neovim plugin…). mm acp-create serves the questions of mm init over ACP and writes the same file. It assumes mm is installed on your PATH and that a model server is running (the wizard lists its models).
Steps
-
Register
mm acp-createas an agent server in your client. In Zed, add tosettings.json:{ "agent_servers": { "mm-create": { "type": "custom", "command": "mm", "args": ["acp-create"] } } }Other clients take the same two things: the command
mmand the argumentacp-create. No configuration file is needed: this mode reads none. -
Open the project the agent will work in, start a new thread with
mm-create, and send/start(or any message). The wizard starts. The file will be written in the project's directory — the session's working directory — not where the client startedmm. -
Answer the questions. How they are asked depends on what your client can show:
- A client that shows forms (it advertises the
elicitation.formcapability): the questions come in a few forms, the defaults already filled in. A question whose choices depend on an earlier answer — the model list on the server you chose — comes in the next form. - Any other client: each question is a message, with numbered choices. Reply with a number or a value;
.takes the default.
- A client that shows forms (it advertises the
-
Read the closing message. It shows
✅ wrote agent.yamland✅ mm loads it, then the command that starts the agent,mm acp /absolute/path/to/agent.yaml. Zed gets a readyagent_serversentry; for another client, use that command line. -
To run the agent in a container or a Docker Sandbox rather than on your machine, send
/dockerinit(writesDockerfileandcompose.yaml) or/sbxinit(writessbxenv.yaml) in the same thread. See run mini-me in a container and run mini-me in a Docker Sandbox. -
Send
/zedconfig. It shows theagent_serversentries for every way the project can now start its agent — on your machine, in its container, in its sandbox — and what to start first for each. Copy the ones you want into your client's settings, and start a thread with one of them: this one is your agent.
Commands during the wizard
| Command | What it does |
|---|---|
/start |
Starts the wizard; once started, asks the current question again. |
/preview |
Shows the agent.yaml as it would be written now. |
/back |
Takes back the last answer and asks it again. |
/write |
Takes the default for every question left and writes the file (replacing an existing file is still asked). |
/restart |
Forgets every answer and starts again. |
/dockerinit |
Writes a Dockerfile and a compose.yaml in the project to run the agent in a container — mm dockerinit for this project. Takes its flags (--name, --agent); existing files are kept unless you add --overwrite. |
/zedconfig |
Shows Zed's agent_servers entries for this project's agent, from what the project holds: mm acp <agent file> always; with a compose.yaml, docker exec -i <container> mm -acp -config <agent file>; with a sbxenv.yaml, sbx exec -i <sandbox> mm -acp -config <agent file> — each with what to start first. |
/sbxinit |
Writes a sbxenv.yaml in the project to run the agent in a Docker Sandbox — mm sbxinit for this project. Takes its flags (--name, --workspace, --agent); an existing sbxenv.yaml is kept unless you add --overwrite. Works at any time; after the agent is written, the sandbox is named after it. |
/skillcreate |
Creates a skill for the project's agent — mm skillcreate for this project: see Create a skill from the same thread. |
/cancel |
Gives up the skill being created; the agent's questions come back. |
/help |
Lists these commands. |
Create a skill from the same thread
Send /skillcreate. It asks what mm skillcreate asks in a terminal — the skill's name, a one-line description, keywords (. for none) and the text — and writes <skillsDir>/<name>/SKILL.md where the project's agent reads its skills: the skillsDir of its agent.yaml or .mm/agent.yaml. Without an agent file, or with skillsDir: no-skills, the skill goes to .mm/skills when the project has a .mm folder — or when the agent being created in this thread uses one —, else to skills, and mm says which skillsDir to set.
- The flags answer in advance:
/skillcreate --name "Vulcan Salute" --description "Greets the Vulcan way" --keywords "vulcan, greeting". Quote a value with spaces. - The text is one message: several lines are fine. With a client that shows forms, the other questions come in a form and the text is still asked as a message.
- An existing skill is replaced only if you answer
yes;noasks for another name. - In the middle of the agent's questions, the answers given so far are kept: once the skill is written — or given up with
/cancel— the agent's current question comes back. Before its file is written, the skill goes where that agent will read its skills:.mm/skillsonce you answeredyesto Keep everything in a .mm folder?, and mm reminds you to answeryesto Use skills?. - After writing, mm reads the skill back (
✅ mm reads it: …). An agent already running sees it once it restarts (Reload Agent).
Variations
- Fix answers in advance. The flags of
mm initwork here (--provider,--base-url,--model,--usage,--project yes…): a question whose flag is given is not asked. For example"args": ["acp-create", "--provider", "llmman", "--project", "yes"]. - The
.mmlayout. Answeryesto Keep everything in a .mm folder?: the file is.mm/agent.yaml, see Keep a project's mini-me files in a.mmfolder. - Declining a form writes nothing. Send another message to pick up where you stopped.
- Reloading the agent (Zed's Reload Agent) restarts the wizard from the first question: the answers are not kept. A file already written stays as it is.
See also
- Create an agent with
mm init— the same wizard in a terminal. - Use mini-me from an editor (ACP) — running the agent you created.
- Reference: command line —
mm acp-create
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
|