pub enum WorkflowEvent {
Show 18 variants
WorkflowStarted {
workflow_id: String,
workflow_type: WorkflowType,
timestamp: DateTime<Utc>,
},
WorkflowCompleted {
workflow_id: String,
status: StreamingStatus,
duration_ms: u64,
timestamp: DateTime<Utc>,
},
WorkflowFailed {
workflow_id: String,
error: String,
timestamp: DateTime<Utc>,
},
NodeStarted {
node_id: String,
node_type: StreamingNodeType,
timestamp: DateTime<Utc>,
},
NodeCompleted {
node_id: String,
duration_ms: u64,
state_changes: Vec<String>,
timestamp: DateTime<Utc>,
},
NodeFailed {
node_id: String,
error: String,
timestamp: DateTime<Utc>,
},
TokenDelta {
token: String,
node_id: Option<String>,
agent_id: Option<String>,
},
ReasoningDelta {
token: String,
node_id: Option<String>,
},
ToolCallStarted {
tool_id: String,
tool_name: String,
node_id: Option<String>,
},
ToolCallDelta {
tool_id: String,
arguments_delta: String,
},
ToolCallCompleted {
tool_id: String,
result: Option<String>,
},
AgentHandoff {
from_agent: String,
to_agent: String,
reason: String,
timestamp: DateTime<Utc>,
},
AgentReturn {
from_agent: String,
to_agent: String,
timestamp: DateTime<Utc>,
},
MessageAdded {
role: String,
agent_id: Option<String>,
content_preview: String,
timestamp: DateTime<Utc>,
},
CheckpointCreated {
checkpoint_id: String,
node_id: String,
timestamp: DateTime<Utc>,
},
StateUpdated {
keys_changed: Vec<String>,
node_id: Option<String>,
},
Progress {
current_step: usize,
total_steps: Option<usize>,
message: String,
},
Custom {
event_type: String,
data: Value,
},
}Expand description
Unified workflow event for streaming
Variants§
WorkflowStarted
Workflow execution started
WorkflowCompleted
Workflow execution completed
WorkflowFailed
Workflow execution failed
NodeStarted
Node execution started
NodeCompleted
Node execution completed
NodeFailed
Node execution failed
TokenDelta
Token generated by LLM
ReasoningDelta
Reasoning/thinking token (for models that expose this)
ToolCallStarted
Tool call started
ToolCallDelta
Tool call arguments streaming
ToolCallCompleted
Tool call completed
AgentHandoff
Agent handoff occurred
AgentReturn
Agent returned to caller
MessageAdded
Message added to conversation
CheckpointCreated
State checkpoint created
StateUpdated
State was modified
Progress
Progress update
Custom
Custom event for extensibility
Trait Implementations§
Source§impl Clone for WorkflowEvent
impl Clone for WorkflowEvent
Source§fn clone(&self) -> WorkflowEvent
fn clone(&self) -> WorkflowEvent
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 WorkflowEvent
impl Debug for WorkflowEvent
Source§impl<'de> Deserialize<'de> for WorkflowEvent
impl<'de> Deserialize<'de> for WorkflowEvent
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
Auto Trait Implementations§
impl Freeze for WorkflowEvent
impl RefUnwindSafe for WorkflowEvent
impl Send for WorkflowEvent
impl Sync for WorkflowEvent
impl Unpin for WorkflowEvent
impl UnsafeUnpin for WorkflowEvent
impl UnwindSafe for WorkflowEvent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more