MiMo Code: Free Open-Source AI Coding Agent with Persistent Memory

Xiaomi's open-source terminal coding agent. Check current access, installation, providers, memory, MCP, and skills.

MiMoCode is Xiaomi MiMo’s open-source, terminal-native AI coding agent. It can inspect a repository, edit files, run shell commands, manage Git, connect to MCP servers, and retain project knowledge across sessions.

The MiMo-V2.5 anonymous free trial ended on July 26, 2026. The MiMoCode CLI remains available under the MIT License and separate use restrictions, but model access now depends on the provider you connect.

Current model options include the Xiaomi MiMo platform, Codex OAuth for eligible ChatGPT Plus or Pro accounts, imported Claude Code authentication, and custom OpenAI-compatible endpoints.

MiMoCode is good for developers who want a provider-flexible coding agent with persistent memory, checkpoint-based context reconstruction, MCP, reusable skills, and deterministic multi-agent workflows.

Its most distinctive value appears in long-running repository work that spans several sessions.

MiMoCode Current Status

DeveloperXiaomi MiMo team
Product typeOpen-source terminal AI coding agent
LicenseMIT License
Anonymous free model accessEnded July 26, 2026
Current model accessXiaomi MiMo OAuth, Codex OAuth, imported Claude Code authentication, provider catalog, or custom endpoint
PlatformsmacOS, Linux, and Windows
Primary interfaceTerminal TUI and headless CLI
MemoryProject memory, checkpoints, task records, notes, and SQLite FTS5 search
ExtensionsMCP, skills, custom agents, commands, plugins, LSP, formatters, hooks, and custom tools
Best fitLong-running repository tasks, multi-session work, and provider-flexible coding workflows

Free-status note: MiMoCode’s source code remains open source. The discontinued MiMo Auto trial referred to hosted model access, not the software license. Xiaomi-hosted model usage now requires an eligible account, balance, or Token Plan. Provider and API charges vary outside Xiaomi’s platform.

Key Features

  • Repository-level coding: MiMoCode reads and writes files, runs shell commands, works with Git, searches code through LSP integrations, and supports interactive or headless execution.
  • Build, Plan, and Compose agents: Build has full development tools, Plan provides read-only analysis, and the dedicated Compose agent supplies the legacy interactive orchestration path.
  • Recommended Compose workflow: Current releases recommend the Build agent with the /compose-next skill for interactive spec-to-ship work. The dedicated Compose agent remains available for the legacy skill-driven workflow.
  • Persistent project memory: MEMORY.md stores durable project knowledge and architecture decisions. Session checkpoints, scratch notes, task records, and SQLite FTS5 preserve working context.
  • Context reconstruction: When the active model approaches its usable context limit, MiMoCode rebuilds the session from the latest checkpoint, project memory, task progress, and recent messages.
  • Configurable compaction point: The /context-limit command can lower the context threshold for a model. This helps control latency, route-specific model limits, and high-context pricing tiers.
  • Goal-verified autonomous work: The /goal command defines a natural-language stop condition. A separate judge checks whether the condition has been met before the agent finishes.
  • Dream and Distill: /dream consolidates durable knowledge into memory. /distill turns repeated procedures into reusable skills, subagents, or commands.
  • Subagents: Primary agents can launch general or exploration subagents for parallel and background work, with lifecycle tracking and cancellation.
  • Deterministic workflows: JavaScript workflow scripts can encode fixed phases, bounded retries, structured handoffs, parallel execution, nested workflows, and isolated Git worktrees.
  • Four built-in workflows: MiMoCode includes compose, deep-research, fact-check, and research-experiment.
  • Reusable skills: Built-in skills cover coding delegation, Codex, Claude Code, research, office documents, product design, modern Python tooling, long-horizon research, and other specialized tasks.
  • Skill discovery: MiMoCode searches skills by exact name, localized alias, and BM25 relevance. A high-confidence match can load automatically, while /skills and slash autocomplete expose manual selection.
  • Multi-skill orchestration: Referencing two or more skills in one message can load up to three skills and add an orchestration plan.
  • Programmatic tool orchestration: The optional tool_script capability chains several tool calls inside a QuickJS sandbox to reduce repeated model round trips.
  • Provider flexibility: First-launch options include Xiaomi MiMo, Codex OAuth, Claude Code authentication import, catalog providers, and custom OpenAI-compatible endpoints.
  • Local model support: A local model can connect through an OpenAI-compatible gateway when the model and endpoint support the tool calls needed for agentic coding.
  • MCP and development extensions: MiMoCode supports local and remote MCP servers, OAuth-enabled MCP authentication, LSP, plugins, custom commands, custom tools, hooks, formatters, and themes.
  • Permission controls: Rules can allow, deny, or ask for actions. Destructive operations receive extra protection, while unattended modes retain prominent warnings.
  • Voice input: Streaming voice input uses TenVAD and MiMo ASR. It requires sox and appropriate model access.
  • Experimental Max Mode: MiMoCode can generate several candidate responses and use a judge to select one. This mode increases provider calls and token use.

