@egain/ai-agent-sdk API Reference - v0.1.1 / QueuedMessage
Interface: QueuedMessage
Queued message with metadata for retry handling.
Each queued message includes a unique ID for idempotency, timestamp for ordering, and attempt counter for retry logic.
Example
typescript
const queuedMessage: QueuedMessage = {
id: "msg-123",
data: { persona: "customer", content: "Hello" },
timestamp: Date.now(),
attempts: 0
};Table of contents
Properties
Properties
id
• id: string
Unique message identifier for idempotency
Defined in
data
• data: any
The message payload to be sent
Defined in
timestamp
• timestamp: number
Timestamp when the message was queued
Defined in
attempts
• attempts: number
Number of send attempts made