Skip to main content

Event

Enum Event 

Source
#[non_exhaustive]
pub enum Event {
Show 36 variants RunStarted { run_id: RunId, plan_summary: PlanSummary, }, NodeStarted { run_id: RunId, node_id: NodeId, kind: FilterKind, effectful: bool, }, NodeProgress { run_id: RunId, node_id: NodeId, progress: f32, }, NodeCacheHit { run_id: RunId, node_id: NodeId, key: CacheKey, tier: CacheTier, load_time: Duration, }, NodeCacheMiss { run_id: RunId, node_id: NodeId, key: CacheKey, }, NodeCompleted { run_id: RunId, node_id: NodeId, duration: Duration, output_summary: String, }, NodeFailed { run_id: RunId, node_id: NodeId, error: String, }, RunCompleted { run_id: RunId, duration: Duration, }, RunFailed { run_id: RunId, error: String, }, TrialStarted { study_id: StudyId, trial_id: TrialId, params: Value, }, TrialMetric { study_id: StudyId, trial_id: TrialId, metric: MetricRecord, }, TrialPruned { study_id: StudyId, trial_id: TrialId, step: usize, reason: String, }, TrialCompleted { study_id: StudyId, trial_id: TrialId, final_metrics: Vec<MetricRecord>, }, TrialFailed { study_id: StudyId, trial_id: TrialId, error: String, }, StudyStarted { study_id: StudyId, name: String, total_trials: usize, }, StudyProgress { study_id: StudyId, completed: usize, total: usize, best_value: f64, }, BestUpdated { study_id: StudyId, trial_id: TrialId, value: f64, params: Value, }, ParetoUpdated { study_id: StudyId, front_size: usize, }, StudyCompleted { study_id: StudyId, best_trial_id: TrialId, best_value: f64, }, GenerationStarted { study_id: StudyId, generation: usize, population_size: usize, }, GenerationCompleted { study_id: StudyId, generation: usize, best_fitness: f64, mean_fitness: f64, }, MemberExploited { study_id: StudyId, generation: usize, replaced_id: String, donor_id: String, }, EpochStarted { run_id: RunId, epoch: usize, total_epochs: Option<usize>, }, EpochCompleted { run_id: RunId, epoch: usize, metrics: Vec<MetricRecord>, }, StepCompleted { run_id: RunId, step: usize, epoch: Option<usize>, }, MetricReported { run_id: RunId, metric: MetricRecord, node_id: Option<NodeId>, trial_id: Option<TrialId>, }, HealthFlag { run_id: RunId, node_id: NodeId, step: usize, flag: String, detail: String, }, AgentTurnStarted { run_id: RunId, node_id: NodeId, turn: usize, }, EffectRequested { run_id: RunId, node_id: NodeId, turn: usize, effect: String, }, EffectCompleted { run_id: RunId, node_id: NodeId, turn: usize, effect: String, duration: Duration, replayed: bool, is_error: bool, }, ToolCalled { run_id: RunId, node_id: NodeId, tool: String, is_error: bool, }, Handoff { run_id: RunId, from: NodeId, to: NodeId, }, Suspended { run_id: RunId, node_id: NodeId, reason: String, turns: usize, duration: Duration, input_tokens: u64, output_tokens: u64, }, Resumed { run_id: RunId, node_id: NodeId, turn: usize, }, AgentStepCompleted { run_id: RunId, node_id: NodeId, turns: usize, duration: Duration, input_tokens: u64, output_tokens: u64, failed: bool, }, AgentSpawned { run_id: RunId, node_id: NodeId, turn: usize, children: Vec<NodeId>, join: String, },
}
Expand description

Structured events emitted during execution at three levels.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

RunStarted

A pipeline run has started.

Fields

§run_id: RunId

The run this event belongs to.

§plan_summary: PlanSummary

Coarse shape of the plan about to execute — see PlanSummary::cached_nodes for what it deliberately cannot say.

§

NodeStarted

A filter node has started execution.

Fields

§run_id: RunId

The run this event belongs to.

§node_id: NodeId

The node this event concerns.

§kind: FilterKind

Structural kind of the node, from its metadata — see FilterKind.

§effectful: bool

Does this node reach outside the graph — a model, a tool, a person?

An effectful node has no honest FilterKind, and reporting it as Opaque made every consumer see an agent as a filter it could not look inside. Defaulted so run logs written before this field existed still parse.

§

NodeProgress

A filter node reports progress (0.0 to 1.0).

Fields

§run_id: RunId

The run this event belongs to.

§node_id: NodeId

The node this event concerns.

§progress: f32

Fraction complete, from 0.0 to 1.0.

§

NodeCacheHit

A filter node’s result was loaded from cache.

Fields

§run_id: RunId

The run this event belongs to.

§node_id: NodeId

The node this event concerns.

§key: CacheKey

The key the result was found under.

§tier: CacheTier

Which CacheTier served the hit.

§load_time: Duration

Time spent loading the cached result.

§

NodeCacheMiss

A cacheable node’s key was computed but not found — the filter executes and (on success) fills this key.

Fields

§run_id: RunId

