Planning loops enable agents to solve complex multi-step tasks by breaking them into sub-tasks and executing them in order. Static planning creates the full plan upfront (faster, brittle on surprises). Dynamic planning re-plans after each step (adaptive, more tokens). Reflexion adds a self-critique step: after execution, a critic LLM evaluates the result and generates feedback for re-execution. Hierarchical task decomposition creates a tree of goals and sub-goals.
Each stage in order — click any step to read what it does.
Trade-offs between creating the full plan upfront vs replanning dynamically.
The trade-offs worth knowing before you build this.
Static planning minimises LLM calls and cost. Only move to dynamic planning when tasks have high variability or frequent failures that require mid-course correction.
Adding a self-critique step before returning results significantly improves code quality, analysis accuracy, and completeness. Use a separate evaluator prompt for best results.
Analyse the dependency graph and execute independent tasks in parallel. A 5-task sequential plan taking 25 seconds might take 10 seconds with parallel execution of independent tasks.
Sign in to share your feedback and join the discussion.