MiMo Code vs Claude Code

MiMo Code and Claude Code both inspect repositories, edit files, run terminal commands, work with Git, automate development tasks, and connect to MCP servers. Their main difference is the model and extension architecture.

MiMoCode exposes its TypeScript source, inherits core OpenCode capabilities, and accepts several provider routes. Claude Code is Anthropic’s commercial coding agent and centers on Claude models through a Claude subscription, the Anthropic API, Amazon Bedrock, Google Vertex AI, or supported gateways.

MiMo CodeClaude Code
ProductOpen-source terminal coding agentCommercial agentic coding tool
SourceMIT-licensedProprietary distribution
Primary interfaceTerminal TUI and headless CLITerminal CLI with supported editor and automation integrations
Model accessXiaomi MiMo, Codex OAuth, Claude auth import, or custom endpointsClaude subscription, Anthropic API, Bedrock, Vertex AI, or supported gateways
Anonymous hosted accessThe MiMo-V2.5 free trial ended July 26, 2026No comparable anonymous hosted channel
Persistent memoryProject memory, checkpoints, notes, tasks, and SQLite FTS5Project instructions, memory files, and session history
Context managementCheckpoint writer, reconstruction, budgeted injection, and configurable compaction pointCompaction and session management within the Claude Code workflow
Primary modesBuild, Plan, legacy Compose, and /compose-nextInteractive and permission-controlled agent workflows
Multi-agent workSubagents, workflows, Compose, and experimental orchestrationSubagents, Agent SDK, hooks, and automation surfaces
Deterministic workflowsSandboxed JavaScript workflows with fixed phases and structured outputHooks, SDKs, headless execution, and CI integrations
Provider flexibilityProvider catalog and custom OpenAI-compatible endpointsClaude models through Anthropic and supported enterprise hosts
CustomizationSkills, agents, workflows, plugins, tools, commands, hooks, MCP, LSPSkills, agents, hooks, plugins, MCP, settings, and SDKs
Cost basisSoftware is open source; model and provider usage determines costClaude plan, API, Bedrock, Vertex AI, or gateway usage
Best fitProvider choice, persistent memory, and customizable long-running workflowsTeams and developers centered on Claude models and Anthropic’s coding stack

Install MiMoCode

Install MiMoCode on macOS or Linux:

curl -fsSL https://mimo.xiaomi.com/install | bash

Use the native PowerShell installer on Windows:

powershell -ep Bypass -c "irm https://mimo.xiaomi.com/install.ps1 | iex"

The npm package works across supported platforms:

npm install -g @mimo-ai/cli --registry https://registry.npmjs.org

Open a project directory and run the mimo command:

cd /path/to/your/project
mimo

