MiMoCode is a fork of OpenCode. It supports ACP over stdio and can be used as an OpenAB agent backend.
| Field | Value |
|---|---|
| Image | openab-mimocode (or any image with mimo installed) |
| Command | mimo |
| Args | ["acp"] |
| Working dir | /home/node |
MiMoCode offers a free tier (MiMo Auto) that requires no API key — just a one-time device auth:
mimo auth login --provider mimo --method "MiMo Auto (free)"This is fully non-interactive and can be used in Dockerfiles, pre-boot hooks, or CI scripts. It sets mimo/mimo-auto as the default model (1M context, free).
The token expires in ~1 hour but auto-refreshes on next ACP session start. For persistent deployments, run this in a [hooks.pre_boot] script to ensure fresh auth on every container start.
MiMoCode uses a SQLite database (~/.local/share/mimocode/mimocode.db) for state. Only one process can access it at a time.
Do NOT run manual mimo commands (e.g. mimo auth login, mimo debug config, mimo models) while mimo acp is actively handling a request. This will corrupt or lock the database, causing all subsequent ACP requests to fail with empty responses or "Connection Lost".
- Start the bot (openab spawns
mimo acpon first message) - Auth before the first message, or while the session is idle
- If the DB gets corrupted:
# As root: rm -f ~/.local/share/mimocode/mimocode.db* chown -R node:node ~/.local/share/mimocode/ # As node: mimo auth login
When running on AWS (ECS, EC2), MiMoCode auto-detects AWS credentials and registers amazon-bedrock as a provider. Combined with its Provider.sort() logic, ACP mode picks the "best" (paid) model — which fails silently with 0 tokens if you don't have a paid Xiaomi account.
Add this to your [hooks.pre_boot] script:
# Write mimo config — disables Bedrock, sets free model as default
mkdir -p ~/.config/mimocode
echo '{"disabled_providers":["amazon-bedrock"],"model":"mimo/mimo-auto"}' > ~/.config/mimocode/config.json
# Provision free-tier auth (non-interactive, token refreshes each boot)
mimo auth login --provider mimo --method "MiMo Auto (free)" 2>/dev/null || trueThis ensures:
- Bedrock is never auto-detected
mimo/mimo-autois the default model (notxiaomi/mimo-v2.5-pro-ultraspeed)- Fresh auth token every container start
For paid Xiaomi accounts, replace mimo/mimo-auto with your preferred model (e.g. xiaomi/mimo-v2.5-pro).
[agent]
command = "mimo"
args = ["acp"]
env = { GHPOOL_URL = "http://ghpool.openab.local:8080", PATH = "/home/node/bin:/usr/local/bin:/usr/bin:/bin" }mimo acpdoes not accept--modelflag (unlike the TUI)- Default model is set during
mimo auth loginand stored in the DB - No
config setCLI command — model selection is via auth flow only - The
-m/--modelflag only works for TUI/run modes, not ACP