What Is agent-desktop? Letting an AI Agent Operate Desktop Apps: Setup, Commands, Permissions and Safety
If your coding agent has to work in a desktop program that has no API (for example an old accounting or inventory program) rather than on a website, it can't see that program's screen. agent-desktop provides that: the agent reads the app's accessibility tree with `agent-desktop snapshot --app Finder -i` as JSON in which every clickable element gets a ref such as `@s8f3k2p9:e8`, acts with `click` or `type`, then reads the screen again to verify the result. It uses no screenshots or pixel matching, and it works on macOS, Windows and Linux. You tell the agent "enter this in that field of that program"; in return you get a summary of the steps taken and a verified result.
- What it does
- Lets an agent click and type in desktop apps
- Type
- Command-line tool (+ skills, MCP server, C library)
- Made by
- Vercel Labs (official repository)
- Systems
- macOS 13+, Windows 10 1809+, Ubuntu 24.04+
- Default
- Headless: doesn't move the pointer or steal focus
- On the web
- Doesn't work; use agent-browser for the web
- Latest version
- 1.3.1 (November 13, 2026)
- Cost
- Free, Apache-2.0
What is agent-desktop for?
Coding agents can read code and websites, but they can't know what a desktop program on your computer shows. If a bookkeeping, inventory or appointment program has no web API, there is often no way to connect an agent to it; you do the job by hand. agent-desktop closes that gap: by reading the operating system's accessibility layer (the layer screen readers use), it lists every button, field and piece of text in the app, and the agent clicks and types on them. Every command prints a single JSON reply and exits; there is no browser and no AI model inside.
Who it's for: developers and automation teams who want an agent to do repetitive work (form entry, settings sweeps, app testing) in desktop programs that have no API. For example, if a business enters daily invoices in a desktop program, the agent can open that program, fill in the fields and, after each step, read back and verify the result. You need to be comfortable running commands in a terminal.
What it isn't: it isn't an agent or a chat app; it is described as "a tool, not an agent". The calling agent (or your script) runs the observe, act, verify loop. It doesn't automate web pages (the sibling tool agent-browser does that) and can't see an interface that publishes no accessibility tree.
Sources: the README and the agent-browser.dev/desktop introduction (November 22, 2026). The "invoice entry" example is a usage scenario; the documentation doesn't mention this application.
How does agent-desktop work? Map, act, verify
› agent-desktop snapshot --app gnome-calculator --skeleton -i --compactFirst a shallow three-level map is taken; cut branches are marked with children_count.› agent-desktop snapshot --root @s2txcl95uvubmn:e1 -i --compactThe sub-elements of the region you need are added to the same snapshot.› agent-desktop click @s2txcl95uvubmn:e11In the documentation example the 7 button is pressed; the action goes through the accessibility API and the pointer doesn't move.› agent-desktop wait --element @s2txcl95uvubmn:e6 --predicate value --value 7It waits for the display to read 7; a successful action doesn't prove the effect.If several windows are open, the command returns AMBIGUOUS_TARGET and lists the candidate window ids; you pick one with --window-id. Every command's reply says whether the action was delivered (such as delivered_unverified) and whether retrying is safe (retry: safe or unsafe); the agent retries only if it is safe, because an unsafe repeat can press the same button twice.
Under the hood: the agent calls the CLI (or the C library); the core reaches the operating system through a single interface, and each binary connects to its own operating system's accessibility API: the AX API on macOS, UI Automation on Windows, AT-SPI on Linux.
Source: the agent-desktop documentation "Quick start" and introduction (November 22, 2026). The example outputs are shown in the documentation on GNOME Calculator on Linux.
What do you type, what do you get? Examples and commands
With the skill installed (or the bootstrap line in AGENTS.md), you give the agent work in a plain sentence and it picks the commands. The requests below are derived from the commands and platform behavior in the documentation; the result depends on how complete the app's accessibility tree is.
launch notepad, finds the field's ref with snapshot -i and writes the text with set-value: according to the documentation, on Windows type is refused in headless mode (POLICY_DENIED), and set-value is used to write headless. It then reads the value back with get and compares it with what was written; it gives a summary based on the steps' JSON replies.snapshot --app "System Settings" -i; in a dense app it first uses --skeleton, then opens the region with --root. It reads the switches' state with observation commands such as is or get; these commands don't change the app and work headless. On macOS, Accessibility permission must have been granted to the app that launches the command.› agent-desktop snapshot --app Finder -i # interactive elements, each with a ref
agent-desktop click @s8f3k2p9:e8 # act on a ref from that snapshot
agent-desktop snapshot --app Finder -i # observe again to verify| Group | Commands |
|---|---|
| Observe | snapshot, find, get, is, screenshot, list-surfaces |
| Act on a ref | click, double-click, right-click, type, set-value, clear, focus, select, toggle, check, uncheck, expand, collapse, scroll, scroll-to |
| Keyboard and mouse | press, hover, drag, mouse-move, mouse-click, mouse-wheel |
| Apps and windows | launch, close-app, list-apps, list-windows, focus-window, resize-window, move-window, minimize, maximize, restore |
| Notifications and clipboard | list-notifications, dismiss-notification, clipboard-get, clipboard-set, clipboard-clear |
| Wait and sessions | wait, session, trace, cursor-overlay |
| System | status, permissions, version, batch, skills, sandbox |
Per the README there are 61 command names, 57 of them operational; key-down, key-up, mouse-down and mouse-up are closed on every platform. For each command's flags, run agent-desktop <command> --help.
Source: the README and the agent-desktop documentation (Windows page, Headed mode, Quick start; November 22, 2026). The macOS and Windows platform pages themselves say "it was not run for these docs"; the information here is according to the documentation.
How do you install agent-desktop?
Installation has three parts: first you install the CLI, then (on macOS) grant the permission, then add the skill or MCP setting so the agent knows the tool. No account or key is needed. According to the documentation, Node.js 18 or later is required. The commands come from the official installation page; the version number is this page's suggestion.
› npm install -g agent-desktop@1.3.1
agent-desktop version
agent-desktop statusThe official command has no version: npm install -g agent-desktop. Without -g the command doesn't land on your PATH and you run it with npx agent-desktop. The package carries a native binary and platform helper for six targets; if your package manager blocks install scripts, the Node launcher runs instead (adding more than 100 ms to every call); the fix is npm install -g agent-desktop --allow-scripts=agent-desktop.
› brew install agent-desktop
brew upgrade agent-desktopHomebrew builds from the tagged source and installs the platform helper beside the CLI. There is no Scoop package; the old custom Homebrew tap and Scoop bucket were removed in 1.0.1, and old installs can shadow the command.
For a native binary without the JavaScript launcher, you download the archive for your operating system and architecture from GitHub Releases and extract the executable and its helper into the same folder on your PATH. Checksums catch corruption; you verify the origin with the build attestation:
› gh attestation verify <downloaded-archive> --repo vercel-labs/agent-desktopIntroduce it to your agent (skill): the documentation says the skill comes inside the CLI, matched to the version: before starting, the agent runs these two commands.
› agent-desktop skills get desktop
agent-desktop skills get platformTo make this automatic, add these two lines to your AGENTS.md or similar instructions file. A static copy can also be installed from skills.sh, but the documentation says that copy can go stale when the CLI is upgraded, while the agent-desktop skills get output always matches the running version.
› Use `agent-desktop` to see and operate desktop apps. Before the first use, run
`agent-desktop skills get desktop` and `agent-desktop skills get platform`, and follow them.› npx skills add https://github.com/vercel-labs/agent-desktop --skill agent-desktopFor MCP clients: agent-desktop mcp starts an MCP server over stdio; each command becomes a tool such as desktop_snapshot, desktop_click or desktop_session_start and returns the command's JSON reply. You add this to the client's MCP settings:
› { "mcpServers": { "agent-desktop": { "command": "agent-desktop", "args": ["mcp"] } } }Global flags such as --session and --headed are given only to the server (agent-desktop mcp --session s1 --headed) and apply to every call; a single tool call can't carry a global flag.
First launch and permissions: macOS, Windows, Linux
- Check: Run
agent-desktop permissions; it doesn't prompt and prints the state. - Open the guide: If a permission is
denied, runagent-desktop permissions --guide: it opens System Settings at the missing permission and shows which app to add. - Manual path: If the guide can't run, add the launching app under System Settings > Privacy & Security > Accessibility and turn it on.
- Confirm: Run
agent-desktop permissionsagain: it should showgranted; no restart is needed.
!The permission is given to the app that launched agent-desktop, not to the shell (Terminal, iTerm2, VS Code or your agent's host app); a different terminal or editor needs its own. Screen Recording permission is only for screenshot.
On Windows there is no permission dialog for UI Automation; access is controlled by integrity level. For apps at your terminal's level you don't need to grant anything. An app running as administrator can be read but not driven from a lower-level terminal: run from a terminal elevated to the same level.
!The Windows binary is unsigned: SmartScreen can warn on a browser download, antivirus can quarantine it, and Smart App Control on a clean Windows 11 install blocks it. In PowerShell, quote refs ('@s8f3k2p9:e8'); a bare @ sign means something else in PowerShell.
On Linux there is no permission dialog; everything depends on the accessibility bus (AT-SPI) answering. Run the command from a shell inside the user's graphical session, then check with agent-desktop status: an empty supported_surfaces means the bus didn't answer. The documentation says to install the at-spi2-core package if the bus is missing (for Flatpak, add --talk-name=org.a11y.Bus).
According to the documentation, Ubuntu 24.04 or later is required (Ubuntu 22.04's bridge aborts); a TTY login, an SSH shell without the variables or a container without a bus sees no apps. On X11 keys need XTEST, and on Wayland GNOME Mutter RemoteDesktop.
Source: the agent-desktop documentation macOS, Windows and Linux pages and Installation (November 22, 2026).
Which systems and agents does agent-desktop work with?
| macOS 13+Yes | Intel and Apple Silicon; the AX API; Accessibility permission required. |
|---|---|
| Windows 10 1809+Yes | x64 and ARM64, the signed-in user's desktop; the binary is unsigned. |
| Ubuntu 24.04+Yes | x86_64 and aarch64; X11 or Wayland; the AT-SPI bus is required. |
| Other Linux distributionsPartly | According to the documentation a fixed at-spi2-core bridge is required; details are in the documentation. |
| Coding agents that run shell commandsYes | The README and documentation pages don't name agents and the skill and AGENTS.md routes are written for "any harness that supports skills"; agent names appear only indirectly in repository files: the npm install script prints "Claude Code skills available" and the macOS skill file lists Codex among the apps to grant permission to. |
| MCP clientsYes | The agent-desktop mcp stdio server. |
| Web pagesNo | Use agent-browser for web page automation. |
| Interfaces that publish no accessibility treeNo | It doesn't match pixels; it can't see such an interface. |
The interface and documentation are in English. The tool reads an app's accessibility tree as it is; in a Turkish app the button and field names come through in Turkish, and you can write to the agent in Turkish. The documentation says nothing else about language.
What does agent-desktop access, and is it safe?
The accessibility tree of open apps: buttons, fields, text and values. Screenshots and the clipboard if asked. The README says screenshots, clipboard reads, command output and debug artifacts can contain private desktop content.
Clicks, types, sets values, picks menu items, moves windows, launches and closes apps; writes to the clipboard. These can change real data.
Writes snapshot, session and trace files to the state directory (~/.agent-desktop, changeable with AGENT_DESKTOP_HOME). There is no configuration file; behavior comes from command flags and a few environment variables. The documentation mentions no telemetry.
The sandbox commands run the agent on its own desktop (a local macOS VM or the hosted Vercel Sandbox). The documentation says this separates the desktop but not the network or the host; there is no local provider on Linux and Windows.
!You are giving the agent control of your real desktop: don't run it unattended in programs where important data is open, and keep command output out of public logs and uploads.
| Safeguard | What it does |
|---|---|
| Headless default | Ref actions use the accessibility API; they don't move the pointer, take focus, send keystrokes or use the clipboard. If the API can't do the job, it doesn't silently switch to physical input; it stops with an error such as ACTION_NOT_SUPPORTED or POLICY_DENIED. |
--headed | Permits physical input (focus, the real pointer, key and mouse events); it doesn't force it or lift other safeguards. |
| Quit shortcuts | On macOS, cmd+q and similar return POLICY_DENIED without --force; use close-app to close an app. |
| Held keys and buttons | key-down, key-up, mouse-down and mouse-up refuse to run on every platform. |
| Safe retry | The retry field in the reply says whether a repeat is safe; the agent retries only if it is safe. |
Source: the README and the Headed mode, macOS, Sandboxes and Configuration pages, SECURITY.md (November 22, 2026). Vulnerabilities are reported through GitHub private reporting. This is not a security certificate.
Is agent-desktop free? License and cost
Yes. agent-desktop is an open-source tool licensed under Apache-2.0; there is no account, subscription or usage limit. There is no AI model in the tool, so there is no model cost either; your coding agent's plan is separate. A cost can arise only if you choose the hosted Vercel Sandbox, which follows Vercel's own pricing; the agent-desktop documentation gives no price. There is no Turkey-specific price or restriction in the official sources; the tool runs on your computer.
- Apache-2.0: free to use, copy, modify and distribute (including in-house and commercial use); contributors also grant a patent license
- When distributing you must keep the license text and copyright notices and state any changes you made; there is no warranty
The web side of the same family, also free and Apache-2.0: agent-browser guide.
Source: the README and LICENSE (November 22, 2026). This is not legal advice.
Common problems and fixes
| What's happening | What to do |
|---|---|
PERM_DENIED or denied permission on macOS | The launching app has no Accessibility permission. Grant it with agent-desktop permissions --guide. |
| Very few elements or no refs | It may be a custom-rendered interface or a Chromium region that is still loading. Check permissions, drop -i, raise --timeout-ms and run list-surfaces in case the content is in a sheet. |
complete: false or a slow snapshot | A deep tree ran out of budget. Use find, or take a --skeleton first and then open the region with --root. |
| STALE_REF or AMBIGUOUS_TARGET | The screen changed or there are several windows. Take a new snapshot; pass --window-id to pick a window. |
type returns POLICY_DENIED on Windows | type is refused in headless mode. Use set-value to write headless, or --headed for physical input. |
| PERM_DENIED on Windows, app runs as administrator | A lower-level terminal can't drive an elevated app. Run agent-desktop from a terminal elevated to the same level. |
| No apps show up on Linux | Run agent-desktop status: if supported_surfaces is empty, make sure you are running from inside the graphical session and that at-spi2-core is installed. |
| The command starts slowly on every call | The package manager blocked the install script and the Node launcher is running. Reinstall with npm install -g agent-desktop --allow-scripts=agent-desktop. |
Source: the macOS, Windows and Linux platform pages and Installation (November 22, 2026). For more cases, agent-desktop skills get macos troubleshooting, skills get windows troubleshooting, skills get linux troubleshooting.
How do you update and uninstall agent-desktop?
- Update: On Homebrew,
brew upgrade agent-desktop. For an archive install, the executable and its helper must come from the same release; replace both together. There is no configuration file or automatic update. - Uninstall:
npm uninstall -g agent-desktoporbrew uninstall agent-desktop(the package managers' standard commands; not stated in the official documentation). If you have an old tap or Scoop install, check which file runs withcommand -v agent-desktop(Get-Command agent-desktopin PowerShell). - Sessions:
agent-desktop session gc --endeddeletes ended sessions. The state directory (~/.agent-desktop) stays; delete it by hand if you don't want it. - Skill: If you installed a static copy with
npx skills add, delete it from the agent folder (npx skills removeis a skills CLI command; not stated in the agent-desktop documentation). The guide read withagent-desktop skills getlives inside the binary, so there is nothing separate to remove.
agent-browser, Playwright CLI and desktop automation: which is for what?
agent-desktop is for desktop apps. If you want an agent to drive a web page, the atlas has separate guides for that job; the agent-desktop documentation makes no comparison with them and only points to agent-browser for the web.
The same family's tool for web pages: agent-browser guide.
Microsoft's command-line tool for the browser: Playwright CLI guide.
Frequently asked questions
What is agent-desktop?
It is Vercel Labs' open-source command-line tool that lets AI agents operate macOS, Windows and Linux desktop apps. The agent reads the app's accessibility tree as JSON with refs, clicks and types, then reads again to verify the result.
How is it different from Claude computer use?
agent-desktop uses no screenshots or pixel matching; it reads the app's accessibility tree and has no AI model inside: your coding agent calls the commands. The agent-desktop documentation makes no comparison with other products.
Does agent-desktop work on Windows?
Yes, it works on Windows 10 1809 and later on x64 and ARM64. Because the binary is unsigned, SmartScreen can warn, antivirus can quarantine it, and Smart App Control on a clean Windows 11 install blocks it. In headless mode, use set-value instead of type.
How do I grant the permission on macOS?
The agent-desktop permissions --guide command opens System Settings; under Privacy & Security > Accessibility you add the app that launches agent-desktop (Terminal, iTerm2, VS Code or your agent's host app). The permission is given to that app, not to the shell.
Can it be used as an MCP server?
Yes. The agent-desktop mcp command serves every command as an MCP tool such as desktop_snapshot or desktop_click over stdio. In the client's MCP settings, command is agent-desktop and args is mcp.
Does it automate web pages too?
No. agent-desktop is only for desktop apps; use the sibling tool agent-browser for the web. For the web contents of a Chromium or Electron app you launch, agent-desktop can open a DevTools port for agent-browser to connect to.
Is it free, and is it safe?
Free and licensed Apache-2.0; no account needed and no model inside. Because it gives the agent control of your real desktop, a wrong click can change real data; screenshots, the clipboard and command output can contain private content, so keep them out of public logs.
Related guides
Sources
- agent-desktop repository (README)
- agent-desktop docs: introduction
- agent-desktop docs: Installation
- agent-desktop docs: Quick start
- agent-desktop docs: macOS
- agent-desktop docs: Windows
- agent-desktop docs: Linux
- agent-desktop docs: Skills
- agent-desktop docs: MCP
- agent-desktop docs: Headed mode
- agent-desktop docs: Sandboxes
- Security reporting (SECURITY.md)
- npm listing: agent-desktop
- License (Apache-2.0)
Not clear in the official sources: That the documentation doesn't name agents (which coding agents it was tried with; names appear only indirectly in repository files) · details of running in a Docker container · the price of the hosted Vercel Sandbox. Each is covered in its section.




