CUA-Gym
收藏资源简介:
CUA-Gym是一个用于强化学习且具有可验证奖励(RLVR)的计算机使用智能体任务集合。每个任务将一个自然语言指令与可执行的设置工件以及一个用于程序化检查任务完成情况的Python奖励函数配对。数据集旨在为计算机使用智能体、GUI智能体、RLVR和程序化奖励设计、合成任务生成、可执行的桌面和Web评估以及后训练数据过滤和扩展研究提供研究环境。当前公开预览版包含从CUA-Gym任务池中随机采样的一个子集,包含7,897个任务,23,691个原始任务文件,未压缩的本地工件大小约为160 MB。数据集涵盖264种应用类型,其中5,322个任务带有难度标签,2,575个任务暂无难度标签。主要应用类别包括LibreOffice套件(Calc、Writer、Impress)、多应用场景、VSCode、PDF以及模拟Web应用(如Instagram模拟、HubSpot模拟、Google Docs模拟、Outlook Web模拟、Google Sheets模拟等)。数据集采用两层Hugging Face布局:1)`data/`目录下的Parquet元数据表,用于快速浏览和程序化过滤;2)`artifacts/`目录下的压缩工件存档,包含原始可执行任务包。每个任务包包含`task.json`、`reward.py`以及一个设置工件(如`.py`、`.sh`、`.xlsx`、`.docx`、`.pptx`文件)。通过Dataset Viewer暴露的`tasks`表包含15个字段,包括任务ID、指令、应用类型、应用家族、平台、难度、设置工件类型、设置步骤数、设置文件数、是否包含真实值、存档路径、存档成员、任务JSON成员、奖励成员和设置文件成员列表。需要注意的是,部分Web任务设置和奖励文件需要CUA-Gym-Hub模拟应用端点。公开版本将这些端点存储为占位符(如`__CUA_GYM_GMAIL_URL__`),而非硬编码的托管URL。为了可靠使用,用户需要自行部署相应的CUA-Gym-Hub应用,设置`url_variables.json`中列出的端点变量,并在运行设置或奖励代码之前具体化提取的任务文件。发布方托管的`xlang.ai`端点仅作为参考和冒烟测试使用,不应作为大规模训练或评估的依赖。由于工件存档包含创建文件、修改本地状态、打开应用程序和运行奖励检查的Python和Shell脚本,因此必须将任务视为不受信任的可执行工件,建议在一次性虚拟机或容器中运行,避免在个人工作站上运行设置脚本,并禁用对私有文件、凭证、云令牌和生产服务的访问。
CUA-Gym is a collection of computer-usage agent tasks for reinforcement learning with verifiable rewards (RLVR). Each task pairs a natural language instruction with executable setup artifacts and a Python reward function for programmatically checking task completion. The dataset is designed to provide a research environment for computer-usage agents, GUI agents, RLVR and programmatic reward design, synthetic task generation, executable desktop and web evaluation, and post-training data filtering and scaling research. The current public preview includes a randomly sampled subset from the CUA-Gym task pool, containing 7,897 tasks, 23,691 raw task files, with uncompressed local artifacts of approximately 160 MB. The dataset covers 264 application types, with 5,322 tasks labeled for difficulty and 2,575 tasks currently unlabeled. Major application categories include the LibreOffice suite (Calc, Writer, Impress), multi-application scenarios, VSCode, PDF, and simulated web applications (e.g., Instagram simulation, HubSpot simulation, Google Docs simulation, Outlook Web simulation, Google Sheets simulation). The dataset adopts a two-layer Hugging Face layout: 1) Parquet metadata tables under the `data/` directory for quick browsing and programmatic filtering; 2) compressed artifact archives under the `artifacts/` directory containing the original executable task packages. Each task package includes `task.json`, `reward.py`, and a setup artifact (e.g., `.py`, `.sh`, `.xlsx`, `.docx`, `.pptx` files). The `tasks` table exposed via the Dataset Viewer contains 15 fields, including task ID, instruction, application type, application family, platform, difficulty, setup artifact type, number of setup steps, number of setup files, presence of ground truth, archive path, archive member, task JSON member, reward member, and list of setup file members. Note that some web task setup and reward files require CUA-Gym-Hub simulated application endpoints. The public version stores these endpoints as placeholders (e.g., `__CUA_GYM_GMAIL_URL__`) rather than hard-coded hosted URLs. For reliable usage, users need to deploy the corresponding CUA-Gym-Hub applications themselves, set the endpoint variables listed in `url_variables.json`, and concretize extracted task files before running setup or reward code. The publisher-hosted `xlang.ai` endpoints are for reference and smoke testing only and should not be relied upon for large-scale training or evaluation. Since artifact archives contain Python and Shell scripts that create files, modify local state, open applications, and run reward checks, tasks must be treated as untrusted executable artifacts. It is recommended to run them in disposable virtual machines or containers, avoid running setup scripts on personal workstations, and disable access to private files, credentials, cloud tokens, and production services.
CUA-Gym 数据集概述
数据集基本信息
- 数据集名称: CUA-Gym
- 许可证: CC-BY-4.0
- 语言: 英语 (en)
- 任务类别: 强化学习、文本生成
- 数据集规模: 1K < n < 10K(当前版本包含 7,897 个任务)
- 配置: 单个配置
tasks
数据集定位与用途
CUA-Gym 是一个面向计算机使用智能体的可验证任务集合,专门用于带可验证奖励的强化学习(RLVR)。每个任务包含:
- 自然语言指令
- 可执行的设置工件
- 用于程序化检查任务完成情况的 Python 奖励函数
预期研究用途:
- 计算机使用智能体与 GUI 智能体研究
- RLVR 与程序化奖励设计
- 合成任务生成
- 可执行桌面与网页评估
- 训练后数据过滤与规模缩放研究
数据集结构
仓库布局
text README.md stats.json url_variables.json data/ tasks.parquet artifacts/ cua_gym_tasks_v1.tar.zst scripts/ materialize_dataset_urls.py
任务包结构
每个任务在归档文件中以独立目录形式存在,包含:
task.json:任务配置reward.py:奖励函数- 设置工件文件(格式不定):
initial_setup.py、initial_setup.sh、initial_setup.xlsx、initial_setup.docx、initial_setup.pptx
元数据表字段
| 字段 | 说明 |
|---|---|
id |
稳定任务标识符 |
instruction |
展示给智能体的自然语言任务指令 |
app_type |
应用或环境标签(如 libreoffice_calc、vscode、instagram_mock、multi_apps) |
app_family |
粗粒度应用家族(desktop_office、desktop、mock_web、multi_apps、other) |
platform |
粗粒度平台(desktop、web、cross_app) |
difficulty |
难度标签(部分任务未标注) |
setup_kind |
设置工件类型(如 py、sh、xlsx、docx、pptx) |
num_setup_steps |
原始任务配置中的设置动作数量 |
num_setup_files |
配置引用的设置工件数量 |
has_ground_truth |
是否包含 ground_truth 字段 |
archive_path |
包含原始任务包的归档文件路径 |
archive_member |
归档内的任务目录 |
task_json_member |
归档内 task.json 的路径 |
reward_member |
归档内 reward.py 的路径 |
setup_file_members |
归档内设置工件文件的路径 |
数据集统计信息
| 指标 | 数值 |
|---|---|
| 任务总数 | 7,897 |
| 原始任务文件数 | 23,691 |
| 未压缩工件大小 | 约 160 MB |
app_type 取值数量 |
264 |
| 已标注难度的任务数 | 5,322 |
| 未标注难度的任务数 | 2,575 |
主要应用类别
libreoffice_calc(LibreOffice 表格)libreoffice_writer(LibreOffice 文档)libreoffice_impress(LibreOffice 演示)multi_apps(多应用组合)vscode(代码编辑器)pdf(PDF 相关)- 模拟网页应用,如:
instagram_mock、hubspot_mock、google_docs_mock、outlook_web_mock、google_sheets_mock
使用说明
数据加载
python from datasets import load_dataset tasks = load_dataset("xlangai/CUA-Gym", "tasks", split="train")
任务过滤
python calc_hard = tasks.filter( lambda row: row["app_type"] == "libreoffice_calc" and row["difficulty"] == "hard" )
下载原始任务包
bash huggingface-cli download xlangai/CUA-Gym --repo-type dataset --local-dir ./CUA-Gym-data --include "artifacts/cua_gym_tasks_v1.tar.zst" "scripts/materialize_dataset_urls.py" "url_variables.json" "data/tasks.parquet"
解压归档
bash mkdir -p ./cua_gym_tasks tar --zstd -xf ./CUA-Gym-data/artifacts/cua_gym_tasks_v1.tar.zst -C ./cua_gym_tasks
关键注意事项
- 自托管网页端点: 部分网页任务的设置和奖励文件需要使用 CUA-Gym-Hub 模拟应用端点。公开版本将端点存储为占位符(如
__CUA_GYM_GMAIL_URL__),用户需自行部署对应应用并设置环境变量。 - 安全执行: 设置和奖励文件是可执行代码,应仅在隔离的虚拟机、容器或沙箱中运行。
- 已知限制: 奖励仅评估最终环境状态;部分任务缺少难度标签;模拟网页任务可能缺失真实网络行为。
引用信息
bibtex @misc{cua-gym, title = {CUA-Gym: Scaling Verifiable Training Environments and Tasks for Computer-Use Agents}, author = {{CUA-Gym Team}}, year = {2026}, howpublished = {url{https://huggingface.co/datasets/xlangai/CUA-Gym}} }




