> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Autonomy Config • AI Agent SDK

> AutonomyConfig: Configuration for Agent autonomy features.

# AutonomyConfig

> Defined in the [**autonomy**](../modules/autonomy) module.

<Badge color="blue">AI Agent</Badge>

Configuration for Agent autonomy features.

Autonomy is the safety center: doom loops, escalation, sandbox,
filesystem tracking, and verification hooks all live here.

Attributes:
enabled: Whether autonomy is enabled
level: Autonomy level (suggest, auto\_edit, full\_auto)
mode: Execution mode — "caller" (single chat call, wrapper-equivalent)
or "iterative" (internal loop with completion detection).
Defaults based on level: suggest/auto\_edit → "caller",
full\_auto → "iterative".
max\_iterations: Maximum iterations before stopping
doom\_loop\_threshold: Number of repeated actions to trigger doom loop
auto\_escalate: Whether to automatically escalate complexity
observe: Whether to emit observability events
completion\_promise: Optional string that signals completion when wrapped in \<promise>TEXT\</promise>
clear\_context: Whether to clear chat history between iterations
verification\_hooks: List of VerificationHook instances for output verification
track\_changes: Whether to track filesystem changes via shadow git.
Defaults to True when level="full\_auto", False otherwise.
When enabled, agent.undo()/redo()/diff() become available.
sandbox: Optional SandboxConfig, carried for forward compatibility.
NOT IMPLEMENTED: nothing currently reads this field, and no sandbox
is auto-enabled at any autonomy level. To isolate execution, set it
on the agent itself -- Agent(sandbox=...) -- or run the whole
workflow remotely with AgentFlow(run\_on="docker").
snapshot\_dir: Directory for snapshot storage. Defaults to \~/.praisonai/snapshots.

Usage::

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Simple — default caller mode (wrapper-equivalent, no wasteful loop)
Agent(autonomy=True)  # level=suggest, mode=caller

# Full auto — iterative loop with completion detection
Agent(autonomy="full_auto")

# Ralph Loop — explicit iterative mode with completion promise
Agent(autonomy=AutonomyConfig(
    mode="iterative",
    completion_promise="COMPLETE",
))
```

## Properties

<ResponseField name="enabled" type="bool">
  No description available.
</ResponseField>

<ResponseField name="level" type="str">
  No description available.
</ResponseField>

<ResponseField name="mode" type="Optional[str]">
  No description available.
</ResponseField>

<ResponseField name="max_iterations" type="int">
  No description available.
</ResponseField>

<ResponseField name="doom_loop_threshold" type="int">
  No description available.
</ResponseField>

<ResponseField name="auto_escalate" type="bool">
  No description available.
</ResponseField>

<ResponseField name="observe" type="bool">
  No description available.
</ResponseField>

<ResponseField name="completion_promise" type="Optional[str]">
  No description available.
</ResponseField>

<ResponseField name="clear_context" type="bool">
  No description available.
</ResponseField>

<ResponseField name="verification_hooks" type="Optional">
  No description available.
</ResponseField>

<ResponseField name="track_changes" type="Optional[bool]">
  No description available.
</ResponseField>

<ResponseField name="sandbox" type="Optional">
  No description available.
</ResponseField>

<ResponseField name="snapshot_dir" type="Optional[str]">
  No description available.
</ResponseField>

<ResponseField name="default_tools" type="Optional">
  No description available.
</ResponseField>

<ResponseField name="max_budget_usd" type="Optional[float]">
  No description available.
</ResponseField>

<ResponseField name="max_tokens" type="Optional[int]">
  No description available.
</ResponseField>

<ResponseField name="budget_action" type="str">
  No description available.
</ResponseField>

## Methods

<CardGroup cols={2}>
  <Card title="effective_track_changes()" icon="function" href="../functions/AutonomyConfig-effective_track_changes">
    Whether track\_changes is effectively enabled.
  </Card>
</CardGroup>

<Accordion title="Internal & Generic Methods">
  * **from\_dict**: Create config from dictionary.
</Accordion>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/agent/autonomy.py#L86">
  `praisonaiagents/agent/autonomy.py` at line 86
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Configuration Overview" icon="gear" href="/docs/docs/configuration/index" />

  <Card title="Agent Config" icon="robot" href="/docs/docs/configuration/agent-config" />
</CardGroup>
