Working through this module?0 of 19 done
Module 05 · Page 6 of 20 · 9 sections

Planning and Reasoning in Agentic AI

How agents break goals into steps, and the reasoning techniques behind each decision.

5.1

Why Planning and Reasoning?

  • Planning and reasoning help an agent break down complex goals into smaller steps, make better decisions and achieve the desired outcome.
  • Without planning, agents may take random actions, get stuck or fail to complete long tasks.
  • Reasoning allows the agent to understand the environment, evaluate options and choose the best next step.
5.2

Types of Planning

1
Goal Planning
Plan a sequence of steps to achieve a specific goal.
2
Task Decomposition
Break complex tasks into smaller sub-tasks.
3
Hierarchical Planning
Plan at high level and then refine into low-level steps.
4
Sequential Planning
Execute tasks step by step.
5
Conditional Planning
Handle different scenarios based on conditions.
6
Replanning
Adjust the plan when the environment changes.
5.3

Planning Workflow

User Goale.g. Research a topic
Understand GoalAnalyse and extract intent
Break into Sub-tasksTask decomposition
Plan StepsChoose tools and sequence
Execute PlanCall tools and take actions
Monitor and ReplanHandle failures and updates
Final OutputCompleted task
MemoryUse past experience
Plan, execute, monitor, replan. Memory informs each planning pass.
5.4

Common Planning Techniques

1
Chain of Thought (CoT)
Step-by-step reasoning to solve a problem.
2
Tree of Thoughts (ToT)
Explore multiple reasoning paths and choose the best one.
3
ReAct
Combine reasoning with action (thought → action → observation).
4
Plan-and-Execute
Create a full plan first and then execute each step.
5
Self-Reflection
Evaluate the result and improve the plan if needed.
6
Few-shot Planning
Learn planning patterns from examples.
5.5

Example: Travel Planning Agent

User GoalPlan a 3-day trip to Goa
Planning AgentLLM + tools
Search Flights
Search Hotels
Find Places to Visit
Create Itinerary
Final ItineraryDay-wise plan with details
5.6

Reasoning Techniques

1
Deductive Reasoning
Apply logical rules to reach a conclusion.
2
Inductive Reasoning
Learn patterns from examples.
3
Abductive Reasoning
Find the most likely explanation.
4
Commonsense Reasoning
Use real-world knowledge.
5
Multi-Step Reasoning
Break down complex problems.
6
Tool-Augmented Reasoning
Use external tools to get information before reasoning.
5.7

Chain of Thought (CoT) Example

QuestionIf I have 3 flights per day and need to compare prices for 2 days, how many total searches are required?
Reasoning steps
  1. 1Identify number of flights per day = 3
  2. 2Number of days to check = 2
  3. 3Total searches = 3 × 2 = 6
Answer6 searches are required.
5.8

ReAct Pattern (Reasoning + Action)

Thought 1
I need to find current weather in Goa.
Action 1
Search_Weather("Goa")
Observation 1
Weather is 30°C and sunny.
Thought 2
Now find best hotels under 5000.
Action 2
Search_Hotels("Goa", budget=5000)
Observation 2
List of hotels with prices.
Final Answer
Recommend top 3 hotels to the user.
5.9

Key Takeaways

  • Planning helps agents handle complex, long-running tasks.
  • Reasoning improves decision making and accuracy.
  • Techniques like CoT, ReAct and Plan-and-Execute are widely used.
  • Agents can replan based on feedback and changing environment.