MiMo Code — Xiaomi's Self-Evolving AI Coding Assistant with Persistent Memory
MiMo Code — Xiaomi's Self-Evolving AI Coding Assistant with Persistent Memory
If you've used Claude Code, Codex, or Cursor, you know the pattern: you start a session, explain your project, write some code, and the next day you start from scratch. The agent doesn't remember your architecture decisions, your project rules, or the bug you were debugging yesterday.
MiMo Code (MiMoCode) changes that. Built by Xiaomi's MiMo AI team as a fork of OpenCode, MiMoCode is a terminal-native AI coding assistant that brings persistent cross-session memory, intelligent context management, subagent orchestration, and self-evolving capabilities to your terminal. It supports any OpenAI-compatible LLM provider and ships with built-in workflows for code composition, deep research, and fact-checking.
Trending with over 11,600 GitHub stars since its June 2026 release, MiMoCode has quickly become one of the most talked-about AI coding agents in the open-source community.
Why It's Trending
- Persistent memory — SQLite-backed cross-session memory with full-text search. Your agent remembers project rules, architecture decisions, and task progress across sessions.
- Subagent orchestration — the primary agent spawns subagents on demand for parallel work, with lifecycle tracking, cancellation, and background execution.
- Workflow engine — deterministic JavaScript scripts that orchestrate multi-agent pipelines: compose (full dev cycle), deep-research (multi-source report), and fact-check (adversarial verification).
- Self-evolving —
/dreamextracts persistent knowledge from session traces;/distillpackages repeated workflows into reusable skills automatically. - Zero-config start — MiMo Auto channel is free for a limited time. One command to install and run.
- MCP support — built-in MCP server connections, compatible with the broader agent ecosystem.
- Open source (MIT) — fork of OpenCode, keeps all core capabilities plus persistent memory, goals, and workflows.
Prerequisites
- macOS, Linux, or Windows (WSL2)
- Node.js 18+ (for npm install) or curl (for one-line install)
- An LLM provider API key (OpenAI, Anthropic, custom providers, or MiMo Auto free channel)
Architecture
MiMoCode's architecture is designed around a modular agent runtime with persistent memory and orchestration layers:
The system is organized into four layers:
- User Interfaces — CLI terminal UI (TUI), headless mode (
mimo run), and MCP client connections provide three ways to interact with the agent. - Agent Layer — The primary agent (Build, Plan, or Compose) manages the session, spawns subagents, and coordinates workflows. Subagents share context and work in parallel.
- Memory & Context System — SQLite FTS5 powers project memory (MEMORY.md), session checkpoints, scratch notes, and task progress. Budgeted injection ranks content by importance before entering context.
- Workflows & Skills — Deterministic JavaScript workflows orchestrate multi-agent pipelines. Built-in skills handle domain-specific tasks (PDFs, spreadsheets, academic papers). The Dream & Distill system enables self-evolution.
Installation
One-Line Install (macOS / Linux)
curl -fsSL https://mimo.xiaomi.com/install | bash
npm (All Platforms)
npm install -g @mimo-ai/cli
Windows PowerShell
powershell -ep Bypass -c "irm https://mimo.xiaomi.com/install.ps1 | iex"
Verify Installation
mimo --version
Quick Start
1. Launch MiMoCode
mimo
The first launch guides you through configuration. Choose from:
- MiMo Auto (free for a limited time) — anonymous channel, zero configuration
- Xiaomi MiMo Platform — OAuth login
- Import from Claude Code — migrate existing authentication
- Custom Provider — add any OpenAI-compatible API via the TUI
2. Switch Between Agents
Press Tab to cycle between agent modes:
| Agent | Role |
|---|---|
| build | Default. Full tool permissions for development |
| plan | Read-only analysis mode for code exploration |
| compose | Orchestration mode for specs-driven workflows |
3. Use Workflows
MiMoCode ships with three built-in workflows:
# Compose — full development pipeline
mimo run "build a REST API for task management" --workflow compose
# Deep research
mimo run "research best practices for RAG systems" --workflow deep-research
# Fact-check
mimo run "verify this claim: ..." --workflow fact-check
4. Use Persistent Memory
Memory is automatic — MiMoCode saves project knowledge, session checkpoints, and task progress to SQLite. When you resume a session, context is reconstructed from:
- Project memory (
MEMORY.md) — persistent rules and architecture decisions - Session checkpoint (
checkpoint.md) — structured state snapshots - Scratch notes (
notes.md) — temporary notes for agents - Task progress (
tasks/<id>/progress.md) — per-task logs
5. Self-Evolve with Dream & Distill
# Extract persistent knowledge from session traces
/dream
# Package repeated workflows into reusable skills
/distill
Configuration
MiMoCode uses JSON/JSONC config files with built-in JSON Schema support for autocompletion.
File Locations
| File | Project-level | Global |
|---|---|---|
| Main config | .mimocode/mimocode.jsonc |
~/.config/mimocode/mimocode.json |
| TUI config | .mimocode/tui.json |
~/.config/mimocode/tui.json |
| Auth credentials | — | ~/.local/share/mimocode/auth.json |
Xiaomi provides JSON Schemas at https://mimo.xiaomi.com/mimocode/config.json for editor autocompletion — add the domain to VS Code / Cursor's trusted schema domains in settings.json.
Key Configuration Options
- Provider and model selection — configure any OpenAI-compatible endpoint
- Agent permissions — fine-grained allow/deny for file system, network, shell access
- Checkpoint and memory behavior — control how often checkpoints are saved and how much memory is injected
- MCP server connections — add external MCP servers
- Keybindings and theme — customize TUI appearance and shortcuts
- Max Mode — parallel best-of-N reasoning with judge selection (
experimental.maxMode)
Custom Provider Example
{
"$schema": "https://mimo.xiaomi.com/mimocode/config.json",
"provider": {
"openai": {
"apiKey": "sk-...",
"baseURL": "https://api.openai.com/v1"
}
}
}
Workflows in Depth
MiMoCode's workflow system is one of its most powerful features. Workflows are deterministic JavaScript scripts that orchestrate multiple agents in a sandboxed runtime.
Compose Workflow
The compose workflow implements a full development pipeline:
- Brainstorm — generate ideas and high-level design
- Design — create detailed specs
- Implement — parallel task execution in isolated git worktrees
- Verify — TDD applied per task
- Review — code review with structured output
- Report — summary of changes
- Merge — integrate all changes
Deep Research Workflow
For multi-source research reports:
- Brief — define the research question
- Plan — identify independent research angles
- Research — parallel sub-agents collect findings
- Reflect — identify gaps and contradictions
- Write — single coherent Markdown report
- Review — cold-review citations for accuracy
Custom Workflows
Place a .js file in .mimocode/workflows/ to define your own workflow, or override a built-in by using the same name.
Key Technical Details
- Every box has a connection: The architecture shows clear data/control flow from UI through agent orchestration to memory, skills, and execution.
- Bus pattern: Subagent orchestration uses a distribution model — one primary agent fans out to multiple subagents.
- Clean arrow routing: All connections follow direct paths with no crisscrossing or element intersections.
- Gutter routing: Secondary connections (like config persistence) stay in the margins outside element boundaries.
- No orphan elements: Every component serves a documented purpose in the architecture.
Built-in Skills
MiMoCode ships with 13 built-in skills covering common development tasks:
| Skill | Purpose |
|---|---|
arxiv |
Search and cite arXiv papers |
docx-official |
Produce and edit Word documents |
pdf-official |
Read, fill, and transform PDFs |
pptx-official |
Author PowerPoint presentations |
xlsx-official |
Build and clean spreadsheets |
design-blueprint |
Produce design blueprints |
frontend-design |
Visual design guidance |
html-to-video-pipeline |
HTML-to-MP4 rendering |
research-paper-writing |
Write academic papers |
skill-creator |
Create and improve agent skills |
evolve |
Self-modification framework |
loop |
Schedule recurring prompts |
mimocode |
Self-documenting reference |
Skills can be overridden by placing a skill with the same name in .mimocode/skills/<name>/SKILL.md or ~/.claude/skills/.
Voice Input
MiMoCode supports real-time streaming voice input powered by TenVAD segmentation and MiMo ASR:
# Activate voice mode in the TUI
/voice
Speak naturally — audio is segmented by pauses and transcribed incrementally. Requires sox (brew install sox on macOS). Available for MiMo logged-in users.
MCP Server Support
MiMoCode supports the Model Context Protocol (MCP), allowing it to connect to external tools and data sources:
# In config
{
"mcp_servers": {
"my-server": {
"command": "node",
"args": ["/path/to/mcp-server.js"]
}
}
}
Comparison: MiMoCode vs Claude Code vs Codex
MiMoCode
- Persistent memory: ✅ SQLite FTS5
- Subagent orchestration: ✅ First-class
- Workflows: ✅ JS-based
- Self-evolution: ✅ Dream/Distill
- Voice input: ✅ Real-time
- MCP support: ✅
- Open source: ✅ MIT
- Multiple providers: ✅ Any OpenAI-compatible
- TUI: ✅ Rich terminal UI
Claude Code
- Persistent memory: ❌ Session-only
- Subagent orchestration: ❌
- Workflows: ❌
- Self-evolution: ❌
- Voice input: ❌
- MCP support: ✅
- Open source: ❌
- Multiple providers: ❌ Anthropic only
- TUI: ✅
Codex
- Persistent memory: ❌ Session-only
- Subagent orchestration: ❌
- Workflows: ❌
- Self-evolution: ❌
- Voice input: ❌
- MCP support: ✅
- Open source: ❌
- Multiple providers: ❌ OpenAI only
- TUI: ✅
Resources
- GitHub: github.com/XiaomiMiMo/MiMo-Code
- Website: mimo.xiaomi.com/coder
- Blog post: mimo.xiaomi.com/zh/blog/mimo-code-long-horizon (Chinese, available in English via site toggle)
- Awesome MiMo Agent: github.com/XiaomiMiMo/awesome-mimo-agent
- OpenCode (upstream): github.com/anomalyco/opencode
- License: MIT