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?
› agent-browser open example.comThe first command starts the background daemon and Chrome.› agent-browser snapshot -i- - link "Learn more" [ref=e1]
› agent-browser click @e1The agent verifies the result with get url or a fresh snapshot.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.
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.› agent-browser open example.com
agent-browser snapshot -i
agent-browser click @e1
agent-browser get url
agent-browser closeFor 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.
› npm install -g agent-browser@0.43.0
agent-browser installagent-browser install downloads Chrome for Testing (the first time). The official command has no version: npm install -g agent-browser.
› brew install agent-browser
agent-browser install› npx agent-browser install
npx agent-browser open example.com› agent-browser install --with-depsIf you aren't root, the command uses sudo; it exits with an error code if it can't install every required library.
Introduce it to your agent (skill): the official route for Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Goose, OpenCode and Windsurf:
› npx skills add vercel-labs/agent-browserThe 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:
› 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
| Group | Commands | What for |
|---|---|---|
| Navigate and read | open, back, reload, read, snapshot, get, is | Opening the page, reading its text and state |
| Interact | click, fill, type, press, select, check, scroll, drag, upload, find | Clicking, typing, selecting, uploading files |
| Wait | wait | Waiting for the page or an element to be ready |
| Capture | screenshot, pdf, record, download, diff | Screenshots, PDFs, video, visual diffs |
| Page and network | cookies, storage, network, eval | Cookies, storage, network requests, JavaScript |
| Debug | console, errors, trace, profiler, vitals, react, a11y | Console, errors, performance, accessibility |
| Sessions and auth | session, state, auth, profiles, confirm, deny | Separating sessions, signing in from the vault |
| Agents and integrations | skills, mcp, chat, batch, plugin | Reading skills, MCP server, batched commands |
| Setup | install, upgrade, doctor, connect, close | Downloading 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 CLIYes | The installation docs list the skill route. |
|---|---|
| GitHub Copilot, Goose, OpenCode, WindsurfYes | The same skill route is named in the docs. |
| MCP clientsYes | The agent-browser mcp stdio server. |
| macOS (ARM64, x64)Yes | Native binary; Chrome for Testing isn't downloaded below macOS 13. |
| Linux (ARM64, x64)Yes | glibc and musl; --with-deps installs the system libraries. |
| Windows (x64)Yes | Native 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?
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.
Clicks, types, submits forms, uploads and downloads files, and runs JavaScript with eval. Writes screenshots, PDFs, videos and session files to disk.
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.
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.
| Setting | What it does |
|---|---|
--allowed-domains | Blocks 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-actions | Forbids risky actions such as eval, downloads and uploads, or requires approval for them; a pending confirmation is denied after 60 seconds. |
--content-boundaries | Wraps page content in markers so the agent doesn't mistake instructions on the page for tool output. |
--max-output | Caps 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 happening | What 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 found | The page changed; the refs belong to an old snapshot. Take a new snapshot -i. |
agent-browser install stops on macOS | Chrome for Testing isn't downloaded below macOS 13; update macOS or install Chrome from Google. |
| The browser won't start on Linux | Install the system libraries with agent-browser install --with-deps. |
--profile <name> doesn't work on Windows | According to the documentation, Chrome must be closed for this. |
| Something broke unexpectedly | Run agent-browser doctor; it cleans stale daemon files and shows what's wrong. |
How do you update and uninstall agent-browser?
- Update:
agent-browser upgradedetects the install method (npm, Homebrew, Cargo) and updates. There are no automatic updates. - Uninstall:
npm uninstall -g agent-browserorbrew uninstall agent-browser(the package managers' standard commands; not stated in the official documentation). - 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. - 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
- agent-browser README (GitHub)
- agent-browser.dev: Installation
- agent-browser.dev: Commands
- agent-browser.dev: Skills
- agent-browser.dev: Security
- agent-browser.dev: Sessions and Chrome profiles
- skills CLI README (vercel-labs/skills)
- npm listing: agent-browser
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.





