Explaining Four Agent Loop Structures
theomitsa · x · 2026-07-14
This is a deep dive into agent loop engineering, arguing that while people often treat it as a single concept, it's actually about choosing different loop structures tailored to specific tasks.
The article introduces a decision framework: any loop must answer two questions—who triggers the run, and who decides when the work is done. In manual runs, humans answer both; the goal of loop design is to hand over more of these decisions to the system.
It outlines four structures:
- Turn-based: Triggered by user input, ideal for evolving requirements where each output shapes the next prompt.
- Goal-based: Triggered by goal commands like /goal, continuously pushing towards success criteria.
- Event-based: Triggered by external events, better suited for monitoring, alerts, and response tasks.
- Autonomous: The system drives itself to completion, fitting work with clear boundaries that can automatically converge.
A quote from Boris Cherny (builder of Claude Code) notes that he no longer "prompts Claude" but instead "engineers loops," highlighting a shift from writing prompts to designing agentic systems.
Related event: Deep Dive into Four Core Agent Loop Architectures(3 posts)→
More from coding & agent
- 250 Builders Hack With Codex at Berlin Community Hackathon Ahead of OpenAI DevDay — paw_lean · 2026-10-26
- Ben Bajarin: Frontier AI is becoming the enterprise cyber-defense stack — BenBajarin · 2026-10-26
- Building AI bots on raw APIs? Devs say models are 'dumb without the harness' — madeofAjala · 2026-10-26
- HarnessMM cuts agent tokens per task by up to 88% while raising success rates — omarsar0 · 2026-10-26
- Microsoft demos intent-classifying agents built with Copilot App and Foundry, deployable across Teams and Outlook — marlene_zw · 2026-10-26
- Looking for a wearable mic with best battery life that feeds recordings to personal agents via MCP — altryne · 2026-10-26