#[non_exhaustive]pub struct Step {Show 21 fields
pub id: Uuid,
pub trace_id: Uuid,
pub run_id: Uuid,
pub name: String,
pub kind: StepKind,
pub position: u32,
pub status: FsmState<StepStatus>,
pub attempt: u32,
pub input: Option<Value>,
pub output: Option<Value>,
pub error: Option<String>,
pub duration_ms: u64,
pub cost_usd: Decimal,
pub input_tokens: Option<u64>,
pub output_tokens: Option<u64>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
pub started_at: Option<DateTime<Utc>>,
pub completed_at: Option<DateTime<Utc>>,
pub debug_messages: Option<Value>,
pub is_error_handler: bool,
}Expand description
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: UuidUnique identifier (UUIDv7).
trace_id: UuidDeterministic trace ID for log correlation.
Generated as UUIDv5(NAMESPACE_OID, "{run_id}:{name}:{position}") so
the same run replayed with the same steps always produces the same IDs.
run_id: UuidThe run this step belongs to.
name: StringHuman-readable step name (e.g. “build”, “test”, “review”).
kind: StepKindThe type of operation.
position: u32Execution wave within the run (0-based).
In linear flows, this strictly increases (0, 1, 2, …).
In DAGs with parallel execution, steps at the same wave share
the same position and execute concurrently. Use
step_dependencies to determine the actual execution order.
status: FsmState<StepStatus>Current FSM status — embeds state + state_machine_id for SQL-side transitions.
attempt: u32Which run attempt produced this step (1-based).
A run retried twice holds steps with attempt 1, 2 and 3. Steps from
earlier attempts are kept for inspection and are never replayed.
Derived by the store from Run::retry_count at creation time.
input: Option<Value>Serialized operation configuration.
output: Option<Value>Serialized operation output.
error: Option<String>Error message if the step failed.
duration_ms: u64Wall-clock execution duration in milliseconds.
cost_usd: DecimalCost in USD (agent steps only).
input_tokens: Option<u64>Input token count (agent steps only).
output_tokens: Option<u64>Output token count (agent steps only).
created_at: DateTime<Utc>When the step was created.
updated_at: DateTime<Utc>When the step record was last updated.
started_at: Option<DateTime<Utc>>When step execution started.
completed_at: Option<DateTime<Utc>>When step execution finished.
debug_messages: Option<Value>Debug messages (verbose conversation trace), stored as JSON.
is_error_handler: boolWhether this step is an error handler (on_error) rather than a normal step.