browser-harness-js  by browser-use

LLM browser automation via direct Chrome DevTools Protocol access

Created 1 month ago
456 stars

Top 65.6% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a minimal, direct bridge for Large Language Models (LLMs) to control Chrome via the Chrome DevTools Protocol (CDP). It targets developers building LLM-powered agents that require fine-grained browser automation, offering precise control by exposing every CDP method as a typed JavaScript call, thereby avoiding the limitations of abstraction layers.

How It Works

The core approach is to act as the "thinnest possible bridge" from an LLM to Chrome. It establishes a persistent WebSocket connection and provides 652+ typed JavaScript wrappers for all CDP methods. Unlike traditional harnesses, it offers no pre-built helpers like click() or goto(). Instead, it directly exposes CDP calls (e.g., session.Input.dispatchMouseEvent, session.DOM.setFileInputFiles), allowing LLMs to construct requests using the full parameter set defined by the protocol. This ensures maximum flexibility and avoids hiding potentially crucial parameters from the agent. The SDK is auto-generated from upstream protocol JSONs, guaranteeing up-to-date method signatures.

Quick Start & Requirements

  • Installation: Run npx skills add https://github.com/browser-use/browser-harness-js --skill cdp. This command installs the skill, adds the CLI to your PATH, and runs an initial task. Bun is auto-installed on first run if missing; set BROWSER_HARNESS_SKIP_BUN_INSTALL=1 to opt out.
  • Prerequisites: Chrome browser with remote debugging enabled.
  • Links: See interaction-skills/ for example recipes.

Highlighted Details

  • Direct, typed access to all Chrome DevTools Protocol methods.
  • SDK automatically regenerated from upstream protocol definitions for zero version drift.
  • No abstraction helpers (e.g., click, goto) to maximize LLM control.
  • Includes essential utilities not present in raw CDP, such as listPageTargets and resolveWsUrl.

Maintenance & Community

Contributions are welcomed, particularly new interaction skills demonstrating pure CDP usage. The project emphasizes small, focused contributions. No specific community channels (e.g., Discord, Slack) or sponsorship details are provided in the README.

Licensing & Compatibility

The license type and compatibility notes for commercial use are not specified in the provided README content.

Limitations & Caveats

The absence of convenience helpers means that LLMs or developers must possess knowledge of the CDP API to construct necessary commands. This shifts the complexity of browser interaction directly onto the agent's implementation rather than abstracting it away.

Health Check
Last Commit

1 month ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
0
Star History
71 stars in the last 30 days

Explore Similar Projects

Starred by John Resig John Resig(Author of jQuery; Chief Software Architect at Khan Academy), Travis Fischer Travis Fischer(Founder of Agentic), and
2 more.

obscura by h4ckf0r0day

2.5%
14k
Lightweight headless browser for AI agents and web scraping
Created 1 month ago
Updated 1 day ago
Starred by Yaowei Zheng Yaowei Zheng(Author of LLaMA-Factory), Joe Walnes Joe Walnes(Head of Experimental Projects at Stripe), and
6 more.

browser-harness by browser-use

3.9%
14k
LLM browser automation agent
Created 1 month ago
Updated 6 days ago
Feedback? Help us improve.