Skip to content

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.

The sibling tool that lets an agent drive web pages: agent-browser guide. For the web contents of a Chromium or Electron app you launch, agent-desktop can also open a DevTools port for agent-browser to connect to.

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

Map› agent-desktop snapshot --app gnome-calculator --skeleton -i --compactFirst a shallow three-level map is taken; cut branches are marked with children_count.
Drill into a region› agent-desktop snapshot --root @s2txcl95uvubmn:e1 -i --compactThe sub-elements of the region you need are added to the same snapshot.
Act› 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.
Verify› 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.
Refs belong to the screen as it was read: when the screen changes, an action returns STALE_REF and you take a new snapshot. A bare ref such as @e8 is rejected; it is written together with the snapshot id.

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.

Have it enter text in a program (Windows)"Using agent-desktop, open Notepad, write the heading "Meeting notes" and three bullet points under it, then read the text back to verify it. First read the rules from agent-desktop skills get desktop and skills get windows."What you get: the agent opens the app with 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.
Read a setting without changing it"Using agent-desktop, list the notification options in the System Settings app and say whether each switch is on or off. Don't change anything."What you get: the agent reads the screen with 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.
You can also run it by hand (README quick start)› 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
GroupCommands
Observesnapshot, find, get, is, screenshot, list-surfaces
Act on a refclick, double-click, right-click, type, set-value, clear, focus, select, toggle, check, uncheck, expand, collapse, scroll, scroll-to
Keyboard and mousepress, hover, drag, mouse-move, mouse-click, mouse-wheel
Apps and windowslaunch, close-app, list-apps, list-windows, focus-window, resize-window, move-window, minimize, maximize, restore
Notifications and clipboardlist-notifications, dismiss-notification, clipboard-get, clipboard-set, clipboard-clear
Wait and sessionswait, session, trace, cursor-overlay
Systemstatus, 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.

Version-pinned install, then a check› npm install -g agent-desktop@1.3.1 agent-desktop version agent-desktop status

The 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.

Introduce 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.

The agent's first commands› agent-desktop skills get desktop agent-desktop skills get platform

To 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.

AGENTS.md› 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.
If you prefer a static skill copy› npx skills add https://github.com/vercel-labs/agent-desktop --skill agent-desktop

For 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:

MCP› { "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

  1. Check: Run agent-desktop permissions; it doesn't prompt and prints the state.
  2. Open the guide: If a permission is denied, run agent-desktop permissions --guide: it opens System Settings at the missing permission and shows which app to add.
  3. Manual path: If the guide can't run, add the launching app under System Settings > Privacy & Security > Accessibility and turn it on.
  4. Confirm: Run agent-desktop permissions again: it should show granted; 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.

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+YesIntel and Apple Silicon; the AX API; Accessibility permission required.
Windows 10 1809+Yesx64 and ARM64, the signed-in user's desktop; the binary is unsigned.
Ubuntu 24.04+Yesx86_64 and aarch64; X11 or Wayland; the AT-SPI bus is required.
Other Linux distributionsPartlyAccording to the documentation a fixed at-spi2-core bridge is required; details are in the documentation.
Coding agents that run shell commandsYesThe 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 clientsYesThe agent-desktop mcp stdio server.
Web pagesNoUse agent-browser for web page automation.
Interfaces that publish no accessibility treeNoIt 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?

Reads

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.

Does

Clicks, types, sets values, picks menu items, moves windows, launches and closes apps; writes to the clipboard. These can change real data.

Keeps records

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.

Separate desktop

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.

SafeguardWhat it does
Headless defaultRef 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.
--headedPermits physical input (focus, the real pointer, key and mouse events); it doesn't force it or lift other safeguards.
Quit shortcutsOn macOS, cmd+q and similar return POLICY_DENIED without --force; use close-app to close an app.
Held keys and buttonskey-down, key-up, mouse-down and mouse-up refuse to run on every platform.
Safe retryThe 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.

Allowed
  • Apache-2.0: free to use, copy, modify and distribute (including in-house and commercial use); contributors also grant a patent license
Not allowed
  • 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 happeningWhat to do
PERM_DENIED or denied permission on macOSThe launching app has no Accessibility permission. Grant it with agent-desktop permissions --guide.
Very few elements or no refsIt 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 snapshotA deep tree ran out of budget. Use find, or take a --skeleton first and then open the region with --root.
STALE_REF or AMBIGUOUS_TARGETThe screen changed or there are several windows. Take a new snapshot; pass --window-id to pick a window.
type returns POLICY_DENIED on Windowstype is refused in headless mode. Use set-value to write headless, or --headed for physical input.
PERM_DENIED on Windows, app runs as administratorA 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 LinuxRun 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 callThe 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?

  1. 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.
  2. Uninstall: npm uninstall -g agent-desktop or brew 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 with command -v agent-desktop (Get-Command agent-desktop in PowerShell).
  3. Sessions: agent-desktop session gc --ended deletes ended sessions. The state directory (~/.agent-desktop) stays; delete it by hand if you don't want it.
  4. Skill: If you installed a static copy with npx skills add, delete it from the agent folder (npx skills remove is a skills CLI command; not stated in the agent-desktop documentation). The guide read with agent-desktop skills get lives 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

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.