最后更新:11/18/2026最后核验:2026-11-04
agent-desktop 的核心是"观察—操作—验证"循环:智能体先用 snapshot 把桌面应用的界面读取为带元素引用的 JSON 快照,再对引用执行点击、按键等操作,最后重新读取界面确认结果确实生效。它只通过操作系统无障碍 API(macOS 的 AX、Windows 的 UI Automation、Linux 的 AT-SPI)访问应用,不做像素匹配,也不自动化网页——网页场景应使用同家的 agent-browser,对 Chromium 或 Electron 应用则可打开 DevTools 端口配合驱动。工具以 npm 全局 CLI 和 C 库(FFI)两种形态分发,60 个命令在三个平台上名称一致;不含任何模型、没有 GUI,也不驻留交互式会话,每条命令只输出一个 JSON 信封后退出。需要注意:它受应用暴露的无障碍树限制,部分平台上的按键与鼠标事件、权限授权等动作会失败关闭;运行方还需自行授予对应系统的辅助功能权限。本项目为 Vercel Labs 出品、Apache 2.0 许可,仓库拥有约 45k star、801 次提交的活跃维护。本文依据官方文档站与 GitHub 仓库核验,未执行安装或自动化操作。
-
读取无障碍树快照、按引用操作并重新验证结果
-
跨 macOS(AX API)、Windows(UI Automation)、Linux(AT-SPI)统一 60 个命令
-
CLI 与 C 库两种形态,可让智能体在进程内直接驱动
-
与 agent-browser 搭配覆盖网页与 Chromium/Electron 应用内容
详情
平台
macOSWindowsLinuxAPI
功能特性
- Observe-act-verify loop: read a desktop app as a compact accessibility snapshot, act on refs, then re-read to verify
- Same 60 cross-platform commands driving AX API, UI Automation, and AT-SPI on macOS, Windows, and Linux
- Ships as a global npm CLI and a C library (FFI) so agents can drive apps in-process
- Pairs with agent-browser to drive Chromium/Electron app contents without pixel-based screen matching
支持语言
en
适合人群
AI agents driving native desktop apps that expose an accessibility treeDevelopers automating cross-platform desktop workflows from shell scriptsTeams combining browser and desktop automation under one agent harness
已知限制
- It is a tool agents call, not an agent itself; the observe-act-verify loop lives in the calling code
- Limited to what apps expose via accessibility APIs and cannot match pixels or automate web pages
- Desktop actions like permission grants and some key/mouse events fail closed on hardened surfaces
- No model, GUI, or interactive prompt inside — every command prints one JSON envelope and exits
替代工具
agent-browser — Same observe-act-verify loop for web pages instead of native desktop apps
Desktop Commander — Terminal and file-operation automation rather than UI-level desktop control






