The problem
You kick off a long, multi-step agent job in Claude Code — review 200 files, draft every chapter of an
outline, drain a work queue from three terminals. Claude Code's native Workflows will happily fan
that out for you.
Then context compaction hits, or you close the laptop. And the run doesn't come back: native resume
is scoped to the session, so in-flight background agents are terminated and their uncommitted work
goes with them — with no completion signal to tell you it happened. There's no checkpoint to resume
from. Hours of work, gone.
The fix
Agent Flow turns a plain-English goal into a durable, resumable workflow. Each step is an LLM doing
the work, but the control flow is deterministic and every run is a state.json on disk — so a
Stop hook auto-continues it across turns, and a long job survives parallelism, interruptions, and even
compaction. Close the laptop at step 47 of 100; reopen and it resumes at 48.
You don't type the flags. You describe the goal; the skill writes the exact commands. The
/agentflow:… lines in this README show what runs under the hood, for transparency.
Familiar by design. If you've written a Claude Code skill, you already know the shape: a WORKFLOW.md
is the same idea as a SKILL.md — frontmatter plus one heading per step — run right in your session.
No server, no Python, no extra services — it runs on the same Node that powers Claude Code; Agent
Flow just adds the durable state and deterministic control flow that turn those steps into a resumable pipeline.
You ▸ /agentflow:create-workflow "review every .cs file in src → group findings by area → one digest"
Agent Flow ▸ designed `code-review` (discover → review·foreach → group → digest·reduce). Run it?
You ▸ /agentflow:run-workflow workflows/code-review/WORKFLOW.md
Agent Flow ▸ stage 2/4 · review ███████░░░ 142/200 items · 3 agents · $0.38
— context compaction —
▸ resumed from disk at item 143/200 …
✓ done · digest written to ./code-review-digest.md
Quickstart
Install (inside Claude Code):
/plugin marketplace add AleSaiani/agentflow
/plugin install agentflow@agentflow
Describe → build → run. You say what you want; Agent Flow writes a self-contained, movable folder
— a human-readable WORKFLOW.md (frontmatter + one heading per stage, like a SKILL.md) plus any helper
script, referenced relatively so the folder runs anywhere:
/agentflow:create-workflow "review every .cs file in src → group findings by area → one digest"
/agentflow:run-workflow workflows/code-review/WORKFLOW.md # --dry-run to preview · --param k=v for inputs
workflows/code-review/
WORKFLOW.md ← the steps, in readable markdown (read it, diff it, hand-edit it)
discover.mjs ← a helper script (called via {{workflow.dir}}, so the folder is portable)
See the engine work in ~10 seconds — no LLM at all. From a clone, drive a bundled all-deterministic
demo straight to done:
node dist/state/pipe.js init demo --workflow examples/workflows/demo.json
node dist/state/pipe.js drive demo # → {"action":"done","steps_taken":5}
node dist/inspect.js board # the dashboard of all runs
That's the whole machine: a pipeline of stages, driven to completion, fully inspectable. The only thing
the LLM adds is the work inside the stages that need judgment. → Full walkthrough in
Getting started.
How it works
plain-English goal → WORKFLOW.md (deterministic spec) → state.json on disk → Stop hook resumes across turns