开源项目 GitHub Trending 2026-07-19T12:00 正文 ok 685 words

🔥 trycua/cua:开源计算机使用 2.0 驱动、跨系统集群与基准测试套件

英文标题:🔥 trycua/cua

Cua 项目为计算机使用智能体提供开源驱动(支持 macOS/Windows/Linux 后台操作)、统一 API 的沙箱环境(Linux、macOS、Windows、Android)以及基准测试与强化学习环境 Cua-Bench。开发者可以使用同一套 CLI 和 MCP 服务器在 Claude Code、Cursor 等客户端中操控原生应用,或通过 Python SDK 快速创建跨操作系统沙箱以训练和评估模型。此外,Lume 工具在 Apple Silicon 上实现接近原生的 macOS/Linux 虚拟化。这些工具链大幅降低了构建、评估与扩展计算机使用智能体的门槛,对代理开发者和模型研究者具有重要工程价值。
打开原文相关 2 · 机会 4
media5.9 KB media5.9 KB media988 B media3.2 KB media1.7 KB media978 B media5.1 KB media2.2 MB media3.5 MB media2.6 MB media2.2 MB media153.8 KB media65.8 KB

中文

在构建自己的智能体? 从 Cua 开始 · 想给编程智能体配置一台电脑? Cua Drivers · 评估或训练模型? Cua Bench · 需要 macOS 虚拟机? Lume


Cua Drivers - 在 macOS、Windows 和 Linux 上后台进行计算机使用

在后台驱动原生桌面应用。智能体可以点击、输入和验证,而不会抢占光标或焦点。在 macOS、Windows 和 Linux 上使用相同的 CLI 和 MCP 服务器,从 Claude Code、Cursor、Codex、OpenClaw 以及自定义客户端均可调用。Linux 同时支持 X11 和针对特定合成器的 Wayland 路径,并为原始后台输入设置了明确限制。

macOS / Linux

/bin/bash -c "$(curl -fsSL https://cua.ai/driver/install.sh)"

Windows (PowerShell)

irm https://cua.ai/driver/install.ps1 | iex

安装后请按照后续说明进行操作。

驱动你的第一个应用 | 安装说明 | CLI 参考

源代码、架构说明以及可选的智能体技能包位于 libs/cua-driver/README.md。


Cua - 适用于任何操作系统的智能体就绪沙箱

构建能够看见屏幕、点击按钮并自主完成任务的智能体。一套 API 适用于任何虚拟机或容器镜像 —— 云端或本地皆可。

# 需要 Python 3.11 或更高版本
from cua import Sandbox, Image

# 无论操作系统或运行时环境,API 保持一致
async with Sandbox.ephemeral(Image.linux()) as sb:   # 也可使用 .macos() .windows() .android()
    result = await sb.shell.run("echo hello")
    screenshot = await sb.screenshot()
    await sb.mouse.click(100, 200)
    await sb.keyboard.type("Hello from Cua!")
    await sb.mobile.gesture((100, 500), (100, 200))  # 多点触控手势
Linux 容器 Linux 虚拟机 macOS Windows Android BYOI (.qcow2, .iso)
云端 (cua.ai) ✅ ✅ ✅ ✅ ✅ 🔜 即将推出
本地 (QEMU) ✅ ✅ ✅ ✅ ✅ ✅

开始使用 | 示例 | API 参考


Cua-Bench - 基准测试与强化学习环境

在 OSWorld、ScreenSpot、Windows Arena 以及自定义任务上评估计算机使用智能体,并导出轨迹用于训练。

# 克隆仓库、安装并创建基础镜像
git clone https://github.com/trycua/cua && cd cua/cua-bench
uv tool install -e . && cb image create linux-docker

# 使用智能体运行基准测试
cb run dataset datasets/cua-bench-basic --agent cua-agent --max-parallel 4

开始使用 | 与我们合作 | 注册中心 | CLI 参考


Lume - macOS 虚拟化

利用 Apple 的 Virtualization.Framework 在 Apple Silicon 上创建和管理 macOS/Linux 虚拟机,性能接近原生。

# 安装 Lume
/bin/bash -c "$(curl -fsSL https://cua.ai/lume/install.sh)"

# 从 Apple 恢复镜像创建并启动一个纯净的 macOS 虚拟机
curl -L "$(lume ipsw | tail -n 1)" -o ~/Downloads/macos-tahoe.ipsw
lume create macos-tahoe --ipsw ~/Downloads/macos-tahoe.ipsw --unattended tahoe
lume run macos-tahoe

--unattended 选项会离线准备安装好的客户机系统。内置的 sequoia 和 tahoe 预设会创建 lume 用户、启用 SSH、配置自动登录并禁用睡眠和屏幕锁定。默认凭据为 lume / lume。

Tahoe 流程已经过端到端验证。Sequoia 在首次显示启动时可能仍会打开“设置助理”中的“辅助功能”步骤;请参阅 issue #2155。

开始使用 | 常见问题 | CLI 参考


包名 描述
cua-driver 适用于 macOS、Windows 和 Linux 的后台计算机使用智能体
cua-agent 用于计算机使用任务的 AI 智能体框架
cua-sandbox 用于创建和控制沙箱的 SDK
cua-computer-server 用于在沙箱中进行 UI 交互和代码执行的驱动程序
cua-bench 用于计算机使用的基准测试和强化学习环境
lume 在 Apple Silicon 上管理 macOS/Linux 虚拟机
lumier 面向 Lume 虚拟机的 Docker 兼容接口

