Races are code
What each race may do, whom it answers to, how it is scored and how it ascends is compiled into the binary. Creatures, models and budgets are yours to configure; the law is not.
open source · MIT · in development
Mnemorph runs a team of coding agents in six races. Each race has one job, and the harness makes it impossible to do anyone else’s: who may write which file, who may touch the network, who answers to whom — compiled into a Rust core, not written in a prompt.
git clone https://github.com/Kaginari/mnemorph && cd mnemorph && cargo install --path crates/mnemorph-tui
No release yet — build from source; the one-line installer comes with 1.0. What you need →
Most harnesses give one agent every tool and ask it nicely to behave. Mnemorph gives each agent only the tools of its job — and checks every write.
What each race may do, whom it answers to, how it is scored and how it ascends is compiled into the binary. Creatures, models and budgets are yours to configure; the law is not.
What the world knows is written to .mnemorph/ in your repository: creature documents,
the journal, notes — plain files, reviewable in a diff. What the harness must trust (gate verdicts,
spend) is hash-chained outside it, beyond any agent’s reach.
Pushing, releasing, deploying: only one race can reach outside, and every outward act asks you first — unless you have signed a standing permission for exactly that.
the races
You are the Player. You talk to the Summoner; it never touches code. Work flows down a fixed chain, and two races stand beside it. Select a race to see its ascended form.
Small asks run solo: one body with the Summoner’s voice and a Slime’s hands, under the same law, sandbox and gate. It escalates into the chain on signals the code reads — never on the model’s say-so.
You state what you want and answer questions. You confirm every ascension and every act that leaves your machine. The Summoner is the only one who talks to you.
Understands you, plans, hands the work down, answers. Never writes code.
Plans one lane of work and decides which domains it touches.
Owns a domain. Writes the verify line that will judge the change before the change exists, then judges the landing.
The only one allowed to change the code of its small zone — and it must update the zone’s doc in the same change.
Everything that leaves the machine: pull requests, CI, releases, deploys, intel. Nobody else can.
Attacks the code the others wrote. A finding counts only with proof: a failing test or a scanner output.
A creature that keeps doing its job well ascends: the harness promotes it, with your confirmation, and the promotion grants a concrete power — usually less friction. A promoted creature that slips falls back. Five races ascend: High Elf, High Orc, Named Slime, Oni, Arch Dark Elf.
communication
An order travels down, and each rank passes on only what the next one needs. The Summoner never talks to a Slime. The answer climbs back the same way, each rank compressing what it heard.
Between agents, messages are short tagged lines, not prose — long things are written to a file and only the path is sent. That is how a deep chain stays affordable.
@S opens an answer@F one finding, with a file:line@U something learned that is written nowhere on disk — it survives the agent@E closesthe loop
The Summoner, an Elf, a Slime — every body runs the same loop until it has an answer.
Read the fuel gauge: budget, time and context left. Running out means saving what matters and stopping cleanly — never crashing.
Pull in the few memories and tools that fit, as pointers, not pasted text — always with one that disagrees, if any does.
Ask the model what to do next.
Run one tool — after checking this race may use it and, for anything outward or destructive, after asking you.
Did the tool work? A failure counts against the body.
Write what happened to the journal and the ledger.
the gate
When a body answers, the gate judges every file it changed — found by snapshotting the tree, so a shell redirect counts the same as the write tool. A failure gets one chance to fix it.
landlock read the system and the world, write only the world
seccomp no socket() unless an approved outward act
seccomp no ptrace, mount, unshare, bpf, io_uring
env secrets passed by name, outputs redacted
A kernel guard, not a jail: the command runs as you, in your real files, with the kernel
enforcing its permission list. On Linux every command starts through mnemorph-guard —
no guard, no command. macOS uses Seatbelt.
memory
Most agent memories save what the model said and fetch the closest text back later — so a wrong answer, once saved, returns as a fact. Mnemorph splits memory in two:
The evidence: journal, ledgers, commits. Never rewritten.
Short notes, each pointing at its evidence, each marked agreeing, disagreeing or correcting.
Any belief can be walked back to the bytes behind it.
consumption
You cap a month, a day, a session. The Summoner carves a slice for each order, each Elf for its Orcs. Before every model call the core checks it fits; if not, the body stops and asks its parent — it never overspends.
Who spent it, on which model, how much was cached. The terminal and the board show it live: tokens, cost, cache hits, burn rate, what is left.
Every prompt starts the same way between calls, so the provider’s prompt cache serves most of it at a fraction of the price. Designed in, not bolted on.
An MCP server sends every tool definition it has. Mnemorph takes them in once at its border, indexes them, and hands each agent only the few its task needs — not a hundred it will never use.
architecture
A Rust core owns everything that must be correct: the loop, the races, the gate, the sandbox, the
ledgers, the provider clients. Two binaries share it. mnemorph, the terminal app, holds
the session in its own process — nothing sits between the screen and the core.
mnemorphd is the core served: to the web board, and over JSON-RPC to the
TypeScript SDK for programs that are not Rust.
One protocol, defined once in Rust — the TypeScript types are generated from it, so a client can never drift from the core. Small crates, arrows pointing only downward, and a check that fails on any edge the design does not draw.
speaksAnthropicOpenAI-compatible APIsMCP servers
the board
mnemorphd board shows every world on your machine, live: chats in the terminal’s grammar,
approvals with the terminal’s protections, memory, ontology, bodies and spend. It listens on loopback
only; a one-time key signs you in. ⌘K jumps anywhere.
roadmap · November 2026
A rung is finished only when its tests pass against fakes of the rung below. Mnemorph works in a terminal and builds itself; the world, the Kijin and the Dark Elf are landing now.
done in progress next · live milestones →
Parts of M11–M14 have already landed — the web board among them.
get started
You need Rust (the pin installs itself through rustup). Node 22 and pnpm build the web board;
just runs the full check. cargo install puts the binaries on your PATH —
on Linux, mnemorph-guard goes beside mnemorph.
Name a provider and a model once, in ~/.config/mnemorph/config.toml — a world’s own
file can never loosen the gate or the sandbox. Then run a session inside any repository: that
repository becomes the world. A run that stops is never lost: mnemorph resume last.
# build git clone https://github.com/Kaginari/mnemorph cd mnemorph cargo install --path crates/mnemorph-tui cargo install --path crates/mnemorph-sandbox pnpm install --frozen-lockfile pnpm --filter @mnemorph/board build cargo install --path crates/mnemorphd # use mnemorph status # model, key, sandbox mnemorph # a session here mnemorph run "<ask>" # one ask, no app mnemorph resume last # a stopped run mnemorphd board # the web board