pub enum GraphEvent {
NodeStart {
node: String,
step: usize,
},
NodeEnd {
node: String,
step: usize,
},
Token {
node: String,
delta: String,
},
StateUpdate {
step: usize,
updates: Map<String, Value>,
},
CheckpointSaved {
checkpoint_id: String,
step: usize,
},
SuperStep {
step: usize,
active_nodes: Vec<String>,
},
}Expand description
Streaming events emitted by the executor during a run. All of LangGraph’s stream modes are views over this single typed event stream.
The enum is serializable so event streams can cross process / FFI boundaries (e.g. a WebSocket bridge or a persisted event log).
Variants§
NodeStart
A node began executing.
NodeEnd
A node finished executing (successfully).
Token
A single LLM token delta (the LangGraph messages stream mode).
The executor itself never emits this variant: tokens originate inside
nodes that call crate::llm::ChatModel::chat_stream and forward
each crate::llm::TokenChunk into the run’s event channel (see the
ChatModel rustdoc for the wiring pattern and
RunConfig::token_tx / Executor::token_tx for sender handles).
Fields
StateUpdate
State was updated at a super-step barrier (updates stream mode).
Fields
CheckpointSaved
A checkpoint was persisted at a super-step boundary.
SuperStep
A super-step began; lists the nodes activated in it.