Summary: Planning: breaking a goal into steps
Planning is the turn from reacting one move at a time to deciding the shape of the whole job first. The agent breaks a goal into an ordered set of sub-tasks before it starts, so a large task does not have to be improvised step by step. That breakdown is the whole idea; everything else (when to replan, how big each step should be) follows from it. This summary is the scan-in-five-minutes version of the full lesson.
Core ideas
Section titled “Core ideas”- Until now the agent reacted: each loop, it looked at the current state, picked one move, and acted. That works until the task is too big to wing. Ask it to plan a multi-day trip under a budget, and pure reaction books a hotel before checking flight dates, or loses the thread halfway through.
- A purely reactive agent fails on long tasks in three ways: wrong order (it cannot see dependencies), repeated or skipped work (it has no map of what is done), and drift off the goal (nothing holds the overall shape in view).
- Planning fixes all three by giving the agent a map. Before diving in, it lays out the steps, then has something to follow, to check progress against, and to stay pointed at the goal.
- Planning is decomposition: taking one large goal and breaking it into an ordered list of smaller sub-tasks, each achievable in a step or a few. The order captures the dependencies (you cannot build the itinerary before you know the dates). The agent produces this breakdown first, as its own step, then executes it.
- Producing a plan is a reasoning move, the same skill as a model thinking step by step: ask it for the intermediate steps first, not the final answer. The plan is usually written in a structured, executable form (a numbered list or machine-readable steps), not loose prose, so each step can be followed, checked off, and run one at a time.
- Plan-then-execute builds the whole plan upfront and runs it; it works when the task is predictable. Replanning revises the remaining plan as results come in: the agent executes a step, observes the result, and adjusts when reality contradicts the plan. It is the same self-correction instinct as retrying a weak retrieval, lifted to the level of the whole task. Most capable agents sit between the two.
- Grain size matters. Steps that are too big hide their complexity (the goal in disguise); steps that are too small bury the strategy in a keystroke transcript. The useful grain is one clear intention per step, where reading the list back tells you the strategy at a glance.
- Plan only when the task earns it. Multi-step, interdependent goals benefit; single-step tasks just pay the overhead of an extra reasoning step. Match planning to the task, like every other capability in this track.
What changes for you
Section titled “What changes for you”Before this lesson, an agent “figuring out a complex task” was a black box. Now you can see the move inside it: the agent decomposes the goal into an ordered set of sub-tasks, then executes them, replanning when a result contradicts the plan. When you meet an agent that handles a big, multi-step job, you can ask the sharper question: what is its plan, is the grain right, and does it replan when reality pushes back? And you can see why planning is layered on top of the loop, not a replacement for it: each step is still one loop iteration with a tool call. Planning just decides what those iterations should be and in what order.