The session object

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

The session 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": "sesn_01JC7M2K4P6R8T0V2X4Z",
  "type": "session",
  "agent_id": "agt_01JC4R8W6Q2N9X3T5V7Y",
  "agent_version": 4,
  "status": "requires_action",
  "channel": "api",
  "title": "Refund for order 88123",
  "usage": {
    "input_tokens": 0,
    "cached_input_tokens": 0,
    "output_tokens": 0,
    "cost_usd": "0.0000"
  },
  "outcome": null,
  "created_at": "2026-11-05T10:00:00Z",
  "last_event_at": "2026-11-05T10:00:00Z",
  "metadata": {}
}

Fields

FieldTypeDescription
idstringStarts with sesn_.
typestringThe object type, always session.
agent_idstringThe agent the session runs.
agent_versionintegerThe version it is pinned to for its whole life.
statusstringrunning, requires_action (waiting for your tool result or approval), idle or archived.
channelstringapi for sessions started here; channel sessions show telegram, slack and so on.
titlestring or nullThe new title.
usageobjectRunning token and cost totals.
outcomeobject or nullSet when a turn ends: reason is end_turn, max_turns, budget_exhausted, interrupted or error.
created_atstringWhen it was created, RFC 3339 UTC (some older objects use Unix seconds).
last_event_atstringTime of the latest event.
metadataobjectThe merged map after the update.

Returned by

Was this page helpful?