Lesson 3 of 7 · About 3 minutes
Watch the loop change direction
Trace an action, its observation, and the next decision.
01 / Learn the idea
Inside the flow
An agent does not need to decide every action before it begins. In the ReAct research, language models alternate task decisions with actions that gather information from an environment. An observation is the returned result. That result becomes new input for deciding what to do next.[1]
Follow this loop: read the goal and available information, choose a useful action, receive its result, and check progress. A useful observation can redirect the plan. An error can reveal that a different action is needed. Repeating the same request without using its result misses the point of feedback.[2]
For our library helper, the first search returns no available copy. The next step could be checking another edition, rather than pretending the first search succeeded. Set an ending too: show a verified option, or stop after a small search budget and report that no suitable option was found.
Original school example
A changed result
Goal: find an available astronomy book. Action: search the catalogue. Observation: the first title is on loan. Next action: check another edition. Finish: show the available title and the catalogue evidence.
The next action should respond to evidence. A useful loop also has a clear stopping condition.
02 / Explore the flow · Guided simulation
Watch an observation change the next action
Cedar has 20 seats; Maple has 30. Both are free Friday at 15:00 in this fixture. Advance one step at a time, then change the group size.
Original fictional scenario. Decisions are authored; calculations and checks run in your browser. No live AI or external action.
↳ A failed check can send the flow back to another action—or to a human.
Step 1 of 8 · Visible system event
Goal
Find 24 seats for Friday at 15:00.
Inspect the visible trace (1 events)
- Goal
Find 24 seats for Friday at 15:00.
This log shows authored actions, tool results, and checks. It is not a model’s private reasoning.
03 / Check your understanding
A timetable tool reports that the chosen room is closed after 3 pm. What shows the agent using feedback?
Where these ideas come from
Primary sources, explained in our own words. Research findings and engineering guidance are different kinds of evidence; neither is a guarantee that an agent will succeed.
Supports: Alternating decisions, actions, and observations.
Limit: ICLR 2023 paper with task-specific experiments. Its results do not prove that all agents succeed or that model explanations reveal internal computation.
Supports: Tool observations can change a subsequent plan.
Limit: The authors explain the ReAct research; this is not independent replication or a universal agent architecture.
Stemtiq original lesson · Sources checked September 12, 2026 · Editorial review pending. School examples and guided simulations are original simplifications, not replications of the cited systems. No research affiliation or endorsement is implied.