API referenceObjectssession_thread

The session thread object

⚠️
Preview — this feature is being built; the design below is the spec.

The session_thread object as the API returns it. Every field below appears in every response that returns this object; fields with no value are null rather than missing.

Example

{
  "id": "thr_01JCC2E4G6J8L0N2Q4S6",
  "type": "session_thread",
  "session_id": "sesn_01JC7M2K4P6R8T0V2X4Z",
  "role": "delegate",
  "parent_thread_id": "thr_01JCC1D3F5H7K9M1P3R5",
  "agent_id": "agt_01JCC0B2D4F6H8K0M2P4",
  "agent_version": 2,
  "title": "Check carrier tracking for order 88123",
  "status": "interrupted",
  "usage": {
    "input_tokens": 6120,
    "cached_input_tokens": 4096,
    "output_tokens": 388,
    "cost_usd": "0.0112"
  },
  "created_at": "2026-11-05T10:02:10Z",
  "ended_at": "2026-11-05T10:02:30Z"
}

Fields

FieldTypeDescription
idstringStarts with thr_.
typestringThe object type, always session_thread.
session_idstringThe related session.
rolestringprimary for the session’s main conversation, delegate for a sub-agent the primary handed work to.
parent_thread_idstring or nullThe thread that started this one; null for the primary thread.
agent_idstringThe agent running in this thread. Delegates run the agent named in the parent’s delegates list.
agent_versionintegerSee the endpoint pages below.
titlestringDisplay title.
statusstringrunning, idle, completed, failed or interrupted.
usageobjectTokens and cost for this thread alone. The session’s usage is the sum of all threads.
created_atstringWhen it was created, RFC 3339 UTC (some older objects use Unix seconds).
ended_atstringSee the endpoint pages below.

Returned by

Was this page helpful?