Learn Agentic Patterns
CoursesInterviewSchoolVideosAI agent videosAI now
Learn Agentic Patterns

Learn agentic AI, then get interviewed on it. A free course, four job paths, a daily broken agent, and the interview.

learnagenticpatterns.com

Navigation

HomeThe courseThe interviewPatterns (developer track)PM trackBlogCareer GuideAboutSign Up

Connect

Cheat sheet (free PDF)Reskilling guideLinkedIn (Mousa Jawaheri)

© 2026 learnagenticpatterns.com

Privacy PolicyTerms of Service

Based on “Agentic Design Patterns” by Antonio Gullí

> All Patterns

[01]Prompt Chaining[02]Routing[03]Parallelization[04]Reflection[05]Tool Use[06]Planning[07]Multi-Agent Collaboration[08]Memory Management[09]Learning & Adaptation[10]State Management (MCP)[11]Goal Setting & Monitoring[12]Exception Handling & Recovery[13]Human-in-the-Loop[14]Knowledge Retrieval (RAG)[15]Inter-Agent Communication (A2A)[16]Resource-Aware Optimization[17]Reasoning Techniques[18]Guardrails & Safety[19]Evaluation & Monitoring[20]Prioritization[21]Exploration & Discovery[22]Boundary Translation
HomeCurriculumPlanning
Pattern [06]

Planning

≈ Workflow Orchestration / Saga Pattern / Finite State Machine (FSM)

[06]

TL;DR

The capability of an agent to break down a high-level, ambiguous user goal into a sequence of executable steps (a plan), and then execute them while maintaining the state of progress.

SWE: Workflow Orchestration / Saga
Architecture Flow
agentgate
Planner AgentagentStep ExecutoragentProgress MonitorgateRe-Planneragent

> Agentic Definition

Planning is the capability of an agent to break down a high-level, ambiguous user goal into a sequence of executable steps (a plan), and then execute them, maintaining the state of progress. It allows agents to tackle tasks that are too complex to be solved in a single turn.

Before: Static Workflow

Static Workflow
1def handle_return_order():
2 # Hardcoded sequence
3 validate_payment()
4 check_inventory()
5 ship_replacement()
6 email_user()

After: Dynamic Planning

Dynamic Planning
1# The Planner Agent generates the DAG at runtime
2# Framework: LangGraph / AutoGen
3plan = planner_agent.generate_plan(
4 goal="Handle a return for a damaged item"
5)
6
7# Generated Plan (Dynamic):
8# 1. Ask user for photo of damage (Reasoning: Policy requires proof)
9# 2. Verify purchase history
10# 3. Generate shipping label
11# 4. Refund wallet
12
13for step in plan:
14 executor_agent.execute(step)
15 # Agent updates plan if a step fails (e.g., photo invalid)

Traditional SWE

Workflow Orchestration / Saga

≈maps to

Agentic Pattern

Planning

≈How They're Similar

Both involve managing a sequence of dependent tasks to achieve a complex goal. Both must manage state (which step are we on?) and dependencies (Step B requires Step A).

≠Key Divergence

Standard workflows (e.g., Airflow DAGs, AWS Step Functions) are static and defined at compile-time by the engineer. Agentic plans are dynamic and generated at run-time by the model. The agent builds its own DAG (Directed Acyclic Graph) based on the specific request, allowing it to handle novel situations that the programmer did not foresee.

> Production Considerations

01

Agents often get stuck in loops or generate invalid plans (e.g., skipping a prerequisite). Reliability requires careful guardrails.

02

Evaluating planners is difficult. You must verify not just the final output, but the validity of the generated plan logic. Is the plan optimal? Is it safe?

03

Planning takes time upfront ("Time to First Token" is high). Latency-sensitive applications need to balance planning depth with responsiveness.

💡

Key Takeaway

Adapt: You are moving from "Imperative Programming" (telling the machine how to do it) to "Declarative Goal Setting" (telling the machine what to achieve). You build the planner, not the plan.

BuildBuild a Multi-Step Task Executor. Create a system that takes a complex goal, breaks it into a step-by-step plan, executes each step, and can re-plan when a step fails.

OptimizeOptimize a Task Planner. Your planning agent decomposes tasks in two steps: high-level planning then detailed subtask generation. Both use Claude 3.5 Sonnet. Cost: $0.018 per plan. Target: under $0.008.

PromptWrite a Task Planner Prompt. You're building a planning agent that decomposes complex user requests into step-by-step execution plans. Write the system prompt for the Planner agent.

Frequently Asked Questions

When should I use the Planning pattern?

Planning is the capability of an agent to break down a high-level, ambiguous user goal into a sequence of executable steps (a plan), and then execute them, maintaining the state of progress. It allows agents to tackle tasks that are too complex to be solved in a single turn.

How does Planning relate to Workflow Orchestration / Saga Pattern / Finite State Machine (FSM)?

Both involve managing a sequence of dependent tasks to achieve a complex goal. Both must manage state (which step are we on?) and dependencies (Step B requires Step A). However, there is a key divergence: Standard workflows (e.g., Airflow DAGs, AWS Step Functions) are static and defined at compile-time by the engineer. Agentic plans are dynamic and generated at run-time by the model. The agent builds its own DAG (Directed Acyclic Graph) based on the specific request, allowing it to handle novel situations that the programmer did not foresee.

What are the production trade-offs of Planning?

Agents often get stuck in loops or generate invalid plans (e.g., skipping a prerequisite). Reliability requires careful guardrails. Evaluating planners is difficult. You must verify not just the final output, but the validity of the generated plan logic. Is the plan optimal? Is it safe? Planning takes time upfront ("Time to First Token" is high). Latency-sensitive applications need to balance planning depth with responsiveness.

Next Pattern

[07] · Multi-Agent Collaboration