Learning Objectives
- Describe WebArena's four self-hosted apps and why execution-based evaluation matters.
- Explain why OSWorld uses real OS screenshots instead of accessibility APIs.
- Name the two primary OSWorld failure modes: GUI grounding and operational knowledge.
- Summarize what OSWorld-G and OSWorld-Human add on top of the base benchmark.
The Problem
Generalist agents can call tools. Can they drive a browser across 20 clicks to complete a shopping checkout? Can they configure a Linux box using only keyboard and mouse? These are the questions WebArena and OSWorld answer.
The Concept
WebArena (Zhou et al., ICLR 2024)
- 812 long-horizon tasks across four self-hosted web apps: a shopping site, a forum, a GitLab-like dev tool, a business CMS.
- Plus utilities: map, calculator, scratchpad.
- Evaluation is execution-based via gym APIs — was the order placed, was the issue closed, was the CMS page updated?
- At release: best GPT-4 agent hit 14.41% success vs human 78.24%.
The self-hosted framing matters — the benchmark is not flaky because the target apps are pinned and reproducible.
Extensions
- VisualWebArena — visually grounded tasks where success depends on interpreting images (screenshots as first-class observations).
- TheAgentCompany (Dec 2024) — adds terminal + coding; more like a real remote-work environment.
OSWorld (Xie et al., NeurIPS 2024)
- 369 real computer tasks across Ubuntu, Windows, macOS.
- Free-form keyboard and mouse control of real applications.
- 1920×1080 screenshots as the observation.
- At release: best model 12.24% vs human 72.36%.
Primary failure modes
- GUI grounding. Pixel → element mapping. Models struggle to localize UI elements reliably in 1920×1080.
- Operational knowledge. Which menu has the setting, which keyboard shortcut, which preference pane. Knowledge tail that humans build over years.
Follow-ups
- OSWorld-G — 564-sample grounding suite + Jedi training set. Decomposes grounding from planning so you can measure them separately.
- OSWorld-Human — manually curated gold action trajectories. Shows top agents use 1.4-2.7x more steps than necessary (the trajectory-efficiency gap).
Why this matters
Claude computer use, OpenAI CUA, Gemini 2.5 Computer Use (Lesson 21) all train on workloads shaped by WebArena and OSWorld. The benchmarks are the target; the production models are the shipped answer.
Where benchmarking goes wrong
- Screenshot-only evals. OSWorld is screenshot-driven; evaluating an agent that uses DOM or accessibility APIs on OSWorld misses the grounding challenge.
- Ignoring trajectory length. Scoring only success-rate misses the 1.4-2.7x step inefficiency OSWorld-Human surfaces.
- Stale self-hosted apps. WebArena's apps pin specific versions; update without re-curation breaks comparability.
Interactive figure coming later.
Build It
code/main.py implements a toy web-agent harness:
- A minimal "shopping app" state machine: list_items, add_to_cart, checkout.
- Gold trajectories for 3 tasks.
- A scripted agent that attempts each task.
- Execution-based evaluator (state check) and trajectory-efficiency metric (steps vs gold).
Run it:
python3 code/main.py
Output: per-task success rate and trajectory efficiency, mirroring OSWorld-Human's methodology.
Use It
- WebArena Verified self-hosted on an internal cluster for continuous evaluation.
- OSWorld in a VM fleet for desktop agents.
- Computer-use agents (Lesson 21) — Claude, OpenAI CUA, Gemini — all trained on workloads like these.
- Your own product flows — capture gold trajectories for your top 20 tasks; run agents against them weekly.
Ship It
outputs/skill-web-desktop-harness.md builds a web/desktop agent harness with execution-based eval and trajectory efficiency metric.
Exercises
- Extend the toy harness with a second app (a forum). Write 3 tasks plus gold trajectories.
- Add trajectory-efficiency reporting per task. On your toy, is the agent 1x, 2x, or 3x over gold?
- Implement a "distractor" tool — one the gold trajectory never uses. Does the scripted agent get tempted?
- Read OSWorld-G. How would you separate grounding failures from planning failures in your own evals?
- Read WebArena's apps README. What breaks when you upgrade one of the pinned app versions?
Key Terms
| Term | What people say | What it actually means |
|---|---|---|
| WebArena | "Web agent benchmark" | 812 tasks across 4 self-hosted apps; gym-style evaluation |
| VisualWebArena | "Visual WebArena" | Visually grounded WebArena; screenshots are observations |
| OSWorld | "Desktop agent benchmark" | 369 tasks on real Ubuntu/Windows/macOS |
| GUI grounding | "Pixel-to-element mapping" | Model localizing UI elements in 1920x1080 |
| Operational knowledge | "OS know-how" | Which menu, which shortcut, which preference pane |
| OSWorld-G | "Grounding suite" | 564 grounding-only samples + training set |
| OSWorld-Human | "Gold trajectories" | Manual expert action sequences to measure efficiency |
| Trajectory efficiency | "Steps over gold" | Agent step count divided by human minimum |
Further Reading
- Zhou et al., WebArena (arXiv:2307.13854) — four-app web benchmark
- Xie et al., OSWorld (arXiv:2404.07972) — cross-OS desktop benchmark
- Anthropic, Introducing computer use — Claude's benchmark-shaped capability
- OpenAI, Computer-Using Agent — OSWorld and WebArena numbers
Code
main.py
python phases/14-agent-engineering/20-benchmarks-webarena-osworld/code/main.pyOpen on GitHub ↗
Take-away files
skill-web-desktop-harness.md
--- name: web-desktop-harness description: Build a WebArena/OSWorld-style harness with execution-based evaluation and trajectory-efficiency metrics. version: 1.0.0 phase: 14 lesson: 20 tags: [webarena, osworld, harness, trajectory-efficiency] --- Given a target app (web or desktop) and a list of tasks with gold trajectories, build an eval harness. Produce: 1. Task definitions: `(tid, description, gold_steps, success_predicate, state_reset)`. 2. Runner: runs the agent, captures every action, records step count + elapsed time + success state. 3. Trajectory-efficiency metric: `agent_steps / gold_steps`. Report per-task and aggregate. 4. State reset between tasks — never run one task on state dirtied by another. 5. Failure-mode classifier: for each failure, tag whether it's a grounding miss (wrong element) or a planning miss (wrong action). Hard rejects: - No state reset between tasks. Cross-task contamination invalidates all scores. - Success-rate-only reporting. Trajectory efficiency is the 2026 standard. - Screenshots-only harness without DOM parity. Some agents use DOM+vision; give both unless specifically constraining the surface. Refusal rules: - If the tasks have no gold trajectories, refuse. You cannot measure efficiency without them. - If the app is not pinned to a specific version, refuse. Drift invalidates cross-run comparisons. - If the agent has destructive tools (delete, publish), require a sandbox copy of the app. Output: `tasks.py`, `runner.py`, `failure_classifier.py`, `report.py`, `README.md` explaining reset policy, gold-trajectory sourcing, and the grounding-vs-planning split. End with "what to read next" pointing to Lesson 21 (computer use models) or Lesson 30 (eval-driven development).