Skip to main content
Autopilot mode uses an AI planner to analyze complex tasks and generate execution plans that leverage multiple agents’ strengths. Each step in the plan is assigned to the most suitable agent (claude, gemini, codex, ollama) based on what it does best.

Usage

TUI (Interactive)

/autopilot "<task>"
/planner <agent>     # set planner agent
/execute             # toggle auto-execution
/interactive         # toggle pause between steps

CLI

puzldai autopilot "<task>" [-p planner] [-x] [-i]
FlagDescription
-pAgent to use for planning (default: ollama)
-xExecute the plan after generating
-iInteractive mode - prompt before each step

Examples

# TUI: Generate and review a plan
/autopilot "Build user authentication with JWT"

# CLI: Full autonomous execution with claude as planner
puzldai autopilot "Refactor the API layer" -p claude -x

# CLI: Interactive execution (approve each step)
puzldai autopilot "Add unit tests for utils" -p claude -x -i

How It Works

1

Analyze Task

The planner agent analyzes the task and determines what steps are needed.
2

Assign Agents

For each step, the planner selects the best agent based on their strengths:
  • claude: Code writing, architecture, creative tasks
  • gemini: Analysis, research, planning
  • codex: Debugging, security, code review
  • ollama: Simple queries, fast local responses
3

Generate Plan

A 1-5 step execution plan is created, with each step showing the assigned agent and action.
4

Execute (optional)

If /execute is enabled, steps run in sequence. Each step receives the output from previous steps.

Agent Assignment

The planner automatically matches agents to tasks:
Task TypeRecommended Agent
Write code, generate filesclaude
Analyze requirements, plan architecturegemini
Review code, find bugs, security checkcodex
Quick lookups, simple transformationsollama

Configuration

Planner Agent

Set which agent creates the execution plan:
# TUI
/planner claude

# CLI
puzldai autopilot "task" -p claude

Execution Mode

Control how the plan is executed:
ModeDescription
Plan onlyGenerate plan without executing (default)
Auto-execute (/execute)Execute all steps automatically
Interactive (/interactive)Pause and confirm before each step
To enable execution in TUI:
/execute           # toggle auto-execution on
/autopilot "task"  # now runs the plan automatically

Keyboard Shortcuts

KeyAction
EscapeHide view (keeps running)
Ctrl+EReturn to autopilot view
Ctrl+CCancel operation

Example Output

─── Autopilot [Autopilot Mode] ───

Generated Plan:
━━━━━━━━━━━━━━━━

1. [gemini] analyze
   Break down the authentication requirements and identify components

2. [claude] code
   Implement JWT token generation and validation utilities

3. [claude] code
   Create login and register API endpoints

4. [codex] review
   Review implementation for security vulnerabilities

Use /execute to enable auto-execution

Tips

Claude makes a great planner - For complex tasks, use /planner claude to get more detailed, well-structured plans.
Start with plan-only mode - Review the generated plan before enabling /execute to ensure the agent assignments make sense.
Use interactive for learning - Enable /interactive to see how each agent handles its assigned step.