Skip to main content
The --planning flag enables planning mode where the agent creates a multi-step plan before execution.

Quick Start

Planning mode example

Usage

Basic Planning

Expected Output:

With Planning Tools

With Reasoning

Auto-Approve Plans

Combine Options

How It Works

  1. Plan Creation: Agent analyzes the task and creates a multi-step plan
  2. User Approval: Plan is shown for approval (unless --auto-approve-plan)
  3. Step Execution: Each step is executed sequentially
  4. Context Passing: Results from each step inform the next
  5. Final Result: Combined output from all steps

Planning Options

YAML Equivalent

Use planning: true inside an agent definition for YAML-based planning:

Examples

Research Task

Code Project

Analysis Task

Programmatic Usage

What happens:
  1. 📋 Agent creates a multi-step plan
  2. 🚀 Executes each step sequentially
  3. 📊 Shows progress with context passing
  4. ✅ Returns final result

Best Practices

Use planning mode for complex, multi-step tasks that benefit from structured execution.
Planning mode adds overhead for simple tasks. Use it for complex tasks with multiple steps.