Automation & Ops desktop-automationaccessibility-apirust-clistructured-jsonwindow-managementcdpffimacos

Agent Desktop

A native CLI that lets AI agents inspect and operate macOS apps through accessibility trees.

FollowAgents review · FARS-2.1
Recommended
85/ 100 5-point scale 4.3 / 5
1 2 3 4 5 6
1Trust23 / 29 · 4.0/5

Least privilege is handled thoroughly: CI begins with no permissions and grants narrow job-level access, plain permission checks do not prompt, permission requests use an isolated helper, ref actions are headless by default, and physical input or notification mutations require explicit headed mode. User confirmation is reduced because launching or closing applications, keyboard input, clipboard changes, and most mutations do not require per-action confirmation once invoked. Data flows are documented well, including session paths, JSONL traces, screenshot-bearing HTML exports, output-path behavior, and the loopback-only CDP endpoint with an explicit warning that other local user processes can reach it. Sensitive-data handling is adequate but incomplete: full traces are identified as screenshot-equivalent, while no general redaction, encryption, retention, or secure-erasure policy is shown. Dependency security has strong static controls through locked Cargo operations, commit-pinned Actions, CodeQL, and private vulnerability reporting, though no dependency-vulnerability scan result is supplied. External effects, headed behavior, force-close semantics, notification fingerprints, and actionability checks are explicit. Rollback is thin: recovery generally means re-observing, using idempotent commands, or relying on the target application's undo facilities; recoverable trashing appears only in a test workflow. Repository and package origin, licensing, and the reporting channel are identifiable, but the publisher is unverified and no named maintainer or organization is established.

2Reliability12 / 14 · 4.3/5

The README, Cargo metadata, and CI agree closely on the Rust requirement, version, platform scope, FFI contract, permissions, and release artifacts. CI also checks release consistency, multiple platforms, units, binaries, and FFI failure boundaries. Dependency availability is documented through npm, npx, source builds, and release binaries, but functional desktop automation is currently macOS-only, while Linux and Windows remain planned; the supplied evidence also omits Cargo.lock and installer implementation. Failure communication is thorough, with structured JSON, error and exit-code contracts, recovery hints, STALE_REF, AMBIGUOUS_TARGET, ACTION_NOT_SUPPORTED, ACTION_FAILED, and explicit permission states. No deduction was made merely because these paths were not executed in this static review.

3Adaptability16 / 18 · 4.4/5

The documentation addresses AI-agent loops, simple and dense applications, shared or independent agent sessions, FFI consumers, and mixed accessibility/CDP automation with concrete workflows. Capability boundaries are unusually explicit: macOS support versus planned platforms, semantic versus physical actions, headless versus headed operation, reserved unsupported held-input commands, and the fresh-launch requirement for CDP. Trigger precision is strong because snapshots and refs are namespace-scoped, actions run preflight checks, ambiguous matches fail closed, and notification mutations require a prior fingerprint. Environment fit is reduced because practical desktop operation currently requires macOS 13+ and Accessibility permission; Linux and Windows have crates, CI checks, and FFI artifacts, but their product features remain planned.

4Convention16 / 18 · 4.4/5

The repository presents a clear hierarchy covering architecture, installation, permissions, agent workflows, command groups, JSON contracts, refs, platforms, development, and FAQ material. Installation guidance covers npm, npx, source compilation, runtime prerequisites, and OS permissions. Naming and compatibility are well specified through qualified refs, explicitly pinned legacy refs, reserved command names, and ABI-major verification. Examples span the main operations and recovery paths, with a dedicated FAQ referenced. Limitations are candidly stated, including platform gaps, reserved commands, headed side effects, CDP exposure, session concurrency concerns, and a known FFI coverage gap. Apache-2.0 metadata matches the complete license. Version metadata, release links, and consistency checks exist, but no changelog or defined compatibility lifecycle appears in the supplied files. SECURITY.md assigns reporting scope and a general maintainer response, yet it does not identify maintainers, response targets, governance, or succession.

5Effectiveness12 / 13 · 4.6/5

Versioned structured JSON, error recovery hints, snapshot-qualified refs, progressive traversal, batching, condition waits, and readable traces make outputs highly usable by agents. Accessibility trees, semantic references, native desktop surfaces, and optional CDP provide substantial value beyond screenshot or pixel-driven automation. Cost-benefit is reduced because the stated 78–96% and 97% token savings are not backed by included result data, and practical use carries macOS permission costs, accessibility-quality dependence, and headed-mode side effects.

