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

# Get Loop Event • AI Agent SDK

> get_loop_event: Get the current loop event if one exists.

# get\_loop\_event

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

Get the current loop event if one exists.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def get_loop_event() -> Optional[DoomLoopEvent]
```

### Returns

<ResponseField name="Returns" type="Optional[DoomLoopEvent]">
  The result of the operation.
</ResponseField>

## Uses

* `get_loop_type`
* `DoomLoopEvent`

## Source

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