Definition
Agent Loop
The agent loop is the core execution pattern under every framework: send the model a message plus tool definitions, let it decide whether to call a tool, execute the tool, append the result, and call the model again until it produces a final answer. The book shows it in about fifteen lines with a raw SDK and argues most production agents are a FastAPI endpoint running exactly this.

Explained in
Chapter 10: Building AI Agents
Frameworks, patterns, and how to actually build an agent that works.
Related terms