Module 3: Memory and planning · 10 min
Planning and the ReAct pattern
For big goals an agent should plan first. A common way is to ask the model to write a short plan, then work through it step by step, updating the plan when something unexpected happens.
ReAct (Reason and Act) is a popular pattern: the model alternates between a short thought and an action.
Thought: I need the population of Pakistan, so I should search.
Action: search("Pakistan population")
Observation: <search result>
Thought: I have the number. I can answer now.
Final answer: ...
Showing the thoughts makes agents easier to debug, because you can see why they chose each action.
← Short-term and long-term memory | Reflection and self-checks →