bots-garden/mini-mepublic Fork
⑂ v2.1.1
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.

Download ZIP
run-with-razorbill.md · 52 lines · 4.1 KBmarkdown
Blame HistoryOpen raw

How to run mini-me on razorbill

This guide shows how to point mm at razorbill, an MLX model server for Apple Silicon Macs (command rzb, no Python), through its OpenAI-compatible endpoint, and how to let mm start and stop it. It assumes rzb is built and installed on the Mac (razorbill's scripts/install.sh puts it in /usr/local/bin) and that you know how to build mm.

Steps

  1. Download a model and start the server. rzb serve listens on 127.0.0.1:7920 and loads a model on the first request that names it:

    rzb models pull mlx-community/Qwen3-4B-4bit
    rzb serve
    
  2. Write the agent file:

    provider: razorbill
    model: mlx-community/Qwen3-4B-4bit
    
  3. Run mm with it and check the banner: provider: razorbill. rzb does not report the context window, so the banner says ctx: unknown. Set contextWindow: to the model's window if you want compaction to be based on it.

Let mm start rzb

With autoStart, you skip step 1's rzb serve: when nothing answers at the agent's address, mm starts rzb serve there, downloads the model with rzb models pull when rzb does not list it, and stops the server when the last mm session that uses it exits.

provider: razorbill
model: mlx-community/Qwen3-4B-4bit
razorbill:
  autoStart: true
  # config: rzb-server.yaml   # rzb serve --config, relative to this file
  • On the Mac only. rzb runs on macOS (Apple Silicon). The start works only when mm itself runs on the Mac. It does not work when mm runs in a container or a Docker sandbox: there mm starts nothing, and prints [warning: razorbill.autoStart: rzb runs on macOS only …] when no server answers. Start rzb on the Mac yourself in that case (see the next section).
  • Your own server is left alone. A server you started yourself (for example rzb serve in a terminal) is used as is and never stopped.
  • Shared between sessions. Several mm sessions on the same address share one server. The output of rzb serve and of rzb models pull goes to ~/Library/Caches/mm/rzb/127.0.0.1-7920/rzb.log.
  • Another binary or settings. server: names the rzb executable (default: rzb on the PATH, then /usr/local/bin/rzb). config: is rzb's server configuration (declared models, defaults, limits). serverArgs: adds any other flag. startTimeout: (default 15m) bounds the start and the download.

Variants

  • From a container or a Docker sandbox. Start rzb on the Mac on every interface, with a key since it is then reachable from your network: RZB_API_KEY=… rzb serve --host 0.0.0.0. With no baseUrl answering, mm falls back to http://host.docker.internal:7920/v1 by itself. Export the same key in RZB_API_KEY where mm runs. In a sandbox, allow localhost:7920 in the network policy.
  • A protected server. rzb checks Authorization: Bearer on every route but /health when its RZB_API_KEY is set. mm reads RZB_API_KEY too (or the variable named under apiKeyEnv). A refused key is a start-up warning naming the variable.
  • Another model. Set model: to an id exactly as GET /v1/models lists it (curl -s localhost:7920/v1/models): a Hugging Face id in MLX format, or a short name declared in rzb's configuration. A model rzb does not list is a start-up warning, model "…" is not downloaded — rzb models pull …: the first question would download it, and the watchdog may give up before the download ends.
  • Write the file with the wizard. mm init --provider razorbill lists the server's models and, on this machine, asks whether mm should start rzb (--autostart, default yes). See How to create an agent.
  • Reasoning. rzb obeys chat_template_kwargs.enable_thinking, and it wins over reasoning_effort. See How to turn a model's reasoning off.
  • Memory. rzb unloads an idle model itself (its keep_alive, 10 minutes by default). It has no unload route, so /unload and the unload_model tool cannot free it sooner.

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
40
41
42
43
44
45
46
47
48
49
50
51
52
# How to run mini-me on razorbill

This guide shows how to point `mm` at razorbill, an MLX model server for Apple Silicon Macs (command `rzb`, no Python), through its OpenAI-compatible endpoint, and how to let `mm` start and stop it. It assumes `rzb` is built and installed on the Mac (razorbill's `scripts/install.sh` puts it in `/usr/local/bin`) and that you know how to build `mm`.

## Steps

1. Download a model and start the server. `rzb serve` listens on `127.0.0.1:7920` and loads a model on the first request that names it:

   ```bash
   rzb models pull mlx-community/Qwen3-4B-4bit
   rzb serve
   ```

2. Write the agent file:

   ```yaml
   provider: razorbill
   model: mlx-community/Qwen3-4B-4bit
   ```

3. Run `mm` with it and check the banner: `provider: razorbill`. rzb does not report the context window, so the banner says `ctx: unknown`. Set `contextWindow:` to the model's window if you want compaction to be based on it.

## Let mm start rzb

With `autoStart`, you skip step 1's `rzb serve`: when nothing answers at the agent's address, `mm` starts `rzb serve` there, downloads the model with `rzb models pull` when rzb does not list it, and stops the server when the last `mm` session that uses it exits.

```yaml
provider: razorbill
model: mlx-community/Qwen3-4B-4bit
razorbill:
  autoStart: true
  # config: rzb-server.yaml   # rzb serve --config, relative to this file
```

- **On the Mac only.** rzb runs on macOS (Apple Silicon). The start works only when `mm` itself runs on the Mac. It does not work when `mm` runs in a container or a Docker sandbox: there `mm` starts nothing, and prints `[warning: razorbill.autoStart: rzb runs on macOS only …]` when no server answers. Start `rzb` on the Mac yourself in that case (see the next section).
- **Your own server is left alone.** A server you started yourself (for example `rzb serve` in a terminal) is used as is and never stopped.
- **Shared between sessions.** Several `mm` sessions on the same address share one server. The output of `rzb serve` and of `rzb models pull` goes to `~/Library/Caches/mm/rzb/127.0.0.1-7920/rzb.log`.
- **Another binary or settings.** `server:` names the `rzb` executable (default: `rzb` on the `PATH`, then `/usr/local/bin/rzb`). `config:` is rzb's server configuration (declared models, defaults, limits). `serverArgs:` adds any other flag. `startTimeout:` (default `15m`) bounds the start and the download.

## Variants

- **From a container or a Docker sandbox.** Start rzb on the Mac on every interface, with a key since it is then reachable from your network: `RZB_API_KEY=… rzb serve --host 0.0.0.0`. With no `baseUrl` answering, `mm` falls back to `http://host.docker.internal:7920/v1` by itself. Export the same key in `RZB_API_KEY` where `mm` runs. In a sandbox, allow `localhost:7920` in the network policy.
- **A protected server.** rzb checks `Authorization: Bearer` on every route but `/health` when its `RZB_API_KEY` is set. `mm` reads `RZB_API_KEY` too (or the variable named under `apiKeyEnv`). A refused key is a start-up warning naming the variable.
- **Another model.** Set `model:` to an id exactly as `GET /v1/models` lists it (`curl -s localhost:7920/v1/models`): a Hugging Face id in MLX format, or a short name declared in rzb's configuration. A model rzb does not list is a start-up warning, `model "…" is not downloaded — rzb models pull …`: the first question would download it, and the watchdog may give up before the download ends.
- **Write the file with the wizard.** `mm init --provider razorbill` lists the server's models and, on this machine, asks whether `mm` should start rzb (`--autostart`, default yes). See [How to create an agent](create-an-agent.md).
- **Reasoning.** rzb obeys `chat_template_kwargs.enable_thinking`, and it wins over `reasoning_effort`. See [How to turn a model's reasoning off](turn-reasoning-off.md).
- **Memory.** rzb unloads an idle model itself (its `keep_alive`, 10 minutes by default). It has no unload route, so `/unload` and the `unload_model` tool cannot free it sooner.

## See also

- The `razorbill` keys: [configuration reference](../reference/configuration.md).
- Why each server has its own provider entry: [providers](../explanation/providers.md).