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

# Apply Backoff • AI Agent SDK

> apply_backoff: Apply backoff delay and return the delay used.

# apply\_backoff

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**DoomLoopDetector**](../classes/DoomLoopDetector) class in the [**doom\_loop**](../modules/doom_loop) module.

Apply backoff delay and return the delay used.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def apply_backoff() -> float
```

### Returns

<ResponseField name="Returns" type="float">
  Backoff delay in seconds
</ResponseField>

## Uses

* `time.sleep`

## Used By

* [`EscalationPipeline.execute_at_stage`](../functions/EscalationPipeline-execute_at_stage)

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/escalation/doom_loop.py#L284">
  `praisonaiagents/escalation/doom_loop.py` at line 284
</Card>
