pub enum AgentEvent {
TextDelta(String),
ToolCallsStart(Vec<ToolCall>),
ToolResult {
call_id: CompactString,
output: String,
},
ToolCallsComplete,
Done(AgentResponse),
}Expand description
A fine-grained event emitted during agent execution.
Yielded by Agent::run_stream() or emitted via Hook::on_event()
for real-time status reporting to clients.
Variants§
TextDelta(String)
Text content delta from the model.
ToolCallsStart(Vec<ToolCall>)
Model is calling tools (with the tool calls).
ToolResult
A single tool completed execution.
Fields
§
call_id: CompactStringThe tool call ID this result belongs to.
ToolCallsComplete
All tools completed, continuing to next iteration.
Done(AgentResponse)
Agent finished with final response.
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 · 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