pub enum AgentEvent {
Started,
Status(String),
Usage {
input_tokens: u64,
output_tokens: u64,
},
AssistantDelta(String),
ReasoningDelta(String),
ToolStarted {
id: String,
name: String,
arguments: String,
},
ToolFinished {
id: String,
output: Vec<String>,
status: ToolStatus,
},
ModelMetadataLoaded(Vec<(String, String)>),
Retrying {
attempt: u32,
max_attempts: u32,
delay_ms: u64,
error: String,
},
Finished,
Failed(String),
Cancelled,
}Expand description
Provider-neutral semantic output from an agent turn.
Application adapters may attach local-tool audit details, UI state, or transport state when projecting these events to their own surfaces.
Variants§
Started
A turn started.
Status(String)
Informational provider or run status.
Usage
Incremental token accounting.
Fields
AssistantDelta(String)
Incremental assistant text.
ReasoningDelta(String)
Incremental reasoning text.
ToolStarted
A tool call was requested.
Fields
ToolFinished
A tool call completed.
Fields
§
status: ToolStatusFinal execution status.
ModelMetadataLoaded(Vec<(String, String)>)
Model metadata available for application model pickers.
Retrying
A retry was scheduled after a recoverable provider failure.
Fields
Finished
The turn completed normally.
Failed(String)
The turn failed recoverably.
Cancelled
The turn was cancelled cooperatively.
Trait 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 moreSource§impl Debug for AgentEvent
impl Debug for AgentEvent
impl Eq for AgentEvent
Source§impl PartialEq for AgentEvent
impl PartialEq for AgentEvent
impl StructuralPartialEq for AgentEvent
Auto 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