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
async def enqueue(idempotency_key: str, target: str, payload: Dict[str, Any], metadata: Optional[Dict[str, Any]]) -> strParameters
ParamField
strUnique key to prevent duplicate sends
ParamField
strTarget channel identifier (e.g., “telegram:12345”)
ParamField
Dict[str, Any]Message payload to deliver
ParamField
OptionalOptional metadata for tracking/routing
Returns
ResponseField
strUnique entry key for tracking this message
Source
View on GitHubpraisonaiagents/gateway/protocols.py at line 2038