pub struct StepResponse {Show 35 fields
pub account: Option<StepAccountResponse>,
pub account_id: Option<Uuid>,
pub agent_role: Option<String>,
pub approval_assignee: Option<String>,
pub approval_deadline_at: Option<DateTime<Utc>>,
pub approval_requirement: Option<ApprovalRequirement>,
pub approval_seconds_remaining: Option<i64>,
pub approvals: Vec<StepApproval>,
pub approvals_required: Option<i32>,
pub artifacts: Vec<ArtifactResponse>,
pub attempt: i32,
pub cache_creation_input_tokens: Option<i64>,
pub cache_read_input_tokens: Option<i64>,
pub completed_at: Option<DateTime<Utc>>,
pub cost_usd: f64,
pub created_at: DateTime<Utc>,
pub debug_messages: Option<Value>,
pub dependencies: Vec<Uuid>,
pub duration_ms: i64,
pub environment_id: Option<String>,
pub error: Option<String>,
pub id: Uuid,
pub input: Option<Map<String, Value>>,
pub input_tokens: Option<i64>,
pub kind: String,
pub name: String,
pub output: Option<Map<String, Value>>,
pub output_tokens: Option<i64>,
pub position: i32,
pub run_id: Uuid,
pub session_id: Option<String>,
pub started_at: Option<DateTime<Utc>>,
pub status: StepStatus,
pub trace_id: Uuid,
pub updated_at: DateTime<Utc>,
}Expand description
Step response DTO — public API representation of a step.
§Examples
use ironflow_store::models::Step;
use ironflow_api::entities::StepResponse;JSON schema
{
"description": "Step response DTO — public API representation of a step.\n\n# Examples\n\n```\nuse ironflow_store::models::Step;\nuse ironflow_api::entities::StepResponse;\n```",
"type": "object",
"required": [
"attempt",
"cost_usd",
"created_at",
"dependencies",
"duration_ms",
"id",
"kind",
"name",
"position",
"run_id",
"status",
"trace_id",
"updated_at"
],
"properties": {
"account": {
"$ref": "#/components/schemas/StepAccountResponse"
},
"account_id": {
"description": "Provider Account the agent step ran under, if any.",
"type": [
"string",
"null"
],
"format": "uuid"
},
"agent_role": {
"description": "Name of the `AgentRole` the agent step was created from; null for any\nother step, an agent step built by hand, or a step stored before roles\nwere recorded.",
"type": [
"string",
"null"
]
},
"approval_assignee": {
"description": "Who the approval is currently assigned to.\n\nSerialized as a prefixed string: `user:{name}` or `group:{name}`.",
"type": [
"string",
"null"
]
},
"approval_deadline_at": {
"description": "When this approval gate expires, if it carries an SLA deadline.",
"type": [
"string",
"null"
],
"format": "date-time"
},
"approval_requirement": {
"$ref": "#/components/schemas/ApprovalRequirement"
},
"approval_seconds_remaining": {
"description": "Seconds left before the gate escalates. Clamped at 0, `None` when the\nstep has no deadline.",
"type": [
"integer",
"null"
],
"format": "int64"
},
"approvals": {
"description": "Votes cast on the approval gate so far, at most one per user.",
"type": "array",
"items": {
"$ref": "#/components/schemas/StepApproval"
}
},
"approvals_required": {
"description": "Distinct approvals the gate needs: the requirement's count, `1` for an\napproval step without rules, `None` for any other step kind.",
"type": [
"integer",
"null"
],
"format": "int32",
"minimum": 0.0
},
"artifacts": {
"description": "Files this step produced, downloadable through the artifact route.\n\nEmpty when the step produced none or when artifact storage is not\nconfigured on the server.",
"type": "array",
"items": {
"$ref": "#/components/schemas/ArtifactResponse"
}
},
"attempt": {
"description": "Which run attempt produced this step (1-based).\n\nA run retried twice exposes steps with `attempt` 1, 2 and 3. Steps from\nearlier attempts are kept so a failed attempt stays inspectable.",
"type": "integer",
"format": "int32",
"minimum": 0.0
},
"cache_creation_input_tokens": {
"description": "Input tokens written to the prompt cache (agent steps).",
"type": [
"integer",
"null"
],
"format": "int64",
"minimum": 0.0
},
"cache_read_input_tokens": {
"description": "Input tokens served from the prompt cache (agent steps).",
"type": [
"integer",
"null"
],
"format": "int64",
"minimum": 0.0
},
"completed_at": {
"description": "When execution completed.",
"type": [
"string",
"null"
],
"format": "date-time"
},
"cost_usd": {
"description": "Cost in USD.",
"type": "number",
"format": "double"
},
"created_at": {
"description": "When created.",
"type": "string",
"format": "date-time"
},
"debug_messages": {
"description": "Verbose conversation trace for agent steps (thinking blocks, tool\ncalls, tool results, per-turn usage). `None` when verbose mode was\noff or the step is not an agent step."
},
"dependencies": {
"description": "IDs of steps this step depends on (direct dependencies).",
"type": "array",
"items": {
"type": "string",
"format": "uuid"
}
},
"duration_ms": {
"description": "Execution duration in milliseconds.",
"type": "integer",
"format": "int64",
"minimum": 0.0
},
"environment_id": {
"description": "Persistent environment the agent step ran in, if any. Pass it to\n`Agent::resume_environment` to continue a later step in the same\nworkspace.",
"type": [
"string",
"null"
]
},
"error": {
"description": "Optional error message.",
"type": [
"string",
"null"
]
},
"id": {
"description": "Unique step identifier.",
"type": "string",
"format": "uuid"
},
"input": {
"description": "Input configuration.",
"type": [
"object",
"null"
],
"additionalProperties": {}
},
"input_tokens": {
"description": "Uncached input token count (agent steps).",
"type": [
"integer",
"null"
],
"format": "int64",
"minimum": 0.0
},
"kind": {
"description": "Step operation type.",
"type": "string"
},
"name": {
"description": "Step name.",
"type": "string"
},
"output": {
"description": "Step output.",
"type": [
"object",
"null"
],
"additionalProperties": {}
},
"output_tokens": {
"description": "Output token count (agent steps).",
"type": [
"integer",
"null"
],
"format": "int64",
"minimum": 0.0
},
"position": {
"description": "Execution order (0-based).",
"type": "integer",
"format": "int32",
"minimum": 0.0
},
"run_id": {
"description": "Parent run ID.",
"type": "string",
"format": "uuid"
},
"session_id": {
"description": "Claude Code session the agent step ran in, if any. A step interrupted\nby a lost lease resumes it on its next execution.",
"type": [
"string",
"null"
]
},
"started_at": {
"description": "When execution started.",
"type": [
"string",
"null"
],
"format": "date-time"
},
"status": {
"$ref": "#/components/schemas/StepStatus"
},
"trace_id": {
"description": "Deterministic trace ID for log correlation.",
"type": "string",
"format": "uuid"
},
"updated_at": {
"description": "When updated.",
"type": "string",
"format": "date-time"
}
}
}
```ignore
</details>Fields§
§account: Option<StepAccountResponse>§account_id: Option<Uuid>Provider Account the agent step ran under, if any.
agent_role: Option<String>Name of the AgentRole the agent step was created from; null for any
other step, an agent step built by hand, or a step stored before roles
were recorded.
approval_assignee: Option<String>Who the approval is currently assigned to.
Serialized as a prefixed string: user:{name} or group:{name}.
approval_deadline_at: Option<DateTime<Utc>>When this approval gate expires, if it carries an SLA deadline.
approval_requirement: Option<ApprovalRequirement>§approval_seconds_remaining: Option<i64>Seconds left before the gate escalates. Clamped at 0, None when the
step has no deadline.
approvals: Vec<StepApproval>Votes cast on the approval gate so far, at most one per user.
approvals_required: Option<i32>Distinct approvals the gate needs: the requirement’s count, 1 for an
approval step without rules, None for any other step kind.
artifacts: Vec<ArtifactResponse>Files this step produced, downloadable through the artifact route.
Empty when the step produced none or when artifact storage is not configured on the server.
attempt: i32Which run attempt produced this step (1-based).
A run retried twice exposes steps with attempt 1, 2 and 3. Steps from
earlier attempts are kept so a failed attempt stays inspectable.
cache_creation_input_tokens: Option<i64>Input tokens written to the prompt cache (agent steps).
cache_read_input_tokens: Option<i64>Input tokens served from the prompt cache (agent steps).
completed_at: Option<DateTime<Utc>>When execution completed.
cost_usd: f64Cost in USD.
created_at: DateTime<Utc>When created.
debug_messages: Option<Value>Verbose conversation trace for agent steps (thinking blocks, tool
calls, tool results, per-turn usage). None when verbose mode was
off or the step is not an agent step.
dependencies: Vec<Uuid>IDs of steps this step depends on (direct dependencies).
duration_ms: i64Execution duration in milliseconds.
environment_id: Option<String>Persistent environment the agent step ran in, if any. Pass it to
Agent::resume_environment to continue a later step in the same
workspace.
error: Option<String>Optional error message.
id: UuidUnique step identifier.
input: Option<Map<String, Value>>Input configuration.
input_tokens: Option<i64>Uncached input token count (agent steps).
kind: StringStep operation type.
name: StringStep name.
output: Option<Map<String, Value>>Step output.
output_tokens: Option<i64>Output token count (agent steps).
position: i32Execution order (0-based).
run_id: UuidParent run ID.
session_id: Option<String>Claude Code session the agent step ran in, if any. A step interrupted by a lost lease resumes it on its next execution.
started_at: Option<DateTime<Utc>>When execution started.
status: StepStatus§trace_id: UuidDeterministic trace ID for log correlation.
updated_at: DateTime<Utc>When updated.