ReAct (Reasoning + Acting) is a decision-making pattern for agents that must do more than answer from a prompt. It cycles through reasoning about the next step, taking an action, and observing the result before deciding what to do next. That feedback lets an agent adapt as a request unfolds instead of committing to a fixed sequence of tool calls. section 6.2.5 section 6.5
Flight and hotel request
For “Find me a flight from New York to San Francisco next Tuesday, and book a hotel near Union Square,” the agent must identify two subtasks, choose flight and hotel tools, inspect their results, and present options for approval before finalizing bookings. Reasoning matters both for tool choice and for order: booking a hotel before confirming the flight may be the wrong move. section 6.2.5
A practical ReAct loop separates three decisions:
- Reason: determine what remains to be done and which tool or action fits the current request. section 6.2.5
- Act: execute the selected step through an available tool. section 6.5
- Observe: use the result to choose the next step or prepare a response. section 6.5
An agentic RAG travel assistant gives this loop two kinds of resources: document retrieval through a vector store and real-time information through a weather API. A ReAct-based chat interface can display the agent’s reasoning steps and tool choices in the browser. The implementation uses TypeScript for that interface; equivalent agent logic, including tools, an agent executor, a vector store, and conversation memory, is also available in Python. section 6.3.1
Visible steps help make decisions auditable, but a reasoning trace does not make an action correct. Wrong tool calls and ordering errors still matter, especially when actions have costs. Tool validation, cross-referencing, and guardrails provide additional reliability measures. In a deployed agent, a harness can own the loop, tool routing, approvals, tracing, and state rather than leaving those controls to the model alone. section 6.2.5 section 6.5 section 7.9.1










