Credentials. Snapshots, clipboard reads, screenshots and command output can contain private desktop content, so keep them out of public logs and uploads.
Who it is forA developer who wants an agent to use Finder or another native app without screenshot matching.
The problemScreenshot-based computer use is slow and fragile when the agent has to guess where to click.
The outcomeAn agent that reads an app as JSON with a ref for each element, acts on a ref, and checks the result.
What you need first
- Node.js and npm (or Homebrew on macOS and Linux)
- macOS needs the Accessibility permission granted
- An AI agent to run the observe, act, verify loop
Steps
- Run
npm install -g agent-desktopto install the CLI - Run
agent-desktop statusto see platform, permissions and supported surfaces - On macOS run
agent-desktop permissions --guideto walk through the Accessibility grant - Run
agent-desktop snapshot --app Finder -ito list interactive elements, each with a ref - Run
agent-desktop click @s8f3k2p9:e8with a ref from that snapshot, then snapshot again to verify
Prompt for your agent
Install agent-desktop with `npm install -g agent-desktop`, run `agent-desktop status`, then snapshot <app> with `agent-desktop snapshot --app <app> -i`. Click the element that does <task> using its ref, and snapshot again to confirm it worked.
Caveat. If the UI changes, an action returns STALE_REF or AMBIGUOUS_TARGET and the agent has to take a new snapshot.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for vercel-labs/agent-desktop and "Let an agent operate a desktop app through its accessibility tree"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer