Vercel provides a user-friendly interface for Agent, allowing users to achieve approximately 2,275 stars per day without taking screenshots or manually identifying coordinates.

Vercel provides a user-friendly interface for Agent, allowing users to achieve approximately 2,275 stars per day without taking screenshots or manually identifying coordinates.

1 week ago
duguying
7 views
Source: GitHub

Vercel Labs offers an open-source agent-based desktop application that uses a system-level accessibility tree instead of screenshots to find coordinates. It provides a single snapshot containing the reference (ref) for each interactive element, and all actions and validations are based on these refs. The application is compatible with macOS, Windows, and Linux.

Related tags

#GitHub#Trending#AI Agent#Computer Use#Rust

Vercel's Interface to Turn Your Desktop into an Agent: A Day with 2,275 Stars, Relying on Screenshots and Coordinate Detection

Over the past year, "computer use" has essentially become synonymous with having a model look at screenshots, guess coordinates, and click the mouse. This approach works well in demonstration videos, but it often requires precise pixel alignment, scaling adjustments, and dealing with high-DPI screens. Vercel Labs' newly open-source agent-desktop takes a different approach: instead of interacting directly with pixels, it reads the operating system's accessibility tree.

The project received 2,275 stars yesterday, bringing its total to 9,948. It is written in Rust and has an Apache-2.0 license.

One Snapshot, One Ref

The interaction model for agent-desktop consists of three steps: observe, interact with a ref, and then confirm the result through observation.

agent-desktop snapshot --app Finder -i      # Get the ref for each interactive element
agent-desktop click @s8f3k2p9:e8            # Click on a specific ref
agent-desktop snapshot --app Finder -i      # Take another snapshot to verify the result

snapshot returns a JSON containing information such as window ID, title, snapshot_id, ref_count, and a tree structure with properties like role, name, ref_id, and available_actions. The model receives information about the element's name (e.g., "Documents," along with the ability to click), rather than coordinates like "(412, 388)," which would require precise pixel mapping.

Refs are tightly bound to snapshots. Directly writing @e8 will be rejected by INVALID_ARGS; if the interface changes, actions may return STALE_REF or AMBIGUOUS_TARGET, requiring a new snapshot and using a different ref. Similarly, multi-window scenarios will also report AMBIGUOUS_TARGET. The error details will list the candidate window IDs, which can be specified using the `--window-id` option.

60 Commands, Default No Focus

The command line has 60 commands in total, with 56 being usable. They are grouped into categories such as observation (snapshot, find, get, is, screenshot), interaction with refs (click, type, set-value, select, toggle, scroll-to), low-level mouse and keyboard operations, application and window management, notifications, clipboard access, waiting, and session tracking.

Notably, the commands key-down, key-up, mouse-down, and mouse-up are deliberately disabled unless a background process can release the pressed key or button. This is for practical reasons: if Agent crashes mid-operation, leaving a stuck Shift key would be more problematic than the operation failing.

The default mode is headless: all ref operations use the accessibility API without moving the pointer or stealing focus, allowing users to continue working on their screen without interruption. Global --headed mode is used only when actual user input is required.

Three Platforms, Three Hurdles

  • macOS: Requires granting "accessibility" permissions; the agent-desktop permissions --guide command will guide users through this process.
  • Windows: Applications with the same level of integrity as the terminal do not require additional authorization;
  • Linux: Requires a graphical session and at-spi2-core, with differences between X11 and Wayland. Screenshots use X11 windows or Wayland portals, while clipboard access relies on wl-clipboard under Wayland.

Installation is as simple as running npm install -g agent-desktop. The package includes native binaries for both x64 and ARM64 architectures. Alternatively, you can use Bun, Yarn, or pnpm, or simply extract the native archive from the "Releases" section, bypassing the JS launcher.

Another detail that makes Agent easier to use is that the binary includes documentation matching the version: agent-desktop skills get desktop explains loops, refs, verification, and retry rules; skills get platform explains differences for the current system. The project has also been moved from lahfir's personal repository to the vercel-labs organization, with v1.0.0 released on October 28th and v1.0.2 released two days later.

One Critical Question to Consider in Advance

There's a section in the README that goes beyond marketing language: "When taking snapshots, reading from the clipboard, or using screenshots, and when running commands or generating debugging outputs, be aware that they may contain private desktop content. Do not include them in public logs or upload them." The optional JEV assistant skill will send screen descriptions to a configured model vendor.

In other words, agent-desktop reduces the cost of "looking at the screen" by reading its structure instead of relying on pixel inference. However, the underlying content remains the same: a desktop with emails, chat logs, and a password manager.

Repository address: https://github.com/vercel-labs/agent-desktop

More News

Want to see more quality content?

Browse all news