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

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

> This is a method of the [**DoomLoopTracker**](../classes/DoomLoopTracker) class in the [**autonomy**](../modules/autonomy) 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

<ParamField query="action_type" type="str" required={true}>
  Type of action (e.g., "read\_file")
</ParamField>

<ParamField query="args" type="Dict[str, Any]" required={true}>
  Action arguments
</ParamField>

<ParamField query="result" type="Any" required={true}>
  Action result
</ParamField>

<ParamField query="success" type="bool" required={true}>
  Whether action succeeded
</ParamField>

## Uses

* `record_action`

## Source

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