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
Re-export core types for convenience 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.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EventType
impl<'de> Deserialize<'de> for EventType
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<EventType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<EventType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for EventType
impl Serialize for EventType
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Copy for EventType
impl Eq for EventType
impl StructuralPartialEq for EventType
Auto Trait Implementations§
impl Freeze for EventType
impl RefUnwindSafe for EventType
impl Send for EventType
impl Sync for EventType
impl Unpin for EventType
impl UnsafeUnpin for EventType
impl UnwindSafe for EventType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.