miao Coding agent
Read first.Then edit.
Reads the repo, makes the change, runs the checks, returns the result. Lean context; cost recorded per turn.
Budgets over money, tokens, turns and time.
macOS / Linux
curl -fsSL https://mtty.dev/miao/install | bashWindows (PowerShell)
irm https://mtty.dev/miao/install.ps1 | iexSingle binary · macOS, Linux and Windows · MIT

01 steering
Add a requirement while it runs.
A new input is saved, then folded in at a safe turn boundary; the running call is not interrupted.
Explicitly queued inputs wait for idle; promoting a new input resets the turn allowance.
- ›
Find the cause of this failing test, fix it, run the relevant checks, and explain the diff.
- ›
Preserve the public API and avoid new runtime dependencies.
steer · saved, folds in at the next turn boundary - ›
Then prepare a draft pull request description.
queue · waits until the session would go idle
02 why miao
Mechanism
- 01
Context
The baseline stays fixed and changes are appended in order, so prompt caches keep hitting. Cache policy and TTL are configurable per provider.
- 02
Compaction
Starts near the threshold; the summary reuses the current prefix. Old output is pruned; oversized results stay on disk and remain recallable.
- 03
Cost
Tokens, cache-hit rate, time to first token and estimated cost per turn. Warn at four fifths of budget, stop at the next safe boundary.
- 04
Install
One binary, no engine or TUI. One command for macOS, Linux and Windows.
Costs are estimates; the provider bill is authoritative. Saved history does not resume work after a crash; an unfinished turn needs an explicit resume.
03 everyday engineering
Everyday work.
| What you need | What miao provides |
|---|---|
| Understand an unfamiliar repository | File reading, search, project instructions, skills and specialist subagents |
| Implement and verify a change | File edits and patches, shell commands, optional LSP diagnostics and formatting |
| Compare models without changing tools | In-session model selection, provider configuration, per-agent models and reasoning variants where supported |
| Work through a larger task | Todos, mid-task input, durable sessions and an opt-in autonomous continuation loop |
| Connect your own tools | Local and remote MCP servers, custom commands, skills and plugins |
| Review and reuse work | Diffs, session forks, history export and permission prompts |
| Integrate with another application | HTTP server, browser UI, CLI automation, and generated clients in the workspace |
04 the app
Runs in the terminal.


05 longer tasks
Long tasks.
Autonomous continuation is opt-in, bounded by an iteration cap and stall detection. At the cost threshold, no new provider turn is scheduled.
The budget is not a hard cap on a provider bill or on a turn already in flight. Put this in .miao/miao.jsonc for one project, or ~/.config/miao/miao.jsonc for all of them.
// .miao/miao.jsonc
{
"loop": { "enabled": true, "max_iterations": 25 },
"cost": { "budget_usd": 5 },
"compaction": { "prune": true },
}06 isolation
Command sandbox.
The Rust layer handles two things: kernel-level isolation around bash, and the matching and patch paths behind edit and apply_patch.
macOS seatbelt and Linux Landlock restrict writes to the active Location, the command directory and approved paths.
A blocked write reports the required path and stops. Approving the directory reruns the command with access.
Native matching and patches run through the addon; MIAO_NATIVE=0 hands them to TypeScript.
The sandbox is opt-in and off by default, and Windows has no backend yet. It fails open: a requested sandbox whose backend is unavailable warns and runs the command unsandboxed unless on_unavailable is set to "fail".
07 status
Before 1.0: capabilities and limits.
| Capability | Availability |
|---|---|
| Saved sessions, mid-task input and project-local session messaging | Implemented |
| Autonomous continuation and cost budgets | Opt-in |
| Old tool-output pruning and automatic compaction | On by default · configurable |
| Code Mode | Experimental |
| Kernel sandbox for bash; native accelerators in edit and apply_patch | Sandbox opt-in · accelerators default |
| Generated clients and the embedded host | Evolving API |
08 quick start
Three commands to a first session.
$ curl -fsSL https://mtty.dev/miao/install | bash # macOS / Linux
PS> irm https://mtty.dev/miao/install.ps1 | iex # Windows
$ miao providers login # choose a provider, connect an account or API key
$ cd /path/to/project
$ miao # start the terminal UI
# one-shot, without the TUI
$ miao run "Explain this repository's architecture"
$ miao web # the browser interface
$ miao upgrade # update the release binaryInside the TUI, ctrl+p opens the command palette and ctrl+x m picks a model. miao models lists what is available.