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

# Turn Lease Token • AI Agent SDK

> TurnLeaseToken: An opaque handle to a held turn lease (Issue #3643).

# TurnLeaseToken

> Defined in the [**protocols**](../modules/protocols) module.

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

An opaque handle to a held turn lease (Issue #3643).

Returned by :meth:`TurnLockProtocol.acquire` and passed back to
:meth:`TurnLockProtocol.release`. The `owner` token identifies the
replica/process that holds the lease so a distributed backend can make
`release` **identity-checked and idempotent** — a replica can only
release the lease it actually owns, and a stale/expired lease that has
since been reclaimed by another owner is never clobbered.

Attributes:
key: The resolved session id the lease serialises on.
owner: The holder's opaque owner token (e.g. a per-replica id).
expires\_at: Absolute wall-clock expiry (same clock the backend uses).
A dead holder's lease is reclaimable once `now` passes this, so a
crashed replica cannot wedge a healthy session forever.

## Properties

<ResponseField name="key" type="str">
  No description available.
</ResponseField>

<ResponseField name="owner" type="str">
  No description available.
</ResponseField>

<ResponseField name="expires_at" type="float">
  No description available.
</ResponseField>

## Source

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