Run agents you don't babysit, and trust the result.
awf is a single-binary runtime for agentic workflows that need a real acceptance gate: run the agent, check the result independently, repair from the critique, and resume safely after crashes without redoing committed work.
It is built for workflows where a model saying "done" is not good enough: coding agents, research agents, data-migration agents, support-reply agents, security triage agents, or any pipeline where each stage should advance only after an external check passes.
CLI reference | Workflow format
Agentic workflows are useful because they let models do open-ended work. They are risky for the same reason: the step can report success without actually meeting the requirement.
AWF makes the acceptance check part of the runtime.
That is a real finished run, shown by awf ui. Read it top to bottom: collect
runs, then the gate. Look inside the gate — there are two attempts. The
first draft was rejected by the judge, the critique was fed back, the second
draft passed, and only then did publish run.
The central primitive is that gate: a generate block, an independent evaluate
block, an until condition over the evaluator's typed output, and a bounded
repair loop. The evaluator runs in a fresh context, so the generator never marks
its own homework. A crash is not a verdict; only a real evaluation with a false
until consumes a repair attempt.
1. Install — a prebuilt binary is the recommended path (details and checksum verification), or with a Go 1.26+ toolchain:
go install github.com/valbaudo/awf/cmd/awf@latest2. Write a workflow. The smallest one needs four things: a format version, a
graph, a step id, and a command. No container image, no agent credentials, no
model server. Save it as hello.yaml:
version: 1
graph:
- id: hello
run: echo "hello from awf"3. Run it:
awf run hello.yamlawf run: native sandbox: sandbox-exec
awf run: auto-selected native backend (no Docker-only features). Resume restores snapshot: workspace workdirs from a full workdir archive but does not pin the host base environment; use --backend docker for a pinned baseline.
[hello] hello from awf
run 0563d69ca5da5fdbb44c43a3d6fbd809: ok
Two lines will differ for you: the sandbox is whichever one your OS provides
(bwrap or landlock on Linux, sandbox-exec on macOS), and the run id is
minted per run. Step output is prefixed with the step id — [hello] — so a
workflow with several steps stays readable.
4. Look at what ran. awf ui serves the graph with run state overlaid. Pick
a run from the dropdown and the nodes light up with its state — green for ok,
red for a failure, and for a gate, one node per attempt. It binds 127.0.0.1
only and never writes state:
awf ui hello.yamlPrefer the terminal? awf ls lists runs, awf inspect <run-id> prints the node
tree with status and timings, and awf outputs <run-id> --step hello reads a
step's typed output back out.
The step declares no container:, so auto backend selection finds no
Docker-only feature to route to and picks native: the command runs directly
on the host, write-confined to its own per-step host workspace when an OS
sandbox is usable (bubblewrap or Landlock on Linux, sandbox-exec on macOS), and its
output is committed to the run's journal — the same checkpoint path a
Docker-backed step uses, just with no container boundary. --backend docker
refuses a bare run: step outright (AWF1065): there is no image to run it in,
so let auto decide, or pass --backend native yourself.
Real workflows are rarely one step, and running a command is not what makes AWF different from a shell script. The primitive that does is the gate: an independent check that decides whether to advance. See A Gated Workflow for one you can copy.
- Independent gates: engine-enforced generate -> evaluate -> repair loops, with the prior verdict automatically fed into the next generate attempt.
- Black-box agents: wrap existing CLIs such as Claude Code, Factory droid,
Block Goose, OpenAI Codex, or use
awf/llmfor direct OpenAI-compatible HTTP. - Input-parameterizable roles: a reusable
agents:role'smodel/system_promptmay reference{{ input.* }}, so one--inputsteers a whole fleet — and forwards across acall:boundary into a child's own role. - Typed outputs: downstream steps bind to validated
output_schemafields, not fragile free text. - Checkpoint/resume: step outputs and declared files commit to a content-addressed artifact store before the journal pointer moves.
- Stall recovery: an idle watchdog catches a wedged agent (silent longer than
timeout.idle, distinct from slow-but-thinking) and turns it into a retryable failure; on a stall a persistent-session step resumes the same conversation thread (recovery: continue) instead of restarting. Default-on for the codex live adapter, which streams a reasoning heartbeat; opt-in elsewhere. - Pinned replay: a structural change — topology, imported files, assets, container digests, or resolved runtime versions — hard-fails the resume; an edit confined to step bodies instead reuses the unchanged committed steps and re-runs from the first change.
- Real workspaces: run against long-lived native processes, digest-pinned containers, or Compose labs; Docker handles networking, healthchecks, and multi-service wiring.
- Traceable runs: inspect runs, fold status from the log, and export traces without putting observability in the execution path.
This workflow asks a model to write a release note, then has an independent
judge approve it or send feedback into the next repair attempt. Unlike the
hello-world above, it needs a running OpenAI-compatible endpoint (Ollama here)
and an OPENAI_API_KEY env var — see Running the
Examples below for the exact commands to run it.
workflow: gated-release-note
version: 1
graph:
- gate:
generate:
- id: draft
uses: awf/llm
with:
base_url: http://localhost:11434/v1
model: llama3.1
api_key_env: OPENAI_API_KEY
system_prompt: "You write concise release notes."
prompt: |
Write a three-sentence release note for a new `awf run --json` flag.
Prior review feedback, if any: {{ evaluate.feedback }}
output_schema:
type: object
additionalProperties: false
required: [release_note]
properties:
release_note: { type: string }
evaluate:
- id: judge
uses: awf/llm
with:
base_url: http://localhost:11434/v1
model: llama3.1
api_key_env: OPENAI_API_KEY
system_prompt: "You are a strict release-note reviewer."
prompt: |
Review this release note:
{{ step.draft.release_note }}
Approve it only if it is accurate, specific, and exactly three sentences.
output_schema:
type: object
additionalProperties: false
required: [approved, feedback]
properties:
approved: { type: boolean }
feedback: { type: string }
until: "{{ evaluate.approved }}"
max_attempts: 3In awf ui, a run of that gate looks like this — generate and evaluate as
sibling scopes inside one attempt, each holding an agent step:
That run used the anthropic/claude-code adapter on both sides rather than
awf/llm, and the judge approved the first draft — so it shows a single
attempt. When a judge rejects, the gate adds attempt-2 beside it, as in the
screenshot at the top of this page.
That same shape works for higher-stakes tasks: generate a patch and run tests, draft a customer reply and judge it against account data, triage a CVE and check the exploitability claim, or migrate data and verify the target state.
Download the archive for your platform from the
Releases page, verify it against the
published checksums, and put awf on your PATH. Prebuilt binaries are
published for linux/amd64, linux/arm64, darwin/amd64, and darwin/arm64.
VERSION=0.6.0
OS=linux ARCH=amd64 # or: OS=darwin ARCH=arm64
BASE="https://github.com/valbaudo/awf/releases/download/v${VERSION}"
curl -LO "${BASE}/awf_${VERSION}_${OS}_${ARCH}.tar.gz"
curl -LO "${BASE}/awf_${VERSION}_checksums.txt"
shasum -a 256 -c "awf_${VERSION}_checksums.txt" --ignore-missing
tar -xzf "awf_${VERSION}_${OS}_${ARCH}.tar.gz"
sudo install "awf_${VERSION}_${OS}_${ARCH}/awf" /usr/local/bin/awf
awf versionThe sudo above applies only to installing the binary into /usr/local/bin.
Do not prefix awf run, resume, signal, pause, or cancel with sudo,
doas, or pkexec. AWF writes .awf as the invoking user and refuses a
foreign-owned state root with path and owner guidance. Read-only commands never
write state and accept an absent blob store. AWF rejects elevation provenance,
not UID 0 itself: genuine root and container sessions remain allowed when they
own the state root. If elevated execution previously created .awf, use its
owning account or select a new user-owned directory with --state-dir.
Release archives are built by GitHub Actions and carry a build-provenance attestation. You can verify one with the GitHub CLI:
gh attestation verify "awf_${VERSION}_${OS}_${ARCH}.tar.gz" --repo valbaudo/awfWith a Go 1.26+ toolchain:
go install github.com/valbaudo/awf/cmd/awf@latestBuild from source — the path for contributors:
git clone https://github.com/valbaudo/awf.git
cd awf
make buildValidate a workflow without running agents, containers, or network I/O:
bin/awf validate examples/awf-llm-ollama/workflow.yamlRun the local Ollama example after starting an OpenAI-compatible Ollama server and forwarding an API-key env var. Ollama can ignore the bearer value; AWF still requires the named env var to be present because adapters never inline secrets into workflow files.
export OPENAI_API_KEY=ollama
bin/awf run examples/awf-llm-ollama/workflow.yamlTo exercise a Claude Code subscription through a typed, deterministic gate
without Docker or Ollama, follow the Claude Code gated readiness
example. It uses a published release
binary, a claude setup-token credential handoff, and the explicit native
backend.
Use Docker when you want resumable runs or workflows that need isolated containers/Compose labs:
bin/awf run --backend docker path/to/workflow.yaml
bin/awf resume <run-id> path/to/workflow.yamlUseful development checks:
make lint test # pre-commit bar
make build # build ./bin/awf
make integ # Docker/native integration suite; no live API spendReleases are tag-triggered. Push an annotated, signed vMAJOR.MINOR.PATCH tag;
GitHub Actions then re-runs the full gate, builds the four platform archives,
and publishes the GitHub Release with checksums and a build-provenance
attestation:
git tag -s v0.1.0 -m "v0.1.0"
git push origin v0.1.0Published version tags are immutable: fix a bad release with the next patch tag
(v0.1.1), never by moving or deleting a tag. See
CONTRIBUTING.md for the full contributor bar.
| Concern | Common agent framework shape | AWF shape |
|---|---|---|
| Model execution | Framework calls the model in-process | Runtime wraps external CLIs or one HTTP LLM call as black boxes |
| Quality check | Author wires evaluator nodes or post-hoc evals | Engine owns the independent gate and repair loop |
| State | Mutable snapshots or app-managed memory | Append-only journal plus content-addressed artifacts |
| Resume | Recompute, restore app state, or apply latest definition | Replay committed steps, rerun only the uncommitted frontier |
| Drift | Often latest-wins | Definition digest and runtime versions are pinned; drift is a hard error |
| Infra | Usually in-process or platform-owned workers | Single-host native/Docker/Compose workspaces, rebuilt from pinned recipes |
AWF is not trying to be a distributed scheduler, a durable-execution platform, or a general agent-team framework. It is a narrow runtime for single-host, checkpointed agentic pipelines where every meaningful stage has to pass an independent check before the workflow can move on.
- Workflow: a YAML document with input schema, optional assets/imports,
execution infrastructure, and a graph of steps/control flow. The resolved
document is content-addressed at run start. Its
version: 1field is the workflow-format version and is independent of theawftool version —awf v0.1.0implements workflow format version 1. - Step: a
run:command,uses:agent invocation,awaitsignal, or imported workflow call. Steps can produce typed JSON outputs and named output files. - Gate: a control node that runs generate steps, evaluates them
independently, checks
until, and repairs with feedback until the condition passes ormax_attemptsis exhausted. - Commit: the durable unit of progress. AWF writes typed outputs, declared files, and optional workspace snapshots to the blob store first; only then does it append the completed journal event.
- Resume: a fold over the journal. Completed steps are replayed from committed artifacts; only the uncommitted frontier re-executes. A structural or runtime-version change stops the resume instead of silently adapting; an edit confined to step bodies reuses unchanged committed steps and re-runs from the first change (per-node verifying-trace reuse).
Agent steps name a runtime with uses:. The step's with: map is opaque to the
engine; only the named adapter validates and interprets it.
Built-in adapters:
anthropic/claude-code— see the gated native readiness examplefactory/droidblock/gooseopenai/codexawf/llmfor OpenAI-compatible Chat Completions endpoints, including local Ollama, vLLM, llama.cpp, LM Studio, LiteLLM, and Bifrost-style gatewaysopenai/codex-livefor Codex app-server-backed live sessions
The openai/codex-live adapter uses the same uses: resolution, runtime
pinning, live event stream, trace, and UI surfaces as other agent steps. It
stores provider session metadata under the live home and keeps raw live
transcripts provider-owned. block/goose-live remains a reserved implementation
track ref, and anthropic/claude-code-live remains deferred behind a PTY proof
spike.
Execution backends:
native: host processes, fastest path; no container boundary. AWF selects the first functionally usable write-confinement launcher (bubblewrap then Landlock on Linux,sandbox-execon macOS). If none is usable, native runs without confinement and prints a loud stderr warning; use--backend dockerwhen confinement is required. Native is resumable (snapshot: workspaceworkdirs are restored on resume). Explicit--backend nativeruns image-mode workflows on the host, ignoring the declared image; the host base environment is not pinned — use--backend dockerfor a fully reproducible baselinedocker: digest-pinned images and Compose projects, resumablefake: in-memory backend for conformance tests
See awf(1) for adapter environment variables, streaming notes, security caveats, and CLI flags.
- awf(1): command reference, flags, exit status, environment, tracing, and examples.
- awf-workflow(5): the workflow-format reference and stable contract for fields, control flow, templating, typed outputs, and checkpoint/resume.
- COMPATIBILITY.md: the machine-contract stability policy — the Contract v1 stability ladder, the plumbing/porcelain split, and schema versioning.
- examples/: runnable examples for
awf/llm, droid BYOK, and engine-owned conversation threads.
These are the sources AWF actually draws from. The list is intentionally narrow.
- Anthropic, Building Effective Agents: simple, composable workflows; prompt chaining with gates; evaluator-optimizer loops; and the "use the simplest architecture that works" bias behind AWF's small core.
- Anthropic, Effective Context Engineering for AI Agents: context as a finite resource; AWF's evaluator runs in a fresh context, while explicit typed outputs and artifacts carry the state that should survive.
- Anthropic, How we built our multi-agent research system: shaped AWF's shipped coordinator primitives: artifact handoff, fan-out/fan-in, reusable agent roles, engine-owned conversation threads, and keyed signals. AWF coordinates black-box agents rather than implementing Anthropic's dynamic subagent planner.
- Huang et al., Large Language Models Cannot Self-Correct Reasoning Yet: one reason AWF makes evaluation external to the generator.
- Xu et al., Pride and Prejudice: LLM Amplifies Self-Bias in Self-Refinement: why self-refinement is not the same as independent review.
- Panickssery et al., LLM Evaluators Recognize and Favor Their Own Generations: why model self-preference matters when designing a judge.
- Zheng et al., SkillRouter: Skill Routing for LLM Agents at Scale: the foundation for AWF's native skill-routing primitive. AWF adopts the paper's lesson that routing needs the full skill body, not only names or frontmatter; BM25 is the default plug-and-play router so local skill libraries start useful immediately, while model-backed routing remains a stronger option when teams want to trade cost and complexity for accuracy.


