a practical guide to loop engineering
Loop engineering, made practical.
Learn how AI agents act, observe, verify, and repeat. Then use the decision tool to choose between a prompt, a fixed chain, and a real feedback loop.
Three tasks, three honest answers
Same model, same tools. The right shape changes with the task, not the hype.
Nothing to react to. One input, one correct-enough output. A loop here just adds latency and cost.
It has to run them. Read the failure, change something, run again. That feedback is the whole job, so it needs a loop.
Fixed order, no surprises. Three known steps in sequence. A plain chain is simpler and easier to trust than a loop.
The test I actually use
Is there anything for the model to react to? If acting produces information it should use next, like an error, a test result, a diff, a price, then you want a loop. If it doesn’t, you are paying for a loop and getting a prompt.
That is the core of it. The rest is knowing which loop, and when to put a human in front of the risky parts. The tool runs this same logic on your wording, then names a pattern. You stay the engineer.
the catalogue
Seven loops worth knowing by name
Each page is blunt about when the pattern fits, when to walk away, and how to start small.
- 01 Retry Loop Try, check, retry until it passes. The simplest loop.
- 02 Plan → Execute → Verify Loop Make a plan, do a step, verify it, then proceed.
- 03 Explore → Narrow Loop Try several paths, then converge on the most promising.
- 04 Human-in-the-Loop Run autonomously until judgment or a risky action is needed.
- 05 Verification / Evaluator Loop Wrap an agent in a grader that scores and sends feedback back.
- 06 Event-Driven Loop An event fires, the agent runs, a real system updates.
- 07 Hill-Climbing Loop Analyze run traces and improve the harness itself.
If you only remember one distinction
Reach for the lightest one that does the job. Move up only when it stops being enough.
field notes
Recent writing
Do you need a loop? A 5-question test
Five yes/no questions that tell you whether your AI task needs an agent loop, and which loop pattern to reach for if it does.
June 26, 2026 · decision, patternsLoop vs chain vs prompt: which do you actually need?
A practical decision guide for choosing between a single prompt, a fixed chain, and an agent loop, with the exact signals that tip you from one to the next.
June 23, 2026 · fundamentals, decisionWhat is loop engineering?
Loop engineering is the practice of designing the systems that prompt and orchestrate AI agents (act, observe, reason, repeat) instead of hand-prompting them one message at a time.
June 20, 2026 · fundamentals, definitions