Originally published on Loop & Retry — field notes on building LLM agents that survive production.
When not to build an agent made the case in the abstract: an agent is an LLM that controls its own control flow, and that control costs you quadratic tokens, serial latency, and a failure surface no unit test can cover, on every single run. What that post didn't give you is the thing you reach for instead. This is that post — three pipeline shapes, each a fixed sequence of calls with no model-decided branching, that between them cover most of the tasks I've seen get a loop by default.
The shared property across all three: you can draw the flowchart of every possible run before you execute a single one. That's the actual dividing line, not "does it call an LLM more than once" — all three shapes below call a model multiple times. What they don't do is let the model decide, at runtime, what step comes next.
Shape 1: the linear chain
The simplest shape and the most commonly reached-for-a-loop task: a fixed sequence of steps, each feeding the next, where the order is known in advance even though the content isn't. Extract, then validate, then format is the canonical example.






