> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tracectrl.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List Sessions

> Returns recent traces grouped as sessions

Returns the most recent 200 traces, each summarized with root span info, agent name, span count, duration, and error status.

### Query Parameters

**service** `string`

Filter sessions by service name.

### Response

Array of session summary objects:

**trace\_id** `string`

OpenTelemetry trace ID

**start\_time** `string`

ISO-8601 timestamp of first span

**end\_time** `string`

ISO-8601 timestamp of last span end

**total\_duration\_ns** `integer`

Wall-clock trace duration in nanoseconds

**span\_count** `integer`

Number of spans in this trace

**root\_span\_name** `string`

Name of the root span (entry point)

**root\_span\_id** `string`

Span ID of the root span

**agent\_name** `string`

Primary agent name (first agent seen in trace)

**has\_error** `boolean`

`true` if any span in the trace has an error status

```json 200 theme={"dark"}
[
  {
    "trace_id": "abc123def456789012345678",
    "start_time": "2026-03-17T14:20:00Z",
    "end_time": "2026-03-17T14:20:03.5Z",
    "total_duration_ns": 3500000000,
    "span_count": 12,
    "root_span_name": "AgentExecutor",
    "root_span_id": "span123",
    "agent_name": "Researcher",
    "has_error": false
  }
]
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.