Search

Search papers and lessons

OSWorld: Benchmarking Multimodal Agents for Open-Ended Computer Tasks

Tianbao Xie, Danyang Zhang, Jixuan Chen et al. · 2024

OSWorld is a benchmark that runs AI agents in real operating systems on 369 everyday computer tasks; the best model tested finished 12.24% of them, against 72.36% for humans.

On this page

  • Colour = topic mix
  • Discrete math
  • Probability
  • Neural network basics
  • Calculus
  • Linear algebra
  • Language & LLMs
  • ReadReady to readNot yet

TL;DR

OSWorld is a benchmark and an environment for testing AI agents on real computer work. An agent looks at screenshots, moves the mouse and types on a real operating system running inside a virtual machine, and a script then checks the final state of the machine. The authors built 369 tasks that span web browsing, spreadsheets, email, coding, image editing and workflows that cross several apps. The best model they tested finished 12.24% of the tasks, while people finished 72.36%.

Builds on: Vision-Language Model, LLM Agent, Virtual Machine · Leads to: work on agents that act through real software interfaces, such as SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering

Why it mattered

Before OSWorld, most agent benchmarks lived inside one website or one kind of software. The paper's comparison table lists WebArena with 812 tasks and MiniWoB++ with 125, both in web browsers, and Mind2Web with 2350 tasks that are a fixed set of recorded web actions with no live environment to run in. A benchmark that only checks a recorded next action cannot tell whether an agent could actually finish a job, because many different action sequences can be correct.

OSWorld made the whole desktop the test bed. The authors released the environment, the setup and evaluation scripts, the documentation and their baseline code, so other groups can run the same tasks and get comparable scores. The same paper also reports a Windows version of 43 tasks, which lets the authors check whether results transfer across operating systems. Its headline result is that current models were far below people on the same tasks.

The problem

Two kinds of earlier work fell short. Some benchmarks gave datasets of human demonstrations with no executable environment, and they scored an agent by whether it predicted the one recorded step; the paper notes this wrongly penalizes other correct solutions. Other benchmarks did have executable environments, but only for one domain such as web navigation, coding, or a fixed mix of apps.

Testing a general computer agent needs three things at once. The agent needs the same inputs and outputs a person has: a picture of the screen and the ability to move a mouse and press keys. The task needs to start from a realistic, half-finished state, such as a file already open or a window in the wrong place. And the grader needs to accept any valid solution by checking outcomes, not steps.

The paper frames this as a partially observable decision problem, which is the standard way to describe an agent acting in an environment it cannot see all of at once (see Partially Observable Markov Decision Process). The agent sees only an observation, not the full state of the machine. Two observation types are used. A screenshot is the picture of the desktop. An accessibility tree (a11y tree) is a structured list of the on-screen elements, such as windows, buttons and text labels, that the operating system exposes to assistive tools. The authors also test Set-of-Mark, a prompting method that draws numbered boxes on the screenshot so that the model can name an element by its number rather than by its pixel coordinates.

How it works

The walkthrough below follows one illustrative task in the style of the paper's Table 1: "Clean up my computer by getting rid of all the cookies that Amazon might have saved." The step names follow the paper's pipeline.

  1. Configure the start state. A configuration file names a saved snapshot of a virtual machine and lists setup steps: download any needed files, open the right application, and arrange the windows. Here the setup opens Chrome with an Amazon page already loaded, so the agent starts in the middle of a session, as a real user would.
  2. Observe. The agent receives the instruction and the current observation: a screenshot of the full desktop and, optionally, the filtered accessibility tree.
  3. Decide an action as code. The model writes one short Python command in the pyautogui library, which is a standard way to control the mouse and keyboard from a script. For example, click(300, 540) clicks at a point, and hotkey('ctrl', 'shift', 'delete') presses a key combination. The model may also output DONE, FAIL or WAIT.
  4. Execute. The environment's simulator runs the command inside the virtual machine. The machine changes, and the next screenshot shows the result.
  5. Repeat. Steps 2 to 4 repeat until the agent outputs DONE or FAIL, or until it reaches the step limit, which is 15 in the paper's experiments.
  6. Post-process and collect. The task manager runs the task's post-processing, such as reopening an app or saving a file, and then copies whatever the grader needs out of the machine. For this task, it reads the browser's cookie store.
  7. Score. An evaluation function compares the collected data with the task's rule. Here the rule is that no cookies for the amazon domains remain. The score is 1 if the rule holds, a number between 0 and 1 for partial success, and 0 otherwise.
