新的开源项目解决自动化脚本与交互应用冲突的难题,实现真正的无侵入式后台运行。
在后台驱动原生桌面应用程序。Agent 可以点击、输入和验证,而不会抢占光标或焦点。在 macOS、Windows 和 Linux 上使用相同的 CLI 和 MCP 服务器,可从 Claude Code、Cursor、Codex、OpenClaw 和自定义客户端访问。Linux 支持 X11 和特定合成器的 Wayland 路由,具有明确的原始后台输入限制。
/bin/bash -c "$(curl -fsSL https://cua.ai/driver/install.sh)"
irm https://cua.ai/driver/install.ps1 | iex
然后按照安装后的说明操作。
Drive your first app | Installation | CLI Reference
源代码文档、架构说明和可选的 agent 技能包位于 libs/cua-driver/README.md。
构建可以看到屏幕、点击按钮和自主完成任务的 agent。一个 API 适用于任何 VM 或容器镜像 — 云端或本地。
pip install cua
# 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
Get Started | Examples | API Reference
在 OSWorld、ScreenSpot、Windows Arena 和自定义任务上评估计算机使用 agent。导出轨迹用于训练。
# 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
使用 Apple 的虚拟化框架在 Apple Silicon 上以接近原生性能的方式创建和管理 macOS/Linux VM。
# 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
--unattended 选项在离线状态下准备已安装的 guest。内置的 sequoia 和 tahoe 预设会创建 lume 用户、启用 SSH、配置自动登录,以及禁用睡眠和屏幕锁定。默认凭证为 lume / lume。
Tahoe 流程经过端到端验证。Sequoia 在首次显示启动时可能仍会打开 Setup Assistant 的辅助功能步骤;见 issue #2155。
Get Started | FAQ | CLI Reference
Blog — 教程、更新和研究
Discord — 社区支持和讨论
GitHub Issues — Bug 报告和功能请求
如果 Cua 支持了你的研究,请引用该软件:
@software{cua2025,
author = {{Cua AI, Inc.}},
title = {Cua},
year = {2025},
url = {https://github.com/trycua/cua},
license = {MIT}
}
为了可重现性,请在你的实验中包含使用的 Cua 版本或提交号。引用元数据也可在 CITATION.cff 中获得。
我们欢迎贡献!详见我们的贡献指南。
MIT License — 详见 LICENSE。
第三方组件有各自的许可证:
OmniParser (CC-BY-4.0)
可选的 cua-agent[omni] 包含 ultralytics (AGPL-3.0)
Apple、macOS、Ubuntu、Canonical 和 Microsoft 是各自所有者的商标。本项目与这些公司无关联,也未获得认可。
感谢所有我们的 GitHub 赞助商!