PaPoo
cover

What is a ReAct agent?

A ReAct agent is an LLM-driven system that alternates between reasoning and acting—often called reason + act or ReAct prompting—so it can decide what to do next, use tools, and update its plan from the results.

Why it matters

ReAct is useful when a model should not just produce an answer, but also take steps in the world: search a document set, call an API, inspect a database, or ask for more information.

In practice, teams reach for it when:

It is a simple and durable pattern for building agentic behavior without requiring a full autonomous planner.

How it works

The core idea is to interleave two kinds of output:

  1. Reasoning: the model decides what it knows, what it still needs, and what action would help.
  2. Action: the model calls a tool or performs an external step, such as search, retrieval, calculator, or database lookup.

After the action returns, the model reads the observation and repeats the loop until it can answer. This makes the process more grounded than “think once, answer once,” because each step can be informed by fresh evidence.

In the original ReAct paper, this reasoning-and-acting pattern was presented as a way to improve task performance on tasks that benefit from both language reasoning and environment interaction. In practice, “ReAct agent” usually means an agent implementation that follows that pattern, even if the exact prompt format varies.

Tiny concrete example

User: “What is the capital of the country whose largest city is Sydney?”

A ReAct-style agent might do:

The important part is not the exact wording—it’s the loop: think, act, observe, repeat.

Common pitfalls / when NOT to use it

Related terms

同じ著者の記事