# 9. Loop or graph

> A loop improves one task. A graph coordinates several.

Lesson 9 of 27. Part 2 of 6: Assign the work. Source: https://chiefofagents.si/lessons/loop-or-graph

## The lesson

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.
