Xiaomi Open-Sources MiMoCode, an AI Programming Agent Featuring Cross-Session Memory and Workflow Automation
Xiaomi’s MiMo team recently released and open-sourced an AI programming agent named MiMoCode, version v0.1.0. Developed by a five-person team in just 14 days, the project aims to address the issues of context loss and memory gaps that current AI programming tools face when handling long-term, complex projects.
Open Architecture Based on OpenCode
MiMoCode is built on a fork of the open-source project OpenCode, inheriting and extending its core capabilities. Its architecture maintains support for multiple model providers and is not locked into Xiaomi’s own model ecosystem. On first launch, users have several options:
- MiMo Auto: A time-limited, free, and anonymous channel for a quick trial.
- Xiaomi MiMo Platform: Log in to access the full suite of platform services.
- Import from Claude Code: Allows existing users to easily migrate their authentication credentials.
- Custom Model Service: Supports connecting to any OpenAI API-compatible model service.

This open strategy allows users to choose the most suitable underlying large language model for their needs, enhancing the tool’s flexibility and applicability. The installation process is also straightforward, with an official one-click installation script available. It also supports global installation via npm (npm install -g @mimo-ai/cli).
Core Breakthrough: Persistent Memory for Long-Task Continuity
MiMoCode’s most distinctive feature is its persistent memory system, designed to solve the AI “amnesia” problem. Traditional AI coding assistants often lose project context after hitting the context window limit, forcing them to “re-learn” the project in a new session. MiMoCode attempts to overcome this bottleneck with a structured file system:
MEMORY.md: Stores the project’s core knowledge, architectural decisions, and key rules, serving as a long-term project archive.
checkpoint.md: Saves a structured snapshot of the current session, facilitating recovery after task interruption.
notes.md: Acts as the agent’s temporary “scratchpad” during its work process.
tasks/<id>/progress.md: Records the execution status and progress of each sub-task in detail.
This information is efficiently retrieved using the SQLite FTS5 full-text search engine. When a task needs to be resumed or a new session started, the system intelligently injects relevant memories into the prompt based on the context budget. This mechanism is different from simply expanding the context window; it functions more like a proactive project knowledge management system, ensuring the agent can track a project’s lifecycle across multiple sessions.
Multi-Agent Collaboration and Automated Workflows
To handle complex software development requirements, MiMoCode introduces multi-agent collaboration and workflow orchestration capabilities. The system has three main built-in agent modes:
build: Responsible for specific code writing and direct development tasks.
plan: Used for read-only analysis, solution design, and task decomposition.
compose: Acts as the main conductor, orchestrating a complete workflow by linking stages such as planning, execution, code review, test-driven development (TDD), and debugging.
The main agent can create multiple sub-agents to work in parallel as needed, depending on task complexity, and track their entire lifecycle. Additionally, MiMoCode provides two special commands for “self-evolution”:
/dream: Scans recent session history to distill information of long-term value and saves it to MEMORY.md.
/distill: Identifies repetitive manual user workflows and attempts to encapsulate them into reusable Skills, sub-agents, or new commands.
Built-in Safeguards, Licensing, and Future Outlook
Considering the risks of an AI agent executing tasks autonomously, MiMoCode includes a “Goal Stop Condition” mechanism. When the agent believes a task is complete, an independent “referee model” judges whether the goal has truly been achieved, reducing instances of the agent “declaring victory” halfway through coding.
As an early v0.1.0 release, MiMoCode’s long-term task stability, memory quality, and multi-agent scheduling efficiency are yet to be tested in real-world projects. Although its source code is under the MIT license, it comes with separate use-restriction clauses. These explicitly prohibit its use for malicious network activities or for autonomously performing high-risk operations without human supervision, reminding secondary developers and integrators to read and comply with them carefully.
Furthermore, the future pricing strategy for the time-limited free MiMo Auto service will be a key factor in determining whether MiMoCode gains widespread adoption as a daily tool within the developer community.