liveBook · Manning

ReAct

ReAct is an agent technique that iteratively interleaves reasoning, actions, and observations so results can guide subsequent actions.

How 11 Manning books explain it

AI Agents in Action, Second Edition

ReAct is an agent reasoning technique that interleaves verbal reasoning with tool actions and observations in a feedback loop.

How it is used
Guides agents through multistep, tool-dependent tasks by using each result to choose the next action.
How deep it goes
Defines the closed loop, contrasts it with CoT, and demonstrates tool-using instructions without descending into model internals.
Examples
Uses backward-and-forward year tools and a trace-inspection exercise to make the action–observation cycle visible.
What you can do after
Build it from scratch as a tool-using agent that inspects results before proceeding, then verify calls in its trace.

Read how AI Agents in Action, Second Edition explains ReAct →

Domain-Specific Small Language Models

An agent framework that interleaves reasoning and tool use to solve tasks by iterating toward a solution.

How it is used
Deploys LLM agents that solve tasks by iteratively reasoning about problems and acting through external tools.
How deep it goes
Explains the iterative loop and demonstrates executable Python actions, without developing a formal theory of reasoning.
Examples
Uses flight search, seat selection, and ticket booking as chained actions in a travel task.
What you can do after
Apply it via smolagents by configuring an LLM, tools, and a CodeAgent for multistep task execution.

Read how Domain-Specific Small Language Models explains ReAct →

Build AI-Enhanced Web Apps

ReAct is an agentic reasoning technique in which a language model interleaves reasoning about a task with actions that gather information or affect an environment.

How it is used
Enables an agent to choose external tools and incorporate retrieved information into answers.
How deep it goes
Shows agent configuration and web-app integration, but does not detail the model’s internal reasoning mechanism.
Examples
Uses WikipediaQueryRun for technical questions and a chat application that displays search results.
What you can do after
Apply it via LangChain.js to configure a tool-using agent and integrate its responses into a streamed chat UI.

Read how Build AI-Enhanced Web Apps explains ReAct →

Build an AI Agent (From Scratch)

The ReAct pattern is an agent design in which reasoning and action alternate so the agent can incorporate tool results and adapt its subsequent behavior.

How it is used
Uses iterative LLM decisions and tool actions to solve multistep questions when the necessary steps are not known in advance.
How deep it goes
Develops the cycle into a tool-execution loop and named agent components, then identifies failures on complex tasks.
Examples
Traces web searches and a calculation for a runner-to-Moon estimate, plus a current-information search through a simple agent loop.
What you can do after
Build it from scratch as a tool-calling agent that iterates over results and returns a final or structured answer.

Read how Build an AI Agent (From Scratch) explains ReAct →

Building Reliable AI Systems

An agent framework that interleaves reasoning, actions, and observations to guide task execution.

How it is used
Guides agents through tool selection and changing multistep workflows by cycling between reasoning, action, and observation.
How deep it goes
Explains the decision cycle through a travel scenario and an agentic RAG implementation, without specifying a prompt format.
Examples
Uses a flight-and-hotel request and a travel assistant combining a weather API with a vector store.
What you can do after
Apply it via LangChain to coordinate retrieval and tools while exposing reasoning steps in a chat interface.

Read how Building Reliable AI Systems explains ReAct →

Prompt Engineering in Practice

ReACT is a prompting pattern for agentic workflows in which a model alternates between reasoning, actions, and observations.

How it is used
Structures agentic investigations that need external observations before reaching a supported conclusion.
How deep it goes
Works through a three-turn diagnosis and describes tool-runtime handoffs, but demonstrates the loop with manually supplied observations rather than code.
Examples
Traces stale-dashboard diagnosis through repeated hourly transformation failures and a schema error involving `user_segment`.
What you can do after
Practice/perform an observation-led investigation and stop when independent evidence supports a diagnosis and next action.

Read how Prompt Engineering in Practice explains ReAct →

AI Agents and Applications

A ReAct agent is an agent architecture that interleaves reasoning with actions such as invoking tools and observing their results.

How it is used
Coordinates dynamic tool selection and sequencing when a user request cannot be mapped to fixed API calls.
How deep it goes
Explains the reasoning-action loop, tool contracts, orchestration, state inspection, retries, and tracing, but not model internals.
Examples
Demonstrates customer-order workflows, travel and weather lookup, and hotel-plus-B&B availability for Penzance.
What you can do after
Build it from scratch or with LangGraph’s prebuilt agent, then debug tool choices and execution through state inspection and traces.

Read how AI Agents and Applications explains ReAct →

Hugging Face in Action

ReAct is an agent technique in which a language model alternates between reasoning, taking actions such as tool calls, observing results, and continuing reasoning.

How it is used
Builds agents that reason through user queries and call suitable tools when their internal knowledge is insufficient.
How deep it goes
Explains the reasoning-action-observation loop and basic execution traces, but does not develop deeper internals or training procedures.
Examples
Demonstrates web search, weather lookup, factual questions, arithmetic, and message-history traces.
What you can do after
Build it from scratch with LangChain or LangGraph, configure tools, invoke queries, and inspect the resulting agent trace.

Read how Hugging Face in Action explains ReAct →

Build Python Web Apps with Streamlit

A ReAct agent is an AI agent pattern that interleaves reasoning about a task with actions performed through callable tools.

How it is used
Deploys agents that interact with existing systems instead of only retrieving facts.
How deep it goes
Explains the reasoning-action loop and tool interfaces, but defers the internal implementations of those tools.
Examples
Uses order tracking and cancellation, static user and order dictionaries, and four customer-service tool functions.
What you can do after
Build an agent that selects callable functions, incorporates their results, and completes customer order tasks.

Read how Build Python Web Apps with Streamlit explains ReAct →

LLMs in Production

ReAct is a prompting framework that interleaves a language model's reasoning with external actions and observations to solve tasks.

How it is used
Uses few-shot prompting to let language models solve tasks through successive reasoning, tool calls, and observations.
How deep it goes
Explains the reasoning-action-observation loop with a worked trace, then demonstrates agent configuration without detailing implementation internals.
Examples
Demonstrates swallow-speed research and an Olivia Wilde, Harry Styles, and exponent-calculation agent trace.
What you can do after
Apply it via LangChain by connecting an OpenAI model with search and math tools in a ReAct agent.

Read how LLMs in Production explains ReAct →

Building LLM Applications with DSPy

The ReAct pattern guides an agent to interleave reasoning with actions such as selecting and invoking tools.

How it is used
Builds agents that select Python-wrapped tools to answer queries, including chatbots that may combine ReAct with RAG.
How deep it goes
Explains iterative tool selection through trajectories of reasoning, tools, parameters, and execution outputs.
Examples
Uses tool-wrapped Python functions and a long-running chatbot loop as application patterns.
What you can do after
Apply it via DSPy to build an agent that selects tools and iterates from execution histories.

Read how Building LLM Applications with DSPy explains ReAct →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.