ReAct — Reason, Act, Observe, Repeat
Asha asks: "Will it rain in Jaipur the day I arrive?" Tripmate does not know which day she arrives until it checks her booking, and it cannot know the weather until it asks for a forecast. The answer needs thinking and doing, woven together. That weave has a name: ReAct, short for reason + act.
The rule
Think a line, act once, read the result — then think again.
ReAct is the simplest widely used agent pattern. The model alternates three kinds of step:
- Thought — a short piece of reasoning about what it knows and what to do next.
- Action — one tool call chosen by that thought.
- Observation — the tool's result, added to the context.
The cycle repeats until a thought concludes that the answer is ready.
Thought: I need Asha's arrival date in Jaipur. Her bookings will have it.
Action: get_bookings(user="asha", destination="JP")
Observation: Friday sleeper, arrives 2026-10-16 14:30.
Thought: Now I need the forecast for Jaipur on 16 October.
Action: get_weather(city="Jaipur", date="2026-10-16")
Observation: High 33°C, 10% chance of rain.
Thought: I have both facts. Rain is unlikely.
Answer: You arrive on Friday 16 October at 14:30; rain is unlikely (10%).Why it works: each thought is grounded in real observations instead of guesses, and each action is explained by a thought, so the trace doubles as a record of why the agent did what it did. Compare it with plain chain of thought, which reasons only from what is already in the context: if a fact is missing, a pure chain can only guess it, while ReAct stops to look it up. Its weakness is that it only looks one step ahead, so long tasks can wander without a bigger plan.