# MiMo Code

> Run Xiaomi's MiMo Code in NeuroSquad cards — how to install it, what works, and what to know.

Source: https://docs.neurosquad.ai/en/agents/mimo-code

**MiMo Code** is Xiaomi MiMo's open-source (MIT) coding agent for the terminal — a fork of
OpenCode with a persistent project memory, in-session subagents ("actors") and its own MiMo models.
In NeuroSquad each MiMo agent is a card with the real `mimo` running inside.

Measured on MiMo Code 0.1.15.

## Install

**1. Install the mimo command**

```bash
npm install -g @mimo-ai/cli
```

Or use Xiaomi's install script from [mimo.xiaomi.com](https://mimo.xiaomi.com/coder).
**Settings → Setup** in NeuroSquad can run the npm install for you.

**2. Pick your models**

Run `mimo` once and choose how it gets models — MiMo's own models, an API key for another
provider, or a custom server. A card can also run on [OpenRouter](https://docs.neurosquad.ai/en/providers/openrouter) or on
[your own server](https://docs.neurosquad.ai/en/providers/your-servers).

**3. Add a MiMo Code card**

Add an agent card and choose **MiMo Code**.

## What works

- **Exact status.** A small NeuroSquad plugin inside MiMo relays its events: working, finished, or
waiting for you — with the call it wants to make (`MiMo Code needs your permission: bash_delete —
rm -rf dist`), the question it asks, or a command its bash tool hands to you. See
[Finished / needs your input](https://docs.neurosquad.ai/en/agents/notifications).
- **Arrows, live.** NeuroSquad's MCP server is in the card's config, and MiMo re-reads its tools
when they change — an arrow drawn mid-session works on the next turn. Installed MCP servers ask
before every call.
- **Canvas mode.** `bash`, `webfetch`, `websearch`, `codesearch` and `exec` are denied in the
card's config. See [Canvas mode](https://docs.neurosquad.ai/en/squads/canvas-mode).
- **Dangerous mode without a restart**, like Claude Code: while the switch is on, the plugin answers
each permission ask through MiMo's own API. See [Dangerous mode](https://docs.neurosquad.ai/en/agents/dangerous-mode).
- **Sessions.** After a restart the card continues the same conversation (`mimo --session`). If the
session was deleted, the card starts a fresh one instead of leaving MiMo on a blank screen.
- **Actors.** MiMo's actors run inside the same session; the card stays working while one runs, and
their requests are marked as a subagent's in [Usage & costs](https://docs.neurosquad.ai/en/usage),
[Run Stats](https://docs.neurosquad.ai/en/cards/run-stats) and [Agent Pulse](https://docs.neurosquad.ai/en/cards/agent-pulse).
- **Long sessions.** Context meter, **Compact** (MiMo's `/compact`), the usage-limit chip with
automatic "continue", the prompt queue, the journal and hand-off.
- **Models and providers.** A lead agent can change the model with `agent_set_model` (the same
session continues), or move the conversation to Claude Code and back. OpenRouter and your own
servers work, the key kept out of every file.
- **Plugins.** [Memory](https://docs.neurosquad.ai/en/plugins/mem0-memory), [Context7](https://docs.neurosquad.ai/en/plugins/context7-docs),
[Graphify](https://docs.neurosquad.ai/en/plugins/graphify) and [Caveman](https://docs.neurosquad.ai/en/plugins/caveman) reach MiMo's turns; the
[token saver](https://docs.neurosquad.ai/en/plugins/rtk-ai-token-saver) works in dangerous mode.
- **From your phone.** The card works in [remote access](https://docs.neurosquad.ai/en/remote); its Stop key sends Escape.

## Good to know

- **Your config is never written.** Each card has its own `MIMOCODE_CONFIG` file that MiMo merges
over yours. The card starts MiMo with `--trust`, which skips the folder-trust question for that
launch only.
- **Stop a turn with Escape** (pressed twice). Ctrl+C closes MiMo, so NeuroSquad never sends it.
- **A slower start.** With the app's servers and plugin MiMo takes about 20 seconds to start; the
card waits before typing anything.
- **Two side requests aren't counted.** MiMo asks a model for each session's title and, after each
answer, for a next-prompt suggestion. It doesn't store them, so Usage can't count them.
- **OpenRouter models must be in MiMo's catalogue** (`openrouter/<slug>`); custom providers list
their own models.
- **Analytics.** MiMo sends usage metrics to Xiaomi by default. That is MiMo's own setting and
NeuroSquad leaves it alone; `MIMOCODE_ENABLE_ANALYSIS=false` turns it off.

> MiMo Code cards run on this computer only — not in WSL or SSH workspaces.
