Skip to main content

Autonomy Modes

PraisonAI CLI supports different autonomy levels that control how much freedom the AI has when making changes to your code. Inspired by Codex CLI’s approval modes, this feature lets you balance speed with safety.

Overview

Autonomy modes determine whether the AI needs your approval before taking actions like editing files or running commands.

Quick Start

Auto edit mode creates files automatically

Usage

Modes Explained

Suggest Mode (Default)

The safest mode. Every action requires your explicit approval.
Behavior:
  • ✅ File reads - Auto-approved
  • ❓ File writes - Requires approval
  • ❓ Shell commands - Requires approval
  • ❓ File deletions - Requires approval
Example interaction:

Auto-Edit Mode

Balanced mode for normal development. File edits are auto-approved, but shell commands still require approval.
Behavior:
  • ✅ File reads - Auto-approved
  • ✅ File writes - Auto-approved
  • ❓ Shell commands - Requires approval
  • ❓ File deletions - Requires approval

Full Auto Mode

Maximum speed, minimum interruption. Use only for trusted tasks.
Behavior:
  • ✅ File reads - Auto-approved
  • ✅ File writes - Auto-approved
  • ✅ Shell commands - Auto-approved
  • ✅ File deletions - Auto-approved
Full auto mode can make destructive changes without asking. Always review the task carefully before using this mode.

Python API

Basic Usage

Requesting Approval

Custom Approval Callback

The interactive CLI populates this same reason field automatically: rejecting a tool call in the Rich prompt or Textual TUI captures your one-line reason and returns it to the agent. See Reject with a Reason.

Action Types

The system recognizes different types of actions:

Approval Policies

Each mode has a policy that defines what’s auto-approved:

Custom Policies

Create custom policies for specific needs:

Remembered Decisions

The autonomy manager can remember your decisions for similar actions:

Statistics

Track approval statistics:

Best Practices

When to Use Each Mode

Safety Tips

  1. Start with suggest mode - Get familiar with what the AI does
  2. Review full_auto tasks - Read the task description carefully
  3. Use git - Always have uncommitted changes backed up
  4. Set blocked actions - Prevent dangerous operations
  5. Monitor statistics - Track what’s being auto-approved

SDK Bridge

The CLI autonomy system bridges to the Core SDK’s approval and autonomy systems:
  • DRY enum values: CLI AutonomyMode derives values from SDK AutonomyLevel (single source of truth)
  • Approval bridging: AutonomyManager.set_mode(FULL_AUTO) sets PRAISONAI_AUTO_APPROVE=true so SDK tools auto-approve
  • Conversion: Use mode.to_sdk_level() to convert CLI mode to SDK enum

Environment Variables