OSWorld

xlang-aiApache-2.0活跃维护

在真实操作系统环境里评测多模态智能体的基准平台,支持开放式任务,覆盖 GUI 操作、命令行和代码生成等场景。

[NeurIPS 2024] OSWorld: Benchmarking Multimodal Agents for Open-Ended Tasks in Real Computer Environments

v0.1.16发布于 2024-06-26 04:22 UTC3,258star +2 / 7 天560fork同步于 2026-11-10 17:43 UTC

怎么上手

由 README 提炼,执行前请确认
git clone https://github.com/xlang-ai/OSWorld
cd OSWorld
pip install -r requirements.txt
python quickstart.py
硬件要求按 README 说明

README 未说明显存要求;需 Python >= 3.10。Docker 后端需宿主机支持 KVM(macOS 一般不支持,建议改用 VMware),VMware/VirtualBox 可跑在桌面、笔记本或裸机上。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

在真实虚拟机里跑多模态 Agent 完成开放式电脑任务的评测基准

在真实操作系统环境里评测多模态智能体的基准平台,支持开放式任务,覆盖 GUI 操作、命令行和代码生成等场景。

核心能力

  • 在真实 Ubuntu/Windows 桌面环境中执行开放式任务
  • 支持截图观察与 pyautogui 动作空间驱动 Agent
  • 提供 VMware、VirtualBox、Docker、AWS、Modal、Daytona 多种后端
  • 用 run_multienv.py 多环境并行批量评测
  • show_result.py 汇总各领域成功率与分类统计

容易踩的坑

需先单独安装 VMware Workstation Pro/Fusion 并配置好 vmrun 命令;部分任务依赖 Google 账号 OAuth2.0 与代理配置,缺失会导致任务失败拉低分数;Docker 实验异常中断会残留容器,需手动 docker stop/rm 清理;发布的 Ubuntu qcow2 镜像可能旧于当前代码,长跑前需查看 guest 镜像更新说明。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

