- 版本
- v0.3.13
- 发布日期
- 2026-11-17
- 平台
- macOS · Windows
- 安装包大小
- macOS 288.9 MB · Windows 291.5 MB
- 发布者
- qybaihe
mu
mu Most of what a coding agent decides isn't code. It's yes/no calls, and mu hands 41 kinds of them to a small model. Built on pi .
README
mu
Most of what a coding agent decides isn't code. It's yes/no calls, and mu hands 41 kinds of them to a small model. Built on pi.
Terminal-Bench 2.1, same model, same tasks: mu passed 68.2% of attempts, pi 58.7% (+9.5 points, 95% interval +3.8 to +15.2). How it was measured
npm i -g mu-agent && mu setup && mu · Node.js 22.19 or newer · or the desktop app for macOS, Windows and Linux
English · 简体中文 · 繁體中文 · 日本語 · 한국어
Does this output matter? Is this command safe for the task? Is the work really done? A coding agent answers questions like these hundreds of times a session. Handing them to the main model or to fixed rules costs you in three ways:
- Wasted tokens. A 2,000-line test log goes into the context whole, and every request after it pays for it again. mu's judge reads long output chunk by chunk and lets in only what the task needs; the rest waits behind a pointer. Stale results are dropped without a summary, and when you're likely to be back, the prompt cache is refreshed before it expires. Test-log trimming, off by default, folds exact repeats without losing a byte: it cuts 40% of the characters in Jest failure logs and 19.5% across 71 real failing test logs (see Measured).
- Commands approved on autopilot. The agent asks before every step, so you click Allow without reading, or turn the prompts off. In Judge mode, the default, the judge lets through what the task clearly needs and asks you about the rest. Rules catch risky commands first, and web pages and MCP output are screened for instructions aimed at the AI before the model sees them.
- Runs that stop halfway. "Next I'll run the tests," and the turn ends. The judge catches a run that stopped short, or a "done" that nothing verified, and sends the agent back to finish.
Asking the main model each of these costs tokens and its attention, and fixed rules get them wrong too often. mu asks a judge: a small, fast model that answers one bounded question at a time, at 41 decision points in the agent loop. 34 of them act on their verdicts out of the box. Every verdict goes into a local ledger with its probabilities and timing (mu ledger, /status or the desktop app's Judge tab), and any decision point can run in shadow mode, asked and logged but changing nothing, so you can compare judges before you rely on one.
mu comes as a command-line tool, mu, which does everything pi does and adds the judgment kernel, and as a desktop app that bundles mu and its runtime. The default judge model is Jev, hosted by TypeSafe. It answers yes/no, choice and score questions with a probability for each answer. Any judge model can take its place: mude 1.0, mu's own model, on your Mac; another decision model from Hugging Face; your own System One server; or any LLM.
Contents: Quick start · How a turn works · Decision points · Judges · How mu is built · Measured · The hive · The board · Desktop app · Command line · Privacy · Documentation · Contributing
Quick start
Desktop app. Download the installer for macOS, Windows or Linux from Releases, open it and sign in with ChatGPT, or paste an API key for any provider. There's nothing else to install.
Command line.
npm i -g mu-agent # Node.js 22.19 or newer
mu setup # connect a model
mu # start a session in the current directory
You don't need a judge key to start: until you set one, the free Jev on OpenCode Zen answers. Out of the box, 34 of the 41 decision points act on their verdicts, and every verdict is logged (/status, mu ledger or the app's Judge tab). To record what the judge would do without acting on it, put {"modes": {"default": "shadow"}} in ~/.mu/agent/mu.json. More in Getting started.
How a turn works
Decision points
Each decision point is active (the default), shadow (asked and logged, but changes nothing; useful for comparing judges before you switch one on) or off. Each can also name its own judge: jev, mude (local), classifier:<provider>/<model>, llm:<provider>/<model> or several in order, such as mude,jev.
The 41 points fall into five groups:
- Input (3): what kind of message this is, whether it changes the task and whether it should interrupt the current step.
- Context (15): what enters the prompt (skills, packs, lessons, chunks of tool output, the files a task opens with), what to drop as the context grows, which lessons and skills are worth keeping and when to keep the prompt cache warm.
- Tools and safety (10): whether a command or action should run, whether fetched content or an MCP tool description carries a prompt injection, and quick calls for file search, bulk yes/no questions, browser steps, review triage and diagnostics.
- Turn (8): whether the work has drifted, hit a dead end, really finished or stopped short, whether a
/goalcondition is met and what the board and the model should hear. - Teamwork (5): which subagent gets a delegated task, whether its patch stayed in scope and which findings bees share.
Input: 3 decision points
| Decision point | Question | Effect |
|---|---|---|
input.preflight |
What kind of message is this, and how much thinking does it need? | A one-line hint to the model; optionally, the turn's thinking level |
task.frame |
Is this a new task, a hard constraint, a correction, a subgoal or no change? | Only a change rewrites the task frame: the goal, your constraints verbatim with their source, and the acceptance criteria |
input.interjection |
You send a message while the agent is working: interrupt now, after this step, or is it only asking how far along the work is? | The turn is cut short, or the message waits; a question about progress is answered by mu, and the agent isn't interrupted |
Context: 15 decision points
| Decision point | Question | Effect |
|---|---|---|
skills.disclosure |
Which skills are relevant to this task? | Only those enter the prompt; the rest can still be found |
capability.disclosure |
Does this task need an installed pack or MCP server? | Only then is it opened and its process started |
tool.admission |
For each chunk of a long tool output: does it matter now? | What matters enters the context; the rest is archived behind a pointer |
tool.admission.test-log |
What in this test log is repetition? | Exact repeats are folded losslessly; optionally, the judge chooses what to keep from the rest |
context.forget |
Past a context threshold: which tool results are stale? | Each stale result becomes a one-line tombstone in outgoing requests |
context.compact |
Keep or prune this passage? | Off by default. Compaction by judgment; no summary is written |
memory.recall |
Which lessons apply to this task? | They're brought into the turn |
memory.capture |
Does this message correct the agent or set a rule? | It becomes a lesson |
memory.outcome |
The agent went in circles and found a way out: does that deserve a lesson? | A lesson learned from the run, not from you |
memory.worth |
The model or a subagent proposes a lesson: useful again, a one-off or already known? | Kept or dropped |
memory.merge |
Is it the same as an existing lesson, more precise or contradictory? | No duplicates; the more precise lesson replaces the older one |
memory.applied |
Were the recalled lessons followed this turn? | A lesson that's often recalled and never followed is retired |
skill.capture |
A long run ended well: was it a procedure, the same steps for the next task of its kind? | It's drafted as a skill and waits for you; /skills accept installs it |
cache.warming |
Will you be back before the prompt cache expires? | The cache is refreshed, or left to expire |
context.preload |
A conversation opens: which files will the task need? | In shadow mode out of the box: the verdict is recorded and compared with what the opening reads. Active: those files go to the model with the first message |