---
title: "Agent-Browser -- Agentic Browser Automation"
description: "140+ command browser automation platform. Your real Chrome, completely undetectable. 98.5% fewer tokens than Playwright. Parallel sessions. Open source."
---

# Agent-Browser -- Agentic Browser Automation

agent-browser is a 140+ command browser automation platform that replaces Playwright, PinchTab, and Puppeteer. It connects directly to Chrome over WebSocket via the Chrome DevTools Protocol. There is no middleware, no detection surface, and no bundled browser binary. You operate your real Chrome installation as yourself. Licensed under Apache-2.0.

## Why It's Different

Most browser automation tools ship a bundled Chromium binary with automation flags that websites detect and block. agent-browser takes a fundamentally different approach:

- **Your real Chrome installation.** Not a bundled binary. Your extensions, your profile, your full-size window.
- **No navigator.webdriver flag.** Sites cannot distinguish agent-browser from a human user. There is no automation fingerprint.
- **Persistent profile.** Log in once and stay logged in across sessions. Cookies, localStorage, and sessionStorage persist naturally.
- **Direct WebSocket CDP.** The connection goes straight from the CLI to Chrome over a Unix socket. There is no Node.js relay layer adding latency or complexity.
- **@e1 element references.** Stable, session-scoped references to page elements instead of fragile CSS selectors that break when markup changes.

## Token Efficiency

Token cost is the primary constraint when AI agents interact with browsers. agent-browser was designed from the ground up to minimize token consumption:

- **~200 tokens per page** via snapshot, compared to ~13,700 tokens for the same page through Playwright MCP. That is a 98.5% reduction.
- **10-step workflow cost:** 7,000 tokens with agent-browser versus 114,000 tokens with Playwright MCP.
- **5.7x more automation cycles** under the same token budget before hitting context limits.
- **snapshot -i (interactive only):** ~400 tokens per page, filtering to only actionable elements.

These numbers come from direct measurement on production pages. The difference compounds over multi-step workflows -- what exhausts a context window in Playwright MCP barely registers with agent-browser.

## 140+ Commands

Commands are organized by function:

**Navigation:**
open, back, forward, reload, url, title, content

**Interaction:**
click, dblclick, type, fill, clear, check, uncheck, select, focus, hover, drag, upload, press, tap

**Semantic Locators:**
getbyrole, getbytext, getbylabel, getbyplaceholder, getbyalttext, getbytitle, getbytestid

**Inspection:**
snapshot, snapshot -i --compact, errors, console

**Screenshots and Video:**
screenshot, video_start, video_stop, recording_start, recording_stop, screencast

**JavaScript:**
evaluate, evalhandle, addscript, addstyle, addinitscript

**Waits:**
wait --load, wait --selector, waitforurl, waitforloadstate, waitforfunction, waitfordownload

**Tabs:**
tab new, tab list, tab switch, tab close, window new

**Storage:**
cookies_get, cookies_set, cookies_clear, storage_get, storage_set, storage_clear, state_save, state_load, state_list, state_clear

**Network:**
route, unroute, requests, headers, offline, dialog

**Device Emulation:**
viewport, device, useragent, timezone, locale, geolocation, permissions

**Performance:**
trace_start, trace_stop, profiler_start, profiler_stop, har_start, har_stop

**Diff:**
diff_snapshot, diff_screenshot, diff_url

**PDF:**
pdf

## Agentic Capabilities

agent-browser is not a testing tool. It is a general-purpose browser automation platform for AI agents. Any task a human performs in Chrome, agent-browser can handle programmatically:

- Find 5-star Amazon sellers and order from the one with the best price-to-rating ratio.
- Message 20 Alibaba suppliers with a custom RFQ, tracking which ones respond.
- Fill out multi-page application forms using data from a spreadsheet.
- Browse marketplace listings, extract pricing data, and compile comparison reports.
- Execute multi-step workflows that span multiple pages, tabs, and domains.

The agent reasons about what it sees on the page, decides the next action, and verifies the result -- the same loop a human follows, but faster and without manual intervention.

## Parallel Sessions

Each agent gets its own isolated browser session through the AGENT_BROWSER_SESSION environment variable:

- Hundreds of parallel sessions run without race conditions or shared state.
- Each session receives an independent Unix socket, process ID, and Chrome tab.
- No conflicts between concurrent agents operating on different tasks.
- Sessions are fully isolated -- one agent's navigation, cookies, and page state never leak into another's.

This makes agent-browser suitable for multi-agent architectures where several agents need to browse simultaneously without coordination overhead.

## Claude Code Skill

agent-browser ships with a Claude Code skill that structures browser interactions into a three-phase loop:

1. **Research.** Inspect the page structure via snapshot before acting.
2. **Plan.** Determine the most efficient interaction path based on what the page contains.
3. **Verify.** Confirm the result after each action, catching failures immediately.

Install the skill by copying SKILL.md to ~/.claude/skills/agent-browser/.

## State and Security

- **state_save and state_load** persist cookies, localStorage, and sessionStorage across sessions.
- **AES-256 encryption** is available for saved authentication state, protecting credentials at rest.
- **Auto-expiry** removes old saved states after a configurable period (default: 30 days).
- **Remote browser support** connects to hosted Chrome instances via Browserbase, Browser Use, and Kernel providers.

## Open Source

Apache-2.0 licensed. Source code: [github.com/CalebDane7/agent-browser](https://github.com/CalebDane7/agent-browser)

Originally forked from Vercel Labs. The CDP transport layer has been completely rewritten.

## Related

- [Safety Gates](https://erebora.org/mantis/docs/safety-gates) -- Gate system integrates with browser verification
- [Skills & Agents](https://erebora.org/mantis/docs/skills-and-agents) -- agent-browser Claude Code skill
- [Getting Started](https://erebora.org/mantis/docs/getting-started) -- First run setup
- [Live Documentation](https://erebora.org/mantis/) -- Full product page