flowchart LR
  A["Setup: VM snapshot plus config"] --> B["Observe: screenshot and optional a11y tree"]
  B --> C["Model writes a pyautogui command"]
  C --> D["Simulator runs it in the VM"]
  D --> E["DONE, FAIL or 15 steps?"]
  E -- "no" --> B
  E -- "yes" --> F["Post-process and collect data"]
  F --> G["Evaluation function gives a score"]

Each of these steps is a place where the system can fail. The paper's error analysis of GPT-4V, covered in Section 5.4, finds that mouse click inaccuracies are the most common error, in more than 75 percent of its 550 failed examples. The model often plans the right steps in its code comments but clicks the wrong coordinates.

The math

Step 1 in symbols: the decision problem

The task is a tuple (S,O,A,T,R)(\mathcal{S},\mathcal{O},\mathcal{A},\mathcal{T},\mathcal{R}). Here S\mathcal{S} is the set of machine states, O\mathcal{O} is the set of observations, A\mathcal{A} is the set of actions, T:S×A→S\mathcal{T}:\mathcal{S}\times\mathcal{A}\to\mathcal{S} is the transition function that says what the machine becomes after an action, and R\mathcal{R} is the reward function.

Step 2 in symbols: observe

At each time tt the agent receives ot∈Oo_t\in\mathcal{O}, a bundle of the instruction and a screenshot, the accessibility tree, or both. The paper's baselines keep a short history: the model sees the most recent 3 observations and actions, formatted as alternating user and assistant chat turns.

Step 3 in symbols: act

The agent emits at∈Aa_t\in\mathcal{A}, and the new state st+1s_{t+1} and observation ot+1o_{t+1} follow from T\mathcal{T}. Because each action is a line of code, the action set is effectively the set of valid pyautogui programs that the simulator accepts.

Steps 5 and 7 in symbols: the reward

The episode stops at a termination action or at the step limit Tmax⁡=15T_{\max}=15. The reward is zero at every step except the last, and at the last step it is a number in [0,1][0,1]:

ri∈[0,1],ri=0 unless the final state meets the goal of task i, or the agent correctly declares an infeasible task.r_i \in [0,1], \qquad r_i = 0 \text{ unless the final state meets the goal of task } i \text{, or the agent correctly declares an infeasible task.}

Reporting a success rate over the NN tasks in a group is then the average reward:

SR=1N∑i=1Nri\text{SR} = \frac{1}{N}\sum_{i=1}^{N} r_i

The paper reports SR as a percentage. Partial credit makes the average a little more informative than a pass or fail count, because a task that is half done still moves the number.

Results

The main findings, on the paper's own numbers: the best model tested, GPT-4 with an accessibility tree, reached 12.24% overall. GPT-4V with Set-of-Mark reached 11.77%, and screenshot-only runs of GPT-4V and Gemini-ProV reached 5.26% and 5.80%. For GPT-4V with Set-of-Mark, single-app tasks scored 13.74% and multi-app workflows 6.57%. Human participants reached 72.36% overall and stayed near 70% across task groups, so the gap is largest where the models are weakest. The authors also found that the Windows version of the tasks gave a lower score (2.55% against 4.88% on Ubuntu for GPT-4V screenshot-only) with a correlation of 0.7 between the two operating systems. The limits: the benchmark has 369 tasks, and the authors note that some false positives and negatives in the evaluation scripts remain.

