Home / Lessons / Assign the work / 9 of 27
Loop or graph
A loop improves one task. A graph coordinates several.
- A loop: one agent, one task, and a check at the end of every lap.
- Not good enough. Round again.
- This time it passes, and the loop ends.
- A graph: several tasks branch out, rejoin, and stop at a person.
- More parts mean more coordination. Start with the loop.
A loop improves one bounded task through repeated checks. It plans, builds, verifies, fixes, and leaves when the result passes.
A graph coordinates several tasks, tools and decisions. Shared state keeps every agent aligned. The connections between steps decide what runs, what retries, what pauses and what stops.
Start with a loop. Add a graph when the work needs it.
How I do it
Most of my work is loops. A graph appears when a slice has real specialists that need to branch and rejoin.
The rule
Reach for the simple shape first.
Rule 9. Reach for the simple shape first. (Loop or graph, https://chiefofagents.si/one-page#rule-9)
Read next
The ideas behind it
This lesson as plain text, for your agent. Or all 27 on one page.