pub enum AgentEvent {
MessageStart {
message_id: String,
role: AgentRole,
},
MessageComplete {
message_id: String,
content: String,
},
HiddenUserMessage {
content: String,
},
StepStart {
step_id: String,
title: String,
step_number: u32,
},
StepComplete {
step_id: String,
status: StepStatus,
duration_ms: u128,
},
Thinking {
content: String,
},
Text {
content: String,
},
ToolCall {
tool: String,
args_json: Value,
tool_call_id: String,
},
ToolResult {
tool: String,
result_text: String,
tool_call_id: String,
is_error: bool,
},
FinalResponse {
content: String,
},
}Expand description
Streamed events emitted by Agent::query_stream.
Variants§
MessageStart
A new message started.
Fields
MessageComplete
A message finished.
HiddenUserMessage
Hidden user prompt injected by config.
StepStart
A tool execution step started.
Fields
StepComplete
A tool execution step finished.
Fields
§
status: StepStatusStep completion status.
Thinking
Model returned reasoning/thinking text.
Text
Model returned regular text content.
ToolCall
Model requested a tool call.
Fields
ToolResult
Tool execution result was recorded.
Fields
FinalResponse
Final response for the query.
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 moreSource§impl Debug for AgentEvent
impl Debug 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