# Core > Core agent-browser usage guide. Read this before running any agent-browser commands. Covers the snapshot-and-ref workflow, navigating pages, interacting with elements (click, fill, type, select), extracting text and data, taking screenshots, managing tabs, handling forms and auth, waiting for content, running multiple browser sessions in parallel, and troubleshooting common failures. Use when the user asks to interact with a website, fill a form, click something, extract data, take a screenshot, log into a site, test a web app, or automate any browser task. Source: https://skillsagentes.com/skills/vercel-labs/agent-browser/core Repository: https://github.com/vercel-labs/agent-browser Author: vercel-labs License: Apache-2.0 Updated: hace 4 días Context cost: 141 tok installed, 7.4k tok once triggered, 29.9k tok with every bundled file Bundle: 14 files, 117 KB Permissions requested: bash(agent-browser:*), bash(npx agent-browser:*) ## Install ```bash npx -y skills add vercel-labs/agent-browser --skill core --agent claude-code ``` ## What it does - Instala guías para el CLI agent-browser: navegar, tomar snapshots con refs @eN, interactuar (click, fill, type, select), extraer texto/datos, capturar screenshots, gestionar pestañas, autenticación y esperas - Establece el flujo snapshot-and-ref como patrón principal y recomienda usar sesiones nombradas en vez de la sesión compartida por defecto - Cubre ejecución de múltiples sesiones de navegador en paralelo, mocking de red, grabación de video y auditorías de accesibilidad con axe-core - Añade introspección de React (árbol de componentes, renders, Web Vitals) y diagnóstico con `agent-browser doctor` ## Use it when - El usuario pide interactuar con un sitio web, llenar un formulario, hacer clic en algo, extraer datos, tomar un screenshot, iniciar sesión en un sitio, probar una app web o automatizar cualquier tarea de navegador ## Don't bother when - Apps de escritorio Electron (VS Code, Slack, Discord, Figma): usar el skill 'electron' - Automatización de workspace de Slack: usar el skill 'slack' - Pruebas exploratorias/QA: usar el skill 'dogfood' ## What triggers it - "Abre este sitio y haz clic en el botón de inicio de sesión" - "Llena el formulario de contacto con estos datos y envíalo" - "Toma una captura de pantalla de la página de precios" - "Extrae los precios de la tabla de productos de esta URL" - "Inicia sesión en la app con estas credenciales y ve al dashboard" ## Before you install - Requiere instalar globalmente con `npm i -g agent-browser && agent-browser install`, y Chrome/Chromium disponible vía CDP. - Needs on PATH: npm - Environment: SESSION ## Files - SKILL.md — 29 KB - references/authentication.md — 11 KB - references/commands.md — 26 KB - references/profiling.md — 3 KB - references/proxy-support.md — 5 KB - references/session-management.md — 8 KB - references/snapshot-refs.md — 5 KB - references/streaming.md — 7 KB - references/trust-boundaries.md — 5 KB - references/video-recording.md — 4 KB - references/webgpu.md — 7 KB - templates/authenticated-session.sh — 4 KB - templates/capture-workflow.sh — 2 KB - templates/form-automation.sh — 2 KB ## SKILL.md Reproduced verbatim from vercel-labs/agent-browser under Apache-2.0. This section is the upstream document and is in English. # agent-browser core Fast browser automation CLI for AI agents. Chrome/Chromium via CDP, no Playwright or Puppeteer dependency. Accessibility-tree snapshots with compact `@eN` refs let agents interact with pages in ~200-400 tokens instead of parsing raw HTML. Most normal web tasks (navigate, read, click, fill, extract, screenshot) are covered here. Load a specialized skill when the task falls outside browser web pages — see [When to load another skill](#when-to-load-another-skill). ## The core loop ```bash agent-browser open # 1. Open a page agent-browser snapshot -i # 2. See what's on it (interactive elements only) agent-browser click @e3 # 3. Act on refs from the snapshot agent-browser snapshot -i # 4. Re-snapshot after any page change ``` Refs (`@e1`, `@e2`, ...) are assigned fresh on every snapshot. They become **stale the moment the page changes** — after clicks that navigate, form submits, dynamic re-renders, dialog opens. Always re-snapshot before your next ref interaction. ## Always use your own session Before your first command, set a named session for the whole task: ```bash export AGENT_BROWSER_SESSION="$(agent-browser session id --scope worktree --prefix task)" ``` The default (unnamed) session is a single shared browser: it is shared with every other agent on the machine and it persists across conversations, so working in it can hijack another agent's page mid-task or navigate away from something the human left open. Every example below assumes a named session is active. See [Run multiple browsers in parallel](#run-multiple-browsers-in-parallel) and `references/session-management.md`. ## Quickstart ```bash # Install once npm i -g agent-browser && agent-browser install # Linux hosts can install required browser libraries too agent-browser install --with-deps # Take a screenshot of a page agent-browser open https://example.com agent-browser screenshot home.png agent-browser close # Search, click a result, and capture it agent-browser open https://duckduckgo.com agent-browser snapshot -i # find the search box ref agent-browser fill @e1 "agent-browser cli" agent-browser press Enter agent-browser wait --load networkidle agent-browser snapshot -i # refs now reflect results agent-browser click @e5 # click a result agent-browser screenshot result.png ``` The browser stays running across commands so these feel like a single session. By default, an inactive daemon saves configured restore state, closes its headless browser, and exits after one hour; the next command starts it again. Without `--restore` or another restore key, shutdown discards transient browser state and open tabs. Dashboard mouse, keyboard, and touch input count as activity. Headed browsers, Safari and iOS WebDriver sessions, and user-attached browsers are exempt from the default; provider-owned cloud browsers are not. Use `--idle-timeout