How agent steps work
What the model sees, what it may do, how a step ends, and what it costs.
An agent step is one agent.act, agent.assert, agent.waitFor, or
agent.extract call. The model reads the screen, asks for actions, and ends
the step with a verdict. Every step has a deadline and a model-call budget.
Who does what
The executor chooses the actions and returns the verdict. The runner redacts the screen, authorizes and performs each action, enforces budgets, fills secrets, and writes the report. The built-in agent is the executor unless the agents entry sets a custom one.
What the model sees
For act, the first prompt holds the instruction, the params, the completed
steps, and a redacted text snapshot of the screen: roles, names, text, and
states. It holds no raw HTML, cookies, headers, or environment values.
Password fields are masked, and a configured secret value on screen becomes
<secret:name>.
After an action, the model gets the changes to the screen, or a new full snapshot when most of it changed. Node ids stay the same while their elements exist. A failed action also returns the current screen, so the model can choose its next action.
Default judgments from assert, waitFor, and extract see the instruction,
the current screen and its location, and the agent’s context, never completed steps or the
acting agent’s summaries. They can use a separate judge model.
Built-in exploring assertions use agents.<name>.model, even when judge is set.
vision: true adds a masked screenshot, and vision: 'only' judges the
screenshot alone. See the agent reference for
the modes. Screenshots mask secure fields only
(after a secret fill).
What the model may do
The agent gets the tools the target’s engine supports, such as tap,
type, press, select, scroll, and navigate. On engines with a
keyboard, it can type and press keys in the focused control. When the text
snapshot can’t describe a control, pixel tools let it take a screenshot and
act at a point. See the
tool reference.
A step with a Secret param also gets type_secret. The model sees only
the secret’s name and purpose. The runner checks the field the model
picked, then fills the value itself. The value never enters prompts,
transcripts, reports, or AI traces.
A targeted action times out after at most 15 seconds. Project tools add your own operations, with declared budgets and platforms.
The loop detects repeated calls and cycles. After three failed actions in a row, it tells the model to change its approach. After five, it asks for a verdict. It also asks for a verdict when the budget or the deadline is near.
Assertion exploration
With explore: true, agent.assert can scroll and combine evidence from several
viewports using read-only tools. The viewport remains where exploration ends.
Use it for content elsewhere on the current screen, and waitFor for changes over time. See
assertion exploration for tools, budgets, and verdicts.
How a step ends
A step ends with one of three verdicts:
passed: the screen shows that the step succeeded.failed: the required condition is false or can’t be shown. Too little evidence isASSERTION_INCONCLUSIVE.blocked: a prerequisite, the environment, or a limit stopped the step before a product verdict. The error code sets the exit code.
Only failed and blocked carry an error code.
The errors reference lists every code a verdict can carry.
What a step costs
Each call has a model-call budget and a default timeout. See budgets.
assertwithout exploration andextractmake one judgment, plus one repair call if the answer is malformed. When the data is not on screen,extractfails withASSERTION_INCONCLUSIVEand returns no placeholder.waitFormakes no model call while the screen and its location stay the same.- A screenshot adds input tokens to every call that carries it.
actasks for one only when the text snapshot is not enough. - The replay cache reruns passing
actsteps with no model calls. - Under a custom executor,
assertuses theactbudgets.
Use expect for exact checks, and give each act one
atomic goal. When the provider caches prompts,
--debug shows the cached share of input tokens per step.
