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.
const url = 'https://app.everruns.com/api/v1/sessions/example/trace/turns';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://app.everruns.com/api/v1/sessions/example/trace/turnsParameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Prefixed public identifier
Query Parameters
Section titled “Query Parameters”Turns before this turn number. Without a cursor, the last turns.
Turns after this turn number.
Turns centered on this turn number.
Turns centered on the turn holding this event sequence.
Turns per page, 1 to 50. Defaults to 20.
Responses
Section titled “ Responses ”Success
A page of turns with their steps.
object
Turns exist before the first one returned.
Turns exist after the last one returned.
Turns in the session.
Turns in turn order.
One turn: what the user asked, how it went, and what happened.
object
Wall time of the turn.
Last event sequence of the turn; absent while running.
When the turn ended; absent while running.
Why the turn failed, when it did.
Failed steps in the turn.
Prompt tokens across the turn’s model calls.
Steps, with repeated calls folded into batches and the middle of very long turns folded into a gap.
One row of a turn.
object
Session a spawn_agent call started.
Wall time of the step; absent while running.
Last event sequence of the step.
Prompt tokens of a model call.
model, answer, tool, approval, agent or send.
Model that served the call, for model steps.
Tool name, or model for model calls.
What the model said alongside this call (model calls and answers).
Start relative to the turn’s start.
Completion tokens of a model call.
Tool calls this model call asked for.
Short result or error.
First event sequence of the step.
When the step started.
running, success, error or cancelled.
Per-turn step number, 1-based.
What the call acted on, from the tool’s narration.
Tool call identifier, for tool steps.
Turn the step belongs to.
One row of a turn.
object
Calls in the batch.
Calls that failed.
The first failed calls, at most 20; page the rest with the steps list.
A model call, tool call, approval, sub-agent or message. Empty fields are left out: a page carries hundreds of these.
object
Session a spawn_agent call started.
Wall time of the step; absent while running.
Last event sequence of the step.
Prompt tokens of a model call.
model, answer, tool, approval, agent or send.
Model that served the call, for model steps.
Tool name, or model for model calls.
What the model said alongside this call (model calls and answers).
Start relative to the turn’s start.
Completion tokens of a model call.
Tool calls this model call asked for.
Short result or error.
First event sequence of the step.
When the step started.
running, success, error or cancelled.
Per-turn step number, 1-based.
What the call acted on, from the tool’s narration.
Tool call identifier, for tool steps.
Turn the step belongs to.
First step number in the batch.
Last step number in the batch.
Tool name shared by every call.
Start relative to the turn’s start.
Median call duration.
95th percentile call duration.
Calls still running.
When the first call started.
Calls that succeeded.
Turn the batch belongs to.
From the first start to the last end.
One row of a turn.
object
Steps not returned.
Failed steps among them.
First step number not returned.
Last step number not returned.
Turn the gap belongs to.
Model calls in the turn.
Completion tokens across the turn’s model calls.
The user message that started the turn.
First and last event sequence of the turn, for links into Events.
When the turn started.
running, completed, failed, cancelled or sealed.
Steps in the turn.
Sub-agent calls in the turn.
Tool calls in the turn.
Per-session turn number, 1-based.
Public turn identifier.
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" } ]}