> ## 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**](../modules/protocols) module.

<Badge color="blue">AI Agent</Badge>

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

<CardGroup cols={2}>
  <Card title="observe()" icon="function" href="../functions/ThawPolicyProtocol-observe">
    Return a :class:`ThawDecision` for the supplied clock readings.
  </Card>
</CardGroup>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/gateway/protocols.py#L3456">
  `praisonaiagents/gateway/protocols.py` at line 3456
</Card>
