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.

Agent Loop diagram from Intelligence at Scale
Diagram from chapter 10, Building AI Agents

Explained in

Chapter 10: Building AI Agents

Frameworks, patterns, and how to actually build an agent that works.

Related terms

This is one term. The chapter is the argument.

Intelligence at Scale: 22 chapters, 65,000 words, 80-plus diagrams. Kindle, paperback and hardcover on Amazon.

Buy on Amazon.com
← All terms