{
 "schema_version": 1,
 "generated": "2026-11-09",
 "id": "vercel-labs-agent-desktop--let-an-agent-drive-a-desktop-app",
 "repo": "vercel-labs/agent-desktop",
 "repo_url": "https://github.com/vercel-labs/agent-desktop",
 "repo_slug": "vercel-labs-agent-desktop",
 "title": "Let an agent operate a desktop app through its accessibility tree",
 "page_title": "How to let an agent operate a desktop app through its accessibility tree with Agent Desktop",
 "summary": "Install the CLI, snapshot an app, and have the agent click refs instead of guessing at pixels.",
 "who": "A developer who wants an agent to use Finder or another native app without screenshot matching.",
 "problem": "Screenshot-based computer use is slow and fragile when the agent has to guess where to click.",
 "outcome": "An agent that reads an app as JSON with a ref for each element, acts on a ref, and checks the result.",
 "steps": [
  "Run `npm install -g agent-desktop` to install the CLI",
  "Run `agent-desktop status` to see platform, permissions and supported surfaces",
  "On macOS run `agent-desktop permissions --guide` to walk through the Accessibility grant",
  "Run `agent-desktop snapshot --app Finder -i` to list interactive elements, each with a ref",
  "Run `agent-desktop click @s8f3k2p9:e8` with a ref from that snapshot, then snapshot again to verify"
 ],
 "agent_prompt": "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.",
 "agents": [
  "claude-code",
  "codex",
  "cursor"
 ],
 "difficulty": "Intermediate",
 "time": "20 minutes",
 "basis": "readme",
 "caveat": "If the UI changes, an action returns STALE_REF or AMBIGUOUS_TARGET and the agent has to take a new snapshot.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "rust",
 "requirements": [
  "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"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "credentials",
   "notice": "Snapshots, clipboard reads, screenshots and command output can contain private desktop content, so keep them out of public logs and uploads."
  }
 ],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/vercel-labs-agent-desktop/let-an-agent-drive-a-desktop-app/",
 "md": "https://dedupedai.com/use-cases/vercel-labs-agent-desktop/let-an-agent-drive-a-desktop-app/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/vercel-labs-agent-desktop--let-an-agent-drive-a-desktop-app.json",
 "api_version": "v1"
}
