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

# record • AI Agent SDK

> record: Record an action for loop detection.

# record

Method

> This is a method of the [**DoomLoopTracker**](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/DoomLoopTracker.md) class in the [**autonomy**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/autonomy.md) module.

Record an action for loop detection.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def record(action_type: str, args: Dict[str, Any], result: Any, success: bool) -> None
```

## Parameters

**action\_type** `str` *required*

Type of action (e.g., "read\_file")

**args** `Dict[str, Any]` *required*

Action arguments

**result** `Any` *required*

Action result

**success** `bool` *required*

Whether action succeeded

## Uses

* `record_action`

## Used By

* [`PersistentRestartLoopGuard.record`](../functions/PersistentRestartLoopGuard-record)

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/agent/autonomy.py#L457)
>
> `praisonaiagents/agent/autonomy.py` at line 457


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.