> ## 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**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/protocols.md) module.

AI Agent

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

**key** `str`

No description available.

**owner** `str`

No description available.

**expires\_at** `float`

No description available.

## Source

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


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