Millrace is a durable runtime for compiler-validated agent workflows.
Millrace v0.22.3 provides governed context and durable public controls.
Install the exact millrace==0.22.3 bundle on Python 3.12 or newer; see
Getting Started.
Existing v0.22.2 workspaces use store schema 8; this release requires fresh
schema-11 state and provides no in-place migration. Finish or retire old
work with its matching runtime, preserve its workspace, and initialize a new
one. See compatibility.
Ever find yourself doing the same thing over and over with AI agents?
You construct the plan. You tell it to execute the plan, then you have another agent check the first agent's work. It finds issues, so you tell it to fix those issues. Any time a new blocker comes up, you ask it to troubleshoot the issue and fix it before moving on. You rinse and repeat until there's no more bugs and everything matches the initial plan.
All you did was manage which agent performs which role at which time. If you sketched the entire process on paper, you would find a manually driven workflow graph: stages connected by completion, failure, recovery, and escalation outcomes. An agent can generally be relied upon to execute any single step on its own, but owning the entire workflow end to end? No agent is owning that reliably (yet). And this is where Millrace comes in.
flowchart TD
W["Workflow package<br/>stages, routes, rules"] --> C["Compiler<br/>validate and freeze"]
C --> P["Selected plan<br/>immutable authority"]
P --> R["Durable runtime<br/>queues, runs, waits"]
R -->|"bounded dispatch"| A["Agent runner<br/>Codex, Millforge"]
A -->|"candidate evidence"| V{"Valid under<br/>selected plan?"}
P -.->|"governs"| V
V -->|"yes"| T["Commit state transition"]
T --> R
V -->|"no"| X["Refuse, retry,<br/>or wait for operator"]
X --> R
If your workflow can be described as stages, outcomes, and transitions, Millrace can compile it into an executable plan. Completion moves to the next step, failure moves to bugfixing, and a hard blocker escalates to automated recovery. You can have as many recovery mechanisms or branching paths as you like, and the compiler makes sure you're only running valid plans.
Millrace made its compiled workflow graph authoritative over agent execution
on April 23, 2026, months before "graph engineering" became a category. A
prior-art audit found only one earlier comparable open-source implementation:
Dagu v2.5.0.
Review the definition, dated evidence, and prior-art audit.
For more information, check out the FAQ.
Start With Your Agent
Millrace is agent-first. Give this repository to a capable local agent:
Install Millrace for me in this workspace using https://github.com/tim-osterhus/millrace. Read its README and published instruction manual first. Check the CLI, workspace, workflows, and runners. Report what you installed and what you need next. Do not store credentials in workflow assets or start unattended work.
Then delegate work:
Use Millrace to govern this work:
<goal and constraints>. Choose an official workflow, explain why, start with a bounded run, and report the selected plan, state, waits, and evidence.
Manual setup is documented in Getting started.
Runtime Rules
- The selected plan defines legal stages, routes, assets, runners, and outcomes.
- Queues, runs, waits, traces, and artifacts survive restarts.
- Each stage receives only its selected assets and context.
- Model output is evidence, not runtime truth.
- Retries, reroutes, pauses, and operator decisions remain on record.
- Exact run pause/resume preserves authority and budgets for supported unstarted/native states; pending acceptance is distinct from verified pause. See control boundaries.
- Operator dispatch suspension gates only new claim acceptance. Already accepted or active work keeps its durable authority.
- Queue cancellation closes eligible workflow work through the normal audited close-work transition. It never deletes queue state or signals a runner.
- Supported commands change state; direct file edits do not.
Governed Context
Millrace v0.22.3 is a general governed-context/runtime-integrity
release. Compiled bindings distinguish
required files from catalog-only discoverable material. Catalog content stays in
CAS until an exact, bounded millrace context select request hydrates a
read-only selection.
The runtime enforces selected-root mutation policy before applying runner results, records source-backed attribution without turning unavailable values into zeros, and removes only derived session material after durable completion. Compiled plans advance to schema 18. Context-bound plans using the unreleased schema-17 shape are historical evidence, not compatible plans; import and select a schema-18 plan before running it.
See the v0.22.3 release notes.
Workflows
millrace-plus provides:
simple_loop: plan, run, review, and bounded recovery;planning.ladandexecution.lad: separate planning and execution graphs;execution.lad_integratorandlad.full: integrated LAD workflow variants;vendor_selection: policy checks, parallel evaluation, and an operator gate.
These are package data, not hard-coded kernel behavior.
Documentation
Getting started · How Millrace works · Graph authority and prior art · Runner-session architecture · Daemon lifecycle · Workflow packages · Millforge runner · Codex runner · Errors · Migrating from v0.21 · v0.22 support
Millrace v0.22 is local and single-operator. Foreground execution supports Linux, macOS, and WSL. The new public daemon lifecycle controls currently qualify process identity on macOS only.
License
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file millrace_ai-0.22.3.tar.gz.
File metadata
- Download URL: millrace_ai-0.22.3.tar.gz
- Upload date:
- Size: 634.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f500e6e474fa087dbc0f8a5d8f8f137370a71d9a04d4663f67eb6af37acf6eb
|
|
| MD5 |
cd77278055b56596a23cea1c4f163ce2
|
|
| BLAKE2b-256 |
4ae124ba6e7bb44770bdee755e7cc60d651959703f869d2a3e471759da547248
|
Provenance
The following attestation bundles were made for millrace_ai-0.22.3.tar.gz:
Publisher:
publish-to-pypi.yml on tim-osterhus/millrace
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
millrace_ai-0.22.3.tar.gz -
Subject digest:
4f500e6e474fa087dbc0f8a5d8f8f137370a71d9a04d4663f67eb6af37acf6eb - Sigstore transparency entry: 2805710989
- Sigstore integration time:
-
Permalink:
tim-osterhus/millrace@b699ffe3e7dd8a39dc5ce0ca149d469149609257 -
Branch / Tag:
refs/tags/v0.22.3 - Owner: https://github.com/tim-osterhus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@b699ffe3e7dd8a39dc5ce0ca149d469149609257 -
Trigger Event:
push
-
Statement type:
File details
Details for the file millrace_ai-0.22.3-py3-none-any.whl.
File metadata
- Download URL: millrace_ai-0.22.3-py3-none-any.whl
- Upload date:
- Size: 657.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e87f92f2330af30395f35860d319db7e5574367da7995a3613276d0a08f163d
|
|
| MD5 |
2a2d37b889d2b3b5f0fbb61dad83c393
|
|
| BLAKE2b-256 |
95a4851b5eec3fe71a7305e1e7b90f3382fc4eba704788e1aca4606c5c14b3e3
|
Provenance
The following attestation bundles were made for millrace_ai-0.22.3-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on tim-osterhus/millrace
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
millrace_ai-0.22.3-py3-none-any.whl -
Subject digest:
5e87f92f2330af30395f35860d319db7e5574367da7995a3613276d0a08f163d - Sigstore transparency entry: 2805711173
- Sigstore integration time:
-
Permalink:
tim-osterhus/millrace@b699ffe3e7dd8a39dc5ce0ca149d469149609257 -
Branch / Tag:
refs/tags/v0.22.3 - Owner: https://github.com/tim-osterhus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@b699ffe3e7dd8a39dc5ce0ca149d469149609257 -
Trigger Event:
push
-
Statement type: