█

AI/TLDR

Buy me a coffee
Buy me a coffee

agent-browser

A native Rust CLI that gives an AI agent a browser it can drive one shell command at a time

Computer & Browser UseOpen source
Latest
v0.42.0
Updated
10 Nov 2026
Language
Rust
License
Apache-2.0
Coverage
1 story
$npm install -g agent-browser

What's new

v0.42.010 Nov 2026

Adds experimental saved flows: record a browser task once and replay its requests, trying direct HTTP first, then page requests, then the recorded commands. Also trims MCP tool arguments, fixes session reuse and Safari/iOS sessions, and now needs Node 22 or later.

Latest news

IN SHORT

What is agent-browser?

agent-browser is an open-source browser automation tool from Vercel Labs, built for AI agents rather than for test scripts. It is a native Rust command-line program: an agent opens a page, reads it, clicks or types, and checks the result, one shell command at a time. It sits in the Computer & Browser Use category of the Agents & Automation tools and is open-source, written in Rust and licensed Apache-2.0.

Updated Markdown version ↗

Overview

agent-browser is an open-source browser automation tool from Vercel Labs, built for AI agents rather than for test scripts. It is a native Rust command-line program: an agent opens a page, reads it, clicks or types, and checks the result, one shell command at a time. Because every step is a plain command with text output, any coding agent that can run a terminal can use it, and an `agent-browser mcp` command also exposes it as an MCP server over stdio.

The core loop is built on snapshots. `agent-browser snapshot` returns the page as a compact accessibility tree with a ref such as `@e1` for each element, and the agent acts on those refs. Refs only hold for the page state they came from, so after a navigation or DOM change the agent takes a new snapshot. A click fails instead of reporting success when the target is hidden, disabled, off-screen or covered. CSS selectors, text, XPath and semantic locators work too.

Under the hood, the CLI sends each command to a background daemon that starts on the first command and controls the browser over the Chrome DevTools Protocol. Each `--session` gets its own daemon and browser, and a headless browser shuts down after an hour without commands. Chrome for Testing is the default; the tool can also attach to a running Chrome, use the Lightpanda or Obscura engines, drive Mobile Safari in the iOS Simulator, or connect to cloud browsers such as Browserbase, Browserless, Browser Use, Kernel and AgentCore. Its sibling project agent-desktop does the same for native desktop apps.

What it does

  • Accessibility-tree snapshots with a ref per element (`@e1`) that the agent acts on, then re-reads to verify
  • Clicks fail loudly when the target is hidden, disabled, off-viewport or covered
  • CSS, text, XPath and semantic locators, e.g. `find role button click --name "Submit"`
  • Background daemon per session talking to the browser over the Chrome DevTools Protocol
  • Chrome for Testing by default; attach to a running Chrome with `--cdp` or `--auto-connect`; Lightpanda and Obscura engines; Mobile Safari in the iOS Simulator
  • Cloud browser providers: Browserbase, Browserless, Browser Use, Kernel and AgentCore
  • Built-in MCP server (`agent-browser mcp`) and version-matched agent skills (`agent-browser skills get core`)
  • Experimental saved flows (v0.42.0): record a browser task once and replay its requests
  • Native binaries for macOS, Linux (glibc and musl) and Windows

Getting started

agent-browser ships as an npm package and a Homebrew formula with native binaries for macOS (ARM64, x64), Linux (ARM64, x64) and Windows (x64). The npm package needs Node 22 or later.

Install the CLI and a browser

Install globally, then download Chrome for Testing once. Homebrew works too (`brew install agent-browser`). On Linux, `agent-browser install --with-deps` also installs the browser's system libraries.

bashbash
npm install -g agent-browser
agent-browser install

Open, snapshot, act, check

Open a page, list its interactive elements with refs, act on a ref, and check the result. Take a new snapshot after anything changes the page.

bashbash
agent-browser open example.com
agent-browser snapshot -i       # interactive elements, each with a ref
agent-browser click @e1         # act on a ref from that snapshot
agent-browser get url           # check the result
agent-browser close

Teach your agent the loop

Load the core skill into your agent before first use; the README suggests adding this instruction to AGENTS.md. `skills list` shows specialised skills such as electron and slack.

bashbash
agent-browser skills get core
agent-browser skills list

Or run it as an MCP server

For agents that prefer MCP tools over shell commands, start the built-in MCP server over stdio.

bashbash
agent-browser mcp

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Letting a coding agent check its own web UI changes in a real browser
  • Filling forms and walking through multi-step web flows from an agent's shell
  • Running isolated browser sessions in parallel, one per `--session`
  • Pointing an agent at a hosted cloud browser instead of a local Chrome

How agent-browser compares

agent-browser alongside other open-source computer & browser use tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
Browser Use★ 121kA Python library that lets agents control a real browser to read pages and complete tasks online from natural-language instructions.
Open Interpreter★ 68.9kA lightweight coding agent that runs code on your own computer to carry out tasks from natural-language requests.
Chrome DevTools MCP★ 55.1kThe Chrome team's MCP server that lets a coding agent control and inspect a live Chrome browser — performance traces, network requests, console messages and Puppeteer-backed automation.
UI-TARS Desktop★ 39.6kByteDance's multimodal agent stack and desktop app that controls a computer's graphical interface using vision-language models.
CloakBrowser★ 32.8kStealth Chromium build with source-level fingerprint patches that drops into Playwright or Puppeteer code, so agents and scrapers browse without tripping bot detection.
Cua★ 32.2kInfrastructure for computer-use agents, providing sandboxes and SDKs that let agents control full desktops on macOS, Linux, and Windows.
OpenCLI★ 31kTurns websites into deterministic CLI commands and lets agents drive your already-logged-in Chrome through a browser bridge extension, with adapters for sites and local binaries.
agent-browser—A native Rust CLI that gives an AI agent a browser it can drive one shell command at a time