How it works
You define a tree. The agent drives execution.
The animation below shows both halves at once: the YAML tree on the left, the CLI exchange on the right, and the cursor moving between them. Watch a single node enter the active state, the agent answer the request, the runtime advance, and the next node light up.
What the animation shows
On the left, a small deploy tree — a sequence with three action children: Run_Tests, Build_Image, and Push_Image. Each action carries one or more evaluate or instruct steps.
On the right, the loop the agent walks once you hand it the execution id:
abtree next <id>asks the runtime what to do. The response is one of four shapes:evaluate(a precondition to check),instruct(work to perform),done, orfailure.abtree eval <id> true|falseanswers anevaluatestep. The runtime advances if the precondition holds; the action fails immediately if it does not.abtree submit <id> success|failure|runningreports the outcome of aninstructstep.successadvances the cursor;failureaborts the action by the parent's branch rules;runningack-and-pauses without advancing.
As each node finishes, it settles into success (green) or failure (red). The cursor — the pink ring — is always sitting on the node the agent is currently working on. The agent never sees anything else.
The contract, in three lines
- You write the tree. Composite nodes (
sequence,selector,parallel) coordinate;actionnodes do the work. - The runtime walks it. It hands the agent the next step, gates each one on declared state, and persists the cursor between calls.
- The agent answers. It evaluates preconditions and performs instructions. It does not decide which step comes next.
That separation — control flow on the runtime side, work on the agent side — is what makes the same workflow deterministic, resumable, and replayable.
Next
- State — the
$LOCALblackboard and$GLOBALworld model the agent reads and writes between steps. - Branches and actions — the four primitives in detail, with the rules each one enforces.
- CLI reference — every command the loop above uses, with response shapes, exit codes, and environment variables.