Browser Harness: The Self-Improving Playwright Alternative Built for LLMs
Watch on TikTok
Browser Harness is an open-source tool that connects LLMs directly to a real browser through a thin, editable CDP (Chrome DevTools Protocol) harness. If you are using Claude Code or Codex to run browser automations and find Playwright too rigid for AI-driven workflows, Browser Harness offers a fundamentally different approach. It learns from every execution and gets better at tasks over time.
What Browser Harness Actually Does
The tool gives an LLM complete freedom to control a real browser through a single WebSocket connection to Chrome. There is nothing between the agent and the browser. The agent writes what it needs during execution, and the harness updates itself every run. This is a sharp contrast to Playwright, where you script every interaction up front and maintain brittle selectors by hand.
The GitHub repo (github.com/browser-use/browser-harness) is MIT-licensed and describes itself plainly: "Connect an LLM directly to your real browser with a thin, editable CDP harness. For browser tasks where you need complete freedom."
The Skills Architecture
The core concept is a self-improving skills system. The codebase is roughly 1,000 lines across four core files:
- install.md for first-time install and browser bootstrap
- skill.md for day-to-day usage
- src/browser_harness/ as the protected core package
- agent-workspace/domain-skills/ for reusable, site-specific skills the agent edits
When the agent runs a task on a specific website, it creates a skill file for that task. The next time it runs the same task, it loads the existing skill and refines it based on what worked and what did not. Over repeated executions, the skill becomes more reliable without any manual intervention from the developer.
As the video explains: imagine you send Browser Harness to Amazon to scrape competitor stores. The first run creates a skill. Each subsequent run updates that skill to handle edge cases, layout changes, and new page structures automatically.
Skills Are Written by the Harness, Not by You
The README makes an important distinction: skills are written by the harness, not by the user. You run your task with the agent, and when it figures something out, it files the skill itself. The project explicitly asks contributors not to hand-author skill files. Instead, the agent generates them based on what actually works in the browser.
This means the system acts as a living automation layer that adapts to website changes without you rewriting test scripts or updating selectors.
How It Compares to Playwright
Playwright requires you to write and maintain deterministic scripts. When a website changes its DOM structure, your tests break and you fix them manually. Browser Harness flips that model by letting the LLM figure out the current state of the page and adapt in real time. The tradeoff is that you lose the determinism of traditional testing frameworks, but you gain resilience for scraping, data extraction, and repetitive browser workflows where exact reproducibility matters less than consistent results.
Key Takeaways
- Browser Harness connects LLMs to Chrome via CDP with a minimal abstraction layer, giving the agent full browser control
- The skills system is self-improving: each task execution creates or refines a reusable skill file that the agent maintains automatically
- Skills are agent-authored, not hand-written, which means the automation adapts to website changes without manual updates
- The project is open source under MIT license with a small codebase of roughly 1,000 lines across four core files
- It works with Claude Code and Codex, making it a practical option if you already use LLM-based development tools
Resources
Published June 11, 2026. Writeup generated from a favorited TikTok.