pub struct RunEvent {Show 15 fields
pub id: String,
pub run_id: String,
pub thread_id: String,
pub node_id: Option<String>,
pub seq: u64,
pub kind: RunEventKind,
pub effect: Effect,
pub input: Option<PayloadRef>,
pub output: Option<PayloadRef>,
pub latency_ms: Option<u64>,
pub tokens: Option<Usage>,
pub cost_usd: Option<f64>,
pub status: EventStatus,
pub parent: Option<String>,
pub recorded_at: DateTime<Utc>,
}Expand description
One recorded fact about a run: the Flight Recorder’s atomic evidence.
Events form a causal chain via parent (the event that caused this one —
e.g. a node input’s parent is its super-step start), and a total order
via seq, a monotonic sequence number assigned by the journal at record
time. seq — not wall time — is the ordering guarantee: recorded runs
re-driven against a seeded clock reproduce the same sequence.
Event ids are {run_id}:{seq} — deterministic for a given journal, so a
re-driven run with the same seed mints the same ids.
Fields§
§id: StringDeterministic event id ({run_id}:{seq}).
run_id: StringThe run this event belongs to. One Executor::run call = one run id.
thread_id: StringThe thread (session) the run belongs to.
node_id: Option<String>The node this event is about, where applicable (None for run-wide
events such as super-step boundaries and checkpoint writes).
seq: u64Monotonic sequence number within the journal, assigned at record time. The total order of the run’s evidence.
kind: RunEventKindWhat happened.
effect: EffectThe declared effect classification of whatever produced this event.
input: Option<PayloadRef>Input payload (arguments, request, snapshot), inline or referenced.
output: Option<PayloadRef>Output payload (result, response, updates), inline or referenced.
latency_ms: Option<u64>Wall/logical latency of the recorded operation in milliseconds, when measured. Sourced from the run’s clock, so a logical clock yields reproducible values.
tokens: Option<Usage>Token usage for model calls, when the provider reported it.
cost_usd: Option<f64>Monetary cost in USD for the recorded operation, when known. f64
micro-costs are fine here: this is evidence, not accounting — the
ledger aggregates elsewhere.
status: EventStatusHow the event ended.
parent: Option<String>The id of the event that caused this one, when there is one. A node input’s parent is its super-step start; a tool call’s parent is the node that invoked it; a checkpoint write’s parent is the routing decision that ended the step.
recorded_at: DateTime<Utc>When the event was recorded, read from the run’s clock (system wall clock by default; the configured logical clock for seeded runs).