> ## 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 a restart at ``now`` and return whether the breaker tripped.

# record

Method

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

Record a restart at `now` and return whether the breaker tripped.

## Signature

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

## Parameters

**now** `float` *required*

A monotonic timestamp for this restart event.

### Returns

**Returns** `bool`

`True` when at least `max_restarts` restarts have occurred
within the trailing `window_seconds` (breaker tripped);
`False` otherwise.

## Used By

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

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/gateway/protocols.py#L6050)
>
> `praisonaiagents/gateway/protocols.py` at line 6050


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