
Browser Harness JS
https://github.com/browser-use/browser-harness-js- Category
- AI Agents
- Rank
- No. 1316Tools index
Previous survey · No. 1321 ·
- Pricing
- Open Source
- Type
- TOOL
- Builder
- browser-use
- GitHub
- 483 stars
- Date
About
Self-healing browser harness that enables LLMs to complete any web task reliably.
What it does
Browser Harness JS exposes Chrome’s DevTools Protocol as typed JavaScript over one persistent WebSocket. A local Bun server keeps the browser session, selected tab, event subscribers, and saved globals alive while a shell CLI forwards snippets for evaluation.
Why it's ranked here
Its appeal is breadth with little abstraction: protocol coverage, typed parameters, direct returns, persistent state, and event handling. That makes unusual browser mechanics accessible without waiting for helper support. The same design demands strong DevTools Protocol knowledge and supplies fewer safeguards than a task-level automation framework.
What's good
Generated types preserve protocol documentation, optional parameters, return shapes, experimental commands, and deprecated commands. Calls share one browser connection, while target routing automatically attaches the active session identifier. Browser discovery covers common Chromium variants across macOS, Linux, and Windows. Focused recipes document traps involving tabs, cookies, dialogs, and frames.
Tradeoffs
There are deliberately no navigation, clicking, upload, or waiting abstractions. Users must compose low-level protocol operations and understand target routing. Remote debugging must be enabled and may require user approval. The Bun-native server evaluates arbitrary JavaScript received through a localhost endpoint, and the CLI may install Bun automatically unless explicitly prevented.
How to use it well
Use it for agents or engineers who need precise Chrome control, persistent exploratory sessions, and access to uncommon protocol features. Pair typed calls with the supplied interaction recipes, then preserve useful values between snippets. Choose another layer when you need task-level helpers, built-in workflow policies, or reliable knowledge of visible tab-strip order.
Technical notes+
sdk/browser-harness-js is a Bash CLI that starts the Bun service, posts raw snippets, exposes lifecycle commands, and optionally bootstraps Bun. sdk/repl.ts binds to 127.0.0.1, retains a singleton Session, evaluates snippets inside async wrappers, and provides evaluation, health, and shutdown endpoints. sdk/session.ts manages request correlation, flattened target attachment, active-session routing, events, browser discovery, and DevToolsActivePort parsing. sdk/gen.ts builds TypeScript namespaces, parameter and return interfaces, domain bindings, and JSDoc from the protocol inputs. sdk/package.json marks the package private, while sdk/tsconfig.json enables strict checking without emitting output.
Observed
- License
- MIT License
- Primary implementation
- TypeScript with a Bash CLI wrapper
- Installation surface
- Installed as the cdp agent skill through npx skills add; the CLI must then be placed on PATH
- Interfaces
- Shell CLI, typed JavaScript SDK, localhost HTTP evaluation service, and Chrome DevTools Protocol WebSocket transport
- Runtime
- Bun is required; the CLI can install it automatically unless opted out
- Platform support
- Browser profile discovery is documented for macOS, Linux, and Windows
- Package structure
- The npm package is private and provides generation and REPL scripts
Read from README.md, sdk/gen.ts, sdk/repl.ts, sdk/session.ts, LICENSE, SKILL.md, sdk/bun.lock, sdk/package.json, sdk/tsconfig.json, sdk/js_protocol.json, sdk/browser-harness-js, interaction-skills/tabs.md, interaction-skills/cookies.md, interaction-skills/dialogs.md, interaction-skills/iframes.md.
What it can do
Execute web automation tasks using natural language instructions
Natural language task description → Completed web task execution
Navigate websites and interact with web elements
Target website URL and interaction instructions → Web page interactions and navigation results
Fill out web forms automatically
Form data and target web form → Completed form submission
Extract data from web pages
Target web page and data extraction requirements → Structured extracted data
Handle dynamic web content and page changes
Dynamic web pages with changing elements → Successful interaction despite page changes
Recover from browser errors and failures
Failed browser operations or broken web elements → Self-corrected successful task completion
Click buttons and links on web pages
Target web elements and click instructions → Executed click actions and resulting page states
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.