Skip to content
Docs
GitHub

Get one step of a session's trace in full

Preview

Read one step of a session’s trace in full: tool input and output, the model request and response, and its raw events.

Public APIEverruns Cloud and self-hosted Platform

GET/v1/sessions/{session_id}/trace/turns/{turn}/steps/{step}

See authentication for credentials and permissions.

session_id
required
string

Prefixed public identifier

turn
required
string

Prefixed public identifier

step
required
string

Prefixed public identifier

full
boolean

Return payloads whole, however large.

Responses

200Success

Success

Media typeapplication/json

Everything about one step, for the inspector.

object
events
required

Raw events of the step, in sequence order.

Array<object>

An event in the session log.

object
data

Payload, when small enough to inline.

id
required

Event identifier.

string
sequence
required

Sequence in the session event log.

integer format: int32
size_bytes
required

Size of the serialized payload.

integer format: int32
ts
required

When the event happened.

string format: date-time
type
required

Event type, such as tool.call_completed.

string
input
One of:

Tool arguments.

object
preview

The first part of the serialized value, when it was cut.

string | null
size_bytes
required

Size of the serialized value.

integer
truncated
required

Whether the value was cut to preview.

boolean
value

The value, when it fits or full was asked for.

output
One of:

Tool result, or error.

object
preview

The first part of the serialized value, when it was cut.

string | null
size_bytes
required

Size of the serialized value.

integer
truncated
required

Whether the value was cut to preview.

boolean
value

The value, when it fits or full was asked for.

request
One of:

The request of a model call: what changed since the previous call.

object
message_count
required

Messages sent in the call.

integer format: int32
new_from
required

Messages before this index were already in the previous call.

integer format: int32
new_messages
required

The new messages, at most 50.

Array<object>

One message of a model request.

object
content

The whole message, when asked for and within the limit.

index
required

Position in the request.

integer format: int32
preview
required

Start of the message text.

string
role
required

Role as handed to the provider driver: system, user, assistant or tool. Stored messages say agent and tool_result; each driver then maps these four onto its own wire format.

string
size_bytes
required

Size of the serialized message.

integer
system_preview

Start of the system prompt.

string | null
tool_changes
One of:

How the call’s tool list changed; absent when it did not.

object
added
required

Tools that became callable.

Array<string>
baseline_tools

Tools fixed when this call started a new tool epoch (the first call, or the first after a model switch or compaction).

integer | null format: int32
redefined
required

Tools whose definition changed, such as a searched tool’s full schema.

Array<string>
removed
required

Tools no longer callable.

Array<string>
tool_count
required

Tools offered in the call.

integer format: int32
usage
One of:

Token usage of the call, split by prompt cache.

object
cache_creation_tokens
required

Prompt tokens written to the provider’s cache.

integer format: int64
cache_read_tokens
required

Prompt tokens read from the provider’s cache.

integer format: int64
cache_reset
One of:

Set when this call lost most of the prompt prefix the previous model call had cached.

object
idle_seconds
required

Seconds between the end of the previous call and the start of this one.

integer format: int64
lost_tokens
required

How many of those this call did not read back.

integer format: int64
previous_cached_tokens
required

Prompt tokens the previous call left in the cache (read plus written).

integer format: int64
reason
required

Likely cause, the first difference found: model_changed, tools_changed, system_changed, history_changed, expired (idle longer than the cache retention), or unknown.

string
cached_through

Estimated index of the last message inside the cached prefix: the cache-read share of the prompt laid over the messages by size. -1 when only the tools fit; absent when nothing was read from cache.

integer | null format: int32
caching_would_help

A long prompt sent with caching off that neither read nor wrote the cache: turning on prompt caching would likely make calls like it cheaper.

boolean
input_tokens
required

Prompt tokens neither read from nor written to the cache.

integer format: int64
output_tokens
required

Completion tokens.

integer format: int64
prompt_cache

How prompt caching was requested, such as auto or anthropic_cache_control; absent when caching was off.

string | null
step
required

The step itself.

object
child_session_id

Session a spawn_agent call started.

string | null
duration_ms

Wall time of the step; absent while running.

integer | null format: int64
end_sequence

Last event sequence of the step.

integer | null format: int32
input_tokens

Prompt tokens of a model call.

integer | null format: int32
kind
required

model, answer, tool, approval, agent or send.

string
model

Model that served the call, for model steps.

string | null
name

Tool name, or model for model calls.

string | null
narration

What the model said alongside this call (model calls and answers).

string | null
offset_ms
required

Start relative to the turn’s start.

integer format: int64
output_tokens

Completion tokens of a model call.

integer | null format: int32
requested_tool_call_ids

Tool calls this model call asked for.

Array<string>
result

Short result or error.

string | null
retry_attempts

Retries a model call made before it succeeded or gave up.

integer | null format: int32
retry_wait_ms

Time spent waiting between those retries.

integer | null format: int64
start_sequence
required

First event sequence of the step.

integer format: int32
started_at
required

When the step started.

string format: date-time
status
required

running, success, error or cancelled.

string
step
required

Per-turn step number, 1-based.

integer format: int32
target

What the call acted on, from the tool’s narration.

string | null
tool_call_id

Tool call identifier, for tool steps.

string | null
turn
required

Turn the step belongs to.

integer format: int32

Example

{
"events": [
{
"id": "event_01a124cd8a1b7f02a5c4e6d1b2f3a4c5",
"sequence": 14,
"size_bytes": 512,
"type": "tool.started"
}
],
"input": {
"size_bytes": 221,
"truncated": false
},
"output": {
"size_bytes": 221,
"truncated": false
},
"request": {
"message_count": 14,
"new_from": 12,
"new_messages": [
{
"index": 12,
"role": "tool",
"size_bytes": 244
}
],
"tool_changes": {
"baseline_tools": 9
},
"tool_count": 9,
"usage": {
"cache_creation_tokens": 0,
"cache_read_tokens": 12529,
"cache_reset": {
"idle_seconds": 42,
"lost_tokens": 18420,
"previous_cached_tokens": 18420,
"reason": "tools_changed"
},
"cached_through": 11,
"input_tokens": 10295,
"output_tokens": 197,
"prompt_cache": "auto"
}
},
"step": {
"duration_ms": 269,
"end_sequence": 21,
"kind": "tool",
"model": "gpt-6.1-sol",
"name": "bash",
"offset_ms": 3010,
"retry_attempts": 3,
"retry_wait_ms": 42000,
"start_sequence": 14,
"status": "success",
"step": 2,
"tool_call_id": "call_PzDcvnFaUll8os3tPhWj",
"turn": 1240
}
}