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
- A roundup of AI agents and MCP resources, including how to evaluate agents — _jaydeepkarale · 2026-07-21
- A full course shows how to build and deploy an AI agent with OpenAI and LangChain — _jaydeepkarale · 2026-07-21
- A beginner guide to AI agents points readers to a Stanford webinar — _jaydeepkarale · 2026-07-21
- A practical guide on how to evaluate AI agents — _jaydeepkarale · 2026-07-21
- MCP is headed toward easier scale, event-driven extensions, and workable file uploads — EricBuess · 2026-07-21
- Developers debate the missing composition model for AI agents — threepointone · 2026-07-21