Skip to content

What Is agent-browser? Letting an AI Agent Drive a Browser: Setup, Commands, MCP and Security

Your coding agent (Claude Code, Codex, Cursor) writes code but can't see for itself how the site works on screen. agent-browser gives it a browser: the agent opens the page with `agent-browser open site.com`, reads it with `snapshot -i` as a short list where every button and field gets a ref such as `@e1`, clicks and types with `click @e1` or `fill @e2 "…"`, then reads the page again to check the result. You tell the agent "fill in the contact form, submit it and show me the result in a screenshot"; in return you get a summary of the steps it took and the screenshot.

What it does
Lets an agent drive a browser by command
Type
Command-line tool (+ skills, MCP server)
Made by
Vercel Labs (official repository)
Where
Claude Code, Codex, Cursor, Gemini CLI, Copilot and any agent that runs shell commands
System
macOS, Linux, Windows (x64)
Default limits
None; security settings are turned on by hand
Latest version
0.43.0 (November 12, 2026)
Price
Free, Apache-2.0

What is agent-browser for?

When you tell a coding agent "fix the bug in the signup form," it changes the code but can't see whether the form really works in the browser; you do the checking. agent-browser closes that gap: by running short shell commands, the agent opens a real Chrome, reads the page, clicks, types and verifies the result itself. The browser stays open between commands, so each step is a one-line command.

Who it's for: developers building websites or apps; agency teams that want the form, cart and checkout flows on client sites checked after every release; anyone building browser automation with an agent. You need to be comfortable running commands in a terminal.

What it isn't: it isn't an AI or a chat app on its own; your coding agent (or you) runs the commands. The optional chat command turns a plain sentence into commands, but it needs a Vercel AI Gateway key.

How does agent-browser work?

Open the page› agent-browser open example.comThe first command starts the background daemon and Chrome.
Read the page› agent-browser snapshot -i
  • - link "Learn more" [ref=e1]
Interactive elements come back as short text with their refs.
Click and check› agent-browser click @e1The agent verifies the result with get url or a fresh snapshot.
Refs describe the page at the moment it was read; take a new snapshot after the page changes.

