pub enum AgentEvent {
GenerationStarted {
context: TraceContext,
},
GenerationFinished {
context: TraceContext,
},
GenerationCommitted {
context: TraceContext,
},
Failure {
failure: GenerationFailure,
attempt: u32,
max_attempts: u32,
retry_in: Option<Duration>,
recovery_remaining: Option<Duration>,
context: TraceContext,
},
TextDelta {
text: String,
context: TraceContext,
},
ThinkingDelta {
text: String,
context: TraceContext,
},
ToolStarted {
call_id: Uuid,
tool_use: ToolUse,
background: CancelToken,
context: TraceContext,
},
ToolFinished {
call_id: Uuid,
tool_use: ToolUse,
result: ToolResult,
context: TraceContext,
},
TurnFinished {
context: TraceContext,
},
}Expand description
Live events emitted by the agent runtime.
All ongoing work is attributed via TraceContext::agent_id.
Variants§
GenerationStarted
Begin a provisional response. A retry replaces the failed attempt’s draft.
Fields
§
context: TraceContextGenerationFinished
The complete response validated. Its tool calls have not executed yet.
Fields
§
context: TraceContextGenerationCommitted
A validated response was installed in history and its configured checkpoint succeeded. Its tool calls have not executed yet. Emitted only when a checkpoint callback is installed, including when a later checkpoint repairs an earlier save failure.
Fields
§
context: TraceContextFailure
Fields
§
failure: GenerationFailure§
recovery_remaining: Option<Duration>Remaining elapsed recovery budget, if configured and recovery started.
§
context: TraceContextTextDelta
Incremental assistant text (for streaming UX).
ThinkingDelta
Incremental thinking summary text (streamed for UI; also stored in history).
ToolStarted
ToolFinished
TurnFinished
Fields
§
context: TraceContextTrait Implementations§
Source§impl Clone for AgentEvent
impl Clone for AgentEvent
Source§fn clone(&self) -> AgentEvent
fn clone(&self) -> AgentEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AgentEvent
impl RefUnwindSafe for AgentEvent
impl Send for AgentEvent
impl Sync for AgentEvent
impl Unpin for AgentEvent
impl UnsafeUnpin for AgentEvent
impl UnwindSafe for AgentEvent
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
Mutably borrows from an owned value. Read more