Skip to main content
Autonomy controls how independently an agent operates — from requiring approval for every action to fully autonomous execution. The mode field determines whether start() uses a single chat() call ("caller") or a multi-turn loop ("iterative").

Which Mode Should I Choose?

Not sure which mode fits your task? Use this guide:

Quick Start

1

Enable Autonomy

2

With Configuration

3

Explicit Mode Override


Architecture

The autonomy system spans the Core SDK and Wrapper CLI, unified through bridging: Key design decisions:
  • Single source of truth: AutonomyLevel enum lives in the SDK; CLI’s AutonomyMode derives from it
  • Bridge via env var: CLI’s FULL_AUTO mode sets PRAISONAI_AUTO_APPROVE=true for SDK approval
  • AgentTeam propagation: AgentTeam(autonomy=...) propagates config to all managed agents
  • Memory integration: run_autonomous() auto-saves sessions between iterations

Autonomy Stages

The agent automatically selects an execution stage based on task complexity:

How Completion Works

Understanding how the agent knows when it’s “done” is key to choosing the right mode. The model decides when to stop by not requesting more tools. This is the same protocol used by ChatGPT, Claude, and all major LLM APIs.
For most tasks, caller mode is all you need — the model handles everything in one turn. Only use iterative mode when you need the agent to observe results and decide what to do next across multiple turns.

Configuration Options


Doom Loop Detection

Prevents agents from getting stuck in repetitive failure patterns:

Escalation Pipeline

When an agent can’t complete a task, it escalates:

Signal Detection

Autonomy uses heuristics to detect task complexity:

Use Cases

Code Refactoring

Best for: Multi-step code changesAgent plans, executes, and verifies changes autonomously.

Research Tasks

Best for: Information gatheringAgent searches, synthesizes, and reports findings.

Bug Fixing

Best for: Debugging workflowsAgent analyzes, fixes, and tests iteratively.

Content Generation

Best for: Writing and editingAgent drafts, refines, and polishes content.

Best Practices

Most tasks complete in a single turn. The model calls all needed tools and summarizes — no iteration loop needed. Only switch to iterative when you need multi-turn self-correction.
Set completion_promise for reliable termination in iterative mode. The agent outputs <promise>DONE</promise> when finished.
Keep doom_loop_threshold at 3-5 to prevent runaway agents and wasted resources.
Set observe=True during development to track agent behavior and stage escalation.

Planning

Think before acting

Guardrails

Safety constraints