LuAITools.com
提交工具
🧠AI
Reasoning and acting in a loop

ReAct Pattern

ReAct alternates reasoning and acting in a loop — the agent thinks a step, calls a tool, checks the result, and repeats until it reaches an answer. It's the default mode for many agents.

What is the ReAct pattern?

ReAct is short for "Reasoning + Acting". It's a loop where an AI thinks and acts in turns: reason a step, call a tool, look at the result, reason again — repeat until it lands on an answer. Thinking and doing are woven together instead of kept apart.

How is it different from "think first, act later"?

The old way: one shot
Either the model thinks hard in a vacuum, or it calls a tool once with no feedback in between.
ReAct: adjust as you go
Every action brings a new observation, and that observation drives the next step. It's like researching: you find one clue, then chase the next one it points to.

How does the loop actually work?

Thought
The model asks itself: what should I do now? What do I need to know?
Action
It calls a tool — search, query a database, run some code.
Observation
It takes the tool's result back in as input for the next round of thinking.

Why is it so popular?

Because the loop is simple and the results are steady. It gives the model's reasoning something to grip: it doesn't have to get it right in one shot, it can inch toward the answer, and every step leaves a trail you can inspect later.

Bottom line: ReAct has an AI "think a step, do a step, check a step", looping its way toward the right answer.

Comments