The --planning flag enables planning mode where the agent creates a multi-step plan before execution.
Donโt confuse --planning with --plan. --planning enables the agentโs multi-step plan-then-execute workflow (this page). --plan on praisonai run / praisonai code is a completely different flag: it selects the read-only planning permission mode (PermissionMode.PLAN) so mutating tools are denied. Inside praisonai chat / praisonai code, the interactive /plan slash command toggles the same read-only permission mode on/off. See Slash Commands โบ /plan, Permissions, and Permission Modes.
Quick Start
Basic Planning
Expected Output:
With Reasoning
Auto-Approve Plans
Combine Options
How It Works
- Plan Creation: Agent analyzes the task and creates a multi-step plan
- User Approval: Plan is shown for approval (unless
--auto-approve-plan)
- Step Execution: Each step is executed sequentially
- Context Passing: Results from each step inform the next
- 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:
- ๐ Agent creates a multi-step plan
- ๐ Executes each step sequentially
- ๐ Shows progress with context passing
- โ
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.