The first launch guides you through model access. Choose Xiaomi MiMo OAuth, Codex OAuth, Claude Code authentication import, a catalog provider, or a custom provider. The discontinued MiMo Auto trial no longer provides anonymous model inference.

Run /init inside the project on first use. MiMoCode analyzes the repository and creates or updates AGENTS.md with project structure, conventions, and guidance for later sessions.

/init

Select the primary agent before sending the first message. Build and Plan can switch after a session starts, but Compose is isolated once entered. Current releases recommend Build with /compose-next for interactive spec-to-ship work.

Start with a concrete repository task, review each requested permission, and inspect the resulting diff. Add a stop condition before a long autonomous run:

/goal all tests pass and the feature branch is committed

Use the recommended Compose skill for a feature that needs specification, implementation, verification, and review:

/compose-next implement the account export feature

Rebuild a long session from its latest checkpoint when context recovery needs manual intervention:

/rebuild

Choose an earlier compaction point for the active model when route limits, latency, or long-context pricing require a smaller working budget:

/context-limit

Run memory maintenance after a long project phase, or package recurring procedures into reusable instructions:

/dream
/distill

Model and Provider Options

OptionHow it worksAccess requirement
Xiaomi MiMo PlatformOAuth login connects MiMoCode to pay-as-you-go API usage or a Token Plan.Xiaomi MiMo account with sufficient balance or an active plan
CodexOpenAI OAuth connects through an eligible ChatGPT subscription.ChatGPT Plus or Pro account supported by the Codex login flow
Import from Claude CodeMiMoCode imports an existing Claude Code authentication setup.Existing Claude Code credentials and applicable Anthropic access
Provider catalogSelect a built-in provider and authenticate with an API key or supported OAuth flow.Provider-specific account and billing rules
Custom providerAdd an OpenAI-compatible base URL, model ID, and credentials in the TUI or config.A compatible endpoint and model with reliable tool calling
Local model gatewayConnect Ollama or another local service through an OpenAI-compatible API layer.A local model and gateway that support the required agent tools

A custom provider needs a registered model entry. Keep the upstream base URL and model ID exactly as the provider supplies them, and do not add or remove /v1 unless the endpoint requires it.

{
  "$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"
      }
    }
  }
}

MiMoCode Cheat Sheet and Quick Reference

CLI Commands

CommandPurpose
mimoLaunch the interactive terminal interface.
mimo runRun a headless, non-interactive coding task.
mimo mcpManage and inspect MCP servers.
mimo agentManage agent definitions.
mimo modelsList models and resolved context information.
mimo providersList or manage model providers.
mimo accountOpen account and login controls.
mimo upgradeUpdate MiMoCode.
mimo uninstallRemove MiMoCode and optionally preserve data.
mimo serveRun the MiMoCode server.
mimo statsShow usage statistics.
mimo export / mimo importExport or import sessions.
mimo sessionList and manage saved sessions.
mimo github / mimo prUse GitHub and pull-request integrations.
mimo generateOpen the code-generation entry point.
mimo pluginManage plugins.
mimo dbRun database utilities.
mimo acp / mimo attachUse ACP or attach to a running session.
mimo debugOpen debugging utilities.
mimo completionGenerate shell completion scripts.

Run mimo <command> --help to inspect the current flags for a command. Notable TUI flags include --continue, --session, --model, --agent, --never-ask, --trust, and --dangerously-skip-permissions.

Application Slash Commands

CommandAction
/sessionsList and continue previous sessions.
/workflowsOpen the workflow list when workflow support is enabled.
/newStart a new session.
/modelsSelect a model.
/agentsSwitch the current agent.
/modalitiesConfigure image, audio, video, or PDF input for a custom model.
/never-askToggle never-ask permission mode.
/skip-permissionsToggle runtime auto-allow while explicit deny rules remain active.
/mcpsShow MCP server status.
/variantsSwitch model variants when available.
/loginSign in to Xiaomi MiMo.
/connectConnect or authenticate a model provider.
/logoutSign out of Xiaomi MiMo.
/orgSwitch organizations when multiple organizations are available.
/statusShow system, model, context, and session status.
/worktreeList and switch Git worktrees.
/themesChoose a terminal theme.
/languageChange the TUI language.
/docOpen user documentation.
/exitExit MiMoCode.

