browser-use/browser-harness
Browser Harness | Self-healing harness that enables LLMs to complete any task.
Browser Harness – Connecting LLMs Directly to Your Real Browser
What it is – Browser Harness is a lightweight Python library that lets a language‑model‑based agent control a local Chrome/Edge browser through the Chrome DevTools Protocol (CDP). The agent can write small helper functions on‑the‑fly, storing them in its own workspace, so the harness gets smarter with each task.
How it works
- A single editable CDP WebSocket is opened (
chrome://inspect/#remote‑debugging). - The library ships a skill (
browser-harness skill) that teaches the LLM the basic browser workflow (open tabs, click, scroll, download files, etc.). - When the agent encounters a missing helper, it writes the Python code into
agent-workspace/agent_helpers.py. Those helpers become reusable for future runs. - An optional MCP (Multi‑Chat‑Protocol) server (
browser-harness-mcp) exposes the same controls over stdio, so any MCP‑compatible client (Claude Code, Cursor, Devin, …) can drive the browser without re‑implementing CDP.
Key capabilities
- File upload / download – e.g., upload a file to a site or scrape videos as shown in the demo GIF.
- Parallel / scaled browsing – use the free local browser for personal tasks, or switch to Browser Use Cloud for many browsers, proxies, CAPTCHA solving, etc.
- Agent‑generated helpers – the LLM can extend its own toolbox during a session, making the system improve over time.
- Zero‑setup for the user – after a one‑time “enable remote debugging” click, the agent handles the rest.
Typical workflow
- Install/upgrade with
uv(Python 3.12) and register the skill. - Run the harness; it opens the remote‑debugging page.
- The user authorises the connection.
- The LLM receives a prompt (e.g., “Open my X profile, find my latest 20 video posts, and download them.”) and starts issuing CDP commands.
- If a needed helper is missing, the LLM writes it to
agent_helpers.pyand continues.
Getting started
- Follow the short Setup prompt (copy‑paste into Claude Code or Codex) which installs the package, registers the skill, and asks about optional local recordings.
- Detailed installation steps are in
install.md. - The skill definition lives in
SKILL.md; the core library code is undersrc/browser_harness/.
Scaling – For heavy workloads, obtain an API key from Browser Use Cloud and let the cloud service spin up multiple browsers with extra features (stealth mode, proxies, CAPTCHA solving, live previews).
Community – Contributions are welcomed for bug fixes, docs, or new agent‑generated domain skills. See CONTRIBUTING.md for guidelines.
Bottom line – Browser Harness provides a practical bridge that lets modern LLM agents interact with a real web browser, learn new actions on the fly, and optionally scale out to cloud‑hosted browsers. It is a concrete piece of infrastructure for building web‑agent applications.
Related
- Project
- Project
- Project
- Project
- Project