pub enum EventType {
Show 26 variants
TextMessageStart,
TextMessageContent,
TextMessageEnd,
TextMessageChunk,
ThinkingTextMessageStart,
ThinkingTextMessageContent,
ThinkingTextMessageEnd,
ToolCallStart,
ToolCallArgs,
ToolCallEnd,
ToolCallChunk,
ToolCallResult,
ThinkingStart,
ThinkingEnd,
StateSnapshot,
StateDelta,
MessagesSnapshot,
ActivitySnapshot,
ActivityDelta,
Raw,
Custom,
RunStarted,
RunFinished,
RunError,
StepStarted,
StepFinished,
}Expand description
Event types for the AG-UI protocol.
This enum enumerates all possible event types in the protocol.
Event types are serialized using SCREAMING_SNAKE_CASE (e.g., TEXT_MESSAGE_START).
§Event Categories
- Text Messages:
TextMessageStart,TextMessageContent,TextMessageEnd,TextMessageChunk - Thinking Messages:
ThinkingTextMessageStart,ThinkingTextMessageContent,ThinkingTextMessageEnd - Tool Calls:
ToolCallStart,ToolCallArgs,ToolCallEnd,ToolCallChunk,ToolCallResult - Thinking Steps:
ThinkingStart,ThinkingEnd - State:
StateSnapshot,StateDelta - Messages:
MessagesSnapshot - Run Lifecycle:
RunStarted,RunFinished,RunError - Step Lifecycle:
StepStarted,StepFinished - Other:
Raw,Custom
Variants§
TextMessageStart
Start of a text message from the assistant.
TextMessageContent
Content chunk of a text message (streaming delta).
TextMessageEnd
End of a text message.
TextMessageChunk
Complete text message chunk (non-streaming alternative).
ThinkingTextMessageStart
Start of a thinking text message (extended thinking).
ThinkingTextMessageContent
Content chunk of a thinking text message.
ThinkingTextMessageEnd
End of a thinking text message.
ToolCallStart
Start of a tool call.
ToolCallArgs
Arguments chunk for a tool call (streaming).
ToolCallEnd
End of a tool call.
ToolCallChunk
Complete tool call chunk (non-streaming alternative).
ToolCallResult
Result of a tool call execution.
ThinkingStart
Start of a thinking step (chain-of-thought).
ThinkingEnd
End of a thinking step.
StateSnapshot
Complete state snapshot.
StateDelta
Incremental state update (JSON Patch RFC 6902).
MessagesSnapshot
Complete messages snapshot.
ActivitySnapshot
Complete activity snapshot.
ActivityDelta
Incremental activity update (JSON Patch RFC 6902).
Raw
Raw event from the underlying provider.
Custom
Custom application-specific event.
RunStarted
Agent run has started.
RunFinished
Agent run has finished successfully.
RunError
Agent run encountered an error.
StepStarted
A step within a run has started.
StepFinished
A step within a run has finished.