Core concepts · Module 1
How AI agents think
ReAct stands for reasoning and acting .
Previously
Start with Core concepts
Build deep understanding of how AI agents work under the hood.
This module
How AI agents think
ReAct stands for reasoning and acting .
Next
Tools and actions
Tools are functions that agents can call to interact with the world.
Progress
Mark this module complete when you can explain it without rereading every paragraph.
Why this matters
The three steps Thought .
What you will be able to do
- 1 Explain the ReAct pattern and why interleaving tools reduces guessing.
- 2 Trace an agent run step by step and point to where it went wrong.
- 3 Write prompts that push the agent to check evidence before acting.
Before you begin
- Foundations-level understanding of this course
- Confidence with key terms introduced in Stage 1
Common ways people get this wrong
- Overthinking. Too much reasoning can increase latency and cost without improving outcomes.
- Looping on ambiguity. If the agent cannot resolve missing information, it can cycle between tool calls and guesses.
Main idea at a glance
The ReAct Pattern
Stage 1
User Question
A question requiring external knowledge or tools
2.1.1 The ReAct Pattern
ReAct stands for reasoning and acting. It is a practical pattern for agent design described in the ReAct paper in 2022 [Source]. The insight is simple. Interleave reasoning with action so the agent can pull in evidence, then use the observation to decide what to do next.
The three steps
Thought. The agent reasons about what to do next. This is explicit reasoning that we can see and debug.
Action. The agent chooses and executes a tool. This is how agents interact with the world.
Observation. The agent sees the result of its action. This new information feeds back into the next thought.
2.1.2 Why ReAct Works
Traditional LLMs generate responses in one go. They cannot stop, check something, and continue. ReAct allows the agent to:
Break complex problems into steps: Instead of trying to solve everything at once, tackle one piece at a time
Ground responses in facts: Each action brings real information into the reasoning process
Self-correct: If an action reveals unexpected information, the agent can adjust its approach
Show its work: The explicit thought process makes debugging much easier
Common mistake
Expecting perfect reasoning
Agents do not reason like humans. They predict plausible next tokens. Sometimes the predicted reasoning is wrong. Always verify agent outputs, especially for important decisions.
2.1.3 When Agents Fail
Understanding failure modes helps you build more robust systems.
Mental model
Reasoning as a loop
Agent behaviour is usually a loop that updates its plan based on observations.
-
1
Goal
-
2
Plan
-
3
Act
-
4
Observe
-
5
Stop rule
Assumptions to keep in mind
- State is tracked. If the agent forgets what it tried, it repeats work and looks unreliable.
- Stop rules exist. A stop rule can be steps, time, cost, or risk. You still need one.
Failure modes to notice
- Overthinking. Too much reasoning can increase latency and cost without improving outcomes.
- Looping on ambiguity. If the agent cannot resolve missing information, it can cycle between tool calls and guesses.
Check yourself
Quick check. How agents think
0 of 4 opened
What does ReAct stand for
Reasoning plus acting.
Why does ReAct often reduce hallucination compared with a single long answer
Because the agent can pull in evidence with tools, then use the observation to decide the next step.
Scenario. An agent keeps repeating the same tool call. What kind of failure is that
An infinite loop, often caused by weak stopping conditions or unclear success criteria.
What is a practical way to make agent reasoning easier to debug
Record thought, action, and observation steps in a run log so you can see where it drifted.
Artefact and reflection
Artefact
A short run log showing thought, action, observation, and your diagnosis.
Reflection
Where in your work would explain the react pattern and why interleaving tools reduces guessing. change a decision, and what evidence would make you trust that change?
Optional practice
Use the ReAct simulator and annotate each step with what the agent assumed.