pub enum AgentEvent {
Show 23 variants
AgentStart,
AgentEnd {
messages: Vec<Message>,
will_retry: bool,
},
AgentSettled,
TurnStart,
TurnEnd {
message: Message,
tool_results: Vec<ToolResultMessage>,
},
MessageStart {
message: Message,
},
MessageUpdate {
usage: Usage,
assistant_message_event: AssistantMessageEvent,
},
MessageEnd {
message: Message,
},
ToolExecutionStart {
tool_call_id: String,
tool_name: String,
args: Value,
parent_tool_call_id: Option<String>,
},
ToolExecutionUpdate {
tool_call_id: String,
tool_name: String,
args: Value,
partial_result: ToolResult,
parent_tool_call_id: Option<String>,
},
ToolExecutionEnd {
tool_call_id: String,
tool_name: String,
result: ToolResult,
is_error: bool,
parent_tool_call_id: Option<String>,
},
QueueUpdate {
steering: Vec<String>,
follow_up: Vec<String>,
},
CompactionStart {
reason: CompactionReason,
},
CompactionEnd {
reason: CompactionReason,
result: Option<CompactionResult>,
aborted: bool,
will_retry: bool,
error_message: Option<String>,
},
EntryAppended {
entry: FileEntry,
},
SessionInfoChanged {
name: Option<String>,
},
ThinkingLevelChanged {
level: ThinkingLevel,
},
AutoRetryStart {
attempt: u32,
max_attempts: u32,
delay_ms: u64,
error_message: String,
},
AutoRetryEnd {
success: bool,
attempt: u32,
final_error: Option<String>,
},
SummarizationRetryScheduled {
attempt: u32,
max_attempts: u32,
delay_ms: u64,
error_message: String,
},
SummarizationRetryAttemptStart {
source: SummarySource,
reason: Option<CompactionReason>,
},
SummarizationRetryFinished,
BashExecutionUpdate {
id: Option<String>,
delta: String,
},
}Expand description
An agent session event, one JSON line in JSON mode.
Variants§
AgentStart
AgentEnd
AgentSettled
The session is idle: no run, retry or queued work remains.
TurnStart
TurnEnd
Fields
§
tool_results: Vec<ToolResultMessage>Tool results, as messages (with role: "toolResult").
MessageStart
MessageUpdate
MessageEnd
ToolExecutionStart
ToolExecutionUpdate
Fields
§
partial_result: ToolResultToolExecutionEnd
Fields
§
result: ToolResultQueueUpdate
CompactionStart
Fields
§
reason: CompactionReasonCompactionEnd
EntryAppended
SessionInfoChanged
ThinkingLevelChanged
Fields
§
level: ThinkingLevelAutoRetryStart
AutoRetryEnd
SummarizationRetryScheduled
A compaction or branch summary request failed and is retried after a delay.
SummarizationRetryAttemptStart
The retried summary request starts.
SummarizationRetryFinished
Retrying a summary request ended.
BashExecutionUpdate
Trait Implementations§
Source§impl Clone for AgentEvent
impl Clone for AgentEvent
Source§impl Debug for AgentEvent
impl Debug for AgentEvent
Source§impl<'de> Deserialize<'de> for AgentEvent
impl<'de> Deserialize<'de> for AgentEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for AgentEvent
impl PartialEq for AgentEvent
Source§impl Serialize for AgentEvent
impl Serialize 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