Skip to slide
Chapter 2 · The Agent Loop
12 / 142

CHAPTER 02 · The Agent Loop · 4 / 5

Connecting to the bigger picture

Chapter 1 gave you the model-versus-harness split; this chapter shows the harness's central job, driving that loop. Everything from here is about making each piece of the loop better: Chapter 3 makes the "gather history and call the model" step rich and correct; Chapters 4 and 5 keep the growing history affordable; Chapter 6 makes the tools real and safe; Chapter 12 replaces max_turns with real budgets. The agent_loop function you just wrote is, almost unchanged, the spine of the capstone in Chapter 17.

← → arrow keys work too