#[non_exhaustive]pub enum AgentEvent {
TurnStart,
ProviderProgress {
progress: ProviderProgress,
},
TextDelta {
delta: String,
},
ThinkingDelta {
delta: String,
},
ReasoningComplete {
blocks: Vec<ReasoningBlock>,
},
ToolCallStarted {
name: String,
},
ToolCall {
call: ToolCall,
provenance: ToolProvenance,
summary_fields: Vec<String>,
},
ToolResult {
result: MessageToolResult,
},
TurnEnd {
stop_reason: StopReason,
usage: Usage,
},
Error {
message: String,
},
}Expand description
Events emitted during a turn for streaming.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
TurnStart
Turn has started.
ProviderProgress
Transient, typed provider dispatch/retry progress for the active request.
Fields
progress: ProviderProgressProvider-owned progress facts. This event is never a transcript message.
TextDelta
A text delta was received from the provider.
ThinkingDelta
A transient thinking/reasoning delta was received from the provider.
Thinking deltas are live UI preview data. They must not be persisted as normal conversation history or included in the final assistant text.
ReasoningComplete
Emitted once per provider response, before TurnEnd, when the response
carried reasoning blocks. Durable replay payload; never display content.
Fields
blocks: Vec<ReasoningBlock>Provider-native reasoning blocks in stream order.
ToolCallStarted
Tool call detected: parameters still streaming.
ToolCall
A tool call was requested.
Fields
provenance: ToolProvenanceThe provenance of the tool being called.
ToolResult
A tool call completed.
Fields
result: MessageToolResultThe tool result.
TurnEnd
Turn has ended.
Error
An error occurred.
Trait Implementations§
Source§impl Clone for AgentEvent
impl Clone for AgentEvent
Source§fn clone(&self) -> AgentEvent
fn clone(&self) -> AgentEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more