Each command goes to a background process (daemon) that starts with the first command; it controls Chrome over the Chrome DevTools Protocol (CDP, Chrome's remote-control interface). The default browser is Chrome for Testing. If you like, it connects to your open Chrome (--cdp, --auto-connect), other engines (Lightpanda, Obscura), Safari in the iOS Simulator or a cloud browser provider. Each --session gets its own browser; by default a headless browser closes after an hour without commands.

Maker's measurement: a snapshot with refs takes about 200–400 tokens, while the page's full DOM takes about 3,000–5,000 tokens (agent-browser.dev introduction, November 18, 2026).

What do you type, and what do you get? Examples

With the skill installed, you give the agent work in a plain sentence and it picks the commands itself. The requests below are derived from the usage patterns in the documentation; the result depends on the agent and the state of the site.

Have it check a form flow"Using agent-browser, open http://localhost:3000/contact, fill in the form with a sample name and email and submit it. Check whether a success message appears and show the result in a screenshot."What you get: the agent runs open, snapshot -i, fill, click and screenshot; you get a summary of what it saw at each step and a screenshot file. If a cookie banner covers the button, the click isn't reported as a success according to the documentation; the error names the covering element.
Exploratory test report"Load agent-browser's dogfood skill (agent-browser skills get dogfood) and walk through https://staging.example.com like a user. Report the bugs and usability issues you find, with screenshots."What you get: according to the documentation, the dogfood skill navigates the app like a real user and produces a structured report with screenshots and repro videos.
You can also run it by hand (README quick start)› agent-browser open example.com agent-browser snapshot -i agent-browser click @e1 agent-browser get url agent-browser close

For example.com, the snapshot output in the documentation is a single line: - link "Learn more" [ref=e1]. click @e1 clicks that link, and get url prints the new address.

How do you install agent-browser?

Installation has two parts: first you install the CLI, then you add the skill so the agent knows about it. No account or key is needed. According to the npm listing, Node.js 22 or later is required. The commands come from the official installation page; the version number is this page's suggestion.

Version-pinned install› npm install -g agent-browser@0.43.0 agent-browser install

agent-browser install downloads Chrome for Testing (the first time). The official command has no version: npm install -g agent-browser.

Introduce it to your agent (skill): the official route for Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Goose, OpenCode and Windsurf:

skill› npx skills add vercel-labs/agent-browser

The installed skill is thin: it tells the agent to run agent-browser skills get core first, so the instructions always match the installed CLI version. If you'd rather not install a skill, adding these two lines to your AGENTS.md or CLAUDE.md file is enough:

AGENTS.md› Use `agent-browser` for browser automation. Before the first use, run `agent-browser skills get core` and follow it.

For MCP clients: agent-browser mcp starts an MCP server over stdio; --tools core,network,react narrows the tool groups. Your MCP client runs this command as a subprocess.

To confirm the install, run agent-browser doctor: it checks Chrome, the daemons, the config files and a test launch; if all is well, the exit code is 0. --fix also performs repairs such as installing a missing Chrome.

agent-browser commands

GroupCommandsWhat for
Navigate and readopen, back, reload, read, snapshot, get, isOpening the page, reading its text and state
Interactclick, fill, type, press, select, check, scroll, drag, upload, findClicking, typing, selecting, uploading files
WaitwaitWaiting for the page or an element to be ready
Capturescreenshot, pdf, record, download, diffScreenshots, PDFs, video, visual diffs
Page and networkcookies, storage, network, evalCookies, storage, network requests, JavaScript
Debugconsole, errors, trace, profiler, vitals, react, a11yConsole, errors, performance, accessibility
Sessions and authsession, state, auth, profiles, confirm, denySeparating sessions, signing in from the vault
Agents and integrationsskills, mcp, chat, batch, pluginReading skills, MCP server, batched commands
Setupinstall, upgrade, doctor, connect, closeDownloading Chrome, updating, diagnosing problems

Besides refs, CSS selectors, text, XPath and semantic locators also work: agent-browser find role button click --name "Submit". screenshot --annotate gives an image with numbered elements, and screenshot --if-changed skips unchanged images. For the full list, run agent-browser --help.

Which agents and systems does agent-browser work with?

Claude Code, Codex, Cursor, Gemini CLIYesThe installation docs list the skill route.
GitHub Copilot, Goose, OpenCode, WindsurfYesThe same skill route is named in the docs.
MCP clientsYesThe agent-browser mcp stdio server.
macOS (ARM64, x64)YesNative binary; Chrome for Testing isn't downloaded below macOS 13.
Linux (ARM64, x64)Yesglibc and musl; --with-deps installs the system libraries.
Windows (x64)YesNative binary; headless Chrome runs on a separate desktop.

The interface and docs are in English. The tool reads the page as it is; on a Turkish site, the text and button names come through in Turkish, and you can write to the agent in Turkish. The documentation says nothing else about language.

What does agent-browser access, and is it safe?

Reads

The content of the pages it opens, screenshots, console and network requests, cookies and storage. With --profile <name>, a temporary copy of your Chrome profile (cookies and sessions); with --auto-connect, the tabs of your open Chrome.

Writes and does

Clicks, types, submits forms, uploads and downloads files, and runs JavaScript with eval. Writes screenshots, PDFs, videos and session files to disk.

Passwords

The login vault (auth save, auth login) keeps the password encrypted with AES-256-GCM under ~/.agent-browser/auth/; according to the documentation, the password never enters the model's context.

Internet

Besides the sites you open, it queries the Chrome Releases blog for a browser version check (AGENT_BROWSER_NO_VERSION_CHECK=1 turns it off). The chat command goes to the AI Gateway, and a cloud provider, if you choose one, gets the session.

By default there are no limits on navigation, actions or output; if you use a logged-in profile or your open Chrome, the agent can act on those accounts on your behalf, so don't run it on important accounts without turning on the settings below.

SettingWhat it does
--allowed-domainsBlocks navigation and requests to addresses outside the allowlist. According to the documentation, it isn't an operating-system-level firewall; it can't be combined with --profile, --auto-connect or --cdp.
--action-policy, --confirm-actionsForbids risky actions such as eval, downloads and uploads, or requires approval for them; a pending confirmation is denied after 60 seconds.
--content-boundariesWraps page content in markers so the agent doesn't mistake instructions on the page for tool output.
--max-outputCaps the size of page-sourced output.

Is agent-browser free?

Yes. agent-browser is an Apache-2.0 open-source tool; there is no account, subscription or usage limit. Costs only come from extra services you choose: a Browserbase, Browserless, Browser Use, Kernel or AgentCore cloud browser runs with that provider's key and pricing, and the chat command needs Vercel AI Gateway usage. Your coding agent's plan is separate. The official sources list no Turkey-specific price or restriction; the tool runs on your computer.

A separate guide to the Browser Use cloud browser and library.

Common problems and fixes

What's happeningWhat to do
A click fails with "covered by …"A cookie banner or dialog sits over the button. Dismiss it, take a new snapshot and retry.
A ref points to the wrong element or isn't foundThe page changed; the refs belong to an old snapshot. Take a new snapshot -i.
agent-browser install stops on macOSChrome for Testing isn't downloaded below macOS 13; update macOS or install Chrome from Google.
The browser won't start on LinuxInstall the system libraries with agent-browser install --with-deps.
--profile <name> doesn't work on WindowsAccording to the documentation, Chrome must be closed for this.
Something broke unexpectedlyRun agent-browser doctor; it cleans stale daemon files and shows what's wrong.

How do you update and uninstall agent-browser?

  1. Update: agent-browser upgrade detects the install method (npm, Homebrew, Cargo) and updates. There are no automatic updates.
  2. Uninstall: npm uninstall -g agent-browser or brew uninstall agent-browser (the package managers' standard commands; not stated in the official documentation).
  3. Skill: npx skills remove agent-browser (a skills CLI command; not stated in the agent-browser documentation), or delete the agent-browser skill folder in your agent's directory.
  4. Leftover files: Settings, the encrypted vault and its key live under ~/.agent-browser/; delete that folder by hand if you don't want them.

How it differs from Playwright CLI, Playwright MCP and Chrome DevTools MCP

There are other ways to give an agent a browser, and the atlas has separate guides for them. agent-browser's documentation doesn't compare itself with them; check each tool's own documentation when choosing. What sets agent-browser apart is that it's a single local CLI: short commands, snapshots with refs, version-matched skills shipped with the CLI, and an optional MCP mode.

Microsoft's command-line tool: Playwright CLI guide.

The same job as an MCP server: Playwright MCP guide.

Google's debugging-focused MCP server: Chrome DevTools MCP guide.

A Python agent library that runs the task itself, plus a cloud browser: Browser Use guide.

Frequently asked questions

What is agent-browser?

It's Vercel Labs' open-source tool that lets AI agents drive a browser from the command line. The agent opens the page, reads it as short text with refs, clicks, types and takes screenshots.

How do I install agent-browser in Claude Code?

First install the CLI and Chrome with npm install -g agent-browser and agent-browser install, then add the skill with npx skills add vercel-labs/agent-browser. The skill tells the agent to read the instructions from the CLI with agent-browser skills get core.

agent-browser or Playwright?

Both give an agent a browser. agent-browser works as a single local CLI with snapshots that use refs; Playwright CLI and Playwright MCP are Microsoft's tools. agent-browser's documentation doesn't compare itself with them; check each one's own documentation for your workflow.

Does agent-browser have an MCP server?

Yes. The agent-browser mcp command starts an MCP server over stdio; your MCP client runs it as a subprocess. You can choose tool groups with --tools.

Is agent-browser free?

Yes, it's Apache-2.0 licensed and needs no account. Cloud browser providers and the Vercel AI Gateway used by the chat command charge their own fees.

Is agent-browser safe?

By default there are no limits on navigation or actions; if you use a logged-in Chrome profile, the agent can reach those accounts, and you turn on the allowlist and action policy by hand.

Does agent-browser work on Windows?

Yes, there is a native binary for Windows x64. macOS ARM64 and x64 and Linux ARM64 and x64 are also supported.

Related guides

Sources

Not clear in the official sources: Telemetry: the documentation has neither a section nor an explicit statement · no uninstall command in the documentation (the package manager's standard command is given) · no specific note on using it with Turkish-language sites.