Plan and Execute

Master the Plan-and-Execute framework to build agents that think before they act

Goal Decomposition

The planning phase is where agents break down high-level goals into specific, actionable subtasks. This decomposition reveals dependencies, identifies resource needs, and creates a roadmap for execution.

Interactive: Goal Decomposition Tree

Click nodes to expand/collapse subtasks. See how complex goals break down into manageable steps.

β–Όβœ…Book vacation to Japan
β–Άβœ…Check visa requirements
β–Άβœ…Set budget ($3000)
β–Άβœ…Choose dates (2 weeks)
▢⏸️Book transportation
▢⏸️Book accommodation

Legend:βœ… = Completed⏳ = In Progress⏸️ = Pending

Planning Strategies

🎯

Top-Down Decomposition

Start with the end goal, recursively break into subtasks

1. Identify main goal
2. Break into 3-7 major subtasks
3. Recursively decompose each subtask
4. Stop when tasks are actionable
πŸ”—

Dependency Mapping

Identify which tasks must complete before others

β€’ Sequential: Task B requires Task A output
β€’ Parallel: Tasks can run simultaneously
β€’ Conditional: Task depends on prior results
βš–οΈ

Resource Allocation

Assign time, budget, or tools to each subtask

β€’ Estimate time per task
β€’ Identify required tools/APIs
β€’ Allocate budget if needed
β€’ Plan for contingencies

Planning Principles

βœ…

Make Tasks Atomic

Each subtask should be a single, clear action

πŸ”

Define Success Criteria

Know how to verify each task completed correctly

πŸ“Š

Estimate Accurately

Use heuristics or past experience for time estimates

🎯

Plan for Failures

Include fallback strategies for critical tasks