A Browser for AI Agents: Vercel agent-browser Tops GitHub, One Ref Drives the Whole Page

TL;DR: On 2026-11-08 a Rust CLI, vercel-labs/agent-browser, sat at the top of GitHub Trending with 47k stars (+190 that day). The same day HN Show HN surfaced competitors: Kuri (a Zig rewrite), an ASCII-wireframe browser for agents, Pickle (policy-gated actions), and Public Browser MCP claiming +48% speed and -33% tokens per session versus AgentBrowser. The signal is clear: the browser is being redesigned as a peripheral for agents, not a window for humans (sources: GitHub Trending 2026-11-08; agent-browser.dev; HN Show HN 2026-11-08).

The old pain: shoving the whole DOM at the model

The usual way to let an LLM drive a page is to dump the DOM or HTML into the context. Two problems: token blow-up (a mid-size page is KB to tens of KB), and noise (the model has to find "the login button" among hundreds of divs). browser-use extracts interactives, but still re-reads the whole structure each turn.

agent-browser takes a different route: it returns a compact accessibility tree where every interactive element gets a stable ref like @e1. The agent reads a snapshot, acts on a ref, reads again, repeats. The browser stays resident in a background daemon, so each step is one short shell call.

How it actually works

The CLI ships each command to a background daemon that drives the browser over the Chrome DevTools Protocol. Each --session gets its own daemon and browser; headless by default, auto-exits after an idle hour (or persists state when session persistence is on).

  • snapshot returns compact text; interactive elements each carry a ref;
  • clicking @e1 really clicks that element, not "please click here";
  • if the target is hidden, disabled, off-screen, or covered by a consent banner, it fails honestly instead of reporting success, so you clear the obstruction, re-snapshot, and retry.

How it differs from Playwright / browser-use

AxisPlaywright / Puppeteerbrowser-useagent-browser
Built forhuman QA / test scriptsLLM direct driveagent, one command at a time
What the model seesraw HTML / DOMextracted interactivesaccessibility tree + @e ref
Call granularitycode / scriptnatural-language intentone shell command
Browser lifetimeinside the scriptper sessionresident daemon, reused across commands
Token costhigh (whole page)mediumlow (compact tree; Public Browser MCP claims -33%/session)

Up and running in five commands

npm install -g agent-browser
agent-browser install          # download Chrome for Testing on first run
agent-browser open example.com
agent-browser snapshot -i      # interactive elements only, each with a ref
agent-browser click @e1
agent-browser get url          # check the result
agent-browser close

No install? npx agent-browser open example.com runs it. On Linux add agent-browser install --with-deps for system libraries.

A minimal ref-driven loop (Python, stdlib only)

This needs no third-party package: open a page, read the snapshot, grab the ref of a "log in" link by regex, click it, verify the URL changed.

import subprocess, re

def snap(session):
    return subprocess.run(
        ["agent-browser", "--session", session, "snapshot", "-i"],
        capture_output=True, text=True).stdout

def click_ref(session, ref):
    subprocess.run(
        ["agent-browser", "--session", session, "click", ref], check=True)

sess = "demo"
subprocess.run(["agent-browser", "--session", sess, "open", "https://example.com"])
tree = snap(sess)
m = re.search(r'link "([^"]+)" [ref=(e\d+)]', tree)
if m and "log in" in m.group(1).lower():
    click_ref(sess, m.group(2))
    url = subprocess.run(
        ["agent-browser", "--session", sess, "get", "url"],
        capture_output=True, text=True).stdout.strip()
    print("clicked", m.group(2), "->", url)

In a real project you wrap "snapshot, decide, act" in a loop and let the LLM read the plain-text snapshot to pick the next ref. That beats stuffing the whole HTML into the prompt on every turn.

Plugging it into an agent: MCP and skill stubs

For agent use, the cleanest path is the MCP server over stdio:

agent-browser mcp

A neat trick is the skill stub: agent-browser skills get core prints a core-loop instruction that tracks the CLI version; npx skills add vercel-labs/agent-browser installs a thin stub that just tells the agent to load agent-browser skills get core. So the instructions always match the installed CLI version and never rot after an upgrade. You can also drop one line into AGENTS.md:

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

Set the security boundaries first

agent-browser Security docs describe four gates: an auth vault, domain allowlists, action policies, and content boundaries. Before you let an agent loose on the web, at least pin the domain allowlist so it cannot follow links off-site and start clicking around.

Where it pays off

agent-browser is not "a better Playwright"; it redefines the browser from a window humans look through into a peripheral agents drive. The swarm of competitors (Zig, ASCII, policy-gated, MCP) says the direction is right. Move the repetitive "open page, read info, click once" flows there first; you get better token economy and steadier runs. Add screenshots and eval when you need visual understanding or tricky forms.

Further reading

Feedback

Diese Seite ist rein front-end: kein Backend, keine Konten. Feedback geht an GitHub Issues, Discussions oder E-Mail.

Füge dies in das Issue oder die E-Mail ein, um mir zu helfen, das Problem zu finden – es enthält nichts von dem, was du eingegeben hast

Auch:Vorhandenes Feedback ansehen · Feedback per E-Mail (ohne GitHub-Konto):278975598@qq.com