> ## 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.

# Execution Config • AI Agent SDK

> ExecutionConfig: Configuration for agent execution limits.

# ExecutionConfig

> Defined in the [**Feature Configs**](../modules/feature_configs) module.

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

Configuration for agent execution limits.

Consolidates: max\_iter, max\_rpm, max\_execution\_time, max\_retry\_limit,
allow\_code\_execution, code\_execution\_mode, rate\_limiter

## Properties

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

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

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

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

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

<ResponseField name="retry_initial_delay" type="float">
  No description available.
</ResponseField>

<ResponseField name="retry_backoff_factor" type="float">
  No description available.
</ResponseField>

<ResponseField name="retry_jitter" type="float">
  No description available.
</ResponseField>

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

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

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

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

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

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

<ResponseField name="context_compaction" type="Union[bool, ContextCompactionPolicy]">
  No description available.
</ResponseField>

<ResponseField name="pre_compaction_memory_flush" type="Union[bool, PreCompactionMemoryFlushConfig]">
  No description available.
</ResponseField>

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

<ResponseField name="compaction_strategy" type="Optional[CompactionStrategy]">
  No description available.
</ResponseField>

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

<ResponseField name="on_budget_exceeded" type="Any">
  No description available.
</ResponseField>

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

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

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

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

## Methods

<CardGroup cols={2}>
  <Card title="resolved_max_steps()" icon="function" href="../functions/ExecutionConfig-resolved_max_steps">
    Single, unified step budget honoured by both tool-execution loops.
  </Card>

  <Card title="resolved_max_tool_calls()" icon="function" href="../functions/ExecutionConfig-resolved_max_tool_calls">
    Per-turn tool-call guardrail (max parallel tool calls in one response).
  </Card>
</CardGroup>

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

## Usage

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Simple preset
    Agent(execution="thorough")
    
    # With config
    Agent(execution=ExecutionConfig(
        max_iter=50,
        max_rpm=100,
        max_execution_time=300,
        max_retry_limit=5,
    ))
    
    # With code execution and rate limiter
    Agent(execution=ExecutionConfig(
        code_execution=True,
        code_mode="safe",
        rate_limiter=my_limiter,
    ))
    
    # With token budget guard
    Agent(execution=ExecutionConfig(
        max_budget=0.50,              # Hard USD limit per agent run
        on_budget_exceeded="stop",    # "stop" | "warn" | callable
    ))
```

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/config/feature_configs.py#L840">
  `praisonaiagents/config/feature_configs.py` at line 840
</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>
