ReAct (Reason + Act) Pattern
The canonical agent loop where the LLM alternates between reasoning steps and tool-use steps.
What is ReAct (Reason + Act) Pattern?
ReAct, introduced in a 2022 paper, is the foundational pattern behind almost every modern agent. The LLM emits a **Thought** (reasoning), then an **Action** (tool call), reads the **Observation** (tool result), and repeats. The visible reasoning makes the agent debuggable.
A ReAct trace looks like: "Thought: I need the customer's order history. Action: query_db(customer_id=123). Observation: [3 orders]. Thought: Customer's last order failed; check refund status. Action: ..."
Modern frameworks (LangChain, LangGraph, OpenAI Agents SDK, Claude Agents) abstract the ReAct loop but the underlying pattern is the same. Knowing what is happening under the hood is what separates engineers who debug agents successfully from those who don't.
ReAct is the mental model for understanding any modern agent. Every Indian agent-engineering interview probes it.
A Pune support-automation agent handles refund requests in a ReAct loop: read ticket → check policy → look up order → decide eligibility → either approve or escalate. The visible reasoning trace lets engineers debug bad decisions in minutes instead of hours.
Want to master this?
Learn ReAct (Reason + Act) Pattern in a structured cohort
3-month live program with mentors, real projects, and 50+ partner placement support.
