Start studying
Module 11 · AI Agents Module contents
Module 11  ·  Card 6 / 17beginner

ReAct

ReAct is a loop in which the model alternates between thinking and acting.

It writes a short thought, chooses a tool, then reads the result.

That result goes back into the context and the loop runs again.

Interleaving reasoning with real observations stops it drifting into invention.

It is the pattern most tool-using agents are built on.

Learn in depth ↓
Module 11 · AI Agents · 17 concepts
In depth  /  15 lines

ReAct, in more detail

ReAct stands for reasoning and acting, interleaved rather than separated.

The model writes a short thought about what to do next.

It then chooses a tool and the arguments to call it with.

The tool runs and the observation is added to the context.

The loop repeats with that observation in hand.

Thought, action, observation, over and over, until it can answer.

The value is that reasoning is anchored to real results at every step.

A model reasoning alone drifts into invention, and one acting alone acts blindly.

Alternating keeps it honest, since each step is checked against something real.

It also produces a readable trace of what the agent believed and why.

That trace is the main debugging artefact when the run goes wrong.

It costs a model call per step, so a ten-step task is ten calls.

The thoughts are a plausible account rather than a guaranteed record of the computation.

It is the pattern most tool-using agents are built on, whether or not the name is used.

The original paper was 2022, and modern chat models do it fairly naturally.

Test yourself

One question on this card. Every option explains itself once you pick, right or wrong.

Question 1
What does interleaving reasoning with tool results actually buy you?
AI Agents

17 concepts in this module, then a graded test with every answer explained.

Study this module →
↑↓ move↵ openesc close