Documentation for the events used in the Agent User Interaction Protocol SDK
EventType
enum defines all possible event types in the system:
BaseEvent
type, which provides common properties
shared across all event types.
Property | Type | Description |
---|---|---|
type | EventType | The type of event (discriminator field for the union) |
timestamp | number (optional) | Timestamp when the event was created |
rawEvent | any (optional) | Original event data if this event was transformed |
Property | Type | Description |
---|---|---|
threadId | string | ID of the conversation thread |
runId | string | ID of the agent run |
Property | Type | Description |
---|---|---|
threadId | string | ID of the conversation thread |
runId | string | ID of the agent run |
result | any (optional) | Result data from the agent run |
Property | Type | Description |
---|---|---|
message | string | Error message |
code | string (optional) | Error code |
Property | Type | Description |
---|---|---|
stepName | string | Name of the step |
Property | Type | Description |
---|---|---|
stepName | string | Name of the step |
Property | Type | Description |
---|---|---|
messageId | string | Unique identifier for the message |
role | "assistant" | Role is always “assistant” |
Property | Type | Description |
---|---|---|
messageId | string | Matches the ID from TextMessageStartEvent |
delta | string | Text content chunk (non-empty) |
Property | Type | Description |
---|---|---|
messageId | string | Matches the ID from TextMessageStartEvent |
Property | Type | Description |
---|---|---|
toolCallId | string | Unique identifier for the tool call |
toolCallName | string | Name of the tool being called |
parentMessageId | string (optional) | ID of the parent message |
Property | Type | Description |
---|---|---|
toolCallId | string | Matches the ID from ToolCallStartEvent |
delta | string | Argument data chunk |
Property | Type | Description |
---|---|---|
toolCallId | string | Matches the ID from ToolCallStartEvent |
Property | Type | Description |
---|---|---|
messageId | string | ID of the conversation message this result belongs to |
toolCallId | string | Matches the ID from the corresponding ToolCallStartEvent |
content | string | The actual result/output content from the tool execution |
role | "tool" (optional) | Optional role identifier, typically “tool” for tool results |
Property | Type | Description |
---|---|---|
snapshot | any | Complete state snapshot |
Property | Type | Description |
---|---|---|
delta | any[] | Array of JSON Patch operations |
Property | Type | Description |
---|---|---|
messages | Message[] | Array of message objects |
Property | Type | Description |
---|---|---|
event | any | Original event data |
source | string (optional) | Source of the event |
Property | Type | Description |
---|---|---|
name | string | Name of the custom event |
value | any | Value associated with the event |