Blog
Agentic AI Chapter 7: Planning, Routing and Decision Strategies

Part of the Agentic AI study series.
A real request often needs several steps, different tools, and an order. The agent has to decide what steps are needed, which tool to use next, in what order, and whether it needs more information from the user.

📊 Real-World Example: A Complex Amazon Request
The user says: "I want to return my laptop, get a refund, and find a similar one with better battery life under ₹70,000."
The LLM generates a plan:
- Get order details for the laptop
- Check return eligibility
- Create a return request
- Check refund status
- Search for similar laptops with better battery life under ₹70,000
- Show the top 3 recommendations
The runtime then executes each step and feeds the result into the next decision. The final answer confirms the return, the refund timeline, and three similar laptops.
🔴 CHECKPOINT: Remember
| Planning type | When to use | Amazon example |
|---|---|---|
| Single-step | Simple tasks | Get order status |
| Multi-step (plan and execute) | Complex tasks with multiple tools | Return an item, find a similar product, create a new order |
| ReAct (reason and act) | Tasks with uncertainty | Search with filters and refine on results |
| Structured function calling | Well-defined tasks | Cancel an order |
| Hierarchical (manager and workers) | Large, complex tasks | Handle return, refund, replacement, and recommendations |
| Routing strategy | Description |
|---|---|
| Rule-based | Predefined rules, such as "cancel order" goes to the Order Agent |
| LLM-based | The LLM picks the best tool or agent |
| Hybrid | Rules for simple cases, LLM for complex ones |
| Classifier model | A small model classifies the intent and routes |
| Context-based | Uses conversation history and user data |
Intent classification: "Can you cancel my order?" is classified as cancel_order, routed to the Order Management Agent, which runs the relevant tools.
Use intent classification, user context, and business rules for better routing.
🛠️ From My Own Work
When I started rebuilding this blog, the work was planned in phases, and each phase had to leave the site deployable. The order of the phases was a plan I could see and change, which is the benefit of a plan written out before execution.
← Previous: State, Memory and Context · Back to the series start · Next: Human-in-the-Loop and Persistence →