ReAct is an agent pattern that interleaves reasoning with actions through callable tools. The agent analyzes a request, chooses an action, uses its result, and decides whether to continue or respond. section 10.6.1 section 10.6.2
The name means Reasoning + Acting. ReAct is different from React, the JavaScript toolkit for building component-based web interfaces; the similar names describe different technologies. section 1.6.3 section 10.6.2
A ReAct interaction follows a practical loop:
- Reason about the user’s request and break it into logical steps. section 10.6.2
- Act by calling an API, querying a database, or triggering another workflow. section 10.6.1 section 10.6.2
- Reason over the returned result and repeat if more work is necessary. section 10.6.2
- Respond when the required steps are complete. section 10.6.2
Checking an order
For “What’s the status of my order?”, an agent reasons that it must identify the customer and locate the order. It calls tools to retrieve the user ID, order ID, and order status, then reports the tracking details and estimated delivery date. section 10.6.2 section 10.6.3
Tools are functions or APIs that let the agent perform real-world actions. A beginner implementation can use static dictionaries rather than PostgreSQL while focusing on agent mechanics. Type hints and docstrings describe how tools should be called; a tool list makes the available functions accessible to the agent. section 10.6.3
Figure 10.19 The ReAct framework
Use the framework diagram to follow the movement from reasoning to action, result processing, repetition, and response. section 10.6.2










