Open Source · Python 3.11+ · MIT License

Engineer loops of
autonomous work.

AnvilWorks is a Python daemon that orchestrates AI coding agents on your behalf. It plans, executes, retries, and escalates — so you can hand it intent and walk away.

Loop = trigger + goal + body + brakes. A self-firing, self-verifying, self-limiting unit of work that runs coding agents, entire projects, or Armature multi-agent teams.

Star on GitHub Install & quick start
terminal
$ git clone https://github.com/bryansparks/anvilworks.git
$ cd anvilworks
$ pipx install -e .
What it is

The orchestration layer above your coding agents.

Heavy use of AI coding tools today looks like 4–5 terminal tabs, each babysitting a separate agent on a different project. AnvilWorks replaces that with one supervised execution daemon: automatic sequencing, live visibility, git integration, failure triage, and a persistent inbox for the decisions that actually need you.

01
Describe the intent
Give AnvilWorks a PRD, an objective file, or a one-line goal.
02
It directs the agents
Spawns claw, Claude Code, or any harnessed CLI in the real project directory.
03
You only handle blockers
Everything persists in SQLite. Escalations land in the inbox; replies resume work.
The Loop Primitive

Trigger. Goal. Body. Brakes.

A loop never stops because the agent claimed it was done. It stops when an independent check passes, when it hits a hard limit, or when it escalates a concrete question to you.

Trigger
What wakes the loop: a manual fire, a cron schedule, or an event.
Goal
A verifiable done condition — a command exit code, or a separate LLM reviewer scoring against a frozen spec.
Body
The work each iteration performs: a coding agent, an AnvilWorks project, or an Armature team.
Brakes
Hard limits that guarantee the loop stops: max iterations, wall-clock, and no-progress detection.

The body is pluggable: a coding agent for code work, an AnvilWorks project for phased delivery, or an Armature multi-agent team for heavy multi-agent deliberation. AnvilWorks wraps each body in scheduling, verification, brakes, and escalation.

Triggers

Start on your schedule — or an event.

Manual
Fire on demand with anvilworks loop fire <id>.
Schedule
Attach a cron expression. The loop arms itself and fires on the boundary.
Event
React to AnvilWorks events — including another loop completing, so loops chain into pipelines.
Brakes

Hard limits that guarantee a stop.

max_iterations
Give up after N tries.
max_wallclock_seconds
Give up after N seconds.
no-progress
Stop if the working tree stops changing — the defense against token furnaces.

Every loop must carry brakes. A loop that can't reach its goal is guaranteed to stop and escalate — never spin forever.

Capabilities

What AnvilWorks manages for you.

Projects & plans
Turn a plain-text objective into a phased plan of explicit tasks, stored in SQLite.
Jobs
Submit a goal against any project path and stream the coding agent output live.
Loops
Self-firing, self-verifying, self-limiting units of autonomous work.
Triggers
Manual fire, cron schedules, or reactive event triggers — including chained loops.
Brakes
Mandatory max-iterations, wall-clock timeout, and no-progress detection.
Escalation inbox
When work is genuinely stuck, the daemon pauses and asks a targeted question.
Git integration
Feature branches, worktrees, auto-commits, push, and PR creation per project.
Harness registry
Pluggable agent CLI config: claw, Claude Code, aider, or any generic executable.
Armature body
Run an Armature multi-agent team as the body of a loop.
Live events
SSE event bus and per-job streams so any UI or script can watch in real time.
Methodology / TEE
Configurable per-task pipeline: clarify → implement → validate → quality gate.
🔒
API key auth
Optional Bearer-token auth for the local REST daemon.
Install & Quick Start

Run it locally in minutes.

AnvilWorks is a Python 3.11+ project. Install it editable with pipx or pip, start the daemon, and create your first project or loop.

install
$ git clone https://github.com/bryansparks/anvilworks.git
$ cd anvilworks
$ pipx install -e .
$ anvilworks --help
project mode● shipped
$ anvilworks daemon start
$ anvilworks project create \
  --objective spec.md \
  ~/projects/myapp
$ anvilworks project status <id>
loop mode● shipped
$ anvilworks loop create \
  --name "keep-tests-green" \
  --command-goal "pytest tests/" \
  --body oneshot:"fix failing tests and commit" \
  --brakes max_iterations=10,max_wallclock_seconds=3600
MIT License · 2026 Bryan Sparks

Open source and ready to hack on.

The repository is public. Use it, fork it, open issues, or adapt the harness registry and loop engine for your own agents.

github.com/bryansparks/anvilworks