Noureddine RAMDI / Browser Harness: a self-healing LLM agent for browser automation via Chrome DevTools

Created Fri, 24 Apr 2026 07:26:29 +0000 Modified Sat, 06 Jun 2026 19:20:19 +0000

browser-use/browser-harness

Browser automation is a well-trodden field, but Browser Harness takes a notably different approach: it empowers large language models (LLMs) to perform any browser-based task by interacting directly with the Chrome DevTools Protocol (CDP), while dynamically extending their own toolkit on the fly. This “self-healing” mechanism means the agent writes missing helper functions during a task, reducing the need for prebuilt frameworks or rigid toolsets.

What browser harness does and how it works

Browser Harness is a minimalist Python project (around 592 lines) that acts as a bridge between LLMs and real browser instances controlled via CDP. It enables LLMs to automate browsers by sending commands and receiving responses through the DevTools protocol, effectively letting the LLM interact with the browser’s internals.

The standout architectural feature is the dynamic creation of helper functions. Instead of relying on a fixed library of tools, the system detects when the LLM lacks a specific utility mid-task and lets it write the required Python helper function (helpers.py) at runtime. This gives the agent true flexibility to adapt to new tasks without human intervention or predefined recipes.

The repo also provides free remote browsers that come with proxy support and captcha solving, allowing stealthy and scalable deployment of sub-agents. This setup helps when automating tasks that require anonymity or geographic diversity.

Under the hood, the system is lean, focusing on minimal overhead and maximum freedom. The codebase is straightforward Python, making it accessible for developers to understand, extend, or embed in larger systems.

Why the self-healing dynamic helper generation is interesting

Most agentic systems prepackage their capabilities as fixed toolsets or domain-specific skills, which can limit flexibility or require extensive upfront development. Browser Harness flips that model by enabling the LLM to write missing code mid-flight. This pattern:

  • Enables true on-demand tool creation, reducing the need for bulky frameworks or manual coding of every possible helper.
  • Reflects a step toward more autonomous AI agents that can bootstrap their own capabilities as they encounter new challenges.
  • Keeps the core system very lightweight (around 600 lines of Python) compared to heavier agent frameworks.

That said, this approach has tradeoffs. Dynamically generated code can introduce brittleness or security risks if not carefully sandboxed or validated. Debugging can also be harder since helpers are created on the fly rather than maintained as stable, tested libraries.

The code quality in Browser Harness is surprisingly clean given its experimental nature. The main logic centers on the interaction loop where the LLM receives state, generates commands or helper code, and executes those against the browser via CDP. Helper functions live in a dedicated helpers.py file, making it easier to inspect or override them.

The repo encourages community contributions via “domain skills”—agent-generated scripts reflecting real-world browser interactions. This can help build a growing library of tested helpers while preserving the core system’s minimalism.

Setup prompt and how to get started

The project README provides a concise setup prompt for connecting the agent to a real browser. You paste this into Claude Code or Codex to initiate the environment:

Set up https://github.com/browser-use/browser-harness for me.

Read `install.md` first to install and connect this repo to my real browser. Then read `SKILL.md` for normal usage. Always read `helpers.py` because that is where the functions are. When you open a setup or verification tab, activate it so I can see the active browser tab. After it is installed, open this repository in my browser and, if I am logged in to GitHub, ask me whether you should star it for me as a quick demo that the interaction works — only click the star if I say yes. If I am not logged in, just go to browser-use.com.

The README also mentions ticking a checkbox on a displayed page to enable the agent’s browser connection. Examples of domain skills are available in the domain-skills/ folder, illustrating practical tasks the agent can perform.

This minimal setup keeps the developer experience straightforward, focusing on connecting the LLM to a real browser and letting it start automating.

Verdict: who should consider Browser Harness?

Browser Harness is a compelling tool for developers and researchers interested in pushing the boundaries of LLM-driven browser automation. Its self-healing design offers a fresh take on agent frameworks, favoring adaptability over rigid tooling.

It’s well-suited for experimental projects where flexibility and minimal overhead matter more than industrial-grade robustness or security guarantees. The dynamic helper generation is a double-edged sword—it enables on-demand capability but requires cautious handling in production scenarios.

If you’re looking for a lightweight, understandable Python codebase that demonstrates a novel interaction pattern between LLMs and browsers via CDP, Browser Harness is worth exploring. It also offers free remote browsers with proxies and captcha solving, which can help with stealth automation tasks.

However, if your use case demands stable, thoroughly tested automation flows or you require strong security assurances, the dynamic and self-modifying nature here may pose challenges.

Overall, Browser Harness provides a valuable reference design and a platform to experiment with truly autonomous LLM agents in browser environments, with a neat balance of simplicity and power under the hood.


→ GitHub Repo: browser-use/browser-harness ⭐ 5,895 · Python