Session and Prompt Commands

CommandAction
/editorEdit the current prompt in an external editor.
/skillsBrowse and select available skills.
/voiceToggle streaming voice input.
/shareShare the current session when sharing is enabled.
/renameRename a session.
/timelineOpen the message timeline.
/forkFork a session from an earlier message.
/compactSummarize a long session to free context.
/btw <question>Ask a side question without adding it to the main context.
/undoUndo the latest message and file changes.
/redoRestore an undone message and file changes.
/thinkingToggle reasoning-block visibility.
/copyCopy the session transcript.
/exportExport the session transcript.

Built-in Prompt Commands

CommandAction
/initGenerate or update project guidance in AGENTS.md.
/review [target]Review uncommitted changes, a commit, branch, or pull request.
/goal <condition>Set a judge-verified stop condition.
/dream [focus]Consolidate durable knowledge into project memory.
/distill [focus]Package recurring work into skills, subagents, or commands.
/rebuildReconstruct context from the latest checkpoint.
/context-limitSet an earlier compaction point for the current model.
/deep-research <question>Start a multi-source research workflow when workflow support is available.
/loopsList or cancel scheduled jobs when cron support is enabled.
/compose-nextStart the recommended interactive spec-to-ship workflow.
/<skill-name>Invoke a discovered built-in, project, or personal skill.

Built-in Agents

AgentRole
buildDefault primary agent with full development tools. Use with /compose-next for the recommended interactive Compose workflow.
planRead-only code exploration and solution design.
composeLegacy interactive orchestration mode with a fixed Compose skill set.
generalGeneral-purpose subagent launched by a primary agent.
exploreCodebase exploration subagent.

Compose Options

OptionUse it for
/compose-next on BuildExploratory or ambiguous feature work that needs questions, redirection, and human judgment between phases. This is the recommended interactive path for capable models.
compose workflowWell-defined work that can split into independent subtasks and run non-interactively through specification, implementation, verification, review, and merge.
compose agentThe legacy interactive path for the older skill-driven Compose curriculum.

Built-in Workflows

WorkflowPurpose
composeRuns a development pipeline from brainstorming and design through implementation, verification, review, reporting, and merge.
deep-researchPlans parallel research, checks evidence gaps, writes one cited report, and reviews the final citations.
fact-checkSearches, extracts claims, groups duplicates, runs adversarial cross-checks, and returns structured findings.
research-experimentRuns a guarded optimization loop against one mechanically verifiable numeric metric, with baseline, keep-or-revert decisions, and audit logs.

Built-in Skills

SkillPurpose
arxivSearch, read, cite, and analyze arXiv papers.
claude-codeDelegate coding, testing, review, and Git work to the Claude Code CLI.
codexRun and troubleshoot Codex CLI work in automation, CI, containers, and remote environments.
compose-nextRun the recommended interactive specification-to-shipping development workflow.
data-analyticsAnalyze product and business data through reusable analytical workflows.
deep-researchProduce cited multi-source research reports with parallel subagents.
design-blueprintCreate a design blueprint and decision trace before visual implementation.
docx-officialCreate, read, and transform Word documents.
drive-mimoScript and automate another MiMoCode process.
evolveModify agent tools, hooks, knowledge, workflows, or UI.
frontend-designApply visual design guidance to user interfaces.
html-to-video-pipelineRender HTML content to MP4 video.
learn-everythingTurn source material into an adaptive course with exercises and progress tracking.
loopSchedule recurring prompts on a fixed cadence.
mimocode-docsLoad MiMoCode features, commands, providers, and configuration references.
modern-python-toolchainConfigure Python projects with uv, Ruff, and Pyright.
pdf-officialCreate, read, fill, and transform PDF files.
pptx-officialCreate and edit PowerPoint presentations.
product-designExplore, audit, implement, and QA product and UX designs.
research-paper-writingWrite and polish academic papers.
salesSupport account research, meeting preparation, prioritization, deal strategy, and forecasting.
skill-creatorCreate or improve reusable agent skills.
super-researchRun long-horizon research, experiments, benchmarks, reproductions, and citation audits.
xlsx-officialBuild, clean, and transform spreadsheets.

