Skip to content
derpx06Notes on systems, models & learning
7. Tools & Agents · lesson 56 of 68 · 1 min · January 10, 2026

ReAct Agents

Reasoning + Acting. The loop that defined 2023.

A "Chain" is a straight line: A -> B -> C. But real life is not linear. If I ask "Who is the CEO of the company that made the iPhone?", you can't just fetch one URL. You need to:

  1. Search "Who made iPhone?" -> Apple.
  2. Search "CEO of Apple" -> Tim Cook.

This requires a Loop.

ReAct stands for Reasoning + Acting. It is a prompt structure that forces the model to "Think out loud" before it touches a tool.

The Prompt Format:

Text
Question: {input}
Thought: What do I need to do?
Action: {tool_name}
Action Input: {tool_args}
Observation: {tool_result}
... (Repeat) ...
Final Answer: {answer}
  1. Model: "Thought: I need to find the maker of iPhone. Action: Search('Who made iPhone')"
  2. System: Executes Search. Returns "Apple Inc."
  3. Model: "Observation: Apple Inc. Thought: Now I need CEO of Apple. Action: Search('CEO Apple')"
  4. System: Executes Search. Returns "Tim Cook."
  5. Model: "Observation: Tim Cook. I have the answer. Final Answer: Tim Cook."
  • Pros: Highly flexible. Can solve problems the developer never anticipated.
  • Cons: Verbose (uses lots of tokens). Can get stuck in "Thought Loops" (I need to search... I need to search...).

ReAct was the breakthrough that made Agents possible. It turns the "Black Box" of inference into a transparent "Step-by-Step" log.

Key Intuition: "Don't just do it. Think about it first."