Create an agent
Creates an agent: a task for a phone, as instructions an agent works through a model or as code, with the model, output schema and limits its runs use. Sending instructions or code creates the agent’s first revision with it; sending source_run_id saves one of your agent runs as the agent, its task or its script as the first revision. A name already used in the organization is 409; an unsupported model, an invalid output schema, both instructions and code, or a run with no task or script to save is 400; another organization’s run is 404.
Authorizations
Customer API key (axl_ prefix).
Body
Request body for creating an agent. With instructions, code or source_run_id, the agent's first revision is created with it.
The agent's name: letters, numbers, hyphens and underscores, unique within the organization.
100^[A-Za-z0-9_-]+$Use accessibility mode for runs (default false). Needs your organization's access to accessibility mode: without it the create is refused with a 403 whose message starts with accessibility_unavailable.
Capture the media runs produce into the file library (default true).
Python the agent runs. Creates a code revision. Leave out to add a revision later, or send instructions instead.
With source_run_id, what the first revision is. task (default): the run's task, as an instructions revision. script: the script the run left (GET /runs/{run_id}/script), as a code revision. A run with no task, or no script, is 400.
task, script The task for the agent to work through a model. Creates an instructions revision. Leave out to add a revision later, or send code instead.
20000Most a run's model steps may cost, in microdollars (default 10000000).
x >= 1Most model steps a run may take (default 500).
1 <= x <= 500The model instruction runs call, one of GET /models. Defaults to the platform default.
With code: what a run does when a step fails. fail (default) fails the run. ask pauses the run for a person (reason step_check_failed), who retries the step or completes the run with its output. repair hands the run to the agent, which finishes the task from the live screen and proposes a fixed revision for a person to promote.
fail, ask, repair The JSON Schema a run's result must satisfy. Leave out to take any result.
Longest a run waits paused for an answer, in seconds (default 600, 60 to 3600).
60 <= x <= 3600Record the screen of runs (default false).
Save one of your agent runs as the agent: its first revision comes from the run (see from), and the run's model, output schema and limits stand in for any left out here. Send it without instructions or code. Another organization's run is 404.
Emit telemetry for runs (default true).
Longest a run may take, in seconds (default 3600, at most 3600).
1 <= x <= 3600Response
Created
An agent: a task for a phone, as instructions the agent works through a model or as code, with the settings its runs use.
Runs use accessibility mode, which needs a phone that supports it.
Runs capture the media they produce on the phone into the file library.
When the agent was created.
The agent's id.
Most a run's model steps may cost, in microdollars.
Most model steps a run may take.
The model an instructions revision's runs call, one of GET /models.
The agent's name, unique within the organization.
Longest a run waits paused for an answer, in seconds, before it fails with input_timeout. A pause also ends with the session.
Runs record the screen.
Runs emit telemetry, live and stored.
Longest a run may take, in seconds, within the one-hour session cap.
When the agent was last changed.
The revision runs of the agent use. Absent until the agent has one.
When a run of the agent last started.
The JSON Schema a run's result must satisfy. Absent takes any result.