Agent(autonomy=True).
How It Works
Escalation Stages
Quick Start
1
Enable autonomy
2
Custom configuration
Stages and Signals
CLI
Pipeline Components
Underpraisonaiagents/escalation/:
- Doom loop detector — identical calls and no-progress patterns
- Loop guard — idempotency-aware tool-call guardrails on every
Agent. See Loop Guard. - Pipeline orchestration — escalation triggers and recovery
- Observability hooks — metrics for escalation events
Best Practices
Enable with autonomy=True
Enable with autonomy=True
Pass
autonomy=True or an AutonomyConfig — the agent selects the stage automatically during execution.Inspect signals before heavy runs
Inspect signals before heavy runs
Call
analyze_prompt() to preview complexity without an LLM call when building UIs or routing logic.Override a false-positive doom-loop stop
Override a false-positive doom-loop stop
A detected doom loop is now a recoverable approval decision, not a hardcoded block. The default still stops (backward-compatible), but a legitimate repeat — e.g. polling a build-status endpoint — can continue with The gate is fail-closed: deny, timeout, no backend, or any error falls back to the historical hard-stop. See Approval.
doom_loop=allow:Stay agent-centric
Stay agent-centric
No standalone pipeline objects — escalation, loop guard, and doom-loop detection live on
Agent.Related
Doom Loop Detection
Pattern-based detection of stuck agent loops
Subagent Delegation
Delegate subtasks when autonomy escalates

