Agentic Engineering from First Principles All chaptersLecturesLabDownload the book
Part III · Making Agents Think and Work

Chapter 11: ReAct

Central questionWhen does alternating model decisions with external observations improve performance over answering in one shot?

Lecture

Chapter principle

ReAct is useful because actions create new information that can change the next decision.

Key takeaways

Experiments

Every experiment in the book is small, runnable and printed with its real output. In the Lab you can replay a recorded real run of each one, with no programming, and watch what the model and the agent do.

Experiment 22: ReAct: act, observe, decide

Does an agent do better when it sees the result of each action before it decides the next one?

The task: find the current price of item A17, then add 15% VAT. The price exists only in the shop's data, behind a lookup tool, so the model cannot know it in advance. A real model tries three times: with no tools at all; in an agent loop where every tool result is shown to the model before its next decision; and in a broken loop where the lookup runs but its result is never shown. This is a recorded run of a real model. A new run may word things differently.

All the code for this chapter: github.com/agentic-engineering-book/code

This is Chapter 11 of Agentic Engineering from First Principles: thirty chapters, a case study and fifty-nine executable experiments, from a single model call to controlled, self-improving agents.
Download the bookBrowse all chapters
← Chapter 10: Model Context Protocol (MCP)Chapter 12: Planning →