Yesterday we gave agents tools so they can act. Today is AI Agent Planning & Reasoning: how an agent decides which actions to take, in what order, and what to do when a step fails. This is the difference between an agent that calls tools and an agent that gets things done.

Save this sheet. The rest of this note walks through it section by section.
Planning vs Reasoning
The two words get used interchangeably, but the sheet separates them usefully:
- Planning breaks a goal into actionable steps. It answers what to do.
- Reasoning makes decisions along the way: comparing options, interpreting results, adapting. It answers how and why.
Planning is the roadmap. Reasoning is the engine. Together they let an agent break down complex goals, handle uncertainty, make better decisions, adapt to change, and get accurate results. An agent with a plan but weak reasoning follows a bad route into a wall. An agent with reasoning but no plan wanders.
The Loop From Goal to Done
The sheet's high-level flow:
Goal -> Understand -> Plan (sub-goals) -> Reason -> Act (tools) -> Observe
^ |
+------ Replan (if the result isn't good) ---+
|
Goal achieved -> final result
Or in one line: Think → Plan → Reason → Act → Observe → Adapt → Complete. The replan edge is what makes this agentic. A script runs its steps in order whatever happens. An agent checks what happened and changes course.
Components of a Planning Agent
| Component | Role |
|---|---|
| Goal | The objective, with its constraints |
| Planner | Breaks the goal into steps or sub-goals |
| Reasoner | Picks the best action for each step from logic and context |
| Memory | Stores context, past steps, and important facts |
| Tools | APIs and functions used to act |
| Feedback loop | Feeds observed results back into the next decision |
| Evaluator | Checks whether a step, or the whole goal, is done and done well |
In the sheet's architecture, the planner and reasoner sit together in the agent brain, connected to memory on one side and tools and environment on the other, with an executor carrying out actions and an observation-and-feedback layer closing the loop. The evaluator is the component teams most often leave implicit. If nothing explicitly checks "is this good enough?", the agent can't know when to replan.
Four Planning Approaches
| Approach | How it works | Best for |
|---|---|---|
| Task decomposition | Break the goal into smaller tasks | Most general use cases |
| Goal-oriented (backward) | Work backward from the goal to the required steps | Complex goals with clear end states |
| Hierarchical | Multi-level plans with sub-plans | Large projects |
| Adaptive / replanning | Revise the plan based on feedback and change | Dynamic environments |
In practice you combine them. A hierarchical plan has decomposed sub-plans, and any level can replan. Don't over-plan up front, though. Long, detailed plans built before the agent has seen any real data tend to be wrong by step three.
Five Types of Reasoning
- Deductive. Apply a general rule to a specific case. "Refunds over the limit need approval. This one is over, so escalate."
- Inductive. Learn patterns from examples. "The last five failures came from the same API, so it's probably down."
- Abductive. Find the most likely explanation for an observation. "Zero search results, so the query is probably too narrow."
- Causal. Understand cause and effect. "Changing the hotel moves the check-in date, which affects the flight."
- Commonsense. Use everyday knowledge. "A 6 a.m. flight after a 2 a.m. hotel check-in is a bad plan."
LLMs handle all five reasonably well when the relevant facts are in context, and poorly when they aren't. That's why memory (Day 16) and retrieval (Day 15) matter so much for reasoning quality.
Worked Example A Travel Planner
The sheet walks through "plan a 4-day trip to Japan under ₹80,000":
| Step | What happens | In the example |
|---|---|---|
| 1. Goal | User states the goal | 4 days, Japan, under ₹80,000 |
| 2. Understand | Agent extracts requirements | Budget, duration, preferences, flights, hotels, activities |
| 3. Plan | Agent creates a plan | Find flights, find hotels, plan itinerary, check budget |
| 4. Reason | Agent chooses the best action per step | Compare price, location, and rating against the budget |
| 5. Act | Agent uses tools | Flight API, hotel API, maps API, currency API |
| 6. Observe | Agent reads results | Prices, availability, ratings, travel time |
| 7. Replan | Agent adjusts if needed | Swap the hotel or flight to fit the budget |
| 8. Complete | Goal achieved | Final itinerary within budget |
Step 7 is the interesting one. When flights come back expensive, a good agent doesn't simply fail. It reasons about which constraint can flex (cheaper hotel, different dates) and replans. A good agent also knows when to stop and ask the user rather than quietly breaking a hard constraint.
Frameworks and a Plan-Execute-Replan Loop
The sheet lists the main published approaches:
- ReAct. Interleave reasoning and actions step by step. This is the default pattern in most agent frameworks.
- Plan-and-Solve. Plan first, then execute each step in sequence.
- Tree of Thoughts. Explore several reasoning paths and pick the best.
- Reflexion. Reflect on past mistakes and use that feedback to improve the next attempt.
- AutoGPT / BabyAGI. Early open-source experiments in fully autonomous planning loops. They showed both the promise and how quickly unconstrained loops drift.
A plan-execute-replan loop with the guardrails you'd want in production:
def run(goal, max_steps=12, max_replans=3):
context = understand(goal) # extract constraints
plan = planner.break_down(goal, context)
steps = replans = 0
while plan and steps < max_steps:
step = plan.pop(0)
action = reasoner.decide(step, context)
result = executor.run(action)
context = memory.update(context, step, result)
steps += 1
if not evaluator.is_good(step, result, context):
if replans == max_replans:
return escalate_to_human(goal, context)
plan = planner.replan(goal, context)
replans += 1
return compose_final(goal, context)
Notice the two budgets, max_steps and max_replans, and the escalation path. Without them, a stubborn goal turns into an expensive infinite loop.
Best Practices and Challenges
Best practices:
- Define goals and constraints explicitly, and mark which constraints are hard (budget) and which are soft (preferences).
- Break tasks into small, clear steps that can be checked.
- Give the agent the right tools for each step, and nothing more.
- Use feedback loops and replanning, with limits.
- Store important context in memory so later steps can use earlier findings.
- Validate results at every step, not just at the end.
- Monitor and log decisions, including why the agent chose an action.
- Keep prompts clear and structured.
Challenges to plan for: ambiguous goals, wrong or missing context, poor tool selection, hallucinated reasoning, error rates that grow with plan length, rising cost and latency, plans that are hard to debug, and reasoning quality that's hard to evaluate. Most of these get much easier when plans are short and every step has a check.
Key Takeaways
- Planning decides what to do. Reasoning decides how and why. You need both.
- Replanning is what turns a script into an agent, but it needs step and replan budgets.
- Make the evaluator explicit. An agent can't replan if nothing tells it a step failed.
- Short plans with validation at each step beat long, detailed plans built up front.
FAQs
Should I use ReAct or plan-and-execute?
ReAct suits short, exploratory tasks. Plan-and-execute suits longer tasks where you want the plan visible and reviewable. Many systems plan at a high level and use ReAct within each step.
Do reasoning models remove the need for explicit planning?
They improve each decision, but you still want explicit plans, budgets, and checks, because those are what make agent behavior inspectable and controllable.
How do I debug a bad plan?
Log the plan, every revision, and the evaluator's verdict at each step. Most bad outcomes trace back to a missing constraint in step 1.
Up Next
Day 20 covers Multi-Agent Collaboration Patterns: supervisor, peer-to-peer, hierarchical, pipeline, blackboard, and swarm, and how to choose between them. If you need an agent that plans reliably inside real business constraints, talk to us.




Letters to the editor
No letters yet. Questions and counterpoints are welcome.