Leviath, an agent runtime: one file, thousands of agents<br>☾☀
Leviath
One file describes the agent. One binary runs ten thousand of them.<br>A model, a toolset and a context budget per stage, not per agent. One 28 MB Rust binary, nothing else to install.
Install LeviathRead the Docs<br>10,000+agents in one process64 msfrom nothing to a running agent30 of 30jobs finished on data too big to fitHow these were measured ↓
Install<br>v0.4.0stableshipped August 18, 2026<br>macOSLinuxWindows<br>curl -fsSL https://leviath.dev/install.sh | shCopy macOS command
What goes wrong<br>Long agent runs fall apart in the same five places.
Long runs forget what you told them<br>Fifty tool calls in, the one constraint you opened with has been squeezed out by file dumps and stack traces.<br>Context regions →<br>Today: compact everything<br>window full · compacting everything…<br>system prompt<br>task: build the CSV importer<br>assistant: reading the schema…<br>tool result: read_file · 18k tokens<br>assistant: now the parser…<br>tool result: shell · test output<br>tool result: read_file · 32k tokens<br>assistant: fixing the imports…<br>tool result: grep · 212 matches<br>user: how is it going?<br>✦ summary of everything so far · details gone<br>assistant: wait, which file was it?<br>tool result: read_file · again
The window fills, then the whole transcript is squashed into one lossy summary. The details go with it, so the agent re-reads what it already read.
Leviath: Context regions<br>task · pinnedbuild the CSV importer
plan · pinned1. parse · 2. validate · 3. write✓ parse · ▸ validate · 3. write
codebase · pinnedschema.rs · parser.rs notes
conversation · compacting✦ compacted<br>user<br>assistant<br>tool: edit<br>assistant<br>user<br>assistant
tool calls · sliding windowshell<br>read_file<br>edit<br>test<br>grep<br>write
Task, plan, and codebase never move. Only the conversation compacts into its own history region, and tool calls slide through their window by rule.
Grepping costs what planning costs<br>One model, one toolset and one prompt run the whole job, so the reasoning you pay a premium for is also the thing listing your files, and the only thing judging whether a fifth identical edit was progress.<br>Stages →<br>Today: one loop, one price<br>do everythingsame prompt · same model · every tool<br>list the filesexpensive modelread three of themexpensive modelwrite the changeexpensive model
edit 5 of the same line, almost done✕ nothing counted the first four<br>Every step is billed at the rate of the hardest one, and the only thing grading progress is the loop making it.
Leviath: Stages<br>discoverlists and readscheap modelimplementwrites the codeexpensive modelreviewreads the diffexpensive modelreassessknows what failedexpensive modelhinthintstuck: 5 edits, one fileretryEach stage picks its own model, tools and context budget, so only the step that writes code pays for the expensive one. The runtime counts the edits too, so a fifth attempt at the same file routes somewhere instead of being reported as progress.
A crash mid-run means starting over, or doing it twice<br>The process dies with hours of tool calls inside it, and nothing left on disk can tell you which of them already wrote a file, ran a migration, or pushed a branch.<br>Run journal →<br>Today: the record lives in the process<br>✓wrote src/api.ts<br>✓ran the migration<br>✓pushed the branch<br>⋯sending the release mail<br>✕ OOM, process goneFour hours of it, and no list of what already happened.
So you choose: run it again and push the branch twice, or open the repo and work out by hand which of the four landed.
Leviath: Run journal<br>✓wrote src/api.tsappended<br>✓ran the migrationappended<br>✓pushed the branchappended<br>⋯sending the release mailappended<br>✕ OOM, process gonedaemon restarts, reads the journal3 replayed, not re-run1 handed back: check before repeating
Every call is written down when it goes out and again when it lands, so the ones that finished are replayed instead of repeated, and the one still in the air is the only thing you are asked about. Nothing to configure.
A handful of agents fills the machine<br>Every run brings its own process, its own memory, and its own copy of the runtime, so the box runs out long before the work does.<br>One shared world →<br>Today: one process per agent<br>process 1 = agent 1 · full runtime · deps<br>process 2 = agent 2 · full runtime · deps<br>process 3 = agent 3 · full runtime · deps<br>Three agents means three copies of everything. Your machine taps out long before your task list does.
Leviath: One shared world
one dot = one agent<br>Every agent is an entity inside one 28 MB Rust binary, thousands of them at a time.
You can interrupt the agent, but not its sub-agents<br>Three levels down, a worker hits a question only you can answer and guesses instead, because the only conversation on offer is with the agent on top.<br>Live steering →<br>Today: only the top agent can hear you<br>call 1<br>call 2<br>call 3: wrong direction<br>✕ kill it<br>call 1, again, from zero<br>call 2<br>call 3
sub-agent: which schema is canonical?no one to ask, so it guesses
Leviath: Live steering<br>lev msg: focus on the parser...