The claude-code and codex skills appear only when the corresponding executables are installed. Project skills in .mimocode/skills/ and personal skills in supported skill directories can override a built-in skill with the same name.

Core Config Files

ScopeFile
Project config.mimocode/mimocode.jsonc or .mimocode/mimocode.json
Global config~/.config/mimocode/mimocode.jsonc or mimocode.json
Project TUI.mimocode/tui.json
Global TUI~/.config/mimocode/tui.json
Credentials~/.local/share/mimocode/auth.json
Project skills.mimocode/skills/<name>/SKILL.md
Project workflows.mimocode/workflows/<name>.js

Core Config Fields

FieldUse
$schemaEnable completion and validation with the published MiMoCode schema.
modelSet a primary model or model group.
model_groupsDefine reusable capability tiers such as lite, standard, and ultra.
small_modelLegacy lightweight-model setting; new configurations should use the lite model group.
providerConfigure custom providers and model overrides.
enabled_providers / disabled_providersAllow or block provider IDs.
default_agentSelect the primary agent used by default.
agentConfigure built-in or custom agents.
skillsAdd skill directories or remote skill indexes.
mcpDefine local or remote MCP servers, headers, OAuth, and sampling permissions.
toolsEnable or disable individual tools.
tool.invocation_styleSelect JSON or shell-style tool invocation.
commandDefine custom slash commands.
pluginLoad plugin packages or local plugin paths.
formatter / lspConfigure formatters and language servers.
instructionsInclude extra instruction files or globs.
permissionControl tool, path, skill, and external-directory access.
compactionControl automatic compaction, pruning, retained turns, and model-specific context budgets.
checkpointSet checkpoint thresholds, reserves, section caps, and memory-search behavior.
memory / historyConfigure indexed project memory and conversation history.
dream / distillControl automatic memory consolidation and workflow extraction.
voiceConfigure ASR and voice-control models.
composeSet Compose document paths and behavior.
workflowControl subagent concurrency, nesting depth, lifecycle limits, and script deadlines.
experimentalEnable optional features such as Max Mode and batch tools.
autoupdateEnable, disable, or notify about updates.
shareSet manual, automatic, or disabled session sharing.
snapshotControl filesystem snapshots used for undo and redo.
serverConfigure mimo serve.
logLevelSet runtime log verbosity.

Important Environment Variables

VariableUse
MIMOCODE_HOMEOverride all data, cache, config, and state roots.
MIMOCODE_CONFIG_DIRAdd an extra configuration directory.
MIMOCODE_PURERun without external plugins.
MIMOCODE_MIMO_ONLYDisable inherited Claude Code settings and provider keys for a MiMo-focused environment.
MIMOCODE_DISABLE_LOG_ROTATIONKeep one growing log file instead of rotating logs.
MIMOCODE_TEXT_TOOL_CALL_RETRY_LIMITSet retries for models that emit tool calls as prose instead of structured calls.
MIMOCODE_EXPERIMENTAL_CRONControl scheduled prompts and loops.
MIMOCODE_DISABLE_CRONDisable cron and loop scheduling at runtime.
MIMOCODE_EXPERIMENTAL_TOKEN_EFFICIENCY_HEURISTICEnable shape-based reduction of noisy shell output.
MIMOCODE_DISABLE_BUILTIN_SKILLSDisable all built-in skills.
MIMOCODE_DISABLE_COMPOSE_SKILLSDisable legacy Compose skills.
MIMOCODE_DISABLE_EXTERNAL_SKILLSDisable externally discovered skills.
MIMOCODE_DISABLE_CLAUDE_CODE_SKILLSDisable Claude Code skill-directory discovery.
MIMOCODE_DISABLE_CODEX_SKILLSDisable Codex skill-directory discovery.
MIMOCODE_DISABLE_OPENCODE_SKILLSDisable OpenCode skill-directory discovery.
MIMOCODE_DANGEROUSLY_SKIP_PERMISSIONSEnable unattended permission handling. Use only in a trusted disposable environment.

