How It Works
Quick Start
Simple Usage
Enable autonomy — artifacts, escalation, and doom-loop protection activate automatically:
How It Works
Instead of loading entire documents into the LLM window, PraisonAI stores large outputs as artifacts and lets agents peek, grep, and chunk them on demand. When tasks grow complex, escalation increases capability stage-by-stage; sub-agent delegation handles focused subtasks with scoped budgets.| Component | Role |
|---|---|
| Artifact store | Holds large outputs; agents query with head, grep, chunk |
| Escalation pipeline | Progresses from direct answer → tools → plan → sub-agents |
| Sub-agent delegator | Spawns focused agents with token and step budgets |
| Doom loop tracker | Stops repeated identical actions |
Configuration Options
AutonomyConfig
| Option | Type | Default | Description |
|---|---|---|---|
level | str | "suggest" | Autonomy level (suggest, auto_edit, full_auto) |
max_iterations | int | 20 | Maximum turns before stopping |
doom_loop_threshold | int | 3 | Repeated actions before doom-loop stop |
auto_escalate | bool | True | Automatically increase complexity stage |
mode | str | auto | caller or iterative execution mode |
Artifact queueing
Large tool outputs aboveinline_max_bytes (default 32 KB) are stored as artifacts automatically when queueing is enabled on the agent’s tool configuration.
Common Patterns
Explore a large artifact
Agents with autonomy enabled can inspect stored outputs without loading the full content:Delegate a subtask
Best Practices
Enable autonomy for large or multi-step tasks
Enable autonomy for large or multi-step tasks
Set
autonomy=True or AutonomyConfig(level="full_auto") when inputs exceed a few pages or require tool loops. Simple one-shot questions do not need it.Set doom_loop_threshold for long runs
Set doom_loop_threshold for long runs
Keep
doom_loop_threshold at 3–5 so agents stop when repeating the same tool call instead of burning tokens indefinitely.Use full_auto for repository-scale work
Use full_auto for repository-scale work
level="full_auto" enables iterative mode, filesystem tracking, and sub-agent delegation — appropriate for code and data analysis over large corpora.Combine with code execution for structured data
Combine with code execution for structured data
Pair
ExecutionConfig(code_execution=True) with autonomy so agents can run Python over artifact contents rather than reasoning over raw text alone.Related
Autonomous Loops
Run agents in iterative loops with completion signals and escalation
Context Compaction
Automatically trim context when the window fills up

