Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

agentic-dev-loop

Turn an LLM into a gated, sandboxed, resumable construction loop over your codebase.

Describe your pipeline in one YAML file — agent steps, mechanical test gates, and trusted actions — and agentic-dev-loop runs it end to end: agent and command steps get kernel-level sandboxing via Docker, verdicts route the graph, every boundary is checkpointed, and nothing gets committed until every gate passes.

flowchart LR
    dev["agent: dev"] --> test{{"test gate"}} --> review["agent: review"] --> qa["agent: qa"] --> commit["action: commit"]
    test -- fail --> dev
    review -- fail --> dev
    qa -- fail --> dev
  • A tool, not a wiring project. One CLI entry point, opinionated defaults, fixed safety policies. You write the pipeline and the agent definitions — nothing else.
  • Deterministic. Same pipeline + same state → same routing. Verdicts are parsed from files, retries are bounded, nothing is best-effort.
  • Sandboxed by default. The agent's shell and every command step run inside an always-on Docker sandbox. There is no opt-out.

Core features

Feature What it gives you
Stage-gated agent loop Agents do the work, test stages verify it, and the pipeline only advances when each stage passes its gates — looping back with full context when one fails.
Kernel-level sandboxing Agent work and command stages run isolated from your machine: no network access by default — authors opt specific stages in, no writes outside your workspace. No sandbox available → the run stops instead of degrading.
Crash-safe resume Interrupt a run at any time and pick it up later — finished stages stay finished, and you resume from exactly where it stopped.
Live graph visualisation Follow every run in the browser: stage status, pass/fail verdicts, retry cycles, and live console output as it happens.
Extensible Plug in your own actions, tools, and document loaders to adapt the loop to your projects.

The fixed policies are the product: fail fast on missing config/secrets, no silent fallbacks, verdicts only from artifacts, bounded retries, per-attempt artifact hygiene, a single clean-worktree-gated commit point, and no default LLM timeout (agent runs are long).

Installation

Prerequisites

Requirement Detail
Python ≥ 3.12
Docker engine Engine API ≥ 1.43 (Engine 24). Any compliant engine works — Docker Desktop, OrbStack, Colima, Rancher Desktop, podman docker-compat. On Windows, Linux-containers mode is required.
LLM API key The env var named by your pipeline's api_key_env (e.g. OPENAI_API_KEY) must be set — a missing key fails fast, naming it.
pip install agentic-dev-loop==1.0.0a3   # pin the current alpha release explicitly
agentic-dev-loop --version

On the first run the engine pulls the digest-pinned dev image (ghcr.io/lukedawilson/agentic-dev-loop/dev) and verifies its digest — the supply-chain check refuses to continue on a mismatch. If you're running pre-publish tooling, point AGENTIC_DEV_LOOP_DEV_IMAGE at your locally built image. Engine setup, first-run details, the full pipeline.yaml contract, and troubleshooting for every fail-fast code live in docs/setup.md.

Usage

export OPENAI_API_KEY=...                          # whatever api_key_env names
agentic-dev-loop pipeline.yaml                     # run it
agentic-dev-loop pipeline.yaml --dry-run           # validate first — no LLM, no Docker
agentic-dev-loop pipeline.yaml --resume <thread-id> --max-attempts 5
Flag Effect
--dry-run Full load-and-validate pass, then print the resolved plan. No LLM, no Docker, no state writes, no API key. Exit 0 on a clean load.
--resume <thread-id> Continue the latest checkpoint of a previous run (crash, Ctrl-C, exhaustion) with all accumulated notes intact.
--max-attempts <n> Override the pipeline's max_attempts.
--refresh Force re-provision of every setup: hook (bypasses the stamp cache).
--clean-stamps Delete cached provision stamps and exit.
--no-viz / --viz-port <port> Suppress the live graph view / set a preferred port (default 8321; falls back to a free port when busy).
extension flags Document-loader flags (e.g. --plan, --aidlc-unit) appear once the pipeline's extensions are loaded — agentic-dev-loop PIPELINE --help shows them.

Exit code is 0 on pipeline success, 1 otherwise.

What a run looks like (the shipped self-loop example):

The live graph view — pipeline stages with verdict badges, retry cycles, and per-stage consoles

  1. dev — the dev agent works with full context (loaded docs + shared files). Its edits are untracked; only declared produces: files are hygiene-tracked.
  2. test — a mechanical command step runs the suite inside the sandbox. Exit 0 moves on; anything else rewinds to dev with the failing output.
  3. review / qa — verdict agents write artifacts whose VERDICT: lines route the graph. fail rewinds to dev and consumes an attempt.
  4. commit — the single commit point fires only when all gates passed and the worktree was clean at start.
  5. success — committed; or failure when attempts are exhausted.

pipeline.yaml reference

name: my-construction-loop
extensions:
  - agentic_dev_loop.extensions.aidlc:AidlcExtension   # bundled AI-DLC doc loader
additional_files:
  - ../README.md                                       # shared context for every agent step

llm:
  model: openai/deepseek-v4-pro
  base_url: https://api.deepseek.com
  api_key_env: OPENAI_API_KEY

max_attempts: 10                                        # CLI --max-attempts overrides
agents_dir: sdk_agents                                  # your <name>.agent.md files

