bots-garden/mini-mepublic Fork 0
main
Commits
Clone
git clone https://git.rickub.com/bots-garden/mini-me.git
git clone ssh://git@rickub.com/bots-garden/mini-me.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

💾 Saved. d722711 · on main · k33g · 4h ago
use-from-an-editor.md · 39 lines · 2.5 KBmarkdown
Blame HistoryOpen raw

How to use mini-me from an editor (ACP)

This guide shows how to host mm inside an editor that speaks the Agent Client Protocol, such as Zed. It assumes mm is built and installed on your PATH (./install.sh copies it to /usr/local/bin), and that your model server is running.

Steps

  1. Register mm as an agent server in the editor, with the -acp flag. In Zed, add to settings.json:

    {
      "agent_servers": {
        "mini-me": {
          "type": "custom",
          "command": "mm",
          "args": ["-acp"],
          "env": { "AGENT_CONFIG": "/absolute/path/to/agent.yaml" }
        }
      }
    }
    
  2. Point AGENT_CONFIG at an absolute path. The editor launches mm with the project's directory as working directory, so a relative ./agent.yaml would not be found. In ACP mode a relative skillsDir in that file is resolved next to the file, not next to the editor's working directory.

  3. Open the agent panel and start a conversation. Each bash, read_file, write_file and edit_file call appears as a tool call; the editor asks you to allow it before it runs. read_skill runs without a dialog.

  4. Read the logs when something looks wrong. In ACP mode nothing human-readable goes to stdout: the banner, the warnings and a [acp] … trail go to stderr, which Zed shows under dev: open acp logs.

Variants

  • Allow a tool for the whole session. Pick "Allow bash for this session" in the permission dialog; the choice is remembered per tool until the session ends.
  • Cancel a running turn. Use the editor's stop key (Escape in Zed). The agent answers the prompt with stop reason cancelled and keeps the commands that already ran in the history. There is no /abort over ACP.
  • Compress or restart the conversation. Send /compact or /new; editors that list the agent's commands offer both in the slash-command menu. See the slash commands reference.
  • Attach a file with @. The editor's picker sends a resource_link, passed to the model as [attached file: <path>]; a path typed by hand as @path is understood the same way (see @path). The model reads the file with its tools.
  • Run from a terminal to debug the protocol. mm -acp reads JSON-RPC on stdin and writes it on stdout, one message per line.

See also

 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
# How to use mini-me from an editor (ACP)

This guide shows how to host `mm` inside an editor that speaks the Agent Client Protocol, such as Zed. It assumes `mm` is built and installed on your `PATH` (`./install.sh` copies it to `/usr/local/bin`), and that your model server is running.

## Steps

1. Register `mm` as an agent server in the editor, with the `-acp` flag. In Zed, add to `settings.json`:

   ```json
   {
     "agent_servers": {
       "mini-me": {
         "type": "custom",
         "command": "mm",
         "args": ["-acp"],
         "env": { "AGENT_CONFIG": "/absolute/path/to/agent.yaml" }
       }
     }
   }
   ```

2. Point `AGENT_CONFIG` at an absolute path. The editor launches `mm` with the project's directory as working directory, so a relative `./agent.yaml` would not be found. In ACP mode a relative `skillsDir` in that file is resolved next to the file, not next to the editor's working directory.

3. Open the agent panel and start a conversation. Each `bash`, `read_file`, `write_file` and `edit_file` call appears as a tool call; the editor asks you to allow it before it runs. `read_skill` runs without a dialog.

4. Read the logs when something looks wrong. In ACP mode nothing human-readable goes to stdout: the banner, the warnings and a `[acp] …` trail go to stderr, which Zed shows under `dev: open acp logs`.

## Variants

- **Allow a tool for the whole session.** Pick "Allow bash for this session" in the permission dialog; the choice is remembered per tool until the session ends.
- **Cancel a running turn.** Use the editor's stop key (Escape in Zed). The agent answers the prompt with stop reason `cancelled` and keeps the commands that already ran in the history. There is no `/abort` over ACP.
- **Compress or restart the conversation.** Send `/compact` or `/new`; editors that list the agent's commands offer both in the slash-command menu. See the [slash commands reference](../reference/slash-commands.md#acp-mode).
- **Attach a file with `@`.** The editor's picker sends a `resource_link`, passed to the model as `[attached file: <path>]`; a path typed by hand as `@path` is understood the same way (see [`@path`](attach-a-file.md)). The model reads the file with its tools.
- **Run from a terminal to debug the protocol.** `mm -acp` reads JSON-RPC on stdin and writes it on stdout, one message per line.

## See also

- The exact methods and capabilities exposed: [ACP reference](../reference/acp.md)
- Why the terminal and the editor share one loop: [architecture](../explanation/architecture.md)