Agent Browser: A Rust CLI That Gives AI Agents a Real Browser Session
Agent Browser is a Rust CLI that lets AI agents open pages, inspect elements, enter text, click controls, capture screenshots, and reuse browser sessions.
At a glance
- What is it?
- Agent Browser is a Rust command-line tool from Vercel Labs that lets AI agents open pages, inspect elements, fill forms, click controls, and reuse sessions. It is fast, but its design choices around Chrome for Testing and accessibility-tree refs shape who should adopt it.
- Who is it for?
- Adopt Agent Browser if you are building an AI agent that needs a real, reusable browser session with deterministic element references and you can accept the dependency on Chrome for Testing. Do not adopt it if you need a full browser automation framework with built-in waits, assertions, and cross-browser support, or if your environment cannot install Chrome.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 1 day ago.
- What is it written in?
- Mainly Rust, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
What Problem It Solves and Who It Is For
Agent Browser targets a specific gap: AI agents need to interact with web pages the way a human would, but most automation tools are built for scripted tests, not for a language model that decides its next action. The CLI exposes a narrow set of commands: open, snapshot, click, fill, get text, screenshot. Each command returns output that an agent can parse and feed back into the next decision. The intended user is a developer building an agent loop, not a QA engineer writing end-to-end tests. The README emphasizes speed: "Fast native Rust CLI." That positioning matters because agents often make dozens of browser calls per task, and latency multiplies. The tool also solves session reuse: an agent can keep a browser open across multiple invocations, preserving login state and client-side updates. That is a real advantage over tools that spawn a fresh browser per call and lose all context.
How It Works: Accessibility Tree Refs and the Browser Daemon
The core mechanism is the accessibility tree. When you run `agent-browser snapshot`, the tool returns an accessibility tree with refs like `@e2`. Those refs are not CSS selectors; they are stable identifiers tied to the rendered accessibility structure. Subsequent commands such as `click @e2` or `fill @e3 "test@example.com"` use those refs. This design is agent-friendly because the snapshot gives the model a compact, semantic view of the page, and the refs avoid the fragility of hand-written selectors. The tool also supports traditional selectors (`click "#submit"`) and semantic locators (`find role button click --name "Submit"`), so you are not locked into one approach. Under the hood, the CLI launches a Chrome instance from Chrome for Testing and communicates via the DevTools Protocol. The README notes that no Playwright or Node.js is required for the daemon, which keeps the runtime lean. The daemon persists across commands, which is how session reuse works. One important behavior: clicks fail early when another element covers the target's click point, such as a consent banner. The tool reports the covering element, and you must dismiss it and take a fresh snapshot before retrying. That is a deliberate trade-off: fail fast instead of guessing.
Getting It Running: Installation and First Commands
Installation is straightforward across package managers. The recommended path is `npm install -g agent-browser`, then `agent-browser install` to download Chrome from Chrome for Testing. Homebrew (`brew install agent-browser`) and Cargo (`cargo install agent-browser`) work too. On Linux, you need `agent-browser install --with-deps` to install system libraries; the command exits nonzero if it cannot install every required library, which is a clear failure signal. Building from source requires Node.js 24+, pnpm 11+, and Rust, then `pnpm install`, `pnpm build`, `pnpm build:native`, and `pnpm link --global`. The quick start is five commands: `open example.com`, `snapshot`, `click @e2`, `fill @e3 "test@example.com"`, `screenshot page.png`, then `close`. The `read` command is separate: it fetches a URL without launching Chrome, sends `Accept: text/markdown`, tries appending `.md`, walks ancestor paths for `llms.txt`, and falls back to readable text from HTML. That is a useful trick for agents that need to consume articles without a full browser session. Updating is handled by `agent-browser upgrade`, which detects your install method and runs the appropriate update command.
Limitations and Failure Modes
The most obvious limitation is the hard dependency on Chrome for Testing. If your environment cannot download or run that specific Chrome build, the tool will not work. The README says existing Chrome, Brave, Playwright, and Puppeteer installations are detected automatically, but the primary path is Chrome for Testing. That is a constraint for teams standardized on Firefox or WebKit. Another failure mode is the covering-element check on clicks: any overlay, modal, or cookie banner that sits on top of the target will cause the click to fail. That is intentional, but it means agents must handle overlays explicitly, adding complexity to the loop. The `read` command has its own quirks: it does not read `llms-full.txt` unless you ask for it, and `--require-md` fails unless the server returns `Content-Type: text/markdown`. If your target sites do not serve markdown, that flag is useless. Also, the snapshot refs are tied to the accessibility tree, which can change after page updates. The README warns to take a fresh snapshot after dismissing a covering element, but in a dynamic single-page app, refs may go stale between commands. The tool does not appear to offer built-in waits or retries, so an agent must handle timing itself.
The `read` Command: A Separate Fetch Pipeline
The `read` command deserves attention because it is not just a convenience wrapper. It is a separate HTTP fetch pipeline that never launches Chrome when given a URL. That is a design choice: for content consumption, you do not need a full browser, and avoiding it saves time and memory. The command sends `Accept: text/markdown`, tries the same URL with `.md` appended if the first response is not markdown, then walks ancestor paths toward `/` to find the nearest `llms.txt` for a matching docs link. It prints markdown or plain text when available, and falls back to readable text extracted from HTML. The `--llms index` option prints a compact nearest-ancestor `llms.txt` link list, and `--llms full` reads `llms-full.txt`. This is a practical tool for agents that need to ingest documentation or articles. But the behavior is conditional on server responses: if a server returns HTML with no markdown alternative, the fallback is HTML extraction, which may lose structure. Also, `--llms` and `--require-md` with no URL use the active tab URL because they depend on HTTP resources. That coupling is a subtle trap: if you run `agent-browser read --require-md` while a browser session is open, it uses the current tab, not a new fetch.
Alternatives and How They Differ
The obvious alternative is Playwright, which is a full browser automation library with built-in waiting, assertions, and multi-browser support. Playwright uses CSS selectors and XPath by default, and it has a Python and JavaScript API. The key difference is that Playwright is a library you embed in your agent code, not a CLI. You write scripts that control the browser programmatically, with automatic waiting for elements to appear. Agent Browser, by contrast, is a CLI that returns accessibility refs, which is more natural for a language model that emits shell commands. Another alternative is Puppeteer, which is Chrome-only and also library-based. Puppeteer is closer to Agent Browser in its Chrome dependency, but it lacks the CLI interface and the accessibility-tree snapshot approach. For agents, the CLI model has a lower integration cost: you do not need to write a driver script, just call commands. But you lose the rich control flow that a library gives you, such as retries and complex waiting logic. If your agent already runs in Node.js and you need fine-grained control, Playwright is a stronger fit. If you want a minimal command surface that returns semantic snapshots, Agent Browser is designed for that.
Maintenance, Upgrade Path, and License
The project is under active development, with releases v0.34.0, v0.35.0, and v0.35.1 across August 2026. The version numbers below 1.0 signal that the CLI surface may change between releases. The `agent-browser upgrade` command detects your installation method and runs the appropriate update, which lowers the upgrade cost. However, because the tool manages its own Chrome download, updates to Chrome for Testing may introduce behavioral changes that affect snapshots or click handling. The license is Apache-2.0, which permits commercial use, modification, and distribution with attribution. That is a permissive license, so you can embed the binary in your own product without open-sourcing your code. The README warns that building from source requires specific toolchain versions (Node.js 24+, pnpm 11+, Rust), which is a maintenance burden if you want to customize the tool. For most users, the npm or Homebrew binary is the practical path. The maintenance cost is moderate: you need to track releases and test your agent loops after each upgrade, especially if you rely on snapshot ref formats.
Editorial conclusion
Adopt Agent Browser if you are building an AI agent that needs a real, reusable browser session with deterministic element references and you can accept the dependency on Chrome for Testing. Do not adopt it if you need a full browser automation framework with built-in waits, assertions, and cross-browser support, or if your environment cannot install Chrome. Before committing, verify that the accessibility-tree refs from `agent-browser snapshot` remain stable across your target pages, that `agent-browser install --with-deps` completes on your Linux CI, and that the `read` command's markdown fallback behavior matches your content sources. The project is actively released (v0.35.1 as of August 2026) and Apache-2.0 licensed, but you must test it against your specific sites because refs and covering-element failures depend on page structure.
Community notes