The run this event belongs to.

§node_id: NodeId

The node this event concerns.

§key: CacheKey

The key that was looked up and not found — the same key the node’s output will be stored under on success.

§

NodeCompleted

A filter node completed successfully.

Fields

§run_id: RunId

The run this event belongs to.

§node_id: NodeId

The node this event concerns.

§duration: Duration

Wall time from start to finish. Control-flow constructs (loops, branches) report zero — their time is in the nodes they ran.

§output_summary: String

Short human-readable rendering of the output, never the payload itself.

§

NodeFailed

A filter node failed.

Fields

§run_id: RunId

The run this event belongs to.

§node_id: NodeId

The node this event concerns.

§error: String

The error, rendered as a string.

§

RunCompleted

The pipeline run completed.

Fields

§run_id: RunId

The run this event belongs to.

§duration: Duration

Wall time for the whole run.

§

RunFailed

The pipeline run failed.

Fields

§run_id: RunId

The run this event belongs to.

§error: String

The error, rendered as a string.

§

TrialStarted

A new trial has started.

Fields

§study_id: StudyId

The study this event belongs to.

§trial_id: TrialId

The trial this event concerns.

§params: Value

The hyperparameters sampled for this trial, as JSON.

§

TrialMetric

A trial reports an intermediate metric.

Fields

§study_id: StudyId

The study this event belongs to.

§trial_id: TrialId

The trial this event concerns.

§metric: MetricRecord

The intermediate measurement — what pruners decide on.

§

TrialPruned

A trial was pruned (stopped early).

Fields

§study_id: StudyId

The study this event belongs to.

§trial_id: TrialId

The trial this event concerns.

§step: usize

The training step at which the pruner struck.

§reason: String

Why the pruner stopped it, human-readable (e.g. below median).

§

TrialCompleted

A trial completed successfully.

Fields

§study_id: StudyId

The study this event belongs to.

§trial_id: TrialId

The trial this event concerns.

§final_metrics: Vec<MetricRecord>

The measurements the trial finished with — the values the sampler and the study’s best-trial bookkeeping consume.

§

TrialFailed

A trial failed.

Fields

§study_id: StudyId

The study this event belongs to.

§trial_id: TrialId

The trial this event concerns.

§error: String

The error, rendered as a string.

§

StudyStarted

An optimization study has started.

Fields

§study_id: StudyId

The study this event belongs to.

§name: String

Human-readable study name.

§total_trials: usize

How many trials the study intends to run.

§

StudyProgress

Study progress update.

Fields

§study_id: StudyId

The study this event belongs to.

§completed: usize

Trials finished so far.

§total: usize

Total trials planned.

§best_value: f64

Best objective value seen so far; NaN until a trial has completed (consumers render it as “no best yet”, they do not compare it).

§

BestUpdated

The best trial has been updated.

Fields

§study_id: StudyId

The study this event belongs to.

§trial_id: TrialId

The trial this event concerns.

§value: f64

The new best objective value.

§params: Value

The hyperparameters that produced it, as JSON.

§

ParetoUpdated

The Pareto front has changed (multi-objective).

Fields

§study_id: StudyId

The study this event belongs to.

§front_size: usize

Number of non-dominated trials after the update.

§

StudyCompleted

The study completed.

Fields

§study_id: StudyId

The study this event belongs to.

§best_trial_id: TrialId

The winning trial.

§best_value: f64

Its objective value (NaN when no trial completed).

§

GenerationStarted

A PBT generation started (train → evaluate → exploit/explore).

Fields

§study_id: StudyId

The study this event belongs to.

§generation: usize

The generation index.

§population_size: usize

How many population members train in this generation.

§

GenerationCompleted

A PBT generation completed.

Fields

§study_id: StudyId

The study this event belongs to.

§generation: usize

The generation index.

§best_fitness: f64

Best fitness in the population after evaluation.

§mean_fitness: f64

Mean fitness across the population — tracks whether the whole population improves, not just its champion.

§

MemberExploited

A population member was replaced during exploit step.

Fields

§study_id: StudyId

The study this event belongs to.

§generation: usize

The generation index.

§replaced_id: String

The underperforming member whose params and state were overwritten.

§donor_id: String

The better-performing member it copied them from (explore then perturbs the copy).

§

EpochStarted

A training epoch started.

Fields

§run_id: RunId

The run this event belongs to.

§epoch: usize

Zero-based epoch index.

§total_epochs: Option<usize>

Planned epoch count when the loop knows it up front; None for open-ended training, where progress cannot be a percentage.

§

EpochCompleted

A training epoch completed with its summary metrics.

Fields

§run_id: RunId

The run this event belongs to.

§epoch: usize

Zero-based epoch index.

§metrics: Vec<MetricRecord>

Summary metrics for the epoch (e.g. mean loss).

§

StepCompleted

One optimizer step completed (coarse liveness marker).

Fields

§run_id: RunId

The run this event belongs to.

§step: usize

The optimizer step index.

§epoch: Option<usize>

The epoch this step belongs to, when the loop tracks one.

§

MetricReported

A user- or node-scoped metric reported outside a trial.