Worked examples

Example
1. A three-task toy run

Suppose an agent runs three tasks and gets rewards 1, 0 and 0.5.

  1. Add the rewards: 1+0+0.5=1.51 + 0 + 0.5 = 1.5.
  2. Divide by the number of tasks, N=3N = 3: SR=1.5/3=0.5\text{SR} = 1.5 / 3 = 0.5.
  3. Read the result: the agent scores 50%. Task 3 counted as half a success, which is why the value is not a whole number of tasks.
Example
2. The standard case: checking the GPT-4V split

Table 6 reports GPT-4V with Set-of-Mark on two groups. Single-app tasks are 72.63% of the benchmark with SR 13.74%. Multi-app workflow tasks are 27.37% with SR 6.57%. Check whether these two numbers add up to the overall score in Table 5.

  1. Weight the single-app rate by its share: 0.7263×13.74=9.9790.7263 \times 13.74 = 9.979.
  2. Weight the workflow rate by its share: 0.2737×6.57=1.7980.2737 \times 6.57 = 1.798.
  3. Add the two weighted parts: 9.979+1.798=11.7779.979 + 1.798 = 11.777.
  4. Compare with Table 5, which reports 11.77% for GPT-4V with Set-of-Mark. The small gap comes from rounding the percentages in the table.
  5. Interpret: the overall score is almost entirely explained by the split. Workflow tasks pull the average down because they are a quarter of the benchmark and the model does poorly on them.
Example
3. A realistic case: difficulty and the human gap

Table 6 also groups tasks by how long a person needed to finish them: Easy (under 60 seconds), Medium (60 to 180 seconds) and Hard (over 180 seconds). People scored 84.91%, 81.08% and 49.57% in those groups. GPT-4V with Set-of-Mark scored 16.78%, 13.12% and 4.59%.

  1. For Easy tasks, the gap in percentage points is 84.91−16.78=68.1384.91 - 16.78 = 68.13.
  2. For Medium tasks, the gap is 81.08−13.12=67.9681.08 - 13.12 = 67.96.
  3. For Hard tasks, the gap is 49.57−4.59=44.9849.57 - 4.59 = 44.98.
  4. Interpret: the model is far behind people on the easy and medium groups. The gap in points is smaller on hard tasks only because people's scores also fall there, and the model is already close to zero.

Try it: the Medium row has people at 81.08% and the model at 13.12%. What is the gap in percentage points? Answer: 81.08−13.12=67.9681.08 - 13.12 = 67.96 points.

Common mistakes and tradeoffs

It is tempting to think that a benchmark score near 12% means the tasks are obscure; in fact most are ordinary. The paper picked tasks from tutorials, forums and video guides, and people completed 72.36% of them. The difficulty comes from the agent's interface, not from the task content, because the agent has to find the right button on a screen it only sees as pixels.

It is tempting to think that giving the model the accessibility tree always helps; in fact the results depend on the model. For GPT-4V, adding the tree raised the score from 5.26% (screenshot only) to 12.17%. For Gemini-Pro-1.5 it lowered the score slightly, from 5.40% to 5.10%. Set-of-Mark also did not beat plain screenshot plus tree for GPT-4V (11.77 against 12.17). The authors speculate that the cause is the higher resolution and the many small cells in spreadsheets, which add noise that the bounding boxes do not offset.

It is tempting to think that more history always helps; in fact it helps text history and does not help image history. Encoding more text history from the accessibility tree helped, but adding previous screenshots did not improve the screenshot-only setting.

Tradeoffs. Screenshots are universal and match what a person sees, but they require the model to locate pixels precisely, which the paper found to be the main weakness. Accessibility trees are text and easier to reason over, but they can be very long, since even the leaf nodes can reach tens of thousands of tokens, and they are not always available. OSWorld is the right tool when the question is whether an agent can finish real work end to end. It is the wrong tool for quick checks, because each task runs in a full virtual machine and the benchmark took about 1800 person-hours to build.