6Verifiability6 / 8 · 3.8/5

Many claims map to concrete command contracts, configuration, CI jobs, and test harnesses, including isolated permission behavior, FFI panic containment, version consistency, bounded process output, and the platform matrix. Traceability is not complete because referenced detailed documentation, implementation files, Cargo.lock, and actual test results are absent, while quantitative token-saving claims lack primary data in the supplied material. Cross-source corroboration is strong: README, Cargo.toml, SECURITY.md, workflows, and test scripts reinforce one another on versions, permissions, safety boundaries, and test scope. Facts and projections are usually separated with labels such as Planned and Phase 1 and with an explicit FFI coverage note, but broad statements such as “works with any app” and the savings percentages are not locally qualified by sufficient evidence.

Evidence confidence: Low Reviewed Aug 16, 2026 Reviewed revision 04f3d675b478
The upstream repository has new commits since this review. The score still applies to the reviewed revision shown and may not cover the latest changes.
Before you use it
  • Functional desktop automation is currently macOS-only; Linux or Windows crates, CI checks, and FFI artifacts should not be mistaken for complete platform support.
  • Accessibility permission can expose and manipulate other applications. Use a dedicated low-privilege account and enforce an upstream confirmation policy for app closure, keyboard, clipboard, notification, and headed operations.
  • Session traces, screenshots, and exported single-file HTML may contain sensitive interface data; the evidence shows no comprehensive redaction, encryption, retention, or secure-deletion mechanism.
  • Although CDP binds only to 127.0.0.1, other local processes running as the same user can reach it; close the target application after use to end the exposure.
  • The quantitative token-saving claims and “works with any app” wording are not fully supported by primary measurements or a compatibility matrix in the supplied files.
  • This assessment reviewed only the supplied static material and did not execute the binary, tests, installer, or automation actions.
Review evidence [1][2][3][4][5][6][7][8][9]
See the full review method →

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.

  1. Developers building a macOS computer-use agent that must inspect Finder, Safari, System Settings, or Xcode as JSON and act through stable element references.
  2. 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.
  3. Test and operations engineers running traceable workflows that launch an app, wait for a window, fill fields, click controls, and verify the resulting state.
  4. Authors of Python, Swift, Go, Ruby, Node, or C hosts who want to load libagent_desktop_ffi once instead of spawning the CLI for every call.
  5. Automation systems that need a CDP client for Electron or Chromium web contents while retaining accessibility-based control of native menus and file dialogs.
  6. Teams auditing multi-step desktop runs that need deterministic JSONL traces and an exportable HTML timeline with screenshots.

What are this agent's strengths and limitations?

Pros
  • 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_REF or AMBIGUOUS_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.
Limitations
  • 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, and mouse-up are reserved names that return ACTION_NOT_SUPPORTED in the stateless CLI.
  • References are scoped to snapshot namespaces, and callers must implement re-observation and retry handling for changed or ambiguous interfaces.
  • launch --cdp requires 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 do you install or deploy this agent?

The recommended prebuilt installation is:

npm install -g agent-desktop

It can also be invoked without a global installation:

npx agent-desktop snapshot --app Finder -i

Building 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 permissions

Start with a working observation:

agent-desktop snapshot --app Finder -i

Keep 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 -i

For a dense application, use:

agent-desktop snapshot --skeleton --app Slack -i --compact
agent-desktop snapshot --root @e3 --snapshot s8f3k2p9 -i --compact

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

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.

FAQ

Does it automate Windows or Linux desktops?
Not currently. Release artifacts include the C-ABI library for macOS, Linux, and Windows, but the platform table marks Windows and Linux accessibility, input, screenshots, clipboard, and window management as planned.
Which macOS permissions are required?
Core desktop control requires Accessibility permission. Screenshots require Screen Recording, and opening Notification Center requires Automation permission for System Events. Plain permission checks do not prompt; permissions --request requests missing permissions through an isolated helper.
What happens when the interface changes after a snapshot?
Actions re-identify the target at execution time. A uniquely identifiable moved target may continue, but a missing or changed identity returns 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?
No provider requirement is documented. The product is exposed as a local CLI and C-ABI library for an external agent to call, so adopters supply their own agent or model integration.
Can trace exports contain sensitive data?
Yes. Sessions can record JSONL events, and HTML exports may embed screenshots as base64. The documentation says exports created with full artifacts should be treated like screenshots.

Related agents