Browser Harness
Install Browser Harness and drive a real browser through bounded, recorded tools. Browser checks use it under the hood; use it directly when another agent or application needs browser control without the blop runner.
Browser Harness (@blopai/browser-harness) owns browser actions, sessions, screenshots, screencast frames and browser containers. It does not own browser checks, the agent loop, model calls, reporters or uploads to Blop Cloud; those belong to blop test.
Choose an integration
Section titled “Choose an integration”| Integration | Use it when |
|---|---|
blop-browser CLI | An agent or script needs one browser that persists across shell calls |
| TypeScript API | Your application runs its own agent loop and embeds the tools |
| Container sessions | Browsers must run in reusable Docker containers |
Prerequisites
Section titled “Prerequisites”- Node.js 22 or newer.
- Chrome or Chromium. If
doctorfinds neither, runnpx playwright install chromium.
Drive a browser from the CLI
Section titled “Drive a browser from the CLI”-
Install the CLI:
Terminal window npm install --global @blopai/browser-harness -
Check the browsers it can use and the saved configuration:
Terminal window blop-browser doctor --json -
Open a page, read it, assert on it and close it:
Terminal window blop-browser open https://example.comblop-browser snapshotblop-browser expect-text "Learn more"blop-browser closesnapshotlists controls with opaque references such ase13. Pass a reference unchanged to later actions, for exampleblop-browser click e13. Never invent or edit one. -
Optional: install the agent skill, which teaches coding agents to use the CLI and verify outcomes:
Terminal window npx skills add blop-oss/blop-browser --skill browser-harnessOr install it from the CLI into the project’s
.agents/skills/:Terminal window blop-browser skill install --target agents --scope project
Check it worked
Section titled “Check it worked”expect-text exits 0 and prints Found visible text: Learn more. A missing text exits 1.
Design boundaries
Section titled “Design boundaries”Browser Harness exposes explicit tools only: no shell, no arbitrary JavaScript and no raw CDP commands. Every action is validated, bounded and recorded so the host keeps evidence. Read the security model before you share a session across a process or network boundary.