# AI use cases for Agent Browser (vercel-labs/agent-browser)

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

agent-browser is a fast native Rust CLI from Vercel Labs for browser automation by AI agents. An agent opens a page, takes an accessibility snapshot with element refs, then clicks, fills and reads by ref, and takes screenshots, including annotated ones and screenshots skipped when nothing changed to save tokens. It downloads Chrome for Testing on first run or uses an existing Chrome, Brave, Playwright or Puppeteer install.

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

- Let your agent browse with short CLI commands: https://dedupedai.com/use-cases/vercel-labs-agent-browser/let-your-agent-browse-with-short-cli-commands/
- Take annotated or skip-if-unchanged screenshots: https://dedupedai.com/use-cases/vercel-labs-agent-browser/take-token-saving-screenshots-for-agent-checks/
- Pin Agent Browser as a project dependency for CI: https://dedupedai.com/use-cases/vercel-labs-agent-browser/pin-agent-browser-in-a-project/

## How to let your agent browse with short CLI commands with Agent Browser

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

Install Agent Browser and have the agent open, snapshot, click and fill by element ref.

**Who it is for:** A developer whose agent can run shell commands and needs to test a web flow.

**The problem:** Browser MCP servers load big tool schemas into every conversation.

**The outcome:** An agent that drives a real browser with compact commands and readable snapshots.

### Steps

1. Install: `npm install -g agent-browser`, then `agent-browser install` to get Chrome
2. Open a page: `agent-browser open example.com`
3. Get the accessibility tree with refs: `agent-browser snapshot`
4. Act by ref: `agent-browser click @e2`, `agent-browser fill @e3 "test@example.com"`, `agent-browser get text @e1`

### Prompt to paste into your agent

```text
Install vercel-labs/agent-browser and use it to open http://localhost:<port>, fill the signup form with test data, submit it, and report the resulting page text.
```

### Caveat



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-browser/let-your-agent-browse-with-short-cli-commands/

## How to take annotated or skip-if-unchanged screenshots with Agent Browser

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

Use screenshot options built for agents: numbered element labels and skipping unchanged images.

**Who it is for:** Someone whose visual checks burn tokens on near-identical screenshots.

**The problem:** Agents re-read the same screenshot again and again.

**The outcome:** Screenshots only when something changed, with labels the agent can refer to.

### Steps

1. Full page: `agent-browser screenshot page.png` (add --full for full page)
2. Labeled elements: `agent-browser screenshot --annotate`
3. Save tokens: `agent-browser screenshot --if-changed`

### Prompt to paste into your agent

```text
With vercel-labs/agent-browser, load <url>, take an annotated screenshot, change <setting>, and take a --if-changed screenshot. Tell me what changed on the page.
```

### Caveat



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-browser/take-token-saving-screenshots-for-agent-checks/

## How to pin Agent Browser as a project dependency for CI with Agent Browser

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

Install it locally in package.json so every run and CI job uses the same version.

**Who it is for:** A team using agent-driven browser checks in CI.

**The problem:** Global tools drift between machines and break CI.

**The outcome:** A pinned Agent Browser version invoked from package.json scripts.

### Steps

1. Run `npm install agent-browser` in the project, then `agent-browser install`
2. On Linux CI install system dependencies with `agent-browser install --with-deps`
3. Call it from package.json scripts
4. Upgrade later with `agent-browser upgrade`

### Prompt to paste into your agent

```text
Add vercel-labs/agent-browser as a dev dependency, add an npm script that runs a smoke check on <url>, and wire it into our CI with install --with-deps on Linux.
```

### Caveat



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-browser/pin-agent-browser-in-a-project/
