id. Optional max_steps and max_time_s caps bound the run before the agent is asked for a final answer.
messages takes a plain string (one user message) or message objects like [{"type": "user_message", "message": "..."}]. The CLI blocks until the run ends. The create calls return at once with the id.
Wait for the result
The final answer isanswer on the result object and on changes, and latest_answer on the session object.
Polling
changes by hand has gotchas: see its polling rules.
Lifecycle
Every session moves through the same states, whichever agent runs it.Session object
Overrides
overrides adjusts a catalog agent for one run, without defining a new agent. It is a map on the create-session body: each key is a dotted path into the resolved request, and its value replaces what the path points to. Paths apply after agent is expanded from its catalog id.
Each value must match the type of the field it targets. An unknown path or a wrong type returns
422 at creation, before the agent runs.
For example, send a catalog web surfer to a chosen start page:
Listing and filtering
GET /api/v2/sessions pages through your sessions, newest first. Combine filters, for example ?status=running&status=queued&agent=web-price-finder.
Responses use the standard page envelope. The SDKs expose it as
client.sessions.list_sessions(...) / listSessions. See List sessions for size, sort, and every parameter.