Alternatives and Related Resources

FAQs

Q: What is MiMoCode?
A: MiMoCode is Xiaomi MiMo’s open-source terminal AI coding agent. It can inspect repositories, edit files, run commands, manage Git, connect to MCP servers, and retain project knowledge across sessions.

Q: Is MiMoCode free?
A: The MiMoCode source code is available under the MIT License and separate use restrictions. The anonymous MiMo-V2.5 model trial ended on July 26, 2026. Continued model use requires Xiaomi MiMo access, an eligible Codex or Claude authentication route, another provider, or a custom endpoint. Provider charges can apply.

Q: What happened to MiMo Auto?
A: MiMo Auto supplied anonymous access to the MiMo-V2.5 trial. MiMoCode v0.1.9 enforced the end of that free trial after July 26, 2026. Bringing your own provider or API access remains available.

Q: Does MiMoCode require signup?
A: MiMoCode itself can be installed without creating a software-license account, but hosted model access requires the account or credentials used by the selected route. Xiaomi OAuth, Codex OAuth, Claude authentication import, and most catalog providers require an account.

Q: Can MiMoCode use ChatGPT Plus or Pro?
A: Yes. Current first-launch options include Codex OAuth for eligible ChatGPT Plus or Pro accounts. Availability and usage limits follow the Codex and ChatGPT account rules.

Q: Is MiMoCode an alternative to Claude Code?
A: Yes. Both tools can read code, edit files, run commands, work with Git, and connect to MCP servers. MiMoCode is open source and supports several provider routes. Claude Code is Anthropic’s commercial coding agent and centers on Claude models.

Q: Can MiMoCode use Ollama or another local model?
A: MiMoCode accepts custom OpenAI-compatible providers. A local model can connect when Ollama or another gateway exposes a compatible endpoint and the selected model can perform the structured tool calls required for coding work.

Q: Does MiMoCode support MCP servers?
A: Yes. MiMoCode can add and inspect local or remote MCP servers and supports OAuth-enabled MCP authentication. Permission rules should reflect the files, credentials, and actions exposed by each server.

Q: How does MiMoCode preserve context in long sessions?
A: A checkpoint writer records structured session state. Context reconstruction combines the latest checkpoint, project memory, task progress, notes, and recent messages. Budgeted injection limits how much stored material returns to the active context.

Q: What is the difference between /compose-next, the Compose workflow, and the Compose agent?
A: /compose-next is the recommended interactive path for exploratory feature work. The deterministic Compose workflow fits well-defined jobs that can run through fixed phases with limited intervention. The dedicated Compose agent is the legacy interactive path.

Q: Does MiMoCode have a desktop app or web interface?
A: The supported user interface is the terminal TUI, with headless and server commands for automation. The current command reference marks the separate web command as disabled, so this page does not treat MiMoCode as a finished desktop or browser coding product.

Q: Is permission skipping safe?
A: Permission skipping can let an agent run commands and access files with little or no confirmation. Use it only in a trusted disposable container, sandbox, or CI job. Keep explicit deny rules for sensitive paths and inspect the repository for malicious instructions.

Last updated: August 1, 2026.

Leave a Reply

Your email address will not be published. Required fields are marked *

Get the latest & top AI tools sent directly to your email.

Subscribe now to explore the latest & top AI tools and resources, all in one convenient newsletter. No spam, we promise!