Technology

A dynamic, indexed action space.

Every observation produces a fresh, numbered table of what can be done on the page. A structured decision model chooses an operation and a target from that table in one request. That's the whole idea, applied carefully.

The loop

The input is one natural-language goal. There are no site-specific plans, recorded macros, or hardcoded field values. The agent repeats a small loop until the decision model chooses DONE or BLOCKED:

Live page one DOM snapshot Indexed elements [1] button Trip type [2] combobox From [3] combobox To [4] textbox Departure [5] button Search … One decision request operationTYPE_TEXT click target[5] type target[3] select target— heads answered in parallel Small text model only for TYPE_TEXT → "London" Guarded executor freshness · geometry · occlusion observe again → next decision

page → indexed elements → operation + target → execution. Each piece is small enough to read in one sitting, and each one has a single job.

The action space

Each observation builds a table of accessible elements and their current values. One DOM node receives one index, even when it supports both clicking and typing.

[1] button    Change ticket type · Round trip
[2] combobox  Where from?        · San Francisco
[3] combobox  Where to?          · empty
[4] textbox   Departure          · empty
...

Available operations:

CLICKTYPE_TEXTSELECTSCROLL_UPSCROLL_DOWNWAITDONEBLOCKED

Only operations that are actually supported on the current page are offered, and each target list contains only compatible elements. A checkbox is never offered as a typing target; a native dropdown's options carry a code-owned element/option index.

Operation + target heads, in one request

The obvious design asks two questions in series: what should I do? and then where?. That doubles latency on every step. Instead, one request asks the decision model both questions at once:

  • operation: which of the available operations to perform
  • click_target: the best element if the operation is CLICK
  • type_text_target: the best element if the operation is TYPE_TEXT
  • select_target: the best option if SELECT is available

The target questions are speculative. Each one explicitly names the operation it assumes, because the heads run independently and cannot read each other's answers. The executor consumes only the head that matches the chosen operation; the rest are discarded. Two decisions, one network round trip.

Because answers are drawn from a finite list, the result is a probability distribution, not free text. That makes decisions inspectable: you can see, for example, that CLICK won at 76% and which element the target head ranked first.

Text generation, only when needed

When the chosen operation is TYPE_TEXT, a small, fast language model is called with the goal, the selected field, the visible page context, and recent actions. It must return a JSON object with exactly one valid text value, or nothing is typed.

The goal is never parsed for quoted literals. If the page changes while text is being generated, the value is reused on retry only if the entire text-model input is identical, and it is discarded after a successful mutation.

In the recorded run the text model produced “Zurich” in 581 ms and “London” in 346 ms, for a combined cost of about six thousandths of a cent.

Snapshot runtime

One browser-side call reads common HTML and ARIA roles, accessible names, values, visible text, and executable targets atomically. A WeakMap gives each real node a code-owned identity, and a Map keeps live references for execution. Replaced elements receive new identities, disconnected references are pruned, and navigation starts a fresh cache.

  • Visible text only. Offscreen article bodies and footers don't fill the model's context.
  • Geometry is read at execution time, never trusted from the snapshot.
  • Background tabs keep rendering. Focus emulation prevents animation throttling without stealing the visible tab.
  • Screenshots are optional. The decision model doesn't consume them. They're for humans and recordings.

Freshness guards

The page can change between observing and acting. Instead of invalidating on every DOM mutation (which made the earlier runtime re-decide on every animation), guards compare semantic state:

  • Clicks and selects check the document, full URL, viewport, safe form values, the selected target, and its nearby form/dialog/row context.
  • Typing, scrolling, waiting and completion use a full semantic comparison.
  • Right before input, the executor re-checks visibility, enabled state, current geometry, and hit-tests for covering overlays.

Typing uses an explicit select-all followed by native text insertion, so existing field contents are replaced rather than appended.

Smart waits

After an interaction the next observation waits for at most two animation frames or 50 ms. Editable comboboxes are the exception: after typing, the agent waits for visible suggestions (capped at 200 ms) so it doesn't pay for a decision against an incomplete popup. Explicit WAIT is 100 ms. Network loading is never fast-forwarded in our recordings.

Current limits

We'd rather tell you than have you find out:

  • The DOM reader handles common HTML and ARIA controls. It does not implement the full accessible-name algorithm.
  • Shadow roots, iframes, canvas, file uploads, pop-up tabs, nested scroll containers and arbitrary keyboard widgets are outside the current reader.
  • A valid action can still be the wrong action. That's why outcomes are verified independently.
  • Each goal is bounded at 60 browser actions and 120 decision requests.

See the measurements →