- The Agents release replaces workflows with agents and
renames the run’s
error_messagetoerror. - API 0.126.0 renames parameters, fields, paths and webhook fields to follow one set of naming rules.
Agents release
The Agents release replaces workflows with agents. An agent’s revision is either code, like a workflow’s, or instructions: a task in plain English that a model works through on the phone. Runs can now start from an ad hoc task, pause for a person, take follow-ups on the same phone, and run on a schedule. Workflows are not carried over: recreate each one as a code agent. The old routes and names stop working in this release. There is no compatibility period, so update your code and clients before you upgrade.Upgrade to CLI 0.14
CLI 0.14.0 follows this release. See Upgrade from an earlier CLI for its breaking changes.Upgrade the SDKs
Python SDK 0.23.0 and Go SDK v0.16.0 follow this release, and earlier versions can’t call the removed paths. In Python,client.workflows is now
client.agents, runs start with client.runs.start(), and
client.session(workflow_id=...) is gone.
Actions on text that matches several elements
When a locator reads the screen (accessibility off, orstrategy="vision"), an
action on text that matches several elements now raises ActionTimeoutError and
lists the matches, instead of acting on the first. Scripts that relied on the
first match need first(), nth(), exact or more specific text. See
Locators.
Removed paths
Renamed and removed fields
The CLI’s
runs watch -o json ends with error in place of error_message:
Changed behavior
- A run has a
mode:agentwhen a model drives it,codewhen a script runs. Every former workflow run is a code run. - A run can be
paused, which joins the run status enum and thestatusfilter onGET /runs. POST /runsreturns409while your organization is at its concurrency limit.- After an agent-mode run’s turn ends, or after you cancel a running or
paused agent-mode run, the run holds its phone for
keep_alive_seconds: 120 seconds by default onPOST /runs, 0 in a batch. A shared phone bills for that time. Release it withPOST /phones/{phone_id}:deallocateand the run’ssession_id, or setkeep_alive_seconds: 0. See Pause and follow up.
New endpoints and fields
- Agents:
/agents, their revisions,:rollback, and/revisions/{revision_id}:promotefor a fix a repair proposed. See Create an agent. - Runs:
POST /runstakes an ad hoctaskor anagent_id,targets,network,keep_alive_secondsand limits.:pause,:resumeand:sendMessagepause, answer and follow up. See Run a task or an agent. - A run carries
mode,task,output,result_text,usage,input_request,repair,turn,turns,keep_alive_expires_atandstream_url.GET /runsfilters byschedule_id,modeanddevice_class. GET /realtime/runs/{run_id}/eventsstreams a run, andGET /runs/{run_id}/events,/stepsand/scriptread its events, model steps and executed code. See Monitor runs.- Schedules:
/agents/{agent_id}/schedules, with:pause,:resumeand:run. See Schedule an agent. - Metrics:
GET /runs/metricsandGET /sessions/metrics, on the metrics contract.GET /usage/metricsadds theagent,model,api_key,scheduleanddevice_classgroups, and thesession_seconds,input_tokensandoutput_tokensmeasures. GET /usage/inferencesadds theagent_chatendpoint: one model step of an agent-mode run.GET /modelslists the models an agent can use.
Agent webhook payloads
New events:
run.paused, run.resumed, schedule.paused, schedule.ended
and schedule.occurrence_skipped. A run with follow-ups fires run.started
and its end event once per turn. See Webhook events.
Naming rules
API 0.126.0 makes the REST API follow one set of naming rules everywhere. Some parameters, response fields, paths and webhook fields have new names. The old names stop working in this release, so update your code and upgrade your clients. The same release puts every metrics endpoint on one contract (see Metrics).Upgrade your clients
The SDK and CLI releases that follow API 0.126.0 use the new names. Earlier releases call the old ones and fail.The rules
Paths and methods
The Agents release later removed the workflow routes in this table. See Removed paths.Query parameters
GET /api-keys also takes search, created_by_id, created_after, created_before and order_by. GET /workflows also takes order_by, whose field is a path into the listed item, for example order_by=workflow.name asc. Both are additions, so existing calls keep working.
Response fields
Metrics
GET /usage/metrics and GET /webhooks/metrics follow one contract, and
every metrics endpoint added later will too.
The response is
{"points": [...]}: one point per bucket (and per group),
oldest first, each with period_start_at and every measure. A measure is
named for its unit (_microdollars, _ms, _rate from 0 to 1, or a plain
count) and is zero for a bucket with no activity. A latency is null when no
attempt in the bucket recorded one. A webhooks window that needs more buckets than the gateway returns in one read is a 400; shorten it.
Webhook payloads
A phone rental’s
canceled_at and a subscription’s canceled status keep
Stripe’s spelling.
SDK methods
The SDKs take the new parameter names as arguments (period_start_at= in
Python, PeriodStartAt in Go). These methods also moved: