Skip to content
A

The ReAct loop

Step through the reason–act–observe cycle that most agent frameworks still implement. A diagram, not a live run.

No GPU needed

A question arrivesReason (Thought)Act (Action)Observe (Observation)Loop or stoprepeat until nothing is missing
  1. A question arrivesThe user goal enters as the first input. At this point the context holds the task and nothing else.
  2. Reason (Thought)The model writes one step of reasoning: what is missing, what to do next. That text becomes part of the context.
  3. Act (Action)It picks a tool and supplies arguments — search, read a file, call an API. This is the only step that touches the outside world.
  4. Observe (Observation)The environment returns a result and it is appended verbatim. It is the source of truth; the model does not get to rewrite it into something tidier.
  5. Loop or stopWith the new observation it returns to the reasoning step. Once nothing is missing, it stops calling tools and answers.

This is a diagram, not a live run.It describes the loop structure the ReAct paper introduced, which most frameworks still implement. Any given run will not look like this.Read the paper →