browser-harness: what it is, what problem it solves & why it's gaining traction
browser-harness: what it is, what problem it solves & why it's gaining traction
What it solves
Browser Harness provides a way for Large Language Models (LLMs) to interact directly with a real web browser via the Chrome DevTools Protocol (CDP). It removes the restrictive layers between the agent and the browser, allowing the agent to perform complex tasks with complete freedom and the ability to modify its own helper code during execution to overcome obstacles.
How it works
The system uses a thin CDP harness that connects an LLM to a running Chrome or Chromium browser. When an agent encounters a task it cannot perform with existing tools, it can write and edit its own helper functions in a dedicated workspace (agent_helpers.py) or create reusable site-specific "domain skills" in a separate directory. This allows the the agent to improve its own capabilities and learn from each run.
Who it’s for
It is designed for users who want to automate browser tasks using coding agents (like Claude Code or Codex) and those who need a high degree of flexibility and control over how an AI agent interacts with the web.
Highlights
- Self-Improving: The agent can write and update its own helper code and skills on the fly to solve problems.
- Direct Connection: Uses a websocket to connect directly to Chrome via CDP, minimizing abstraction layers.
- Lighweight Architecture: The core package is small, consisting of approximately 1,000 lines of code across four core files.
- Cloud Integration: Supports connection to local browsers or stealth/headless browsers via Browser Use Cloud.
Sources
- undefinedbrowser-use/browser-harness