#[non_exhaustive]pub struct Step {Show 15 fields
pub id: String,
pub step_index: u32,
pub step_type: StepType,
pub source: StepSource,
pub target: StepTarget,
pub status: StepStatus,
pub content: String,
pub content_delta: String,
pub thinking: String,
pub thinking_delta: String,
pub tool_calls: Vec<ToolCallInfo>,
pub error: String,
pub is_complete_response: Option<bool>,
pub structured_output: Option<Value>,
pub usage_metadata: Option<UsageMetadata>,
}Expand description
A single step in the agent trajectory, mirroring the SDK’s Step.
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: StringUnique string identifier for the step.
step_index: u32Integer index of the step in the trajectory.
step_type: StepTypeThe high-level type of the step.
source: StepSourceThe source that generated the step.
target: StepTargetThe target of the step interaction.
status: StepStatusThe status of the step.
content: StringThe text content/output of the step.
content_delta: StringIncremental text content added since the last update for this step.
thinking: StringFull model reasoning/thinking text for planner responses.
thinking_delta: StringIncremental thinking text added since the last update for this step.
tool_calls: Vec<ToolCallInfo>List of tool calls associated with the step.
error: StringShort error message if the step failed.
is_complete_response: Option<bool>Whether this step is a completed model response directed at the user.
Multiple steps per turn may have this flag set; consumers wanting only the last response should iterate fully.
structured_output: Option<Value>Structured output payload extracted from the FINISH step.
This is serde_json::Value because it contains user-defined schema data
whose shape is not known at compile time.
usage_metadata: Option<UsageMetadata>Token usage for this step’s model invocation.