agent-desktop lets AI agents see and operate desktop apps on macOS, Windows, and Linux via the OS accessibility tree instead of screenshots or pixel matching.
Overview
agent-desktop is a computer-use layer for AI agents. It reads a desktop application’s accessibility tree and returns JSON with refs for each actionable element. The agent clicks or types on refs, snapshots again to verify outcomes, and repeats. The control loop stays in your agent; the tool ships without an embedded model.
It is distributed as a CLI and as a C library (libagentdesktopffi) for in-process calls. Both paths share one core that talks to each OS through a platform adapter. macOS uses the AX API, Windows uses UI Automation, and Linux uses AT-SPI on X11 or Wayland.
Observe commands cover snapshots, find, screenshots, and listing surfaces. Action commands target refs for clicks, typing, focus, scrolling, and similar UI operations, with optional headless mode that avoids moving the pointer or stealing focus unless --headed is set. MCP mode exposes commands as stdio tools named after each command.
Install paths include package managers such as Bun, Yarn, pnpm, and Homebrew on macOS and Linux, plus native release archives for direct execution. Refs belong to a specific snapshot; stale or ambiguous targets require a fresh snapshot. Dense UIs can be mapped with skeleton snapshots before drilling into regions.
Platform requirements listed are macOS 13 or later, Windows 10 1809 or later, and Ubuntu 24.04 or later on x86_64 or aarch64. Snapshots, clipboard content, screenshots, and debug output may include private desktop data and should be handled carefully in logs.
Key features
- Accessibility-tree JSON snapshots with refs
- Headless ref actions by default
- 57 operational CLI commands
- MCP server over stdio
- Session and trace support
- C library for in-process use
- Sandbox command group
- Version-matched agent skill guides
Use cases
- Agent-driven desktop automation
- UI testing without pixel matching
- Slack and other dense app navigation
- MCP harness desktop control
- Piped stdin for secret input steps