enqueue • AI Agent SDK

enqueue: Persist an outbound message for delivery.

enqueue

Async

Method

</div>

This is a method of the OutboundDeliveryProtocol class in the protocols module.

Persist an outbound message for delivery.

Signature

python
async def enqueue(idempotency_key: str, target: str, payload: Dict[str, Any], metadata: Optional[Dict[str, Any]]) -> str

Parameters

ParamField str

Unique key to prevent duplicate sends

ParamField str

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

ParamField Dict[str, Any]

Message payload to deliver

ParamField Optional

Optional metadata for tracking/routing

Returns

ResponseField str

Unique entry key for tracking this message

Source

View on GitHub

praisonaiagents/gateway/protocols.py at line 2038