The Agent Loop: One Turn at a Time

The loop, slowed down to its unit of work: what happens inside one turn, a real three-turn transcript, the five stopping conditions that keep loops from running forever, and the anatomy of a tool call — including why its result becomes the next turn’s input.

Lessons

  1. Anatomy of one turn
  2. Three turns of a support agent
  3. How loops end — and what happens when they don’t
  4. Inside a tool call: request, arguments, result
  5. Drill: should this loop continue?