如果 Cua 支持了您的研究工作,请引用该软件:

@software{cua2025,
  author  = {{Cua AI, Inc.}},
  title   = {Cua},
  year    = {2025},
  url     = {https://github.com/trycua/cua},
  license = {MIT}
}

为保证可复现性,请注明您在实验中使用的 Cua 发布版本或提交记录。引用元数据也可在 CITATION.cff 中找到。

我们欢迎贡献!请参阅贡献指南了解详情。

MIT 许可证 — 详见 LICENSE。

第三方组件拥有各自的许可证:

  • Kasm (MIT)
  • OmniParser (CC-BY-4.0)
  • 可选的 cua-agent[omni] 包含 ultralytics (AGPL-3.0)

Apple、macOS、Ubuntu、Canonical 和 Microsoft 是其各自所有者的商标。本项目与这些公司无关联,亦未获得其认可。

English / 原文

Building your own agent? Start with Cua · Giving a coding agent a computer? Cua Drivers · Evaluating or training models? Cua Bench · Need macOS VMs? Lume


Cua Drivers - Background computer-use on macOS, Windows, and Linux

Drive native desktop apps in the background. Agents click, type, and verify without stealing the cursor or focus. Use the same CLI and MCP server on macOS, Windows, and Linux from Claude Code, Cursor, Codex, OpenClaw, and custom clients. Linux supports X11 and compositor-specific Wayland routes with explicit limits for raw background input.

macOS / Linux

/bin/bash -c "$(curl -fsSL https://cua.ai/driver/install.sh)"

Windows (PowerShell)

irm https://cua.ai/driver/install.ps1 | iex

Then follow the post-install instructions.

Drive your first app | Installation | CLI Reference

Source documentation, architecture notes, and the optional agent skill pack live in libs/cua-driver/README.md.


Cua - Agent-Ready Sandboxes for Any OS

Build agents that see screens, click buttons, and complete tasks autonomously. One API for any VM or container image — cloud or local.

# Requires Python 3.11 or later
from cua import Sandbox, Image

# Same API regardless of OS or runtime
async with Sandbox.ephemeral(Image.linux()) as sb:   # or .macos() .windows() .android()
    result = await sb.shell.run("echo hello")
    screenshot = await sb.screenshot()
    await sb.mouse.click(100, 200)
    await sb.keyboard.type("Hello from Cua!")
    await sb.mobile.gesture((100, 500), (100, 200))  # multi-touch gestures

| Linux container | Linux VM | macOS | Windows | Android | BYOI (.qcow2, .iso)
---|---|---|---|---|---|---
Cloud (cua.ai) | ✅ | ✅ | ✅ | ✅ | ✅ | 🔜 soon
Local (QEMU) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅

Get Started | Examples | API Reference


Cua-Bench - Benchmarks & RL Environments

Evaluate computer-use agents on OSWorld, ScreenSpot, Windows Arena, and custom tasks. Export trajectories for training.

# Clone, install, and create base image
git clone https://github.com/trycua/cua && cd cua/cua-bench
uv tool install -e . && cb image create linux-docker

# Run benchmark with agent
cb run dataset datasets/cua-bench-basic --agent cua-agent --max-parallel 4

Get Started | Partner With Us | Registry | CLI Reference


Lume - macOS Virtualization

Create and manage macOS/Linux VMs with near-native performance on Apple Silicon using Apple's Virtualization.Framework.

# Install Lume
/bin/bash -c "$(curl -fsSL https://cua.ai/lume/install.sh)"

# Create and start a vanilla macOS VM from an Apple restore image
curl -L "$(lume ipsw | tail -n 1)" -o ~/Downloads/macos-tahoe.ipsw
lume create macos-tahoe --ipsw ~/Downloads/macos-tahoe.ipsw --unattended tahoe
lume run macos-tahoe

The --unattended option prepares the installed guest offline. The built-in sequoia and tahoe presets create the lume user, enable SSH, configure autologin, and disable sleep and screen locking. The default credentials are lume / lume.

The Tahoe flow is E2E verified. Sequoia may still open the Accessibility step of Setup Assistant on its first display boot; see issue #2155.

Get Started | FAQ | CLI Reference


Package Description
cua-driver Background computer-use agent for macOS, Windows, and Linux
cua-agent AI agent framework for computer-use tasks
cua-sandbox SDK for creating and controlling sandboxes
cua-computer-server Driver for UI interactions and code execution in sandboxes
cua-bench Benchmarks and RL environments for computer-use
lume macOS/Linux VM management on Apple Silicon
lumier Docker-compatible interface for Lume VMs

If Cua supports your research, please cite the software:

@software{cua2025,
  author  = {{Cua AI, Inc.}},
  title   = {Cua},
  year    = {2025},
  url     = {https://github.com/trycua/cua},
  license = {MIT}
}

For reproducibility, include the Cua release or commit used in your experiments. Citation metadata is also available in CITATION.cff.

We welcome contributions! See our Contributing Guidelines for details.

MIT License — see LICENSE for details.

Third-party components have their own licenses:

  • Kasm (MIT)
  • OmniParser (CC-BY-4.0)
  • Optional cua-agent[omni] includes ultralytics (AGPL-3.0)

Apple, macOS, Ubuntu, Canonical, and Microsoft are trademarks of their respective owners. This project is not affiliated with or endorsed by these companies.