An open-source Computer Use service exposed as an MCP server, letting AI agents control macOS, Linux, and Windows desktops.
vercel-labs/agent-desktop
A CLI and C library that lets AI agents read and operate desktop apps on macOS, Windows and Linux via OS accessibility trees.
- Stars
- 18,740
- Forks
- 1,367
- Open issues
- 26
- Last commit
- 18 hours ago
What is it?
agent-desktop gives AI agents computer use on the desktop without relying on screenshots or pixel matching. A snapshot returns JSON listing every element an agent can act on, each with a stable ref. The agent acts on a ref, takes a new snapshot to verify the result, and repeats, with the decision loop kept in the agent itself.
It runs on macOS, Windows and Linux, and is distributed as an npm package with native binaries for x64 and ARM64, or as release archives. Linux support depends on AT-SPI, and some features differ by platform and display server, such as X11 versus Wayland. Ref actions are headless by default, moving neither the pointer nor focus, and a global --headed flag enables physical input.
The project also ships a C FFI library so programs can call it in process, with Python examples in the README. Snapshots and screenshots may contain private desktop content, so the project documents keeping them out of public logs.
Key features
- 01Returns accessibility-tree snapshots as JSON with a ref for each actionable element.
- 02Refs are tied to their snapshot, and stale or ambiguous targets are reported as errors.
- 03Headless ref actions avoid moving the pointer or taking focus by default.
- 04Covers observing, clicking, typing, window management, clipboard and notifications.
- 05Ships a C FFI library for in-process calls from other languages.
Use cases
- Letting an AI agent operate native desktop apps that have no API.
- Automating repetitive GUI workflows across macOS, Windows or Linux.
- Building computer-use agents that verify each action with a fresh snapshot.
- Embedding desktop automation in other programs through the C library.
Quick start
- 1
Install the package globally with npm
npm install -g agent-desktop - 2
Check the installed version
agent-desktop version - 3
Grant Accessibility permission on macOS (see the guide)
agent-desktop permissions --guide - 4
Take an interactive snapshot of an app such as Finder
agent-desktop snapshot --app Finder -i
Things to know
- Accessibility permission is required on macOS, and Linux needs a graphical session with at-spi2-core.
- Several features are platform-limited, such as Wayland screenshots and GNOME-only notifications on Linux.
- Key-down, key-up, mouse-down and mouse-up commands are not operational yet.
- Snapshots and screenshots can expose private desktop content, so keep them out of public logs.
In collections
Topics
FAQ
- What is agent-desktop?
- A CLI and C library that lets AI agents read and operate desktop apps on macOS, Windows and Linux via OS accessibility trees. agent-desktop gives AI agents computer use on the desktop without relying on screenshots or pixel matching. A snapshot returns JSON listing every element an agent can act on, each with a stable ref. The agent acts on a ref, takes a new snapshot to verify the result, and repeats, with the decision loop kept in the agent itself.
- Is agent-desktop free to use? What license does it have?
- agent-desktop is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is agent-desktop still maintained?
- Actively maintained. The last commit to agent-desktop was on Nov 7, 2026.
- What can I use agent-desktop for?
- Letting an AI agent operate native desktop apps that have no API. Automating repetitive GUI workflows across macOS, Windows or Linux. Building computer-use agents that verify each action with a fresh snapshot. Embedding desktop automation in other programs through the C library.
- How do I install agent-desktop?
- Install the package globally with npm: npm install -g agent-desktop Check the installed version: agent-desktop version Grant Accessibility permission on macOS (see the guide): agent-desktop permissions --guide Take an interactive snapshot of an app such as Finder: agent-desktop snapshot --app Finder -i
- Where can I get agent-desktop?
- The source code and installation instructions are on GitHub: https://github.com/vercel-labs/agent-desktop
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Open-source computer-use toolkit giving AI agents desktops to operate, with Cua Driver, Lume VMs, cross-OS sandboxes and Cua Bench evaluation.
Exposes Codex's computer-use runtime to any agent harness on macOS and Linux, without Codex authentication.
An open-source computer use agent framework that controls a real GUI with mouse, keyboard and screen to complete tasks in desktop and web apps.
An unofficial plugin for OpenCode Desktop that adds computer use on Windows and Android, a provider editor with model fetching, and scheduled prompts.
Native Rust CLI that lets AI agents drive a Chrome browser through snapshots, element refs, and common automation commands.