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

# Thaw Policy Protocol • AI Agent SDK

> ThawPolicyProtocol: Protocol for freeze-thaw (involuntary host-suspend) detection.

# ThawPolicyProtocol

> Defined in the [**protocols**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/protocols.md) module.

AI Agent

Protocol for freeze-thaw (involuntary host-suspend) detection.

Pure, import-free decision contract consumed by the wrapper's
`BotOS` run-loop. The wrapper ticks the policy with a matched pair
of `time.monotonic()` and `time.time()` readings; the policy
compares the elapsed monotonic delta against the elapsed wall-clock
delta and returns a :class:`ThawDecision`. On Linux `CLOCK_MONOTONIC`
does not advance while the host is suspended, so a wall-clock delta
that runs far ahead of the monotonic delta is a positive signature of
a freeze the process could not otherwise observe. Concrete recovery
(restart channel sockets when idle, refresh presence, reconcile the
scheduler) lives in the wrapper; this contract keeps the *detection*
testable in isolation.

## Methods

> [card] [observe()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/ThawPolicyProtocol-observe.md)
>
> Return a :class:`ThawDecision` for the supplied clock readings.

## Source

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


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