#[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
RunStarted
A pipeline run has started.
Fields
plan_summary: PlanSummaryCoarse 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
kind: FilterKindStructural kind of the node, from its metadata — see FilterKind.
effectful: boolDoes 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
NodeCacheHit
A filter node’s result was loaded from cache.
Fields
NodeCacheMiss
A cacheable node’s key was computed but not found — the filter executes and (on success) fills this key.
Fields
NodeCompleted
A filter node completed successfully.
Fields
NodeFailed
A filter node failed.
Fields
RunCompleted
The pipeline run completed.
RunFailed
The pipeline run failed.
TrialStarted
A new trial has started.
Fields
TrialMetric
A trial reports an intermediate metric.
Fields
metric: MetricRecordThe intermediate measurement — what pruners decide on.
TrialPruned
A trial was pruned (stopped early).
Fields
TrialCompleted
A trial completed successfully.
Fields
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
StudyStarted
An optimization study has started.
Fields
StudyProgress
Study progress update.
Fields
BestUpdated
The best trial has been updated.
Fields
ParetoUpdated
The Pareto front has changed (multi-objective).
Fields
StudyCompleted
The study completed.
Fields
GenerationStarted
A PBT generation started (train → evaluate → exploit/explore).
Fields
GenerationCompleted
A PBT generation completed.
Fields
MemberExploited
A population member was replaced during exploit step.
Fields
EpochStarted
A training epoch started.
Fields
EpochCompleted
A training epoch completed with its summary metrics.
Fields
metrics: Vec<MetricRecord>Summary metrics for the epoch (e.g. mean loss).
StepCompleted
One optimizer step completed (coarse liveness marker).
Fields
MetricReported
A user- or node-scoped metric reported outside a trial.
Fields
metric: MetricRecordThe measurement.
HealthFlag
A training-health diagnostic fired for a node (e.g.
DEAD_CHANNELS, IGNORED_CHANNELS, LEAKAGE, NONFINITE).
Fields
AgentTurnStarted
A step began a turn (one poll).
Fields
EffectRequested
A step asked for an effect to be performed.
Fields
EffectCompleted
An effect finished.
Fields
effect: StringEffect::label() — matches the Event::EffectRequested this
answers.
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
Handoff
Control passed from one node to another.
Fields
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
Resumed
A suspended run picked up again.
Fields
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
input_tokens: u64Total LLM input tokens consumed. Cumulative across a resume: replayed effects re-count their recorded usage.
failed: boolThe 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.