pub enum AgentStreamEvent {
Show 15 variants
RunStart {
run_id: RunId,
conversation_id: ConversationId,
},
NodeStart {
node: AgentExecutionNode,
step: usize,
status: RunStatus,
},
NodeComplete {
node: AgentExecutionNode,
step: usize,
status: RunStatus,
},
Custom {
event: AgentEvent,
},
ModelRequest {
step: usize,
},
ModelStream {
step: usize,
event: ModelResponseStreamEvent,
},
ModelResponse {
step: usize,
response: ModelResponse,
},
Checkpoint {
node: AgentExecutionNode,
step: usize,
},
Suspended {
node: AgentExecutionNode,
reason: String,
},
ToolCall {
step: usize,
call: ToolCallPart,
},
ToolReturn {
step: usize,
tool_return: ToolReturnPart,
},
OutputRetry {
retries: usize,
prompt: String,
},
SteeringGuard {
step: usize,
prompt: String,
},
RunComplete {
run_id: RunId,
output: String,
},
RunFailed {
run_id: RunId,
error_kind: String,
message: String,
},
}Expand description
Typed event emitted by the agent runtime while a run progresses.
Variants§
RunStart
A run started.
NodeStart
Runtime execution entered a durable node boundary.
Fields
node: AgentExecutionNodeExecution boundary being entered.
NodeComplete
Runtime execution completed a durable node boundary.
Fields
node: AgentExecutionNodeExecution boundary that completed.
Custom
A context sideband event was published during the run.
Fields
event: AgentEventApplication or capability event.
ModelRequest
A model request was prepared for a loop step.
ModelStream
A model response stream event was received.
Fields
event: ModelResponseStreamEventCanonical model stream event.
ModelResponse
A model response was received.
Fields
response: ModelResponseCanonical model response.
Checkpoint
A durable execution checkpoint was persisted or inspected.
Suspended
Execution was suspended at a durable checkpoint.
Fields
node: AgentExecutionNodeExecution boundary that requested suspension.
ToolCall
A model requested a function tool call.
ToolReturn
A function tool returned a result or structured control-flow error.
OutputRetry
Output validation or output function validation requested another model turn.
Fields
SteeringGuard
Pending user steering requested another model turn before finalization.
Fields
RunComplete
A run completed successfully.
RunFailed
A run failed after preserving recoverable context state.
Implementations§
Source§impl AgentStreamEvent
impl AgentStreamEvent
Sourcepub fn sideband_event(&self) -> Option<AgentSidebandEvent>
pub fn sideband_event(&self) -> Option<AgentSidebandEvent>
Return a typed sideband event view for known context events carried by Custom.
Trait Implementations§
Source§impl Clone for AgentStreamEvent
impl Clone for AgentStreamEvent
Source§fn clone(&self) -> AgentStreamEvent
fn clone(&self) -> AgentStreamEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more