steps:
  - name: dev
    agent: dev
    produces: implementation-summary.md
    on_pass: test

  - name: test
    command: .venv-sandbox/bin/python -m pytest tests/ -q -m "not docker"
    setup: python -m venv .venv-sandbox && .venv-sandbox/bin/pip install -e ".[dev]"
    timeout: 600
    on_pass: review
    on_fail: { goto: dev, retry: true }

  - name: review
    agent: review
    artifact: review-findings.md
    verdicts: { pass: APPROVED, fail: NEEDS CHANGES }
    on_pass: qa
    on_fail: { goto: dev, retry: true }

  - name: qa
    agent: qa
    artifact: qa-report.md
    verdicts: { pass: PASS, fail: FAIL }
    on_pass: commit
    on_fail: { goto: dev, retry: true }

  - name: commit
    action: commit
    params: { message: "feat: construct {subject} (agent dev loop)" }
Key Notes
agent: / command: / action: Exactly one per step. Agents live in agents_dir as <name>.agent.md; commands run sandboxed (mechanical, never an LLM call); actions are registered host-side functions.
produces: / artifact: + verdicts: Hygiene-tracked outputs vs verdict-parsed routing. The last VERDICT: line wins; stale artifacts are deleted at each attempt start.
on_pass: / on_fail: A step name, terminal success/failure, or {goto: X, retry: true}. No loops happen unless you write them.
env: / setup: / network: env: declares step vars (fixed safe base + declared vars only); setup: provisions the sandbox (command steps, network ON, stamp-cached); network: true grants egress to a command or agent step (default off) — see Per-stage networking.
isolation: (optional) Configures the sandbox — image override, resource caps, allow_git_mutations. It can never disable it.
state_dir Defaults to ~/.agentic-dev-loop/runs/<pipeline-hash>/ — artifacts and checkpoints live outside the sandbox mount.

Per-stage networking

The sandbox is network-off by default. A step that legitimately needs egress — a QA step that curls a service it booted, an agent that must hit an API or fetch package metadata mid-conversation — declares it explicitly:

steps:
  - name: fetch-docs
    command: curl -fsSL https://example.com/spec.json -o spec.json
    network: true            # egress for this step only
  • Default off. Every step runs with --network none unless it declares network: true. A networked step runs in a second, otherwise-identical sandbox container (--read-only, --cap-drop ALL, single workspace mount) on the Docker bridge network — the default network-none container is always created too, so no infrastructure work happens mid-run.
  • Command and agent steps may declare it. Action steps are host-side and never take it (a load-time error).
  • Author opt-in is the control. A networked step gives its agent raw egress for that stage; the default stays network-off everywhere. Reserve it for stages that need it (QA, integration). The residual risk is documented in docs/setup.md.

Development environment

git clone git@github.com:lukedawilson/agentic-dev-loop.git
cd agentic-dev-loop
./setup-venv.sh                       # idempotent .venv setup (never touches bare pip)
# create .env with your LLM key (loaded by trigger-agentic-dev-loop.sh, never committed):
#   echo 'OPENAI_API_KEY=...' > .env
python -m pytest tests/ -q            # fast suite
python -m pytest tests/ -q -m "not docker"   # skip engine-dependent tests
./trigger-agentic-dev-loop.sh --dry-run      # run the shipped pipeline against this repo
./run-demo.sh                         # viz demo — scripted run replay, no pipeline needed
  • setup-venv.sh is safe to re-run and picks the right interpreter even on machines with exotic Python installations.
  • Docker-marked integration tests need a local daemon; CI runs them on Linux.
  • The shipped pipeline (agentic-dev-loop/pipeline.yaml) dogfoods the tool on its own repo — dev → test → review → qa → commit, with the engine's own three agent definitions in sdk_agents/.
  • CI: ci.yml (unit + integration suite, ubuntu + windows), publish-image.yml (multi-arch dev image, amd64 + arm64), release.yml (PyPI publishing).

Contributing

  • Read AGENTS.md first — it is the instruction set for both human and agent contributors (default mode: the user drives, ask before coding, TDD, no silent fallbacks).
  • Development is structured by AI-DLC — the lifecycle workflow in .aidlc/aidlc-rules/aws-aidlc-rules/ with working docs (plans, units, state) in aidlc-docs/. The bundled document loader autodetects the current unit from aidlc-state.md via --aidlc-unit, or load any plan with --plan.
  • OpenCode commands over the workflow: /unit-status, /epic-status, /ticket-details, /update-subtask, /apply-aidlc-patches, and more.
  • Working extension samples (actions, tools, document loaders) ship as tests/sample_ext.py.

Built on OpenHands SDK and LangGraph.

Metadata

Release files for agentic-dev-loop 1.0.0a4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agentic-dev-loop 1.0.0a4
File Size Uploaded Provenance
agentic_dev_loop-1.0.0a4.tar.gz 130.8 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for agentic-dev-loop 1.0.0a4
File Interpreter ABI Platform
agentic_dev_loop-1.0.0a4-py3-none-any.whl Python 3 none any Details

Total release size: 200.4 kB

Release files / agentic_dev_loop-1.0.0a4.tar.gz

Download URL agentic_dev_loop-1.0.0a4.tar.gz
Size 130.8 kB
Tags Source
SHA-256 checksum
How to use checksums
cc0ab5affa547d7c1328dbda7b1a6a15bec1db58cef2bb8592832599e1116e7a
BLAKE2b-256 checksum
How to use checksums
5115488f8e1a57c1a96f2408dab1f732b518c1d9227f8436847bb5289621f9ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Release files / agentic_dev_loop-1.0.0a4-py3-none-any.whl

Download URL agentic_dev_loop-1.0.0a4-py3-none-any.whl
Size 69.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
11a986967ccea405c417b8048f25601507c7ea02d9b7700af7b4301bb49f698f
BLAKE2b-256 checksum
How to use checksums
6448d7d6cdc929f5f996127220205d7824b7fbe730c366931ae95acc80414718
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Security for agentic-dev-loop 1.0.0a4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for agentic_dev_loop-1.0.0a4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page