Default to Browser. Reach for Browser Harness when the task needs your real Chrome profile and logins, bot-hostile or shadow-DOM-heavy sites, iframes, or raw CDP access.
Browser
Interactive browser automation via theagent-browser CLI. Also usable as an AI agent tool (tool name browser).
First-use install is automatic. The node installs agent-browser from npm into OpenCompany’s shared package tree on first use (npm must be on PATH), then fetches the Chrome-for-Testing runtime — a roughly 150 MB Chromium download — so expect the very first run to take a while.
Operations
14 discrete operations plus abatch meta-operation:
Operations that act on an element —
click, type, fill, get_text, get_html, wait, select — require Selector (a CSS selector or an @eN ref from a snapshot).
The recommended agent loop is navigate -> snapshot -> click/fill using the @eN refs the snapshot returned -> snapshot again to verify.
Key parameters
select
default:"navigate"
One of the operations above
string
Target URL (required for
navigate)string
CSS selector or
@eN ref from a snapshot (required for element operations)string
Session id. Leave empty to use a per-run session — cookies, open tabs, and auth persist across sequential operations that share the same session, and every browser call in one workflow/agent run (including delegated sub-agents) reuses one browser instance.
select
default:"chrome"
chrome, edge, chromium, bundled_explicit (the bundled Chrome-for-Testing), or custom (set Executable Path)boolean
default:"true"
Show the browser window; disable for headless runs
number
default:"30"
Per-action timeout in seconds (1-600)
full_page / annotate / screenshot_format / screenshot_quality (screenshots), direction / amount (scroll), commands (batch JSON), auto_connect (reuse an already-running CDP browser), chrome_profile, user_agent, proxy, action_delay, executable_path, new_window.
Output
data is whatever agent-browser returned for the operation (parsed JSON when available, raw text otherwise). Responses larger than 100 KB are truncated.
Sessions and limits
- Concurrent browser instances are capped by
BROWSER_MAX_INSTANCES(default 3); when the cap would be exceeded, the oldest session is closed first. - Idle browsers shut themselves down after
BROWSER_IDLE_TIMEOUT_MS(default 600000 ms; 0 disables).
Browser Harness
Browser Harness drives your real Chrome over the Chrome DevTools Protocol (CDP) — no Playwright, no bundled Chromium. That means it sees your actual profile, cookies, and logins, which is exactly why it exists: sites that defeat headless automation or need your session state. It is a sibling of the Browser node, not a replacement:Chrome must be started with remote debugging
The harness needs a CDP-reachable Chrome. It discovers one in this order:- A
BU_CDP_URL(orBU_CDP_WS) environment variable pointing at a dedicated automation Chrome. - The
DevToolsActivePortfile Chrome writes when you enable chrome://inspect/#remote-debugging (“Allow remote debugging for this browser instance”). - A port probe on 9222/9223 — e.g. Chrome launched with
--remote-debugging-port=9222.
Operations
select
default:"run_python"
run_python (primary), goto, screenshot, js, tabs, or doctorcode
Python for
run_python. Roughly 25 helpers are pre-imported (goto_url, click_at_xy, capture_screenshot, js, fill_input, wait_for_load, …). Print a JSON object as the final line for structured output.string
URL to open (for
goto)string
JavaScript to evaluate in the page (for
js)boolean
default:"false"
Capture the full scrollable page (for
screenshot)number
default:"60"
Script timeout in seconds (5-600)
capture_screenshot() to see the page, click_at_xy(x, y) to interact, wait_for_load(), then js(...) for DOM reads.
Output
Install
Install is lazy: first use runsuv tool install --python 3.12 browser-harness, so uv must be on PATH. If the node reports that browser-harness could not be installed, install uv and retry — it installs automatically on the next use.
Example: check a page and summarize
Fetch a live page in a real browser, extract the visible text, and have an agent summarize it:- Browser #1 — Operation:
navigate, URL:https://news.ycombinator.com. - Browser #2 — Operation:
get_text, Selector:body. Leave Session empty on both nodes; they share the per-run session automatically, so the second node reads the page the first one opened. - AI Agent — prompt it to summarize the extracted text.
Tips
Related
Scraping & Proxies
Fetch and extract known pages without a full browser
Web Search
Find pages before you open them
AI Agents
Let an agent drive the browser as a tool
Code Executors
Post-process extracted content