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

# acquire • AI Agent SDK

> acquire: Block until the lease for ``key`` is held; return its token.

# acquire

<div className="flex items-center gap-2">
  <Badge color="blue">Async</Badge>
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**TurnLockProtocol**](../classes/TurnLockProtocol) class in the [**protocols**](../modules/protocols) module.

Block until the lease for `key` is held; return its token.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
async def acquire(key: str) -> TurnLeaseToken
```

## Parameters

<ParamField query="key" type="str" required={true}>
  No description available.
</ParamField>

### Returns

<ResponseField name="Returns" type="TurnLeaseToken">
  The result of the operation.
</ResponseField>

## Used By

* [`LocalTurnLock.acquire`](../functions/LocalTurnLock-acquire)

## Source

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