# agent-browser

> Native Rust CLI that lets AI agents open pages, read them as an accessibility tree and act on elements from the shell.

- Type: agent or tool
- Field: Web Automation & Scraping
- Repository: https://github.com/vercel-labs/agent-browser
- GitHub stars: 54812
- Licence: Apache-2.0
- Language: Rust
- Last push: 2026-11-30
- Page: https://imutechz.in/agents/agent-browser-vercel-labs

## What it is
agent-browser is a native Rust CLI that gives an AI agent a browser it can drive one command at a time. The snapshot command returns the page as compact text with refs such as @e1, which the agent can click or fill, then it reads the page again. A background daemon controls the browser over the Chrome DevTools Protocol. Chrome for Testing is the default, and other engines and cloud providers are supported.

## Features
- snapshot command with element refs
- Click, fill, type, scroll, upload and drag commands
- Screenshot, pdf, record and diff commands
- Attach to running Chrome via CDP
- Cloud browser providers and iOS Simulator
- Built-in MCP server over stdio

## Best for
- Letting agents browse and fill forms
- Browser testing from the shell
- Capturing screenshots and PDFs
- Wiring browser control into MCP clients

## Pros
- Browser stays open between commands
- Ships version-matched skills for agents
- Clicks fail instead of reporting false success on covered targets

## Cons
- Refs go stale after navigation and need a new snapshot

## Install
```
npm install -g agent-browser
agent-browser install
```

## Usage
```
agent-browser open example.com
agent-browser snapshot -i
agent-browser click @e1
```

Tags: browser-automation, cli, ai-agents, rust, mcp, accessibility-tree, scraping, chrome
