Part 06›
✎

01. Multimodal Agents: Web and Computer Use#

Level: Practitioner · Reading time: 10 min · Exercise: 45 min Prerequisites: The Anatomy of an Agent (the observe, decide, act loop)

In one sentence: After this chapter you can explain why agents that click through real web pages and desktop apps still fail, name the benchmarks that measure them, and choose an observation format and a scoring method for a computer-use task of your own.

Why this matters#

A stakeholder asks for an agent that buys the cheapest color photo printer and ships it to "the address on the photo". Three things break at once. A text-only agent cannot see that the photo is upside down. An agent that reads the page's source code drowns in markup. An agent that sees only pixels cannot tell which small gray box is the Add to cart button.

Ruslan Salakhutdinov demonstrates almost exactly this task, with the address in a photo that he shows upside down on purpose (8:00).

The core idea#

A multimodal agent is an agent that reads more than text. Here it reads screenshots as well as page source, and it acts by clicking and typing. A vision-language model (VLM) is a language model that also accepts images. Grounding is linking a phrase in the instruction ("the cheapest printer") to the thing on screen it refers to. Execution-based evaluation scores a run by checking the final state of the environment, not by comparing the agent's steps with one reference path.

The analogy is a unit test: a fixture sets up the state, the code under test acts, an assertion checks the result. It breaks twice: the environment is slow and one click changes everything after it, and the assertion must accept every valid route to the same end state.

How it works, step by step#

1. Choose what the agent sees#

Observation What it is Strength Weakness
HTML or DOM tree The page source as text Exact labels and attributes Messy and long; layout is lost
Accessibility tree The operating system's list of interface elements with roles and names Short and structured Differs per platform; misses purely visual content
Screenshot Pixels One format on every platform; keeps layout and images Hard to map words to pixels; small text vanishes at low resolution

Salakhutdinov lists three representations in use: the HTML source, Set-of-Mark, a bounding box with an ID around each clickable element, so the agent acts by naming an ID, and raw coordinates; he expects a combination (16:00, 18:00). Xiong draws his from a screenshot plus labels from the accessibility tree (16:00).

2. Give every task a resettable start state#

In OSWorld, the computer-use benchmark Xiong presents, each task has a configuration: an instruction, a setup file that puts files and apps into the starting state, and an evaluation part that says how to score it. OSWorld then starts a virtual machine (VM), a simulated computer, from that setup, so a ruined state costs one reset and nothing real is at risk (12:00, 14:00).

3. Let the agent act#

The agent emits actions as short code strings that move the mouse and keyboard. The loop stops when the task is done or has failed, or at a step limit, 15 in Xiong's experiments (18:00).

4. Score by execution#

A script inspects the final state. Salakhutdinov's verifiers look for an exact answer, a yes-or-no visual question or a price inside a range (16:00). Xiong writes a custom script per task, 134 for 369 tasks, because no single metric fits all (20:00, 24:00); a partly finished task scores between 0 and 1 (18:00).

Figure 1. One task run in an execution-based benchmark such as OSWorld.

flowchart TD
    C["Task config: instruction, setup, scorer"] --> V["VM reset to the setup state"]
    V --> O["Agent observes the screen"]
    O --> A["Agent emits one action"]
    A --> E["VM runs the action"]
    E -->|"not finished, under the step limit"| O
    E -->|"done, failed or step limit"| F["Final state"]
    F --> S["Evaluation script checks the state"]
    S --> R["Score between 0 and 1"]

The loop repeats until the agent stops or hits the step limit; the score comes only from the final state.

5. Spend more compute after a failure#

Salakhutdinov describes two test-time methods. Search by repeated sampling runs several complete attempts and keeps one that passes, which he likens to rejection sampling (34:00). Tree search scores each intermediate state with a value function, a model that estimates how close the run is to success, here an LLM acting as judge; when the score drops, it backtracks and tries another action (38:00). Asked for a black polo shirt, his example agent lands on a page of blue ones and gives up; backtracking finds one (42:00). Repeated sampling needs the check from step 4 to know which attempt passed, and search is slow (44:00).

Benchmarks to know#

Benchmark Year Environment Scoring
WebArena 2023 Self-hosted clones of a shopping site, Reddit and GitLab Execution-based; HTML observations
Mind2Web 2023 2,350 tasks on 137 real websites Offline: compared with one recorded human demonstration
VisualWebArena 2024 The same style, with tasks that need images Execution-based; screenshots allowed
OSWorld 2024 369 tasks on a real desktop operating system Execution-based scripts on a VM

What the practitioners say#

Ruslan Salakhutdinov (March 2025): the gap, the failures, the fixes#

Caiming Xiong (March 2025): the environment, the data, a vision-only agent#

Pitfalls#

  1. Scoring by matching steps against one recording. Fix: check the end state; see a minimal eval harness.
  2. Feeding raw HTML. Fix: pick one observation format on purpose and measure the others against it.
  3. Small screenshots. Fix: raise the resolution and measure the token cost.
  4. Going vision-only and dropping the text history. Fix: keep a compact text log of past actions.
  5. A step limit set too low. Fix: raise it, and watch for loops.
  6. Reading a benchmark score as product readiness. Fix: build the same fixture, action and assertion around your own environment.
  7. Letting the agent act on a real account. Fix: run in a sandbox and confirm irreversible actions; see prompt injection.

Try it#

Build a five-task harness for one web app you control.

Key takeaways#

What this means for someone building agents#

  1. Write the check before the agent. An end-state check turns a vague demo into a number, and it powers retries and search; see planning, search and decision making.
  2. Treat the observation format as a design decision with a cost, and keep a text log of past actions even when the agent is vision-based.

Self-check#

  1. An agent reaches the goal by a route nobody recorded. Which scoring method passes it? A. Step overlap with the reference demonstration B. Execution-based check of the final state C. Similarity to the reference reasoning text D. Trajectory length within reference bounds
  2. In Xiong's OSWorld analyses, which change did not help? A. Higher screenshot resolution B. Longer text-based action history C. More screenshots instead of the text history D. Step limit raised from 15 to 50
  3. What is the difference between search by repeated sampling and tree search?
  4. Why does AGUVIS train an inner monologue before each action?
  5. Name three long-horizon failure modes Salakhutdinov reports.
Show answers 1. B. Execution-based evaluation looks only at the end state. 2. C. A longer text history helped; a screenshot-only history did not. 3. Repeated sampling runs whole attempts and keeps one that passes. Tree search branches inside a run and uses an LLM judge to rate intermediate states. 4. To carry the reasoning a language model already learned from text into action generation; Xiong's slide reports it helps most on harder tasks. 5. Any three of: looping between pages, no memory of progress, undoing completed work, giving up early, clicking the wrong element, weak spatial reasoning.

Sources#

Next#

→ 02. Embodied Agents and Robotics, where the environment stops being a virtual machine and starts pushing back physically.