@egain/ai-agent-sdk API Reference - v0.1.1 / AgentEventPayloadMap
Interface: AgentEventPayloadMap
Payload map for agent events
Table of contents
Properties
- connected
- message
- agentMessage
- errorMessage
- error
- closed
- stateChanged
- queueFlushed
- heartbeat
- tokenExpiring
- transcriptUpdate
- callTranscriptUpdate
- callerInfoUpdate
- conversationIdUpdate
- userContextUpdate
- filterTagsUpdate
- initialized
- portalsAvailable
- agentsAvailable
- profilesAvailable
Properties
connected
• connected: Record<string, never>
Defined in
message
• message: Object
Type declaration
| Name | Type |
|---|---|
data | any |
Defined in
agentMessage
• agentMessage: Omit<MessageHandlerResult, "sessionId" | "timestamp" | "agentId">
Defined in
errorMessage
• errorMessage: Object
Type declaration
| Name | Type |
|---|---|
message | Message |
error | Error |
Defined in
error
• error: Object
Type declaration
| Name | Type |
|---|---|
error | Error |
Defined in
closed
• closed: Object
Type declaration
| Name | Type |
|---|---|
code? | number |
reason? | string |
Defined in
stateChanged
• stateChanged: Object
Type declaration
| Name | Type |
|---|---|
state | ConnectionState |
previousState | ConnectionState |
Defined in
queueFlushed
• queueFlushed: Object
Type declaration
| Name | Type |
|---|---|
count | number |
Defined in
heartbeat
• heartbeat: Omit<MessageHandlerResult, "sessionId" | "timestamp" | "agentId">
Defined in
tokenExpiring
• tokenExpiring: Object
Type declaration
| Name | Type |
|---|---|
reason | "expiring" | "transport_request" |
expiresAt? | number |
Defined in
transcriptUpdate
• transcriptUpdate: Object
Type declaration
| Name | Type |
|---|---|
entry | TranscriptEntry |
Defined in
callTranscriptUpdate
• callTranscriptUpdate: Object
Type declaration
| Name | Type |
|---|---|
entry | CallTranscriptEntry |
Defined in
callerInfoUpdate
• callerInfoUpdate: Object
Type declaration
| Name | Type |
|---|---|
callerInfo | CallerInfo |
Defined in
conversationIdUpdate
• conversationIdUpdate: Object
Type declaration
| Name | Type |
|---|---|
conversationId | string |
Defined in
userContextUpdate
• userContextUpdate: Object
Type declaration
| Name | Type |
|---|---|
userContext | Record<string, unknown> |
Defined in
filterTagsUpdate
• filterTagsUpdate: Object
Type declaration
| Name | Type |
|---|---|
filterTags | Record<string, string[]> |
Defined in
initialized
• initialized: Object
Always includes at least agent (agentId, name). When CC pipeline completes: portal, portalDetails?, agent?, profile, availableProfiles, availablePortals.
Type declaration
| Name | Type |
|---|---|
portal? | Portal |
portalDetails? | any |
agent? | Record<string, unknown> | AgentListItem |
profile? | UserProfile |
availableProfiles? | UserProfile[] |
availablePortals? | Portal[] |
Defined in
portalsAvailable
• portalsAvailable: Object
Type declaration
| Name | Type |
|---|---|
portals | Portal[] |
Defined in
agentsAvailable
• agentsAvailable: Object
Type declaration
| Name | Type |
|---|---|
agents | AgentListItem[] |
Defined in
profilesAvailable
• profilesAvailable: Object
Type declaration
| Name | Type |
|---|---|
profiles | UserProfile[] |
selectedPortal | Portal |