History

Before 2024, agent evaluation was split into separate worlds. Web benchmarks such as MiniWoB++ and WebArena gave agents a browser, coding benchmarks gave them a repository or a shell, and dataset collections gave them recorded human actions with no live system. The paper argues that none of these tested a general computer, and that the gap mattered because real work often crosses apps.

The paper was posted to arXiv in April 2024, and the authors built the environment on virtual machine snapshots so that every run starts from the same state. Its central move was to make the grader part of the task: each task ships with its own script that checks the outcome. That made it possible to reward any working solution, which the older single-answer datasets could not do. The screenshot input was made practical by vision-language models that can read a full desktop image and predict actions from it.

Reading guide

  • Section 1, Introduction needs LLM Agent and Vision-Language Model. The introduction states the claim that models are far from being computer assistants.
  • Section 2, OSWorld Environment needs Virtual Machine for the snapshots and the isolation, and Partially Observable Markov Decision Process for the task definition in 2.1.
  • Section 3, OSWorld Benchmark needs Benchmark Dataset for the idea of a fixed task set with a scoring rule. Table 4 places it beside other environments.
  • Section 4, Baselines needs In-Context Learning for why the paper uses recent chat turns instead of example pairs, and Transformer for the context-length limits behind the history experiments.
  • Section 5, Analysis needs no new idea beyond the above. Read it for the effect of resolution, window clutter and operating system.
  • Section 6, Related Work is easier after Agent-Computer Interface and ReAct Prompting, which describe ways of structuring what an agent sees and writes.

Recap

  • An agent acts on a real operating system through screenshots and code commands, inside a virtual machine that can be reset to a saved state.
  • Each task has a setup configuration and an evaluation script that checks the final machine state, so any valid solution scores.
  • The benchmark has 369 Ubuntu tasks and 43 Windows tasks; 268 are single-app, 101 are multi-app workflows, and 30 of the 369 are infeasible on purpose.
  • The best result was 12.24% for GPT-4 with an accessibility tree, against 72.36% for people, and screenshot-only models scored between 5.26% and 5.80%.
  • The main failures were imprecise clicks, repeated actions and unfamiliar software; more history helped with text but not with images.

Read next: SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering for a related study of how the commands and feedback an agent sees change its results, and Agent-Computer Interface for the general idea behind that study.

Check yourself

QuestionWhat does the agent output on each step in OSWorld, and how is it run?Show answer
The agent outputs a short pyautogui Python command, such as a click or a key press, or one of the special actions WAIT, FAIL or DONE. The simulator runs the command inside the virtual machine, and the next observation is taken from the changed machine.
QuestionFour tasks get rewards 1, 1, 0 and 0.5. What is the success rate SR, as a percentage?Show answer
The sum is 1+1+0+0.5=2.51 + 1 + 0 + 0.5 = 2.5. Divide by N=4N = 4 to get 0.6250.625, so SR is 62.5%.
QuestionWhy does OSWorld use an evaluation script for each task instead of comparing the agent's actions with one recorded solution?Show answer
Many different action sequences can complete the same task, so matching one recorded solution wrongly penalizes correct alternatives. A script that checks the final state of the machine accepts any solution that achieves the goal. The paper's benchmark has 134 different evaluation functions for this reason.
QuestionA team tests a new agent on OSWorld and sees that it scores well on screenshot-only tasks but poorly when it is given the accessibility tree as well. Name two explanations the paper gives for results like this and one check the team could run.Show answer
The paper says the accessibility tree can mislead some models, and that its usefulness varies across models and settings. It also notes that long trees take up context and that Set-of-Mark can also mislead some models. A useful check is to run the same tasks with the tree truncated or filtered, and to compare the results by task group, such as single-app and workflow tasks.

Sources

Read the full paper

Tianbao Xie, Danyang Zhang, Jixuan Chen et al., 2024. arXiv:2404.07972