Skip to content
Everruns Cloud is open in early access. Run agents without operating the platform.

List a page of a session's turns with their steps: model calls, tool calls, approvals, sub-agents and messages, with repeated calls folded into batches.

GET
/v1/sessions/{session_id}/trace/turns
curl --request GET \
--url https://app.everruns.com/api/v1/sessions/example/trace/turns
session_id
required
string

Prefixed public identifier

before
integer format: int32

Turns before this turn number. Without a cursor, the last turns.

after
integer format: int32

Turns after this turn number.

around
integer format: int32

Turns centered on this turn number.

sequence
integer format: int32

Turns centered on the turn holding this event sequence.

limit
integer format: int32

Turns per page, 1 to 50. Defaults to 20.

Success

Media typeapplication/json

A page of turns with their steps.

object
has_earlier
required

Turns exist before the first one returned.

boolean
has_later
required

Turns exist after the last one returned.

boolean
turn_count
required

Turns in the session.

integer format: int64
turns
required

Turns in turn order.

Array<object>

One turn: what the user asked, how it went, and what happened.

object
duration_ms

Wall time of the turn.

integer | null format: int64
end_sequence

Last event sequence of the turn; absent while running.

integer | null format: int32
ended_at

When the turn ended; absent while running.

string | null format: date-time
error

Why the turn failed, when it did.

string | null
error_count
required

Failed steps in the turn.

integer format: int32
input_tokens
required

Prompt tokens across the turn’s model calls.

integer format: int64
items
required

Steps, with repeated calls folded into batches and the middle of very long turns folded into a gap.

Array
One of:

One row of a turn.

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
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
type
required
string
Allowed values: step
model_calls
required

Model calls in the turn.

integer format: int32
output_tokens
required

Completion tokens across the turn’s model calls.

integer format: int64
prompt

The user message that started the turn.

string | null
start_sequence
required

First and last event sequence of the turn, for links into Events.

integer format: int32
started_at
required

When the turn started.

string format: date-time
status
required

running, completed, failed, cancelled or sealed.

string
step_count
required

Steps in the turn.

integer format: int32
subagent_calls
required

Sub-agent calls in the turn.

integer format: int32
tool_calls
required

Tool calls in the turn.

integer format: int32
turn
required

Per-session turn number, 1-based.

integer format: int32
turn_id
required

Public turn identifier.

string
Example
{
"has_earlier": true,
"has_later": false,
"turn_count": 1240,
"turns": [
{
"duration_ms": 4998,
"end_sequence": 31,
"error_count": 0,
"input_tokens": 4210,
"items": [
{
"duration_ms": 269,
"end_sequence": 21,
"kind": "tool",
"model": "gpt-6.1-sol",
"name": "bash",
"offset_ms": 3010,
"start_sequence": 14,
"status": "success",
"step": 2,
"tool_call_id": "call_PzDcvnFaUll8os3tPhWj",
"turn": 1240,
"type": "step"
}
],
"model_calls": 2,
"output_tokens": 129,
"prompt": "Check the links on the docs site",
"start_sequence": 12,
"status": "completed",
"step_count": 3,
"subagent_calls": 0,
"tool_calls": 1,
"turn": 1240,
"turn_id": "turn_01a124cd7e9571ac95c312b3c6d0cd82"
}
]
}