Agent Desktop
A native CLI that lets AI agents inspect and operate macOS apps through accessibility trees.
- Source repo
- vercel-labs/agent-desktop
- Stars
- ★ 28k
- Last updated
- 1d ago v1.4.0
- FARS reviewed
- Nov 08, 2026 +3 new
- License
- Apache-2.0
- Primary language
- Rust
- FA score
- 81/100 · Good
At a glance
- How it runs
- Works with
- Universal · cross-platform
- Cost
- Free, no paid service needed
- Setup effort
- Medium · a few setup steps
- You'll need
- Typical use
- Developers building a macOS computer-use agent that must inspect Finder, Safari, System Settings, or Xcode as JSON and act through stable element references.
- Not a fit if
- Teams needing Windows or Linux desktop automation; only macOS works today
- Environments where Accessibility and Screen Recording permissions cannot be granted
- Workflows needing headless hover, drag, or coordinate clicks
- Website
- agent-browser.dev/desktop ↗ set on GitHub
- Maintenance
- Commits in the last 30 dayslast commit 2026-12-02latest release v1.4.0 (2026-12-01)+162.4 ★/day over 7 days
- Source review
- 81/100 · Good
What does this agent do, and when should you use it?
Agent Desktop is a Rust-based desktop automation CLI designed for AI agents that need to control graphical applications. It reads macOS accessibility trees, returns structured JSON, and assigns snapshot-qualified deterministic references to interactive elements. An agent can act on those references with commands for clicking, typing, selection, scrolling, window management, notifications, and clipboard access, then take another snapshot to verify the result. The repository ships both a standalone CLI and the libagent_desktop_ffi C-ABI dynamic library for in-process use from Python, Swift, Go, Ruby, Node, or C. Explicit sessions provide snapshot namespaces, automatic JSONL trace segments, and single-file HTML trace exports with optional screenshots. Operational desktop support is currently limited to macOS; the README lists Windows and Linux accessibility and interaction features as planned.
The core loop runs agent-desktop snapshot against an application, retains the returned snapshot_id and qualified references such as @s8f3k2p9:e3, invokes commands including click, type, set-value, select, toggle, or scroll, and snapshots again to verify the new state. For dense interfaces such as Slack, VS Code, and Notion, --skeleton produces a three-level overview and --root drills into selected containers. Additional commands capture screenshots, find elements, read properties, send keyboard shortcuts, manage applications and windows, access the clipboard, handle macOS notifications, and wait for elements, windows, text, menus, or notifications. session start creates an explicit trace-enabled session, trace show merges its JSON timeline, and trace export produces a static HTML viewer. For Chromium applications, launch --cdp starts a fresh process with a verified DevTools endpoint bound to 127.0.0.1; Playwright, Puppeteer, chrome-remote-interface, or agent-browser can drive web contents while Agent Desktop handles native windows, menus, dialogs, and screenshots.
- Developers building a macOS computer-use agent that must inspect Finder, Safari, System Settings, or Xcode as JSON and act through stable element references.
- Teams automating dense Slack, VS Code, or Notion interfaces that want a shallow skeleton followed by targeted traversal instead of sending a full accessibility tree to a model.
- Test and operations engineers running traceable workflows that launch an app, wait for a window, fill fields, click controls, and verify the resulting state.
- Authors of Python, Swift, Go, Ruby, Node, or C hosts who want to load
libagent_desktop_ffionce instead of spawning the CLI for every call. - Automation systems that need a CDP client for Electron or Chromium web contents while retaining accessibility-based control of native menus and file dialogs.
- Teams auditing multi-step desktop runs that need deterministic JSONL traces and an exportable HTML timeline with screenshots.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Install / run
npm install -g agent-desktopnpx agent-desktop snapshot --app Finder -i
- Runtime
- Rust 1.89+
- Install notes cover
- macOS
How do you install or deploy this agent?
The recommended prebuilt installation is:
npm install -g agent-desktopIt can also be invoked without a global installation:
npx agent-desktop snapshot --app Finder -iBuilding from source requires Rust 1.89+ and macOS 13.0+:
git clone https://github.com/lahfir/agent-desktop
cd agent-desktop
cargo build --release
cp target/release/agent-desktop /usr/local/bin/Grant macOS Accessibility permission before desktop automation. Screenshots additionally require Screen Recording permission, and opening Notification Center requires Automation permission for System Events. Check with agent-desktop permissions; request missing permissions through the bounded helper with agent-desktop permissions --request. The documented runtime does not require AI-provider credentials.
How do you use this agent?
Check the environment first:
agent-desktop status
agent-desktop permissionsStart with a working observation:
agent-desktop snapshot --app Finder -iKeep the returned snapshot_id and element references, then run actions such as:
agent-desktop click @s8f3k2p9:e3
agent-desktop type @s8f3k2p9:e5 "quarterly report"
agent-desktop snapshot --app Finder -iFor a dense application, use:
agent-desktop snapshot --skeleton --app Slack -i --compact
agent-desktop snapshot --root @e3 --snapshot s8f3k2p9 -i --compactFor tracing, run agent-desktop session start --screenshots, assign its returned ID to AGENT_DESKTOP_SESSION, perform the workflow, and inspect it with agent-desktop trace show --limit 500 or export it with agent-desktop trace export --out run.html. When an action reports STALE_REF or AMBIGUOUS_TARGET, wait or snapshot again and retry with the new reference.
Safety boundaries, hardening & integrations
Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.
Declared capability surface (blast radius)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Modifies local files; work on a clean Git branch or dedicated worktree.
FARS trust-control audit
- least-privilege scoping
- data-flow disclosure
What are this agent's strengths and limitations?
- Uses accessibility trees and structured JSON rather than requiring screenshot recognition, pixel matching, or a browser to operate native applications.
- Qualified references embed the exact snapshot ID, and actions re-identify and preflight targets; stale and ambiguous matches fail explicitly with
STALE_REForAMBIGUOUS_TARGET. - Progressive skeleton traversal targets dense applications, with a documented 78–96% reduction in tokens for the traversed interface representation.
- Offers both a native single-binary CLI and a C-ABI dynamic library for in-process integration from several programming languages.
- Explicit sessions automatically record segmented JSONL traces and can export the timeline and screenshots as one HTML file.
- A verified local CDP endpoint can complement accessibility automation for Chromium web contents while native surfaces remain on the accessibility path.
- Working accessibility, input, screenshot, clipboard, notification, and window-management features are currently macOS-only; Windows and Linux are marked as planned.
- Deployment requires macOS 13.0 and Accessibility permission, with additional Screen Recording and Automation permissions for particular features.
- Strict headless reference actions avoid silent focus and cursor effects, but hover, drag, coordinate clicks, double-click, and triple-click require headed mode.
key-down,key-up,mouse-down, andmouse-upare reserved names that returnACTION_NOT_SUPPORTEDin the stateless CLI.- References are scoped to snapshot namespaces, and callers must implement re-observation and retry handling for changed or ambiguous interfaces.
launch --cdprequires a fresh application launch; an already-running target fails, and other local processes running as the same user can reach the endpoint while it remains open.
How does this agent compare with similar options?
Compared with screenshot- and pixel-matching desktop automation, Agent Desktop primarily exposes semantic accessibility trees and addressable JSON elements; screenshots remain optional. For Chromium applications, it complements rather than replaces Playwright, Puppeteer, chrome-remote-interface, or agent-browser: those clients can control web contents over the endpoint created by launch --cdp, while Agent Desktop covers native menus, dialogs, and windows. The README identifies agent-browser as the preferred ref-oriented CDP workflow but provides no direct benchmark against these clients.
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| Agent Desktop This agent | 81 · Good | CLIFree | ★ 28k | 1d ago | Rust | — |
| macOS Harness | 54 · Major gaps | CLIFree + model costs | ★ 1k | 3d ago | Python | Codex · Claude Code |
| Open Computer Use (MCP desktop service) | 79 · Good | CLIFree + model costs | ★ 3.1k | 2d ago | Swift | Codex · Claude Code |
| Clawd Cursor | 72 · Some gaps | MCP serverFree + model costs | ★ 409 | 1d ago | TypeScript | Codex · Claude Code |
How does FollowAgents rate this agent?
Why each dimension lost points
Headless accessibility actions avoid focus changes by default, while physical input is placed behind explicit policies such as --headed, providing strong least-privilege evidence (least_privilege=3). The docs describe user-granted macOS permissions, but ordinary desktop actions have no per-action confirmation mechanism (user_confirmation=1). The README and FAQ disclose data flows and privacy risks for snapshots, clipboard, screenshots, command results, and the optional JEV helper (data_flow_transparency=3). Structured trace fields are described as redacted, but evidence artifacts may retain sensitive content, so handling is substantial but incomplete (sensitive_data_handling=2). CI locks Rust dependencies, pins Actions by SHA, and checks dependency isolation, but the packet contains no dependency vulnerability audit results (dependency_security=2). Input, clipboard, window, and notification operations have headed, policy, or capability limits, but external effects lack universal explicit confirmation and recovery guarantees (external_effects=2). The material provides safe-retry guidance but shows no general undo or rollback mechanism (rollback=1). License and repository attribution are identifiable, but publisher identity is unverified per the prompt and the packet does not establish independent provenance (source_attribution=1).
The README, platform skills, installation notes, and main entry point broadly agree on the CLI, accessibility adapters, refs, errors, and lack of an embedded model; AGENTS.md is contributor guidance rather than runtime product instruction (self_consistency=3). Rust and platform requirements are explicit, and CI includes MSRV and platform build gates, but the packet cannot establish ongoing availability of external packages or system services (dependency_availability=2). JSON error envelopes, error codes, retry dispositions, platform refusal reasons, and the FFI last-error contract are documented (failure_messages=3).
The product clearly serves AI agents calling desktop tools and offers CLI, MCP, C library, and platform skills (audience_and_scenarios=3). It states that it has no model, does not automate web pages, depends on accessibility trees, and details per-platform support and refusal cases (capability_boundaries=3). Platform skills include trigger descriptions, but the core skill's full trigger conditions are not shown in the packet (trigger_precision=2). Installation and platform docs specify OS versions, architectures, sessions, permissions, accessibility buses, and input dependencies (environment_fit=3).
README, docs, platform skills, FAQ, security policy, and development guidance have clear roles (information_architecture=3). npm, Homebrew, archive, and source installation, upgrade, and permission instructions are concrete (install_notes=3). Snapshot-qualified refs, command names, and FFI ABI versioning have stable rules, though the packet does not cover the full compatibility policy (naming_stability=2). Quick starts, JSON samples, platform examples, and FAQ coverage are substantial (examples_and_faq=3). Platform limits, permissions, privacy, Wayland constraints, and inaccessible UIs are described concretely (known_limitations=3). Apache-2.0 metadata, workspace declaration, and license text agree (license=3). The packet describes semver and a release process that updates the changelog, but does not include changelog contents for review (versioning_changelog=2). A security reporting channel and maintainer response commitment are stated, but no named maintenance owner is shown (maintenance_responsibility=2).
Structured JSON envelopes, snapshot refs, recovery guidance, and CLI/FFI usage make outputs directly usable by agents (output_usability=3). Operating desktop apps through accessibility trees, with CLI, MCP, and FFI interfaces, addresses a clear automation need (marginal_value=3). Native binaries across platforms and permission/session requirements add setup and operating costs; the packet does not quantify the tradeoff (cost_benefit=2).
The README, skills, and source provide traceable behavioral descriptions and specific documentation references (claim_traceability=3). Installation docs, FAQ, platform skills, and code corroborate key behaviors across sources (cross_source_corroboration=3). The material distinguishes documented behavior from effects that require observation and does not claim this review executed or independently tested anything; some feature descriptions cannot be checked against the supplied source excerpts (fact_inference_separation=2).
- Desktop snapshots, clipboard contents, screenshots, notifications, and command results may contain private data; trace redaction does not make screenshots or evidence artifacts safe to publish.
- This is a low-confidence static review; the program was not run and the packet's feature and test claims were not independently verified.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
Release notes excerpt
What's Changed * fix(sandbox): confine host key writes and bound guest probe replies by @lahfir in https://github.com/vercel-labs/agent-desktop/pull/673 * fix(sandbox)!: reach the macOS guest through a guest agent instead of SSH by @lahfir in https://github.com/vercel-labs/agent-desktop/pull/675 * fix: name the launching app in the permission guide under tmux by @lahfir in https://github.com/vercel-labs/agent-desktop/pull/681 * chore: ignore the chrono unmaintained advisory from uiautomation by @ctate in https://github.com/vercel-labs/agent-desktop/pull/714 …View on GitHub ↗ -
Release notes excerpt
What's Changed * chore(deps): bump rustix to 1.1.6 for RUSTSEC-2026-0486 by @lahfir in https://github.com/vercel-labs/agent-desktop/pull/670 * fix: keep a started sandbox running after its launcher exits by @lahfir in https://github.com/vercel-labs/agent-desktop/pull/672 * chore(release): 1.3.1 by @lahfir in https://github.com/vercel-labs/agent-desktop/pull/680 Full Changelog: https://github.com/vercel-labs/agent-desktop/compare/v1.3.0...v1.3.1View on GitHub ↗ -
Release notes excerpt
What's Changed * fix(macos): resolve native menus and verify lifecycle transitions by @lahfir in https://github.com/vercel-labs/agent-desktop/pull/376 * perf(macos): read the app process inventory with libproc instead of spawning ps by @Railly in https://github.com/vercel-labs/agent-desktop/pull/573 * docs: say every local account can reach the --cdp port by @lahfir in https://github.com/vercel-labs/agent-desktop/pull/589 * fix: close reachable invalid state transitions in sessions, refs, trace, mcp and waits by @lahfir in https://github.com/vercel-labs/agent-desktop/pull/602 …View on GitHub ↗
FAQ
Does it automate Windows or Linux desktops?
Which macOS permissions are required?
permissions --request requests missing permissions through an isolated helper.What happens when the interface changes after a snapshot?
STALE_REF, and multiple plausible matches return AMBIGUOUS_TARGET; the caller should observe again before retrying.Is a particular model provider or cloud API required?
Can trace exports contain sensitive data?
Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.