Fields

§run_id: RunId

The run this event belongs to.

§metric: MetricRecord

The measurement.

§node_id: Option<NodeId>

The node the metric is scoped to, if any.

§trial_id: Option<TrialId>

The trial the metric is scoped to, if any.

§

HealthFlag

A training-health diagnostic fired for a node (e.g. DEAD_CHANNELS, IGNORED_CHANNELS, LEAKAGE, NONFINITE).

Fields

§run_id: RunId

The run this event belongs to.

§node_id: NodeId

The node this event concerns.

§step: usize

The training step at which the diagnostic fired.

§flag: String

The flag family, optionally with a count — e.g. DEAD_CHANNELS(3).

§detail: String

Supporting numbers behind the flag, e.g. zero_frac=0.98.

§

AgentTurnStarted

A step began a turn (one poll).

Fields

§run_id: RunId

The run this event belongs to.

§node_id: NodeId

The node this event concerns.

§turn: usize

Zero-based index of the turn being started.

§

EffectRequested

A step asked for an effect to be performed.

Fields

§run_id: RunId

The run this event belongs to.

§node_id: NodeId

The node this event concerns.

§turn: usize

The turn (one poll) that requested the effect.

§effect: String

Effect::label() — e.g. llm:claude-opus-5, tool:search.

§

EffectCompleted

An effect finished.

Fields

§run_id: RunId

The run this event belongs to.

§node_id: NodeId

The node this event concerns.

§turn: usize

The turn (one poll) that requested the effect.

§effect: String

Effect::label() — matches the Event::EffectRequested this answers.

§duration: Duration

How long performing (or replaying) the effect took.

§replayed: bool

Served from the journal rather than actually performed. A replay should be nearly all true.

§is_error: bool

The effect’s result was an error. It is still delivered to the step, which decides whether that is fatal.

§

ToolCalled

A tool ran. Separate from EffectCompleted because tool usage is the thing worth counting per run, and it is what a permission or audit layer hooks into.

Fields

§run_id: RunId

The run this event belongs to.

§node_id: NodeId

The node this event concerns.

§tool: String

The tool’s name.

§is_error: bool

The tool returned an error result.

§

Handoff

Control passed from one node to another.

Fields

§run_id: RunId

The run this event belongs to.

§from: NodeId

The node handing control off.

§to: NodeId

The node receiving it.

§

Suspended

The run stopped, pending something outside it.

Carries what the step has cost so far: a suspended step has not finished, so no Event::AgentStepCompleted fires for it. When the run resumes and finishes, that final event’s totals are cumulative (replayed effects re-count their recorded usage), superseding these. The fields default to zero so run dirs written before they existed still deserialize.

Fields

§run_id: RunId

The run this event belongs to.

§node_id: NodeId

The node this event concerns.

§reason: String

What the run is waiting on, as a short label (e.g. human).

§turns: usize

Turns taken up to and including the one that suspended.

§duration: Duration

Wall time spent so far.

§input_tokens: u64

LLM input tokens consumed so far.

§output_tokens: u64

LLM output tokens generated so far.

§

Resumed

A suspended run picked up again.

Fields

§run_id: RunId

The run this event belongs to.

§node_id: NodeId

The node this event concerns.

§turn: usize

The turn the step resumes at.

§

AgentStepCompleted

A step finished, with what it cost — however it finished.

Done, a handoff, a failed poll or effect, and turn exhaustion all emit this: the cost was paid either way, and telemetry that loses the expensive failures undercounts exactly the runs worth studying. Suspension is the one exit that does not — see Event::Suspended.

Fields

§run_id: RunId

The run this event belongs to.

§node_id: NodeId

The node this event concerns.

§turns: usize

Total turns taken.

§duration: Duration

Total wall time across all turns.

§input_tokens: u64

Total LLM input tokens consumed. Cumulative across a resume: replayed effects re-count their recorded usage.

§output_tokens: u64

Total LLM output tokens generated (same accounting as input_tokens).

§failed: bool

The step ended in an error (the node will also emit Event::NodeFailed). Defaults to false so run dirs written before the field existed still deserialize.

§

AgentSpawned

A step fanned work out to spawned instances.

children are the hierarchical ids (parent/label) the instances run under; their own turn and completion events appear under those ids, which is how a reader ties the sub-tree together.

Fields

§run_id: RunId

The run this event belongs to.

§node_id: NodeId

The node this event concerns.

§turn: usize

The turn (one poll) that spawned the instances.

§children: Vec<NodeId>

Hierarchical ids (parent/label) the spawned instances run under.

§join: String

The join policy, as a label (all, all-settled, first).

Trait Implementations§

Source§

impl Clone for Event

Source§

fn clone(&self) -> Event

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Event

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Event

Source§

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 Serialize for Event

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Event

§

impl RefUnwindSafe for Event

§

impl Send for Event

§

impl Sync for Event

§

impl Unpin for Event

§

impl UnsafeUnpin for Event

§

impl UnwindSafe for Event

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AsAny for T
where T: Any,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

The receiver as &dyn Any, ready for downcast_ref.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,