Multi-Step Tasks & Memory

Planning

Part of: AI Agents & Tool Use

"Plan a weekend trip to Lisbon, book a hotel under 150 a night, and add it to my calendar." That is not one action, it is a small project. The agent has to break the goal into steps, do them in order, and remember the hotel it picked when it later writes the calendar event. Two skills carry this: planning (decompose then sequence) and memory (carry results forward). What it is Planning is the agent breaking a big goal into an ordered list of sub-tasks before diving in. Memory is how the agent keeps track of what it has already done and learned, so step five can use the result of step two. There are two flavors of memory, and mixing them up causes bugs. Short-term (working) memory is the running context of the current task, the trace of thoughts, actions, and observations so far. Long-term memory is information stored outside the context window, in a database or file, that the agent can retrieve later, even in a future session. How it works A multi-step agent runs a plan-then-execute cycle: 1. Plan. Turn the goal into ordered sub-tasks. 2. Execute one step , using tools and reasoning (the ReAct loop from the last lesson). 3. Update memory. Record the result so later steps can use it

Challenge: The Dependent Pipeline