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

# enqueue • AI Agent SDK

> enqueue: Persist an outbound message for delivery.

# enqueue

AsyncMethod

> This is a method of the [**OutboundDeliveryProtocol**](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/OutboundDeliveryProtocol.md) class in the [**protocols**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/protocols.md) module.

Persist an outbound message for delivery.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
async def enqueue(idempotency_key: str, target: str, payload: Dict[str, Any], metadata: Optional[Dict[str, Any]]) -> str
```

## Parameters

**idempotency\_key** `str` *required*

Unique key to prevent duplicate sends

**target** `str` *required*

Target channel identifier (e.g., "telegram:12345")

**payload** `Dict[str, Any]` *required*

Message payload to deliver

**metadata** `Optional`

Optional metadata for tracking/routing

### Returns

**Returns** `str`

Unique entry key for tracking this message

## Source

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


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