AI AgentsLesson 4
Lesson 49 min
Planning (ReAct & Reflection)
How agents break big goals into steps and self-correct.
What you will learn
- ✓The ReAct pattern
- ✓Reflection / self-critique
- ✓Why planning reduces errors
Explanation
ReAct interleaves Reasoning and Actions: the agent thinks about what to do, takes one step, reads the outcome, then re-plans. This beats trying to do everything in one shot.
Reflection adds a self-check: after acting, the agent critiques its own progress and adjusts ('that search failed, try different terms').
Together these make agents more reliable on long tasks, though each extra step costs tokens and time.
Real-world use
A research agent that searches, notices a gap, and searches again is using ReAct + reflection rather than one giant guess.
Common mistakes
- • Letting an agent loop forever — always set a max-step limit.
Practice
Outline the ReAct steps an agent would take to 'find and summarise three recent AI news stories'.
Knowledge check
0/1 answered1. The ReAct pattern combines...
Answer all questions to check.