Agents are good at staying busy. Leave one alone overnight and it drifts off the goal, calls things done that aren't, and hands you 200 commits with no story behind them. Ouroboros is an attempt to make long runs work. A charter guides Claude Code, Codex or Pi through a loop that runs for hours: one agent does the work from a fresh context, and another checks it against the charter, writes down what happened, and picks the next step. Nothing is thrown away: a turn that fails is recorded and fixed forward. In the morning you get a branch you can read, findings tied to the memory behind them, and a report on what's worth merging. Research example coming soon →
Elapsed
32 h 10
Commits kept
127
Last verdict
kept
Model
Opus 5.5
Time67%32 h 10 elapsed · 15 h 50 left of 48 h 00
Usage74%of the usage budget, max_usage
Tokens13.1 M/hin the past 60 min, 1.1× the 12 M/h average · 378 M this run
Done82%9 of 11 done criteria met
Right now · The worker is doing the work · iteration 128
Benching the 50- and 500-move budgets.
This page doubles as a demo of the Ouroboros interface. It’s what a run looks like while it’s working and after it finishes, giving the operator a clear view of what happened and what is happening along the way.
Progress toward done
5 of 5 met · the discipline of a run; these rules win over every other rule
met
Follow the charter.The writer grades every turn against your goal, your constraints and your quality bar. A turn that fails is recorded and fixed forward. No agent can edit the charter.
met
Prove every claim.The writer refuses a claim that the diff and the tests do not support, and a claim of “done” most of all.
met
Report as it goes.Every iteration writes a record of what changed and why. The run page keeps the findings, each tied to the memory it rests on, a digest goes to your phone, and ouroboros report gives the full account.
Show 2 moreShow less
met
Do work, not motion.One bounded unit per iteration, done to the end. No change, no commit. Two counters catch a loop that is busy but ships nothing.
met
Never block, never stop early.The writer answers the worker’s questions from your question policy. A usage limit switches to a fallback harness: Claude Code, Codex or Pi. Only a stop condition that you set ends a run.
Open problems
6 open · the roadmap, written the way a run page writes its open problems: what Ouroboros does not do yet
open
Native parallelisation.One worker works per iteration. Several workers on separate worktrees in one run, with the writer judging each and merging their records, is not built yet.
open
Multi-agent collaboration.A Flywheel graph has one writer. Several runs, or a run and a person, on one graph need a files run on its branch whose records the merge imports. That importer is not built yet.
open
Runtime edits.The charter is read again before each iteration, so you can steer a live run. The config, models, stop limits and the timer still need a restart.
Show 3 moreShow less
open
Other multi-agent architectures.Worker → writer is the default, and actor → critic → scribe ships as loop: standard. Planner and worker trees, harnesses that take turns, and custom pipelines do not ship as presets yet.
open
Other memory systems.Memory is a Governor graph on Flywheel, or the same model as markdown files. Other stores would go behind the same ouroboros mem verbs.
open
The agent keeps busy but ships nothing.Watched, not solved: two mechanical counters name the loop and change the model. See finding 4.
Findings
1Two roles, both fresh every turn holds
A worker does one unit of work and reports it. A writer reviews it against the charter, records it, grows the memory’s tree of claims, and names the claim the next unit works on. A fresh context is gold for a long run, so the memory does the remembering.
Role
Each iteration
Verbs
Worker
Gets the target claim whole: its place in the tree, what is ruled out, its records. Orients, does the unit to the end, tests it, commits, and reports. Never writes the memory.
brieftreeorientshow
Writer
Reads the report, the diff and the commits. Grades the turn against the charter, refuses a false “done”, records the turn (a failed one too), folds the memory, and names the next target claim. The only memory writer.
recordfoldcheckrender
Notes
Nothing is reverted. A failed turn is recorded and fixed forward, and the writer keeps “ruled out” apart from “fix and resubmit”. Before it hands a step on, it checks the step against what the host can do and what the memory has ruled out.
The engine keeps what needs no model: stop rules, the no-early-exit rule, loop detection, limits and backoff. loop: standard keeps the older actor, critic and scribe. Other multi-agent architectures are easy to support: make your own, or start from why we chose this one.
2The charter speaks for you holds
The charter is the contract for the run, in .ouroboros/goal.md. ouroboros design writes it with you, in an interview. The writer seeds the memory from it and grades every turn against it; no agent can edit it.
# Goal: <name>
## Mission one paragraph: what and why, priorities in order
## Done criteria - [ ] claims about the world, not tasks
## Horizon ladder short-term, medium-term, long-term
## Constraints never do X; always keep Y green
## Question policy how to decide for me: "prefer the reversible option"
## Quality bar what the writer grades against
3A finding rests on the graph holds
Each finding on a run page is a title, a summary of at most three sentences, its figures, the part of the memory graph it rests on, and folded notes. Below is one from the 2048 bot run: depth 3 reaches 4096 in 11 of 20 games, drawn from the claims under U2 and the records that changed them.
Depth 3 reaches 4096 once it is fast enough. (a) The largest tile each seeded game reached, as a share of the games, at four points in the run; the numbers are games, and the dashed line is the criterion. (b) The same 20 seeds at depth 3 on both cores: the cores agree move for move, so each game keeps its score and only its time changes. Hollow marks are games that stopped short of 4096. Drawn with ouroboros plot in the house palette.
In the memory graph. Each row is a claim across the whole run; a dot is an iteration whose record changed it.
Notes
The writer keeps the findings in view/findings.json and draws their figures with ouroboros plot fig.py (matplotlib, seaborn and pandas in the house palette, whatever language the project is in) or ouroboros shot URL name for a screenshot. A finding that stops holding is marked revised or retracted, not deleted.
4Motion is not progress holds
A loop that keeps working can ship nothing: records about records, audits of audits, plans that restate the last plan. All of them write files, so a diff looks like progress. Ouroboros counts two things an agent cannot argue with.
Iterations
201
Lines changed
22,437
Records written
128
Frontier moved
1node
Counter
Counts iterations that
Fires at
no_product
changed only memory files, not the product
8
no_frontier
left the frontier unchanged
30
Step 1: name the loop in the next prompt. Step 2: change the model. There is no step 3. A loop is a thing to break out of, not a thing to die of.
Notes
The figures are one real run, the worked example. An agent asked “are you looping?” always finds a reason why this time is different, so the counters are mechanical.
5What the first night taught holds
Three failures from the first overnight run, and the change each one made.
Observed
Change
A session limit was not seen as temporary. 63 of 90 iterations were empty commits and pointless verdicts on 0-byte patches.
Limits are classified. The reset time is parsed, and the role falls back to another harness instead of waiting.
At iteration 50, the overseer rejected “done” with “0 of 3” when all three had shipped. It counted boxes in a static file.
Done criteria became gaps in memory. Done is judged against the memory, not against ticked boxes.
The merged branch had 173 commits; 132 were empty.
No change, no commit.
Memory graph and timeline
Memory is how a run explains itself, to the next turn and to you. Records are append-only, and each says what it changes and which records it follows from. State is a tree of claims that cite records: each done criterion’s gap at the top, and under it the sub-problems, hypotheses and questions the work opens. Only the writer’s fold writes state. The frontier is the tree’s open leaves, and the next step is one of them.
true now (met)openrecord of an iterationclick a node to read it, and to mark its iterations below
Node titles
The run above: 2048 bot. The charter: build a correct 2048 game and a bot that plays it, then make the bot better, one change at a time, with every claim a number from a seeded benchmark. 127 iterations in 32 hours, iteration 128 running; 114 kept, 13 rejected and fixed forward, the memory folded every turn. Click a column, or an iteration’s Show in the graph, and the graph above brings forward its record and the claims it changed.
workerwriterkeptheld backfailedmemory folded
Governor, the standard store
Governor keeps the records and claims as a graph in a local Flywheel repository, in .flywheel/, outside git. With flywheel and governor installed, memory: auto creates the graph when a run starts and uses it. Every memory write is a Flywheel commit, and flywheel repo:push and repo:pull sync it with a hosted repository.
Or as files, in git
Without them, the same model lives as markdown under .ouroboros/graph/, committed with the code on the run branch. Each node is one file with canonical frontmatter and a uuid, so a later import into Flywheel can run twice without duplicating anything. A repo whose runs already use files keeps them.
Agents never learn which store they have. They see one command: ouroboros mem brief | tree | orient | show | record | fold | check | render, and each role may use only its own verbs. The page draws the graph with Governor’s viewer either way.
Install and run
You need Python 3.12+, uv, and at least one agent CLI that is logged in: claude, codex or pi. To outlive the terminal, a run needs one of tmux, tern, or a systemd user session (launcher: in the config).
ouroboros init # config and charter template
ouroboros design # write the charter with an agent
ouroboros run --for 8h # start the loop
ouroboros top # watch it
ouroboros view # open the run's page
ouroboros stop # stop early if you must
ouroboros report # read what happened
Optional: memory in Governor, the standard store
npm install -g @paradigma-inc/flywheel # the Flywheel CLI
git clone https://github.com/theo-kirby/governor.git && cd governor
npm ci && npm run build && npm link # puts governor on PATH
With both installed, a run creates its graph when it starts; keep .flywheel/ and .governor/ out of git. Without them, the run keeps its memory as files. Start with a clean working tree. Read the report and the run branch before you merge. Every run keeps a live page like this one at .ouroboros/runs/<run>/view/index.html; ouroboros view --host 0.0.0.0 lets a phone open it. When the run stops, the writer writes a paper (profile: research) or a product report, and the page opens on it behind a Run / Paper toggle. ouroboros watch pushes alerts and a digest every 4 hours to your phone.