# AI use cases for Agent Desktop (vercel-labs/agent-desktop)

Repo: [vercel-labs/agent-desktop](https://github.com/vercel-labs/agent-desktop) | Use cases: 3 | Page: https://dedupedai.com/use-cases/vercel-labs-agent-desktop/

agent-desktop gives an AI agent computer use without screenshots or pixel matching. It reads the accessibility tree of a desktop app on macOS, Windows or Linux and returns it as JSON, with a ref for every element the agent can act on. The agent clicks or types on a ref, reads the UI again to check the result, and repeats. It ships as a CLI and a C library, with no model inside.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Let an agent operate a desktop app through its accessibility tree: https://dedupedai.com/use-cases/vercel-labs-agent-desktop/let-an-agent-drive-a-desktop-app/
- Add desktop control to your agent over MCP: https://dedupedai.com/use-cases/vercel-labs-agent-desktop/add-desktop-control-to-your-agent-with-mcp/
- Teach your agent the desktop loop with the bundled skill: https://dedupedai.com/use-cases/vercel-labs-agent-desktop/install-the-agent-desktop-skill/

## How to let an agent operate a desktop app through its accessibility tree with Agent Desktop

Repo: [vercel-labs/agent-desktop](https://github.com/vercel-labs/agent-desktop) | Difficulty: Intermediate | Time: 20 minutes | Basis: From the README

Install the CLI, snapshot an app, and have the agent click refs instead of guessing at pixels.

**Who it is for:** A developer who wants an agent to use Finder or another native app without screenshot matching.

**The problem:** Screenshot-based computer use is slow and fragile when the agent has to guess where to click.

**The outcome:** An agent that reads an app as JSON with a ref for each element, acts on a ref, and checks the result.

### Steps

1. Run `npm install -g agent-desktop` to install the CLI
2. Run `agent-desktop status` to see platform, permissions and supported surfaces
3. On macOS run `agent-desktop permissions --guide` to walk through the Accessibility grant
4. Run `agent-desktop snapshot --app Finder -i` to list interactive elements, each with a ref
5. Run `agent-desktop click @s8f3k2p9:e8` with a ref from that snapshot, then snapshot again to verify

### Prompt to paste into your agent

```text
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.

Risk, credentials: Snapshots, clipboard reads, screenshots and command output can contain private desktop content, so keep them out of public logs and uploads.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/vercel-labs-agent-desktop/let-an-agent-drive-a-desktop-app/

## How to add desktop control to your agent over MCP with Agent Desktop

Repo: [vercel-labs/agent-desktop](https://github.com/vercel-labs/agent-desktop) | Difficulty: Intermediate | Time: 15 minutes | Basis: From the README

Serve every Agent Desktop command as an MCP tool over stdio.

**Who it is for:** A developer whose agent already speaks MCP and who wants desktop tools such as desktop_snapshot and desktop_click.

**The problem:** Wiring a custom desktop automation layer into an agent harness takes glue code.

**The outcome:** An MCP server that exposes each command as a tool and returns its JSON envelope.

### Steps

1. Install the CLI with `npm install -g agent-desktop`
2. Add `{ "mcpServers": { "agent-desktop": { "command": "agent-desktop", "args": ["mcp"] } } }` to your MCP client config
3. Restart the client so it lists tools named after commands, such as `desktop_snapshot` and `desktop_click`
4. Pass global flags such as `--session`, `--headed` or `--trace` to `mcp` if you want them on every call

### Prompt to paste into your agent

```text
Add agent-desktop to my MCP config with command `agent-desktop` and args `mcp`, restart, then use desktop_snapshot on <app> and desktop_click to <task>. Retry a failed command only when error.disposition.retry is safe.
```

### Caveat

Actions are headless by default with no pointer movement; pass --headed for physical input.

Risk, credentials: The agent can see and act on anything visible in the app it controls, so scope it to apps you are happy to expose.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/vercel-labs-agent-desktop/add-desktop-control-to-your-agent-with-mcp/

## How to teach your agent the desktop loop with the bundled skill with Agent Desktop

Repo: [vercel-labs/agent-desktop](https://github.com/vercel-labs/agent-desktop) | Difficulty: Beginner | Time: 10 minutes | Basis: From the README

Install the Agent Desktop skill so the agent follows the observe, act, verify and retry rules.

**Who it is for:** A developer who wants the agent to follow the right retry and verification rules from the start.

**The problem:** Without guidance an agent may retry unsafe actions or skip verifying the result.

**The outcome:** An agent harness that knows the loop, refs, verification and retry rules for your version.

### Steps

1. Run `npx skills add https://github.com/vercel-labs/agent-desktop --skill agent-desktop`
2. Or run `agent-desktop skills get desktop` to read the loop, refs, verification and retry rules
3. Run `agent-desktop skills get platform` to see what differs on your OS
4. Optionally add a line to your `AGENTS.md` telling the agent to run both guides before first use

### Prompt to paste into your agent

```text
Install the agent-desktop skill with `npx skills add https://github.com/vercel-labs/agent-desktop --skill agent-desktop`, read `agent-desktop skills get desktop` and `agent-desktop skills get platform`, then do <task> in <app>.
```

### Caveat

This card is written from the vercel-labs/agent-desktop README, not from a test run by Deduped. Before you start, make sure you have Node.js and npm. Check the repo for newer instructions before you rely on these steps.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/vercel-labs-agent-desktop/install-the-agent-desktop-skill/
