Skip to main content
An agent is a task for a phone that you save to run again. Each agent has numbered revisions, and each revision is one of two kinds:
  • Instructions: a task in plain English, such as “Open Settings and report the Android version”. A model works through it on the phone, one step at a time, until it can report a result.
  • Code: a Python script that drives the phone with the Axilio SDK. It runs as written, with no model, unless a failed step hands it to the model to repair.
A run is one execution on a phone. A run starts from a saved agent or from an ad hoc task with nothing saved. Its run ID is also the ID of the phone session it runs in.

Run modes

Every run has a mode: Both modes run the same SDK on the same phones, so the script an agent-mode run leaves behind can be saved as a code revision. See Read the run’s script.

Lifecycle

  1. Start a run with POST /runs, the CLI, the Dashboard or a schedule. A run booked with start_at is scheduled until then.
  2. The run is queued until a phone is free, then running.
  3. A run can be paused to ask a person for input, such as a one-time code or an approval. See Pause and follow up.
  4. The run ends completed, failed or cancelled. A completed run carries output (which matches the run’s output_schema, if it has one) and result_text, a short account of the result. A failed run carries error.
  5. After an agent-mode run ends, it holds its phone for keep_alive_seconds (120 seconds by default on POST /runs). A message sent with :sendMessage in that time starts the run’s next turn on the same phone. After the hold, the phone is released and you start a new run.

What a run’s code can use

Instructions runs write their own code. Code revisions use the same names:
Never ask a person for a password with run.ask. An answer joins the run’s record, and in an agent-mode run it is also sent to the model.

Agent settings

An agent’s settings apply to each of its runs. An ad hoc run takes the same settings on POST /runs. A code revision also sets on_failure, which decides what happens when a step fails. See Handle a failed step.

Limits and billing

  • A run, its pauses included, fits inside the one-hour session limit.
  • An agent-mode run can’t reach the public internet by default. Set network: "internet" on the run if its code needs it. Code runs always have internet access.
  • Model steps are billed as inference with the agent_chat endpoint. See Usage.
  • A shared phone bills phone time for as long as the run’s session lasts, including a paused run and the hold after a turn. A dedicated phone bills nothing per session.
  • Your plan’s concurrency limit counts running and paused runs. While you are at the limit, POST /runs returns 409.

Next steps

Create an agent

Save instructions or code and manage revisions.

Run a task or an agent

Start ad hoc and saved runs on shared or dedicated phones.

Pause and follow up

Answer a paused run and continue a run with more turns.

Monitor runs

Stream, inspect, cancel and measure runs.