The browser tool, not the agent. You bring the brain.
The AI-native browser automation library — born from OpenClaw, built on Playwright, embeddable in any TS/Node agent loop. Snapshot + ref targeting: no CSS selectors, no XPath, no vision model — just numbered refs that map to interactive elements.
Most other tools in this space ship a complete AI agent: they take your task, own the LLM loop, decide what to click, and click it. Great — until you already have an agent. Then you've got two brains fighting over who's in charge.
browserclaw is just the eyes and hands. Call snapshot() and get an AI-readable text tree where every interactive element carries a numbered ref (e1, e2, …). The model reads text — the thing it's best at — and hands back a ref ID. browserclaw resolves that ref to one exact element through a Playwright locator and acts. Same page state → same ref → same result: deterministic targeting, no coordinate guessing, no LLM re-interpreting which element it meant. A ref stays with its element across snapshots, and once that element is gone the ref fails at once instead of clicking whatever took its place. The reasoning stays in your code.
import { BrowserClaw } from 'browserclaw';
const browser = await BrowserClaw.launch({ url: 'https://demo.playwright.dev/todomvc' });
const page = await browser.currentPage(); // reuse the tab opened by launch; open() adds a tab
// Snapshot — the core feature
const { snapshot, refs } = await page.snapshot();
// snapshot: AI-readable text tree
// refs: { "e1": { role: "textbox", name: "What needs to be done?" }, "e2": { role: "link", name: "Playwright" } }
await page.type('e1', 'Buy groceries', { submit: true }); // Type by ref
await page.click('e2'); // Click by ref
await browser.stop();
Use it from your coding agent
Claude Code, Codex, Cursor and other coding agents can drive a browser with browserclaw from your project:
npm install browserclaw
npx skills add idan-rubin/browserclaw
Prefer plugins? In Claude Code, /plugin marketplace add idan-rubin/browserclaw, then /plugin install browserclaw@browserclaw. In Codex, codex plugin marketplace add idan-rubin/browserclaw, then codex plugin add browserclaw@browserclaw. Then ask your agent: Use browserclaw to open https://demo.playwright.dev/todomvc, add "Buy milk", and check that it appears.
The skill has the agent run npx browserclaw skill, which prints the guide for the version you installed, and npx browserclaw help page.click for any method. Unknown options fail with the right call instead of being ignored.
browserclaw starts its own browser with a separate profile, or connect()s to one you started with remote debugging. It is not a desktop browser that works inside your everyday signed-in tabs; for that, see ego lite in the comparison below.
Bring your own agent loop — or use ours
browserclaw never calls an LLM or decides anything; you do. The whole integration is snapshot in, ref out, act — here it is wired to a real model. Install @anthropic-ai/sdk and set ANTHROPIC_API_KEY and ANTHROPIC_MODEL to a model available to your account:
import { BrowserClaw } from 'browserclaw';
import Anthropic from '@anthropic-ai/sdk';
const llm = new Anthropic();
const model = process.env.ANTHROPIC_MODEL;
if (!model) throw new Error('Set ANTHROPIC_MODEL to a model available to your account');
const browser = await BrowserClaw.launch({ url: 'https://news.ycombinator.com' });
try {
const page = await browser.currentPage();