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 arrivesThe user goal enters as the first input. At this point the context holds the task and nothing else.
- Reason (Thought)The model writes one step of reasoning: what is missing, what to do next. That text becomes part of the context.
- 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.
- 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.
- 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 →