A governed runtime for compiler-validated, durable agent workflows.
Project description
Millrace is a graph-driven runtime that executes long-running AI workflows using compiler-validated authority rather than prompt conventions.
Instead of letting an agent decide what happens next, Millrace compiles a workflow into an immutable execution plan and enforces state transitions, recovery, approvals, capabilities, and operator intervention throughout the lifetime of a run.
It is not another agent harness.
Agent-Native By Design
Millrace is designed to be installed, configured, and operated through an AI agent acting as the intermediary between you and the runtime. You describe the work and its constraints; the agent uses Millrace's deterministic CLI and JSON surfaces to configure the workflow, enqueue work, run and monitor the daemon, and bring approvals, blockers, and evidence back to you.
Manual operation is fully supported, but the CLI favors explicit, replay-safe machine operation over interactive convenience. It is not intended to be Millrace's primary human-facing interface.
For agent-led setup and operation, give the agent the Millrace instruction manual.
Install
To install the full distribution directly:
python -m pip install millrace
millrace --version
The bundle installs the millrace-ai runtime, official millrace-plus
workflows and authoring skills, and Millforge. Install millrace-ai
directly when you need only the generic runtime and its diagnostic
kernel_ping workflow. The complete millrace bundle requires Python 3.12
or newer; the base millrace-ai runtime supports Python 3.11 or newer.
Start A Workspace
export WORKSPACE=/absolute/path/to/new-workspace
millrace --workspace "$WORKSPACE" workspace init \
--input-id workspace-init-001
millrace --workspace "$WORKSPACE" workspace check
Import an installed workflow package, compile and select a workflow, enqueue
work, then run the daemon with an explicit local adapter configuration. The
getting-started guide
walks through one complete simple_loop setup.
What Millrace Owns
- Compiled authority: workflow data becomes an immutable selected plan before work starts.
- Durable progress: queues, runs, artifacts, waits, and audit records survive process and model-session restarts.
- Bounded dispatch: each stage receives only its selected prompt, skills, schemas, and runtime context.
- Governed routing: runner output is candidate evidence. It cannot invent a legal route or approve its own completion.
- Recovery and intervention: workflows can retry, reroute, pause, quarantine, or request a local operator decision.
- Inspection: the CLI exposes status, runs, traces, waits, interventions, package health, and workspace health.
workflow package -> compiler -> selected plan -> durable queue
|
v
validated outcome <- runtime transition <- runner stage
SQLite stores local control state. Content-addressed storage keeps immutable plans, payloads, and artifacts. Millrace refuses unsupported or inconsistent authority rather than reconstructing it from filenames, prompts, or runner claims.
Workflows And Runners
The base millrace-ai package ships only kernel_ping. millrace-plus
provides the official workflow collection, including simple_loop, LAD
variants, and vendor_selection. Plane names, stage names, queues, and
terminal markers remain package data rather than kernel concepts.
Millforge executes the default millforge-base component for eligible new
plans. Codex is an explicit alternative that requires an operator-provided
wrapper implementing Millrace's versioned JSON protocol.
Millrace also supports versioned compiled-plan export. It performs compiled-plan export verification. Export is not runtime plan admission. v0.22 does not expose this through the CLI/operator surface. A package-marketplace import flow is not part of the v0.22 CLI/operator surface.
Operator Commands
| Need | Command |
|---|---|
| Initialize local state | millrace workspace init --input-id <id> |
| Manage workflow packages | millrace package ... |
| Admit and select plans | millrace plan ... |
| Enqueue work | millrace queue enqueue ... |
| Run work | millrace run daemon ... |
| Inspect state | millrace status, millrace runs ..., millrace trace ... |
| Resolve governed waits | millrace waits ..., millrace interventions ... |
| Check health | millrace doctor |
Workspace-scoped commands accept
millrace --workspace /absolute/path .... Mutation commands require explicit
replay-safe input or command IDs where applicable.
Millforge supports Linux and macOS, and WSL through Linux execution semantics. Native Windows execution is not supported in v0.22.
Documentation
- Getting started
- How Millrace works
- Workflow packages
- Errors and refusals
- Migrating from v0.21
- v0.22 compatibility
- Millforge runner
- Codex runner
License
Millrace is licensed under the Apache License 2.0.
Project details
Release history Release notifications | RSS feed
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.0.tar.gz.
File metadata
- Download URL: millrace_ai-0.22.0.tar.gz
- Upload date:
- Size: 343.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f47bd3e1371213097f21349c3266e125ef385c8af0dbf94464020cec10caa84b
|
|
| MD5 |
db67a018e57461a40265bcaaa48093af
|
|
| BLAKE2b-256 |
fe77e9ab2574fef6edd2c5b0bb8cd75eaaf7b2eda4ef683e8c0fa693a9d23483
|
Provenance
The following attestation bundles were made for millrace_ai-0.22.0.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.0.tar.gz -
Subject digest:
f47bd3e1371213097f21349c3266e125ef385c8af0dbf94464020cec10caa84b - Sigstore transparency entry: 2231037717
- Sigstore integration time:
-
Permalink:
tim-osterhus/millrace@703beebd542ac1dd90341342f89d8a82887adee9 -
Branch / Tag:
refs/tags/v0.22.0 - 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@703beebd542ac1dd90341342f89d8a82887adee9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file millrace_ai-0.22.0-py3-none-any.whl.
File metadata
- Download URL: millrace_ai-0.22.0-py3-none-any.whl
- Upload date:
- Size: 377.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b4e7245c02902e14da71787258b7f9bac5dceeed1048da67c2ceaf7bb20e124
|
|
| MD5 |
3589d4c1091347ee5b6f34db8dd69fa3
|
|
| BLAKE2b-256 |
9b3fd65f391b6c4d7320266a57a574200a238cae35371c6e861885bbe51af4f6
|
Provenance
The following attestation bundles were made for millrace_ai-0.22.0-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.0-py3-none-any.whl -
Subject digest:
0b4e7245c02902e14da71787258b7f9bac5dceeed1048da67c2ceaf7bb20e124 - Sigstore transparency entry: 2231038225
- Sigstore integration time:
-
Permalink:
tim-osterhus/millrace@703beebd542ac1dd90341342f89d8a82887adee9 -
Branch / Tag:
refs/tags/v0.22.0 - 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@703beebd542ac1dd90341342f89d8a82887adee9 -
Trigger Event:
push
-
Statement type: