# Browser Harness: Self-Healing LLM Browser Control Directly on CDP

> A minimal Python shim (~592 lines) that connects an LLM directly to Chrome via CDP — and lets the agent edit its own harness when it gets stuck.

- Org: browser-use
- Date: 2026-04-24
- Category: repo, tool
- Source: https://github.com/browser-use/browser-harness
- Canonical page: https://ai-tldr.dev/releases/browser-use-harness/

## In short

~600-line Python harness giving LLMs direct Chrome DevTools Protocol access for browser automation. Self-healing: when the agent hits a missing capability, it edits helpers.py mid-task to add the function. 6.8K stars, 117 HN points on Show HN.

## What it is

Browser Harness strips away heavyweight abstraction layers (Playwright, Selenium, the browser-use SDK itself) that traditional browser automation frameworks add on top of Chrome. Instead it provides a ~592-line Python shim that speaks the Chrome DevTools Protocol directly over a single WebSocket, plus a small set of helper functions the agent can read and call. The project describes itself as 'the simplest, thinnest, self-healing harness that gives an LLM complete freedom to complete any browser task.'

## How it works

The harness exposes helper functions as tool calls: navigate, click, type, screenshot, and so on. The unusual part is self-healing: when the LLM encounters a browser interaction the current helper set can't handle, it can write a new helper function and inject it into helpers.py mid-task — effectively extending its own tool API as it runs. All communication flows over CDP WebSocket rather than through a high-level browser framework. A free remote browser tier (cloud.browser-use.com) removes the need to run a local Chrome instance.

## Why it matters

Most LLM browser automation frameworks ship thousands of lines of deterministic heuristics and hand-tuned selectors that fail on sites the framework authors didn't anticipate. Browser Harness trades that explicit coverage for self-editing adaptability: if the agent doesn't have a tool for a situation, it builds one on the fly. The entire codebase fits in an LLM's context window, which is what makes the self-healing step possible — the agent can actually read and understand what it's modifying.

## Who it's for

Developers building LLM-powered web automation and agent pipelines

## Try it

git clone https://github.com/browser-use/browser-harness && pip install -r requirements.txt

## Links

- [GitHub Repo](https://github.com/browser-use/browser-harness)
- [HN Discussion](https://news.ycombinator.com/item?id=47890841)