2 个版本v0.1.16
  1. v0.1.16最新正式版2024-06-26 · 2024-06-26 04:22 UTC

    :package: What’s New? VM + Cloud support!

    • New VirtualBox to allow free VM snapshots
    • AWS Support w/ optimized interface mappings and instance types
    • Fixes for reported annotation bugs
    • Support new models from Gemini 1.5-Pro, Llama-3, and Qwen
    • Add more detailed README on proxy and so.

    Contributors

    Thanks to all the contributors who have helped with this release!

  2. v0.1.02024-04-11 · 2024-04-11 15:23 UTC
    查看更新说明

    The first release of the OSWorld environment

    See our README for details!

    Contributors

    Thanks to all the contributors who have helped with this release!

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    📢 Updates

    • 2025-07-28: Introducing OSWorld-Verified! We have made major updates, fixed several issues reported by the community, with more support for AWS (can reduce evaluation time to within 1 hour through parallelization!), and making the benchmark signals more effective. Check out more in the report. We have run new model results in the latest version and updated them on the official website. Please compare your OSWorld results with the new benchmark results when running the latest version.
    • 2025-05-01: If you need pre-downloaded files for init state setup, we downloaded for you here.
    • 2024-10-22: We supported Docker🐳 for hosting virtual machines on virtualized platforms. Check below for detailed instructions!
    • 2024-06-15: We refactor the code of environment part to decompose VMware Integration, and start to support other platforms such as VirtualBox, AWS, Azure, etc. Hold tight!
    • 2024-04-11: We released our paper, environment and benchmark, and project page. Check it out!

    💾 Installation

    VMware/VirtualBox (Desktop, Laptop, Bare Metal Machine)

    Suppose you are operating on a system that has not been virtualized (e.g. your desktop, laptop, bare metal machine), meaning you are not utilizing a virtualized environment like AWS, Azure, or k8s. If this is the case, proceed with the instructions below. However, if you are on a virtualized platform, please refer to the Docker section.

    1. First, clone this repository and cd into it. Then, install the dependencies listed in requirements.txt. It is recommended that you use the latest version of Conda to manage the environment, but you can also choose to manually install the dependencies. Please ensure that the version of Python is >= 3.10.
    # Clone the OSWorld repository
    git clone https://github.com/xlang-ai/OSWorld
    
    # Change directory into the cloned repository
    cd OSWorld
    
    # Optional: Create a Conda environment for OSWorld
    # conda create -n osworld python=3.10
    # conda activate osworld
    
    # Install required dependencies
    pip install -r requirements.txt
    

    Alternatively, you can install the environment without any benchmark tasks:

    pip install desktop-env
    
    1. Install VMware Workstation Pro (for systems with Apple Chips, you should install VMware Fusion) and configure the vmrun command. The installation process can refer to How to install VMware Workstation Pro. Verify the successful installation by running the following:
    vmrun -T ws list
    

    If the installation along with the environment variable set is successful, you will see the message showing the current running virtual machines.

    Note: We also support using VirtualBox if you have issues with VMware Pro. However, features such as parallelism and macOS on Apple chips might not be well-supported.

    All set! Our setup script will automatically download the necessary virtual machines and configure the environment for you.

    Docker (Server with KVM Support for Better Performance)

    The published Ubuntu qcow2 image may contain an older guest server than this checkout. Before long runs, read the guest image update notice: the image tracked in #596 predates the X11 connection leak fix in #500. Updating the host checkout or the recording routes alone does not update the guest screenshot handler.

    If you are running on a non-bare metal server, or prefer not to use VMware and VirtualBox platforms, we recommend using our Docker support.

    Prerequisite: Check if your machine supports KVM

    We recommend running the VM with KVM support. To check if your hosting platform supports KVM, run

    egrep -c '(vmx|svm)' /proc/cpuinfo
    

    on Linux. If the return value is greater than zero, the processor should be able to support KVM.

    Note: macOS hosts generally do not support KVM. You are advised to use VMware if you would like to run OSWorld on macOS.

    Install Docker

    If your hosting platform supports a graphical user interface (GUI), you may refer to Install Docker Desktop on Linux or Install Docker Desktop on Windows based on your OS. Otherwise, you may Install Docker Engine.

    Running Experiments

    Add the following arguments when initializing DesktopEnv:

    • provider_name: docker
    • os_type: Ubuntu or Windows, depending on the OS of the VM

    Note: If the experiment is interrupted abnormally (e.g., by interrupting signals), there may be residual docker containers which could affect system performance over time. Please run docker stop $(docker ps -q) && docker rm $(docker ps -a -q) to clean up.

    Modal

    Modal runs OSWorld with VM Sandboxes. Install the SDK, get started and authenticate with modal setup, follow the setup instructions below, and run evaluations with --provider_name modal. For more details, see Modal Provider.

    pip install 'modal>=1.6.0'
    modal setup
    # Stage OSWorld disk image into Modal
    python -m desktop_env.providers.modal.setup --os Ubuntu
    # Run OSWorld with Modal Sandboxes
    python quickstart.py --provider_name modal --headless true
    

    Daytona

    Daytona runs OSWorld in a Daytona sandbox with the sandbox itself acting as the desktop, so it does not need host KVM or the Docker qcow2 flow. Install the SDK, set a Daytona API key and snapshot name, then run OSWorld; see Daytona Provider for snapshot build, smoke test, port forwarding, and tier limitations.

    pip install daytona
    export DAYTONA_API_KEY=...
    export DAYTONA_OSWORLD_SNAPSHOT=osworld-debian-v1
    python quickstart.py --provider_name daytona --headless True
    

    AWS

    Using cloud services for parallel evaluation can significantly accelerate evaluation efficiency (can reduce evaluation time to within 1 hour through parallelization!) and can even be used as infrastructure for training. We provide comprehensive AWS support with a Host-Client architecture that enables large-scale parallel evaluation of OSWorld tasks. For detailed setup instructions, see Setup Guideline and AWS Configuration Guide.

    Others

    We are working on supporting more 👷. Please hold tight!

    🚀 Quick Start

    Run the following minimal example to interact with the environment:

    # Basic usage with default settings
    python quickstart.py
    
    # Customize provider and VM path
    python quickstart.py --provider_name vmware --path_to_vm "path/to/your/vm.vmx"
    

    You will see all the logs of the system running normally, including the successful creation of the environment, completion of setup, and successful execution of actions. In the end, you will observe a successful right-click on the screen, which means you are ready to go.

    🧪 Experiments

    Agent Baselines

    ⚠️ Important Configuration Requirements:

    • Google Account Tasks: Some tasks require Google account access and OAuth2.0 configuration. Please refer to Setup Guideline - Google Account Setup for detailed setup instructions.
    • Proxy Configuration: Some tasks may require proxy settings to function properly (this depends on the strength of website defenses against your network location). Please refer to Setup Guideline - Proxy Configuration.
    • Impact of Missing Configuration: If these configurations are not properly set up, the corresponding tasks will fail to execute correctly, leading to lower evaluation scores.

    If you wish to run the baseline agent used in our paper, you can execute the following command as an example under the GPT-4o pure-screenshot setting:

    Set OPENAI_API_KEY environment variable with your API key

    export OPENAI_API_KEY='changeme'
    

    Optionally, set OPENAI_BASE_URL to use a custom OpenAI-compatible API endpoint

    export OPENAI_BASE_URL='http://your-custom-endpoint.com/v1'  # Optional: defaults to https://api.openai.com
    

    Single-threaded execution (deprecated, using vmware provider as example)

    python run.py \
        --provider_name vmware \
        --path_to_vm Ubuntu/Ubuntu.vmx \
        --headless \
        --observation_type screenshot \
        --model gpt-4o \
        --sleep_after_execution 3 \
        --max_steps 15 \
        --result_dir ./results \
        --client_password password
    

    Parallel execution (example showing switching provider to docker)

    python scripts/python/run_multienv.py \
        --provider_name docker \
        --headless \
        --observation_type screenshot \
        --model gpt-4o \
        --sleep_after_execution 3 \
        --max_steps 15 \
        --num_envs 10 \
        --client_password password
    

    If a task needs a host-side credential or other secret inside the VM, inject it at startup instead of baking it into the VM image:

    python scripts/python/run_multienv.py \
        --provider_name docker \
        --vm_secret_mount /path/to/google-sa.json:/opt/osworld/secrets/google-sa.json
    

    The results, which include screenshots, actions, and video recordings of the agent's task completion, will be saved in the ./results (or other result_dir you specified) directory in this case. You can then run the following command to obtain the result:

    # Basic usage with default parameters
    python show_result.py
    
    # Specify custom parameters
    python show_result.py \
        --action_space pyautogui \
        --model gpt-4o \
        --observation_type screenshot \
        --result_dir ./results
    
    # Show detailed scores per domain (format: score/total)
    python show_result.py --detailed
    

    The script will display:

    • Per-domain success rates
    • Category-level statistics (Office, Daily, Professional)
    • Overall success rate and total score
    • With --detailed flag: compact format showing "score/total" for each domain

    Manual Task Examination

    For manual verification and examination of specific benchmark tasks, you can use the manual examination tool:

    python scripts/python/manual_examine.py \
        --headless \
        --observation_type screenshot \
        --result_dir ./results_human_examine \
        --test_all_meta_path evaluation_examples/test_all.json \
        --domain libreoffice_impress \
        --example_id a669ef01-ded5-4099-9ea9-25e99b569840 \
        --max_steps 3
    

    This tool allows you to:

    • Manually execute tasks in the environment
    • Verify task correctness and evaluation metrics
    • Record the execution process with screenshots and videos
    • Examine specific problematic tasks

    See scripts/bash/run_manual_examine.sh for example task IDs across different domains.

    Evaluation

    Local Evaluation

    Please start by reading through the agent interface and the environment interface. Correctly implement the agent interface and import your customized version in the run.py (for single-threaded execution) or scripts/python/run_multienv.py / scripts/python/run_multienv_xxx.py (for parallel execution) file. Afterward, you can execute a command similar to the one in the previous section to run the benchmark on your agent.

    Public Evaluation

    If you want your results to be verified and displayed on the verified leaderboard, you need to schedule a meeting with us (current maintainer: [email protected], [email protected]) to run your agent code on our side and have us report the results. You need to upload and allow us to disclose your agent implementation under the OSWorld framework (you may choose not to expose your model API to the public), along with a report that allows the public to understand what's happening behind the scenes. Alternatively, if you are from a trusted institution, you can share your monitoring data and trajectories with us. Please carefully follow the Setup Guideline - Public Evaluation Platform to get results.

    ❓ FAQ

    What is the username and password for the virtual machines?

    The username and password for the virtual machines are as follows (for provider vmware, virtualbox and docker): we set the account credentials for Ubuntu as user / password. For cloud service providers like aws, to prevent attacks due to weak passwords, we default to osworld-public-evaluation. If you make further modifications, remember to set the client_password variable and pass it to DesktopEnv and Agent (if supported) when running experiments. Some features like setting up proxy require the environment to have the client VM password to obtain sudo privileges, and for some OSWorld tasks, the agent needs the password to obtain sudo privileges to complete them.

    How to setup the account and credentials for Google and Google Drive?

    See Setup Guideline - Google Account Setup.

    How can I configure a proxy for the VM (if I'm behind the GFW, or I don't want some of my tasks to be identified as bot and get lower scores)?

    See Setup Guideline - Proxy Configuration. We also provide a pre-configured solution based on DataImpulse, please refer to the proxy setup section.

    Open Source Contributors

    Thanks to all the contributors!

    📄 Citation

    If you find this environment useful, please consider citing our work:

    @misc{OSWorld,
          title={OSWorld: Benchmarking Multimodal Agents for Open-Ended Tasks in Real Computer Environments}, 
          author={Tianbao Xie and Danyang Zhang and Jixuan Chen and Xiaochuan Li and Siheng Zhao and Ruisheng Cao and Toh Jing Hua and Zhoujun Cheng and Dongchan Shin and Fangyu Lei and Yitao Liu and Yiheng Xu and Shuyan Zhou and Silvio Savarese and Caiming Xiong and Victor Zhong and Tao Yu},
          year={2024},
          eprint={2404.07972},
          archivePrefix={arXiv},
          primaryClass={cs.AI}
    }
    

    Acknowledgement for OSWorld-Verified

    Special thanks to the following institutions that provided feedback and participated in the fixes (as well as institutions that provided feedback during the process): MoonShot AI, a.k.a. Kimi,Human Data, OpenAI, ByteDance Seed TARS, Anthropic, Simular, HKU Data Intelligence Lab

    Special thanks to the following students who participated in the specific fixes: Mengqi Yuan, Danyang Zhang, Xinzhuang Xiong, Zhennan Shen, Zilong Zhou, Yanxu Chen, Jiaqi Deng, Tianbao Xie, Junda Chen, Jixuan Chen, Haoyuan Wu.

    Special thanks to the following students who participated in running the re-evaluation: Mengqi Yuan, Zilong Zhou, Xinyuan Wang, Bowen Wang.

    You might also be interested

    • OSWorld-MCP: Benchmarking MCP Tool Invocation in Computer-Use Agents. Website