browser-use/browser-harness-js

Self-healing browser harness that enables LLMs to complete any task

What it solves

It removes the restrictive "helper" layers typically found in browser automation tools, which often hide complex parameters and limit what an AI agent can actually do. Instead of providing simplified functions like click(), it provides a direct, typed bridge to the Chrome DevTools Protocol (CDP).

How it works

The project uses a codegen process that reads the official Chrome protocol JSON files to generate typed JavaScript wrappers for every single CDP method. It establishes a persistent WebSocket connection to Chrome, allowing an LLM to call any of the 652 available methods (across 56 domains) directly using the syntax session.Domain.method(params). It includes a tiny CLI and a Bun-based HTTP server to manage the session and forward snippets.

Who it’s for

Developers building AI agents that need full, unconstrained control over a web browser without the limitations of pre-defined automation libraries.

Highlights

  • Zero Wrapping: Exposes the full Chrome DevTools Protocol without simplifying or hiding parameters.
  • Fully Typed: Every CDP method is generated as a typed wrapper, providing autocomplete and documentation based on the official protocol.
  • ’No Version Drift’: The SDK is regenerated from upstream protocol JSON, ensuring new Chrome features are available immediately.
  • Direct LLM Access: Designed for agents to write the CDP calls themselves rather than relying on a fixed set of helper functions.

Related

  • Project
  • Project
  • Project
  • Project