What are agent loops?
An agent loop is the cycle an AI agent runs through to complete a task: think, act, observe, repeat. This guide explains the ReAct pattern, how loops fail in production, why first-retrieval quality determines cost, and what separates a healthy two-turn loop from one that burns 80,000 tokens to write a 400-token answer.