Skip to main content

Session shape

A session is one run of an agent on a task. Create a session and Retrieve a session return it. List sessions returns a summary of each.
Session object

Fields

string
Session UUID, used by every follow-up call.
object
The create body, with agent resolved to its full spec even if you passed a catalog ID. Secrets read back as ***, for example a browser proxy_url.
integer | null
The catalog agent’s revision the session runs: request.agent is that revision, with request.overrides applied. null for inline agents.
object | null
The catalog skills and environments the session resolved by reference, including references inside inline agents and subagents, each at the revision it ran. skills and environments are arrays of {"catalog_id", "name", "revision"}, where name is the skill’s name or the environment’s id. Inline definitions are not listed. null for sessions created before skill and environment revisions.
object
Live state: the status object.
string | null
The session’s Agent View page, for live viewing and replay.
string | object | null
The agent’s latest final answer: text, or an object matching the agent’s answer_format. Mirrors the answer from changes. null until the agent first answers.
object | null
The runner hosting the agent’s environment, as the environment last reported it: {"id", "kind"}. id is the runner session ID from the RunnerSessionEvent, accepted by the session files endpoints. It changes when the agent moves to a new runner. kind is web, desktop, android, or workstation; with both a browser and a workstation, web. null until the environment starts, and when you can read the session only through its share link.
string
ISO 8601 creation time.
string | null
When the agent started. null until then.
string | null
When the session reached a terminal state. null until then.

Status object

The session’s live state, also returned alone by Get session status. It never carries the answer: read latest_answer, or follow the session with changes.
string
Current state: queued, pending, running, paused, idle, awaiting_tool_results, completed, failed, timed_out, or interrupted, as in the lifecycle.
string | null
Short, stable error message if the session failed or timed out. Branch on error_code, not on this text.
string | null
Failure category if the session failed or timed out: environment_error, no_answer, answer_validation, timeout, insufficient_credit, or internal.
string | null
The agent’s self-assessed outcome, reported with its final answer: success, partial, infeasible, or blocked. null until reported.
integer
Steps taken so far, where each step is one decide-and-act cycle.
object[]
Per-model token usage. Empty until the agent calls a model.
string
Model ID.
integer
integer
Input served from the prompt cache, billed at a discount.
integer
integer
string[]
IDs of the child sessions this session spawned. List them with their agent labels via GET /sessions?parent_session_id={id}.
object[]
The custom tool calls the agent is waiting on. Echo each one back as tool_req when you post its result. Empty unless the status is awaiting_tool_results, or paused while calls are pending.
string
object
string | null
object[]
The tool calls held for a human decision. Approve or deny each by its tool_req.id. Empty unless the status is awaiting_tool_results, or paused while calls are held.
object
The held call, { tool_name, args, id }.
object[]
Why the call waits, one entry per source: source (guardrail, tool, environment, resume, or another), reason, and the policy_clause_refs it cited.