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
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.The catalog agent’s revision the session runs:
request.agent is that revision, with request.overrides applied. null for inline agents.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.Live state: the status object.
The session’s Agent View page, for live viewing and replay.
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.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.Status object
The session’s live state, also returned alone by Get session status. It never carries the answer: readlatest_answer, or follow the session with changes.
Current state:
queued, pending, running, paused, idle, awaiting_tool_results, completed, failed, timed_out, or interrupted, as in the lifecycle.Short, stable error message if the session failed or timed out. Branch on
error_code, not on this text.Failure category if the session failed or timed out:
environment_error, no_answer, answer_validation, timeout, insufficient_credit, or internal.The agent’s self-assessed outcome, reported with its final answer:
success, partial, infeasible, or blocked. null until reported.IDs of the child sessions this session spawned. List them with their
agent labels via GET /sessions?parent_session_id={id}.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.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.