Browsers, Playwright, and agent “computer use” — a tutorial
Lecture notes: how a browser turns HTML into pixels; how images, video, and PDFs are rendered;
what the Chrome DevTools Protocol (CDP) is; what Playwright adds on top; and how the same
machinery underlies an AI agent’s “computer use.” A running example — a script that automates a
button click — ties it together, shown message-by-message in §4.2.
TL;DR (executive summary)
- A webpage is HTML (text) that the browser parses into a DOM tree and renders to
pixels — a graphical UI. It is not JSON and not a text UI (TUI). - Images, video, fonts, and PDFs each reach the screen through their own
decode-to-pixels pipeline; a page is really a DOM tree plus a bag of separately-fetched,
separately-decoded resources. - CDP (Chrome DevTools Protocol) is a separate JSON control channel for driving and
inspecting a browser from the outside — distinct from the page itself. - Playwright is an ergonomic, race-proof library layered over CDP. Put an AI model on top,
choosing the actions, and you get agent “computer use.”
The sections below build each point up from scratch, with worked examples and figures.
1. What a webpage actually is
You type a URL. Here’s the pipeline that turns it into what you see:
https://github.com/... (1) a URL
│ HTTP GET
▼
┌─────────────────────────────────────────┐
│ HTTP response body = HTML (plain text) │ (2) the "webpage" on the wire = TEXT markup
│ <!doctype html> │ (NOT json, NOT pixels)
│ <html><body> │
│ <button id="vis">Change visibility</button>
│ <link rel="stylesheet" href="app.css">│
│ <script src="app.js"></script> │
│ </body></html> │
└─────────────────────────────────────────┘
│ browser parses the HTML
▼
┌─────────────────────────────────────────┐
│ DOM = Document Object Model (a TREE) │ (3) an in-memory tree of nodes
│ │
│ html │
│ └─ body │
│ └─ button#vis "Change visibility" │
└─────────────────────────────────────────┘
│ + CSS (CSSOM) + JavaScript (V8) mutating the tree
▼
┌─────────────────────────────────────────┐
│ Render pipeline: │ (4) layout → paint → composite
│ DOM+CSSOM → render tree → layout(boxes) │ = actual PIXELS on a GPU surface
│ → paint → GPU composite │ = the graphical window you see
└─────────────────────────────────────────┘
▼
[display] pixels in a window (a graphical window)
Key points that dissolve the confusion:
- On the wire, a page is text (HTML) — a markup language, not JSON. (Some pages also
fetch JSON viafetch()for data, but the page document itself is HTML.) - The DOM is a tree, not JSON. It’s a live in-memory data structure of element nodes. You
can serialize a snapshot of it to JSON (that’s literally what CDP’sDOM.getDocument
returns, for inspection) — but the browser doesn’t render from JSON; it renders from the
DOM + CSS. - The output is pixels drawn by the rendering engine (Blink) and composited by the GPU —
the graphics chip built into every modern Mac, PC, and phone (compositing, and usually
rasterization, video decode, and WebGL, run there; some rasterization stays on the CPU). A browser
is a full graphics application, not a terminal program.
So: HTML (text) → DOM (tree) → pixels (GUI). JSON appears nowhere in that chain.
1.1 The three languages: HTML, CSS, JavaScript
A web page is written in three cooperating languages, each with a distinct job — think
nouns, adjectives, verbs:
- HTML — structure & content (the nouns). Tags and their nesting say what is on the page
and how it’s organized (“a heading, then a card containing a button and a paragraph”). This is
what the browser parses into the DOM tree. - CSS — presentation & style (the adjectives). Cascading Style Sheets: rules that say how
things look and are placed — colour, size, spacing, font, position. CSS does not change the
tree’s structure; the browser consults the rules while laying out and painting each node. Example:
.card{border:1px solid;padding:8px}andbutton{background:blue;color:white}leave thediv
andbuttonnodes unchanged but make them paint as a bordered card with a blue button. - JavaScript — behaviour (the verbs). A real programming language that runs inside the page.
It can read and change the DOM tree and react to events (clicks, typing, timers). When JS
changes the tree (or a node’s style), the browser re-runs layout + paint so the screen updates.
Example:button.addEventListener('click', () => button.textContent = 'Sold')— on each click, JS
rewrites the button’s text node.
HTML and CSS are declarative (they describe a desired result); JavaScript is imperative (it runs
step by step and can keep changing things). All three feed the single DOM tree the browser renders.
1.2 The DOM tree, concretely (worked example)
“DOM tree” sounds abstract, so let’s build one. Take this tiny document:
<!doctype html>
<html>
<head><title>My Page</title></head>
<body>
<h1>Hello</h1>
<div class="card">
<button id="buy">Buy</button>
<p>Price: <span>$9</span></p>
</div>
</body>
</html>The browser reads that text top-to-bottom and builds this tree of typed nodes — every tag is
an element node, the text inside a tag is a separate text node child, and attributes hang
off their element:
#document
└─ html (element)
├─ head
│ └─ title
│ └─ "My Page" (text node)
└─ body
├─ h1
│ └─ "Hello" (text node)
└─ div [class="card"] (attribute)
├─ button [id="buy"]
│ └─ "Buy" (text node)
└─ p
├─ "Price: " (text node)
└─ span
└─ "$9" (text node)
Three things to internalize:
- It’s a tree of typed nodes. The root is
#document;<html>is its child; every nested
tag is a child element. Text is its own text node, not a property of the tag — so
<h1>Hello</h1>is anh1element whose single child is the text node"Hello". - It’s live — not the original text. After parsing, the browser works with the tree, not the
HTML string; JavaScript can change it at any moment and CSS decides how each node looks (see §1.1).
Concretely: the file shipped<button id="buy">Buy</button>, but when
document.querySelector('#buy').textContent = 'Sold'runs on a click, JS replaces the button’s
text node with"Sold", the browser repaints, and the user now sees Sold. The original HTML
still says “Buy”; the live tree is the source of truth — and it’s what automation and CDP read. - Rendering reads the tree + CSS to lay out boxes and paint pixels. Nothing renders “from JSON.”
1.3 How you point at a node
Automation (and your own JS) must name a node. Addressing schemes, brittle → robust, all
resolving to a node in the tree above:
| Scheme | Example | Picks |
|---|---|---|
| by id | #buy / getElementById('buy') | the button |
| by class | .card | the div |
| by tag | span | the span (“$9”) |
| CSS path | .card > button | the button inside .card |
| by role + name (ARIA) | get_by_role("button", name="Buy") | the button — what Playwright + our flipper use |
The last is sturdiest: it names an element the way a person (or a screen reader) would — “the
button labelled Buy” — so it survives layout/markup changes. That comes from the accessibility
tree: a parallel, distilled view the browser computes from the DOM, keeping each node’s
role and name. For our example, roughly:
document › heading "Hello" · button "Buy" · text "Price: $9". DOM-based agents read this because
it’s small and semantic.
1.4 The same tree, as CDP sees it (JSON)
Here is where JSON finally appears — not as the page, but as a serialization of the tree that
CDP returns from DOM.getDocument:
{ "root": { "nodeName": "#document", "children": [
{ "nodeName": "HTML", "children": [
{ "nodeName": "BODY", "children": [
{ "nodeName": "H1", "children": [ { "nodeName": "#text", "nodeValue": "Hello" } ] },
{ "nodeName": "DIV", "attributes": ["class","card"], "children": [
{ "nodeName": "BUTTON", "attributes": ["id","buy"],
"children": [ { "nodeName": "#text", "nodeValue": "Buy" } ] } ] } ] } ] } ] } }Same tree, same node types (element / #text), same attributes — written as JSON so a program can
read it. The browser still renders from the live tree; this JSON is the control plane’s
description of it.
1.5 Rendering more than text: images, video, fonts, canvas
The DOM tree’s leaf elements usually don’t contain their heavy content — they reference it
by URL (<img src>, <video src>, <link href>, <script src>, @font-face). The model is the
same for every type:
reference -> fetch bytes -> type-specific decode -> place in the layout box -> composite.
The browser issues a separate HTTP request per resource (many in parallel), gets back
bytes, and routes each to the decoder for its type. Only text/HTML builds the DOM; everything
else decodes into something the compositor can paint.
index.html ──references──▶ parallel HTTP GETs ──▶ per-type decoders ──▶ composite
<h1>Hi</h1> text -> DOM + CSSOM \
<link style.css> (bytes come back) PNG -> RGBA bitmap ├─▶ layout +
<img photo.png> MP4 -> decoded frames / GPU composite
<video clip.mp4> WOFF2 -> glyph outlines = one frame
| Content | On the wire | Decoded into | Becomes pixels by |
|---|---|---|---|
| HTML | UTF-8 text | the DOM tree | layout + paint (glyphs via fonts) |
| CSS | text | CSSOM (style rules) | feeds layout/paint of the DOM |
| Raster image (PNG/JPEG/WebP) | compressed bitmap bytes | an RGBA pixel buffer | GPU texture drawn in the <img> box |
| Vector image (SVG) | XML text | its own node tree + paths | rasterized at display resolution (scales cleanly) |
| Video (MP4/WebM) | a streamed container | demuxed streams -> codec-decoded frames (often hardware) | each frame composited every refresh; audio to the sound device |
| Font (WOFF2) | compressed glyph outlines | a glyph set | outlines rasterized into text runs during paint |
<canvas> / WebGL | (no asset — JS draws) | draw commands from JS | rasterized directly on the GPU |
So “a webpage” is really a DOM tree plus a bag of separately-fetched, separately-decoded
resources, merged by the compositor into one picture — refreshed ~60x/second for video/animation.
1.6 What is a PDF — and is it “rendered”?
A PDF (Portable Document Format, descended from PostScript) is a fixed-layout,
page-description format. Where HTML is reflowable (it describes structure and lets the browser
compute layout for any window), a PDF ships the finished layout: each fixed-size page carries a
content stream of drawing operators plus the resources they need (embedded fonts, vector paths,
raster images). A page’s stream reads like:
BT /F1 12 Tf % begin text, font F1 at 12pt
72 700 Td % move to coordinate (72, 700)
(Hello) Tj % show the string "Hello"
ET
0 0 1 rg % set fill colour = blue
100 600 200 50 re f % fill a rectangle at (100,600) size 200x50
Yes, a PDF is rendered — by a PDF engine that interprets those operators and rasterizes to
pixels. There is no DOM and no CSS; it’s a different pipeline to the same end. Chrome embeds
PDFium (C++); Firefox uses PDF.js (JavaScript drawing onto a <canvas>). Opening a PDF in a
browser does not use the HTML engine (Blink) — a separate PDF engine does the work.
| HTML | ||
|---|---|---|
| Layout | reflowable — computed per window | fixed — baked into the file, per page |
| Model | DOM tree + CSS + JS (live, interactive) | object graph + content-stream operators (static) |
| Engine | Blink / V8 | PDFium (Chrome) · PDF.js (Firefox) |
| End result | rasterized to pixels | rasterized to pixels (same destination, different road) |
Full circle for this document: weasyprint took the reflowable HTML you’re reading, computed
a layout, and baked it into a fixed-page PDF. Open that PDF in Chrome and PDFium renders it
back to pixels — HTML’s layout engine never runs. One source, two render pipelines.
2. What “a browser” actually is (it’s not a CLI)
Chrome/Chromium is a multi-process GUI application. Simplified:
┌────────────────────────── Chrome ──────────────────────────┐
│ │
│ Browser process ← the "boss": window, tabs, menus, │
│ │ disk, the CDP endpoint │
│ ├── Network service ← does the HTTP, TLS, cookies │
│ ├── GPU process ← rasterizes/composites pixels │
│ └── Renderer process ← ONE per site (sandboxed): │
│ ├─ Blink ← HTML/CSS parser + layout engine │
│ └─ V8 ← the JavaScript engine │
└─────────────────────────────────────────────────────────────┘
- It has a GUI (windows, a trackpad-driven pointer, menus). It is not a command-line
tool you pipe text into. google-chrome <url>on a terminal just launches the GUI app pointed at a URL. Flags like
--headlessrun the same engine with no visible window (still not a CLI you converse with).- The only “programmatic conversation” channel is the remote-control protocol (CDP) —
off by default, turned on with a flag. That’s section 3.
3. CDP: the control plane (this is the JSON)
There are two planes, and keeping them separate is the whole lesson:
DATA PLANE (the page): server ──HTML/CSS/JS──▶ browser ──renders──▶ pixels
CONTROL PLANE (CDP): your code ◀── JSON-RPC ──▶ browser (drive + inspect)
The Chrome DevTools Protocol is a JSON-RPC API the browser exposes so an outside program
(DevTools, Playwright, your script) can drive and inspect it. Enable it with
--remote-debugging-port=9222 (WebSocket) or --remote-debugging-pipe (OS pipes).
Everything is one of three JSON shapes:
(a) You send a command (you pick the id):
{ "id": 7, "method": "Page.navigate", "params": { "url": "https://example.com" } }(b) The browser replies to that id:
{ "id": 7, "result": { "frameId": "F1", "loaderId": "L1" } }(c) The browser streams events you didn’t ask for:
{ "method": "Page.lifecycleEvent", "params": { "name": "load", "frameId": "F1" } }Commands are grouped into domains. A few, with real examples:
Page — navigation & lifecycle:
{ "id": 1, "method": "Page.navigate", "params": { "url": "https://x.com" } }
{ "id": 2, "method": "Page.captureScreenshot", "params": { "format": "png" } } // returns base64 PNGDOM — the element tree as JSON (this is where “page → JSON” is real, but only as an
inspection snapshot):
{ "id": 3, "method": "DOM.getDocument", "params": { "depth": 2 } }
// result: a JSON tree of nodes:
{ "id": 3, "result": { "root": {
"nodeId": 1, "nodeName": "#document",
"children": [ { "nodeId": 2, "nodeName": "HTML",
"children": [ { "nodeId": 4, "nodeName": "BODY",
"children": [ { "nodeId": 9, "nodeName": "BUTTON",
"attributes": ["id","vis"] } ] } ] } ] } } }{ "id": 4, "method": "DOM.querySelector", "params": { "nodeId": 1, "selector": "#vis" } }
{ "id": 4, "result": { "nodeId": 9 } }Runtime — run JavaScript inside the page and get a value back:
{ "id": 5, "method": "Runtime.evaluate",
"params": { "expression": "document.querySelector('#vis').textContent", "returnByValue": true } }
{ "id": 5, "result": { "result": { "type": "string", "value": "Change visibility" } } }Input — synthesize real mouse/keyboard (what makes a trusted click):
{ "id": 6, "method": "Input.dispatchMouseEvent",
"params": { "type": "mousePressed", "x": 512, "y": 640, "button": "left", "clickCount": 1 } }Network — watch/intercept actual HTTP (events carry the real request/response):
{ "method": "Network.responseReceived",
"params": { "response": { "url": "https://x.com/api", "status": 200, "mimeType": "application/json" } } }So the one honest nuance behind your question: the page is HTML/pixels, but you can ask CDP
for a JSON description of the DOM (DOM.getDocument) and for screenshots
(Page.captureScreenshot). CDP is the lens; the page itself isn’t JSON.
4. Why Playwright, not “just call Chrome/CDP directly”
You asked: if the browser is drivable, why not have the agent call it directly? You can —
Playwright is literally a CDP client. But raw CDP is low-level and brutal to use correctly.
Compare one click.
Raw CDP (what you’d hand-write):
Target.getTargets → find the page target
Target.attachToTarget {flatten:true} → get a sessionId
Page.enable / DOM.enable / Runtime.enable → turn on domains
... poll Page.lifecycleEvent until "load" (handle the race if it already fired)
Runtime.evaluate "document.querySelector('#vis')" → but you get a remote objectId, not a node
DOM.requestNode {objectId} → convert to a nodeId
DOM.getBoxModel {nodeId} → get x/y/width/height (fails if off-screen → scroll first)
DOM.scrollIntoViewIfNeeded
Input.dispatchMouseEvent mouseMoved x,y
Input.dispatchMouseEvent mousePressed x,y
Input.dispatchMouseEvent mouseReleased x,y
... and if the element was re-rendered between steps, your coordinates are now wrong → flakePlaywright:
page.get_by_role("button", name="Change visibility").click()That one line auto-waits for the element to exist, be visible, be stable (not animating), be
enabled, and be hittable; scrolls it into view; recomputes geometry; retries on transient
failures; and works the same on Chromium/Firefox/WebKit. It also runs a real selector/locator
engine (injected JS, called via Runtime.evaluate) so you address elements by role/text/CSS
instead of juggling nodeIds.
your code
│ "click the Buy button"
▼
┌───────────────────────────┐
│ Playwright │ auto-wait · locators · retries · cross-browser · typed API
│ (ergonomics + robustness) │
└───────────────────────────┘
│ dozens of CDP messages, correctly sequenced & timed
▼
┌───────────────────────────┐
│ CDP (JSON-RPC) │ Page / DOM / Runtime / Input / Network …
└───────────────────────────┘
│
▼
the browser → the page → pixels
Analogy: raw CDP is like raw syscalls; Playwright is the standard library. A coding agent
could emit CDP directly — but it would end up re-implementing Playwright’s waiting/retry logic
(badly), so in practice agents use Playwright/Puppeteer (or the WebDriver BiDi standard) as the
”hands.” The timing/race handling is the real value, not the messages themselves.
4.1 Chrome as a CDP server, and Playwright as a bundle of tools
Reframe “the browser” from an automator’s seat: Chrome’s browser process is a CDP server. Each
tab, iframe, and worker is a target you attach to (getting a sessionId); each target exposes
the domains (Page, DOM, Runtime, Input, Network, Accessibility, …) as commands
and events. CDP is powerful but granular and stateful: one human intention (“click Buy”) is a
dozen ordered commands, any of which can race if the page is still changing.
Playwright is essentially a curated library of high-level “tools” (actions), where each tool is a
hardened recipe of many CDP calls plus the waiting/retry logic that makes them reliable. You call
one method; it choreographs the CDP sequence:
| Playwright action | The “smarts” it adds | CDP commands it orchestrates |
|---|---|---|
chromium.launch() / connect | start Chrome w/ automation, attach | process launch + Target.setAutoAttach, Target.attachToTarget → sessionId |
new_page() | a fresh, instrumented tab | Target.createTarget; then Page.enable, Runtime.enable, DOM.enable, Network.enable, Page.setLifecycleEventsEnabled; inject the selector/util script |
page.goto(url) | navigate and wait until ready | Page.navigate, then await Page.lifecycleEvent (DOMContentLoaded → load → optional networkidle) |
locator resolve (get_by_role/get_by_text/CSS) | find element(s) semantically, retry | Runtime.evaluate runs the injected selector engine in-page → a RemoteObject/objectId; for roles, Accessibility.queryAXTree |
| auto-wait (actionability) | attached, visible, stable, enabled, hit-testable | repeated Runtime.evaluate checks + DOM.getBoxModel, until two frames agree |
.click() | scroll in, aim at center, real click | DOM.scrollIntoViewIfNeeded → DOM.getContentQuads/getBoxModel → Input.dispatchMouseEvent ×3 (moved/pressed/released) |
.fill(text) | focus, clear, set value, fire input | DOM.focus (or JS focus) → Input.insertText |
.type() / .press() | per-keystroke events | Input.dispatchKeyEvent keyDown/keyUp per char/key |
.check() | tick a box/radio and verify | click sequence + Runtime.evaluate reading .checked |
.wait_for(state=…) | block until a DOM condition holds | Runtime.evaluate polling / an injected MutationObserver |
page.route() (intercept) | stub/modify network requests | Fetch.enable → Fetch.requestPaused → Fetch.continueRequest/fulfillRequest |
.screenshot() / .pdf() | capture pixels / print | Page.captureScreenshot / Page.printToPDF |
So “why Playwright and not raw CDP” answers itself: the CDP commands are the same either way —
Playwright just packages the correct sequence, the actionability waiting, and the cross-browser
differences into one tested call per intention. You could write these bundles yourself; you’d be
rewriting Playwright. §4.2 shows one action, message by message.
4.2 One action, message by message
To make “a bundle of CDP calls” concrete, here is what one line —
page.get_by_role("button", name="Buy").click() on the page from §1.2 — sends over the wire
(ids illustrative; Playwright emits more bookkeeping):
# 1. resolve the element (injected selector engine runs in-page)
--> {"id":31,"method":"Runtime.evaluate","params":{"expression":"__pwQuery('role=button[name=Buy]')"}}
<-- {"id":31,"result":{"result":{"objectId":"{el}"}}}
# 2. actionability + geometry (visible, stable, enabled; where is it?)
--> {"id":32,"method":"DOM.scrollIntoViewIfNeeded","params":{"objectId":"{el}"}}
--> {"id":33,"method":"DOM.getBoxModel","params":{"objectId":"{el}"}}
<-- {"id":33,"result":{"model":{"content":[180,300,240,300,240,326,180,326]}}}
# 3. a real, trusted click at the box centre (x=210, y=313)
--> {"id":34,"method":"Input.dispatchMouseEvent","params":{"type":"mouseMoved","x":210,"y":313}}
--> {"id":35,"method":"Input.dispatchMouseEvent","params":{"type":"mousePressed","x":210,"y":313,"button":"left","clickCount":1}}
--> {"id":36,"method":"Input.dispatchMouseEvent","params":{"type":"mouseReleased","x":210,"y":313,"button":"left","clickCount":1}}
The page receives genuine mousedown/mouseup/click events with isTrusted:true —
indistinguishable from a human hand. One Playwright call, ~8 CDP messages, all the waiting handled
for you. To watch the real stream from any Playwright script, set the env var DEBUG=pw:protocol;
PWDEBUG=1 opens a visual step-through inspector.
5. How this becomes a coding agent’s “computer use”
A fixed automation script (like §4.2) has no model in the loop. An agent adds a brain in a
loop. Two flavors:
5a. DOM/protocol agent (browser-focused)
┌──────────── loop ────────────┐
│ OBSERVE │ get a compact text view of the page:
│ • DOM / accessibility tree │ the a11y tree ("button 'Buy'",
│ (serialized to JSON/text) │ "textbox 'confirm name'") — cheap, structured
│ │ │
│ ▼ │
│ DECIDE (the model) │ "click the Change visibility button"
│ │ │
│ ▼ │
│ ACT → Playwright/CDP │ page.get_by_role(...).click() (reliable)
└───────────────┬──────────────┘
▼ observe the new state, repeat
The model reads structured text (the accessibility tree is basically the DOM distilled to
roles+names — compact and token-cheap) and acts through CDP/Playwright. Reliable, fast, but
browser-only (needs a DOM).
5b. Vision/pixel computer use (general)
┌──────────── loop ────────────┐
│ OBSERVE → screenshot (PNG) │ the model literally looks at pixels
│ ▼ │
│ DECIDE (the model) │ "click at (512, 640); then type ..."
│ ▼ │
│ ACT → OS mouse/keyboard │ move cursor, click, type at the OS level
└───────────────┬──────────────┘
▼ screenshot again, repeat
This drives any app (Finder, Photoshop, a game) because it needs no DOM — but it reasons
over images, so it’s slower, costs more tokens, and is fuzzier about exact coordinates. This is
the “Computer Use” paradigm (Anthropic Computer Use, OpenAI Operator/computer-use, etc.).
Where they meet
Browser agents often use 5a (DOM/a11y + CDP) for reliability and fall back to 5b
(screenshot + coordinate click) only when the target isn’t in the DOM — e.g. <canvas>, a
PDF viewer, a video, or a native desktop window.
On “Codex doing computer use”: a coding agent like that primarily runs commands in a
sandbox (its main “tool” is a shell/editor, not a browser). When such a product advertises
computer use, it means it was given a screenshot+action tool (5b) and/or a browser
tool (5a) on top of the shell. Which mechanism a specific product uses varies, so I won’t
claim a specific internal design for Codex — but conceptually it’s one (or both) of the two
loops above, with the model as the decider.
6. Benchmarks & RL environments for web / computer-use agents
The loops in §5 are an active research area. There is now a rich set of environments — many
usable as reinforcement-learning training environments (step/reset APIs, rewards), not just
static eval sets — for agents that drive browsers and desktops. A map of the main ones:
6.1 Browser / web agents
| Environment | What it is |
|---|---|
| MiniWoB / MiniWoB++ | The classic: ~100 tiny browser tasks (click, type, drag) rendered in a canvas. Synthetic & reproducible — the long-standing RL sandbox for web UIs. |
| WebShop | A simulated shopping site (1.18M real products, 12k instructions); buy the item matching a request. Trained with RL and imitation learning. |
| WebArena (+ VisualWebArena, VideoWebArena) | Self-hosted, fully-functional real sites (shopping, forum, GitLab, CMS); execution-checked tasks. The standard “realistic” web benchmark. |
| Mind2Web (+ Mind2Web-Live, Online-Mind2Web) | 2,000+ open tasks over 137 real websites; generalist web agents. Later versions add live, online, human-checked evaluation. |
| WebVoyager | End-to-end tasks on 15 live real websites, evaluated multimodally (screenshots). |
| WorkArena / WorkArena++ | Enterprise knowledge-work tasks on a real ServiceNow instance. |
| BrowserGym | A unifying Gym-style framework (observation/action/step) that wraps MiniWoB++, WebArena, VisualWebArena, WorkArena, … under one API — and is built on Playwright, so an agent’s “actions” are exactly the §4.1 Playwright calls. |
6.2 Computer-use / OS-level GUI agents
| Environment | What it is |
|---|---|
| OSWorld | A real Ubuntu/Linux desktop + apps; 369 execution-checked tasks (file manager, browser, office, terminal). The flagship computer-use benchmark (the §5b loop). |
| WindowsAgentArena | Adapts OSWorld to Windows: 150+ multi-step tasks across real Windows apps and the web. |
| AndroidWorld / Android-in-the-Wild / AndroidControl | Real Android device/emulator tasks — the mobile equivalent. |
| macOSWorld | macOS GUI tasks, multilingual. |
| ScreenSpot / ScreenSpot-Pro | GUI grounding: given a screenshot + instruction, click the correct pixel — tests the perception half of §5b. |
As RL environments: MiniWoB++, WebShop, and BrowserGym expose Gym-style reset() / step(action)
with task rewards, so you can train with RL / imitation learning; the browser-based ones execute
actions through Playwright/CDP exactly as this note describes. OSWorld and WindowsAgentArena are
execution-based and can likewise be wrapped as environments.
Frontier context: Anthropic’s Claude Computer Use and OpenAI’s Operator are the §5b
vision-loop agents. On human-verified web tasks (Online-Mind2Web), reported success rates drop sharply
versus self-reported numbers — closing that gap is the current frontier.
Sources / papers: BrowserGym ·
WebArena · Mind2Web ·
Online-Mind2Web · WebShop ·
OSWorld · WindowsAgentArena ·
macOSWorld.
7. Glossary
- HTML — the text markup a server returns; the page’s source.
- DOM — Document Object Model; the live in-memory tree the browser builds from HTML.
- CSSOM / render tree / layout / paint / composite — the stages that turn DOM+CSS into pixels.
- Blink / V8 — Chromium’s rendering engine / JavaScript engine.
- CDP — Chrome DevTools Protocol; JSON-RPC control+inspection channel into the browser.
- WebDriver BiDi — the emerging cross-browser standard that generalizes CDP.
- Accessibility tree — a distilled, role+name view of the DOM; what screen readers and
DOM-based agents read. - Playwright / Puppeteer — libraries that speak CDP (and more) with auto-waiting + locators.
- Headed / headless — browser with / without a visible window; same engine either way.