AI Agents Made Crystal Clear · chapter 2: What an Agent Actually Is

The agent loop, the anchor schema of this book

2026-08-27

Figure 2.1 draws that loop with every part named. These six labels (goal, context, decision, tool call, observation, stop condition) are the vocabulary the rest of this book uses, so it is worth a slow read. Chapter 5 zooms into the tool call box. Chapter 6 zooms into the context box. Chapter 9 zooms into the stop condition. Chapter 10 zooms into the exact line where a decision becomes an action. This is the map they all hang on.

Figure 2.1: The agent loop, the anchor schema of this book. A goal enters. Context is assembled, the model decides, your code runs a tool, the observation goes back into context, and the stop condition is checked before the next turn begins. There are exactly two ways out: the model returns an answer with no tool call, or a ceiling is hit. Later chapters zoom into one box each.
Figure 2.1: The agent loop, the anchor schema of this book. A goal enters. Context is assembled, the model decides, your code runs a tool, the observation goes back into context, and the stop condition is checked before the next turn begins. There are exactly two ways out: the model returns an answer with no tool call, or a ceiling is hit. Later chapters zoom into one box each.

This diagram is one of many in AI Agents Made Crystal Clear.

Every chapter opens with the gist, draws the hard ideas, and ends with recipes and sources.

Get the book

More from this book

All diagrams