---
title: "List agent session traces"
method: GET
path: "/agents/sessions/{session_id}/traces"
tags: ["Agents"]
---

# List agent session traces

`GET /agents/sessions/{session_id}/traces`

Lists published root-turn traces as OTLP JSON, ordered by turn creation time and ID. Unpublished traces are skipped. Each page returns data available when read; it does not wait for late traces. Trace reads and the JSON response are limited to 16 MiB per request. If the limit is exceeded, request fewer traces.

## Path parameters

- `session_id` string, required

## Query parameters

- `limit` integer
- `order` 'asc' | 'desc' — The order in which paginated resources are returned.
- `after` string

## Response `200`

A page of published session traces.

- SessionTraceListResource — A page of Agents API resources, with IDs for retrieving additional pages.
  - `object` 'list', required — The object type, which is always `list`.
  - `data` SessionTurnTraceResource[], required — The resources returned in this page, in the requested sort order.
    - `id` string, required — The root turn ID. Use this ID as the pagination anchor.
    - `object` 'agent.session.trace', required — The object type, which is always `agent.session.trace`.
    - `session_id` string, required — The session that owns this trace.
    - `created_at` integer, required — The Unix timestamp in seconds when the root turn was created.
    - `otlp` object, required — An OTLP JSON ExportTraceServiceRequest containing resourceSpans. Only currently published data is returned; later trace updates are not awaited.
  - `first_id` string, nullable, required — The ID of the first resource in `data`, or `null` if the page is empty.
  - `last_id` string, nullable, required — The ID of the last resource in `data`, or `null` if the page is empty. Pass this as `after` with the same order and filters.
  - `has_more` boolean, required — Whether there are more resources to retrieve after this page.

## Other responses

- `400` — The request was invalid.
- `401` — Authentication or project context was missing.
- `403` — The API key lacks the required permission.
- `404` — The requested session or event was not found.
- `409` — The request conflicted with the current session state.
- `500` — An internal error occurred.
- `503` — The service is temporarily unavailable.

## Changes

> 195 revisions in range; 1 not diffed.

- **2026-09-30** `0dadf284a143` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/openai/apis/openapi/changes/agents/sessions/:session_id/traces/get.md)

---

[API](https://skmtc.dev/openai/apis/openapi.md) · [All operations](https://skmtc.dev/openai/apis/openapi/llms.txt) · [OpenAPI document](https://skmtc.dev/openai/apis/openapi/revisions/23e255ef7949?raw)
