https://github.com/browser-use/browser-harness
Browser Harness | Self-healing harness that enables LLMs to complete any task.
https://github.com/browser-use/browser-harness
ai-agent browser-agent browser-automation browser-use browser-use-box browser-use-cloud cdp cloud-browser llm persistent-browser playwright telegram-agent vps-agent web-automation
Last synced: 8 days ago
JSON representation
Browser Harness | Self-healing harness that enables LLMs to complete any task.
- Host: GitHub
- URL: https://github.com/browser-use/browser-harness
- Owner: browser-use
- License: mit
- Created: 2026-04-17T01:56:15.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2026-05-19T18:52:45.000Z (24 days ago)
- Last Synced: 2026-05-19T22:15:18.691Z (24 days ago)
- Topics: ai-agent, browser-agent, browser-automation, browser-use, browser-use-box, browser-use-cloud, cdp, cloud-browser, llm, persistent-browser, playwright, telegram-agent, vps-agent, web-automation
- Language: Python
- Homepage: https://browser-harness.com
- Size: 1.17 MB
- Stars: 13,254
- Watchers: 38
- Forks: 1,225
- Open Issues: 94
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Agents: AGENTS.md
Awesome Lists containing this project
- awesome-harness-engineering - browser-use/browser-harness - A thin CDP-based browser harness that lets agents extend helper functions during execution, useful for inspecting self-healing web-task workflows. (Runtimes, Harnesses & Reference Implementations)
- awesome-harness-engineering - browser-harness - healing browser harness that connects an LLM directly to your real Chrome via CDP. The critical design decision: the agent itself writes missing helpers and domain skills into the harness during execution, so the scaffold improves every run rather than requiring manual updates. At ~1k lines across four core files, it is the clearest published demonstration of an editable harness that learns from its own failures.  (Reference Implementations / Demo Harnesses)
- awesome-ai-agents - browser-use/browser-harness - Browser Harness is a self-healing CDP harness that connects LLMs directly to a real browser, enabling AI agents to complete any web-based task and improve themselves over time. (GUI & Computer Control AI Agents / Browser & Web Automation)
README

# Browser Harness ♞
Connect an LLM directly to your real browser with a thin, editable CDP harness. For browser tasks where you need **complete freedom**.
One websocket to Chrome, nothing between. The agent writes what's missing during execution. The harness improves itself every run.
```
● agent: wants to upload a file
│
● agent-workspace/agent_helpers.py → helper missing
│
● agent writes it agent_helpers.py
│ + custom helper
✓ file uploaded
```
**You will never use the browser again.**
## Setup prompt
Paste into Claude Code or Codex:
```text
Set up https://github.com/browser-use/browser-harness for me.
Read `install.md` and follow the steps to install browser-harness and connect it to my browser.
```
The agent will open `chrome://inspect/#remote-debugging`. Tick the checkbox so the agent can connect to your browser:

Click Allow when the per-attach popup appears (Chrome 144+):

See [agent-workspace/domain-skills/](agent-workspace/domain-skills/) for example tasks.
## Free Browser Use Cloud browsers
Stealth, sub-agents, or headless deployment.
**Browser Use Cloud free tier: 3 concurrent browsers, proxies, captcha solving, and more. No card required.**
- Grab a key at [cloud.browser-use.com/new-api-key](https://cloud.browser-use.com/new-api-key)
- Or let the agent sign up itself via [docs.browser-use.com/llms.txt](https://docs.browser-use.com/llms.txt) (setup flow + challenge context included).
## Architecture (~1k lines across 4 core files)
- `install.md` — first-time install and browser bootstrap
- `SKILL.md` — day-to-day usage
- `src/browser_harness/` — protected core package
- `agent-workspace/agent_helpers.py` — helper code the agent edits
- `agent-workspace/domain-skills/` — reusable site-specific skills the agent edits
## Contributing
PRs and improvements welcome. The best way to help: **contribute a new domain skill** under [agent-workspace/domain-skills/](agent-workspace/domain-skills/) for a site or task you use often (LinkedIn outreach, ordering on Amazon, filing expenses, etc.). Each skill teaches the agent the selectors, flows, and edge cases it would otherwise have to rediscover.
- **Skills are written by the harness, not by you.** Just run your task with the agent — when it figures something non-obvious out, it files the skill itself (see [SKILL.md](SKILL.md)). Please don't hand-author skill files; agent-generated ones reflect what actually works in the browser.
- Open a PR with the generated `agent-workspace/domain-skills//` folder — small and focused is great.
- Bug fixes, docs tweaks, and helper improvements are equally welcome.
- Browse existing skills (`github/`, `linkedin/`, `amazon/`, ...) to see the shape.
If you're not sure where to start, open an issue and we'll point you somewhere useful.
## Domain skills
Set `BH_DOMAIN_SKILLS=1` to enable [agent-workspace/domain-skills/](agent-workspace/domain-skills/) — community-contributed per-site playbooks `goto_url` surfaces by domain. Contribute via PR.
---
[The Bitter Lesson of Agent Harnesses](https://browser-use.com/posts/bitter-lesson-agent-harnesses) · [Web Agents That Actually Learn](https://browser-use.com/posts/web-agents-that-actually-learn)