MiMo Code: Where Models and Agents Co-Evolve
中文 | English
MiMoCode is a terminal-native AI coding assistant. It can read and write code, run commands, manage Git, and use a persistent memory system to keep a deep understanding of your project across sessions while continuously improving itself.
MiMoCode supports connecting to any mainstream LLM provider API.

Xiaomi MiMo Desktop is built for real-world work: one conversation can handle office work, design, coding, and multimodal creation, while multiple conversations can divide work and collaborate. The desktop app is powered by MiMo Code as its core engine, bringing its terminal-native intelligence to desktop workflows.
Powered by the new MiMo-V2.6-Pro and MiMo-V2.6-Flash models.
# One-line install (macOS / Linux)
curl -fsSL https://mimo.xiaomi.com/install | bash
# One-line install (Windows PowerShell)
powershell -ep Bypass -c "irm https://mimo.xiaomi.com/install.ps1 | iex"
# Run
mimo
The first launch guides you through configuration automatically. Supported options: - Xiaomi MiMo Platform — OAuth login - Codex (ChatGPT Pro/Plus) — OpenAI OAuth login - Import from Claude Code — migrate existing authentication in one step - Provider list — connect catalog providers by API key, or OAuth where supported (e.g. xAI/Grok) - Custom Provider — add any OpenAI-compatible API in the TUI
sudo apt install xsel
brew install --cask iterm2
# Remote host
mimo serve --port 4096
# Local host: create the SSH port forward
ssh -N -L 4096:127.0.0.1:4096 user@remote-host
# Local host: connect from another terminal
mimo attach http://127.0.0.1:4096
If decorative animation is causing the lag, run `/vivid`, or configure **Vivid visuals** in the `ctrl+p` command palette, to switch between Vivid and Minimal visuals as needed.
Beyond MiMoCode, Xiaomi MiMo models also work in other agents and coding tools like Cursor, Cline, and Zed.
awesome-mimo-agent collects setup guides for using MiMo in those tools — worth a look if you want to try MiMo elsewhere. Contributions welcome: open a PR to add your own setup.
| Agent | Description |
|---|---|
| build | Default. Full tool permissions for development |
| plan | Read-only analysis mode for code exploration and solution design |
Press Tab to switch between primary agents. Build and Plan can switch at any time; other custom or special modes lock once the first message is sent.
Cross-session memory powered by SQLite FTS5 full-text search:
MEMORY.md) — persistent project knowledge, rules, and architecture decisionscheckpoint.md) — structured state snapshots maintained automatically by the checkpoint-writer subagentnotes.md) — temporary note area for agentstasks/<id>/progress.md) — per-task logsMemory is injected automatically when a session resumes, so the agent does not need to relearn project context.
/context-limit (or compaction.max_context) makes a model compact earlier than its own window, per model/context-limit){
"compaction": {
"max_context": {
"openai/gpt-5.6": "272K", // token count, "300K", "1M", or "50%" of the window
"anthropic/*": "300K" // wildcards allowed, longest pattern wins
}
}
}
The value is always clamped to what the provider actually accepts, so it can only lower the
compaction point, never raise it. `0` restores the model's own window.
Why you might want it:
- **Cost tiers.** OpenAI prices GPT-5.6 prompts above 272K input at 2x input and 1.5x output
for the whole request.
- **The advertised window is not always what you get.** The same model can have a different
usable window depending on how you reach it — a ChatGPT/Codex subscription, a direct API
key, or a reseller such as OpenRouter — so a catalog figure of 1M does not mean your route
serves 1M.
- **Quality and latency.** Very long contexts are slower and, past a point, not better.
`mimo models ` prints, per model, the window MiMoCode resolved and the token count
where it will compact. The prompt footer uses that same number as its denominator
(`33.0K/260K↓ (13%)` — the `↓` means a budget is in force), and `/status` breaks it down.
A tree-shaped task system (T1, T1.1, T1.2, …) that integrates automatically with the checkpoint system, so task progress is preserved when sessions resume.
The primary agent can create subagents on demand. Subagents share the current session context and can work in parallel, with lifecycle tracking, cancellation, and background execution.
The /goal command sets a stopping condition for a session. When the agent tries to stop, an independent judge model evaluates the conversation to decide whether the condition is truly satisfied — preventing premature "optimistic stops" during autonomous work.
Use the /compose-next skill to run an end-to-end feature delivery loop: a single self-contained contract covering grill → workspace → spec → implement → verify → review → finalize → finish, with feature documents at docs/compose/spec/<feature>.md under the workspace root. Do not combine it with plan mode.
Workflows are deterministic JavaScript scripts that orchestrate multiple agents in a sandboxed runtime. Unlike agent conversations, workflows encode fixed phase sequences with bounded retries and automatic parallelization — fire-and-forget execution with no user interaction required.
MiMoCode ships with three built-in workflows:
| Workflow | Phases | Description |
|---|---|---|
deep-research |
Brief → Plan → Research → Reflect → Write → Review | Multi-source deep research report generator. Plans independent research angles, runs parallel sub-agents to collect cited findings, reflects on gaps, writes a single coherent Markdown report, then cold-reviews citations. Convergent: resumable via file checkpoints. |
fact-check |
Plan → Search → Extract → Group → Crosscheck → Report | Adversarial fact verification. Runs parallel web searches, extracts checkable facts, groups duplicates, then cross-checks each with a 3-juror adversarial vote. Best for precise claims ("Is X true?"). |
research-experiment |
Baseline → Loop → Audit → Report | Autonomous optimization loop for a mechanically verifiable metric. Establishes a baseline, iterates through hypothesize → implement → evaluate → keep/revert, audits for metric gaming, and produces a reproducible result log. Requires a fixed-budget evaluation command and an explicit editable-file scope. |
Custom workflows: Place a .js file in .mimocode/workflows/ or .claude/workflows/ to define your own, or override a built-in by using the same name.
Skills are reusable instruction sets that teach agents how to handle specific tasks (e.g. generating PDFs, writing academic papers, searching arXiv). For a new task, MiMoCode searches available skills by exact name, localized alias, and BM25 relevance. High-confidence matches are loaded automatically; uncertain matches are ranked for the agent to assess. In the TUI, type / to browse the autocomplete list or invoke a skill directly with /<skill-name> — mentioning two or more skills in a single message auto-loads them and injects a multi-skill orchestration plan.
MiMoCode bundles the following builtin skills:
| Skill | Description |
|---|---|
arxiv |
Search, read, cite, and analyze arXiv papers |
claude-code |
Drive the Claude Code CLI for coding, testing, review, and Git tasks (opt-in: MIMOCODE_ENABLE_AGENT_CLI_SKILLS) |
codex |
Drive the Codex CLI in headless automation, CI, containers, and remote environments (opt-in: MIMOCODE_ENABLE_AGENT_CLI_SKILLS) |
compose-next |
Spec→ship feature delivery orchestration — clarify, spec, implement, verify, review, finish |
data-analytics |
Analyze product and business data through reusable workflows for data quality, KPIs, dashboards, reports, notebooks, and market sizing |
deep-research |
Produce cited, multi-source research reports with parallel subagents and built-in web tools |
docx-official |
Produce, read, and transform Word (.docx) files |
grok-build |
Operate the Grok Build CLI for interactive and headless agent workflows (opt-in: MIMOCODE_ENABLE_AGENT_CLI_SKILLS) |
html-to-video-pipeline |
HTML-to-MP4 rendering via headless browser + ffmpeg |
learn-everything |
Turn documents, URLs, or topics into adaptive courses with exercises, feedback, and progress tracking |
loop |
Schedule recurring prompts on a fixed cadence |
mimocode-docs |
Self-documenting reference for MiMoCode features, commands, providers, and configuration |
modern-python-toolchain |
Set up modern Python projects with uv, Ruff, and Pyright |
pdf-official |
Produce, read, fill, and transform PDF files |
pptx-official |
Author and manipulate PowerPoint (.pptx) decks |
product-design |
Explore, audit, implement, and QA product and UX designs through focused workflows |
research-paper-writing |
Write and polish academic papers (ML/CV/NLP style) |
sales |
Support sales research, meeting preparation, account prioritization, deal strategy, forecasting, and CRM workflows |
skill-creator |
Interactive guide for creating and improving agent skills |
super-research |
Run long-horizon, auditable research, experiments, benchmarks, diagnostics, reproductions, and citation checks |
xlsx-official |
Build, clean, and transform spreadsheets (.xlsx/.csv) |
The skills claude-code, codex, and grok-build drive other agent CLIs from the terminal. They ship off by default; set MIMOCODE_ENABLE_AGENT_CLI_SKILLS=true to enable them. Other skills may still require task-specific tools described in their instructions.
Overriding a builtin skill: Create a skill with the same name under the project (.mimocode/skills/<name>/SKILL.md) or personal (for example ~/.config/mimocode/skills/<name>/SKILL.md) MiMoCode skills directory. Open-standard .agents/skills/ in the project and ~/.agents/skills/ are compatible discovery roots. User skills discovered later in the scan order override builtins with the same name.
Real-time streaming voice input powered by TenVAD and MiMo ASR. Activate with /voice, then speak — audio is segmented by pauses and transcribed incrementally into the input. Available for MiMo logged-in users. Requires sox (brew install sox on macOS, other platforms similar).
sudo apt install -y sox pulseaudio libasound2-plugins
export PULSE_SERVER=unix:/mnt/wslg/PulseServer
# Mac (local)
brew install pulseaudio
pulseaudio --load="module-native-protocol-tcp auth-ip-acl=127.0.0.1" --exit-idle-time=-1 --daemonize
# Add to ~/.ssh/config: RemoteForward 4713 127.0.0.1:4713
# Remote host
apt install -y pulseaudio pulseaudio-utils sox
export PULSE_SERVER=tcp:127.0.0.1:4713
# Verify: pactl info
{
"voice": {
"control_model": "openrouter/xiaomi/mimo-v2.6-flash"
}
}
**Internal / self-hosted relay (both ASR and voice control):**
{
"provider": {
"internal": {
"options": {
"baseURL": "https://your-api-gateway.example.com/v1",
"apiKey": "sk-..."
},
"models": {
"xiaomi/mimo-v2.5-asr": { "name": "MiMo-V2.5-ASR" },
"xiaomi/mimo-v2.6-flash": { "name": "MiMo-V2.6-Flash" }
}
}
},
"voice": {
"asr_model": "internal/xiaomi/mimo-v2.5-asr",
"control_model": "internal/xiaomi/mimo-v2.6-flash"
}
}
Custom providers must register at least one model in their `models` field to be recognized. The model names in `voice.*_model` are sent directly to the API — they don't need to match the registered model keys exactly.
> **Note:** Models registered under a custom provider will appear in the model selection list. Don't use ASR-only models (e.g. `mimo-v2.5-asr`) as your primary coding model.
/dream — scans recent session traces, extracts persistent knowledge into project memory, and removes outdated entries/distill — discovers repeated manual workflows in recent work and packages high-confidence candidates into reusable skills, subagents, or commandsMiMoCode uses JSON/JSONC config files with published JSON Schemas for autocompletion and validation.
| File | Project-level | Global |
|---|---|---|
| Main config | .mimocode/mimocode.jsonc (also .json) |
~/.config/mimocode/mimocode.jsonc (also .json) |
| TUI config | .mimocode/tui.json |
~/.config/mimocode/tui.json |
| Auth credentials | — | ~/.local/share/mimocode/auth.json |
On Windows, XDG paths fall under
%LOCALAPPDATA%\mimocode\. You can override all paths withMIMOCODE_HOME.
MiMoCode auto-injects a $schema field when it first loads your config, so your editor gets completions and validation out of the box:
| Config | Schema URL |
|---|---|
mimocode.jsonc / mimocode.json |
https://mimo.xiaomi.com/mimocode/config.json |
tui.json |
https://mimo.xiaomi.com/mimocode/tui.json |
{
"json.schemaDownload.trustedDomains": {
"https://mimo.xiaomi.com/": true
}
}
If your provider is not in the built-in model catalog, configure it directly with its base URL, API key, and model ID:
{
"$schema": "https://mimo.xiaomi.com/mimocode/config.json",
"model": "custom/MODEL_NAME",
"provider": {
"custom": {
"name": "Custom",
"npm": "@ai-sdk/openai-compatible",
"only_configured_models": true,
"models": {
"MODEL_NAME": {
"name": "MODEL_NAME"
}
},
"options": {
"baseURL": "BASE_URL",
"apiKey": "API_KEY"
}
}
}
}
baseURL and apiKey./v1 unless the endpoint requires it.models is the upstream model ID. Model IDs containing / are supported because only the first / in model separates the provider ID from the model ID.custom with another unused lowercase provider ID if needed, and use the same ID in the top-level model value.@ai-sdk/openai-compatible is for OpenAI-compatible APIs. Services using a different wire protocol require their provider-specific adapter.Put user-wide settings in ~/.config/mimocode/mimocode.jsonc (or mimocode.json in the same directory), or project-only settings in .mimocode/mimocode.jsonc (or .json), and merge them with any existing configuration. Because apiKey is stored as plaintext, keep the file readable only by your user and never commit it. Run mimo models or use the TUI model picker to verify the configured model.
To declare which input modalities a custom model supports (image, audio, video, PDF), run /modalities in the TUI — a multi-select dialog that persists the setting to config without hand-editing.
Max Mode (parallel best-of-N reasoning with judge selection) can be enabled via experimental.maxMode in the config.
/tmp)
**This setting has known risks — use it at your own risk.** The temp directory is
world-writable and shared with every other process and user on the machine. Auto-allowing
it means the model can read and write there without confirmation, which widens your exposure
to predictable temp-path / symlink tricks (e.g. another process pre-creating `/tmp/foo` as a
symlink to a sensitive file). For that reason it is only recommended for single-user,
controlled environments or inside a container. Keep the allowlist as narrow as possible.
</details>
<details>
<summary><strong>Skipping permission prompts (<code>--dangerously-skip-permissions</code>)</strong></summary>
For trusted, disposable environments (containers, sandboxes, CI) you can auto-approve
everything the agent does instead of confirming each action:
```bash
# TUI — prompts once for an explicit confirmation on startup
mimo --dangerously-skip-permissions
# Headless
mimo run --dangerously-skip-permissions "your prompt"
# Or via environment variable (any surface)
MIMOCODE_DANGEROUSLY_SKIP_PERMISSIONS=1 mimo
This injects an **allow-all base underneath your config**, so a tool with no rule
auto-approves — but any explicit rule you wrote still wins (the last matching rule wins,
and your rules sit after the injected `*`). A `deny` still blocks; note that a leftover
`ask` rule also still prompts, and a top-level `"*": "ask"` makes the flag a no-op. In the
TUI it shows a red warning and requires you to accept the risk before it takes effect (the
prompt is skipped when there is no TTY, so in CI it activates with no confirmation).
**This is dangerous.** With permissions bypassed, a malicious prompt, file, or plugin can
run arbitrary shell commands and read, modify, or exfiltrate your data without any
confirmation. Only use it where you fully trust the workspace.
For a lighter-weight option, the `/skip-permissions` command toggles auto-allow at runtime
inside the TUI: `deny` rules still block, and forced-ask operations (e.g. destructive bash)
auto-reject after 60 seconds with feedback the model can act on instead of hanging.
bun ci # Install dependencies (= bun install --frozen-lockfile)
bun run dev # Run in development mode
bun run typecheck # Type check
MiMoCode is built as a fork of OpenCode. It keeps all core OpenCode capabilities (multiple providers, TUI, LSP, MCP, plugins) and adds persistent memory, intelligent context management, subagent orchestration, goal-driven autonomous loops, compose-next end-to-end delivery, Dynamic Workflows, and self-improvement via dream/distill.
Scan the QR code to join the community group chat:
Source code is licensed under the MIT License.
Use of MiMoCode is also subject to the Use Restrictions. Use of Xiaomi MiMo-hosted services is subject to the MiMo Terms of Service. Use of the MiMo name, logo, and trademarks is subject to the MiMo Trademark Policy.
| 日期 | 榜单 | 排名 | 周期新增 | 总 STAR |
|---|