id. The optional max_steps and max_time_s caps bound how long it runs before the agent is asked for a final answer.
id. For a one-shot run, the helper below creates the session, blocks until the agent finishes, and hands back the result.
Wait for the result
Pick the call that matches how much control you need. The final answer isanswer on the result object and on changes, and latest_answer on the session object.
Polling
changes by hand has a few gotchas; see its polling rules.
Session object
Lifecycle
Every session moves through the same state machine, whichever agent runs it:Overrides
Reuse a catalog agent but adjust it for a single run withoverrides, a map on the create-session body. Rather than defining a new agent, you point at fields of the resolved request. Each key is a dotted path, and its value replaces whatever that path resolves to, applied after agent is expanded from its catalog id.
- Dots walk into objects.
agent.instructionssets behavior,agent.modelswaps the serving model, andagent.answer_formatpins a structured answer. - A
[field=value]selector picks a list member.agent.environments[kind=web]selects the web environment, soagent.environments[kind=web].start_urlsets just its start page andagent.environments[kind=web].modeswitches how it reads the page. - Values are type-checked. Each value must match the type of the field its path targets. An unknown path or a wrong type is rejected with
422at creation, before the agent runs.
Listing and filtering
GET /api/v2/sessions pages through your sessions, newest first, with filters you can combine:
size, sort, and the full parameter reference.