browser-harness
The simplest, thinnest, and most powerful harness to control your real browser with your agent.
What it is and what it does
Browser Harness is a thin CDP harness that lets an LLM agent control your real browser directly, with one websocket connection to Chrome and no middleware. The agent can write and edit helper code and domain-specific skills during execution, improving the harness on each run. It's designed for tasks where you need complete freedom—the agent discovers what's missing and adds it.
The package ships with a command-line interface, stores agent-editable helpers and skills in your config directory, and supports both local Chrome instances (via --remote-debugging-port) and Browser Use Cloud browsers for stealth, sub-agents, or headless deployment. It depends on cdp-use, fetch-use, pillow, and websockets to handle Chrome protocol communication, image capture, and real-time bidirectional messaging.
Use it for:
- Let an LLM agent automate repetitive web tasks (file uploads, form filling, data entry) while it learns site-specific selectors and flows.
- Build domain skills for specific websites that the agent generates and improves iteratively.
- Deploy headless browser automation using Browser Use Cloud without managing local Chrome instances.
- Debug agent behavior by inspecting live browser state and letting the agent write custom helpers on the fly.
- Integrate browser control into multi-step AI workflows where the agent needs to interact with web applications dynamically.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Connects an LLM agent directly to a real Chrome/Chromium browser via the Chrome DevTools Protocol, allowing the agent to control browser tasks and self-improve by writing helper code during execution.
Yes, if you need an LLM to control a real browser and want the agent to improve itself during execution. The package is actively maintained, has low install friction, carries a permissive MIT license, and is in early alpha (0.1.8) with no known vulnerabilities. Start with the setup prompt in the description or Browser Use Cloud if you want to avoid local Chrome setup. Not suitable if you need a stable, production-hardened API—the alpha status and self-modifying helper code mean workflows may shift as the agent learns.
Install
browser-harness on PyPI
pip
pip install browser-harnessuv
uv add browser-harnesspoetry
poetry add browser-harnessInstalling browser-harness
Before you install
Low friction: pure Python wheel with four runtime dependencies (cdp-use, fetch-use, pillow, websockets). Active maintenance—released 19 days ago with commits through 2026-08-14. Requires Python 3.11 or later.
License in practice
MIT license (permissive): you can use, modify, and distribute this package freely in commercial or private projects, with minimal restrictions.
Quickstart
pip install browser-harness
from browser_harness import connect
# Connect to Chrome at default CDP endpoint
browser = connect()
# Agent can now control the browser and write helpers as needed
Requires Chrome or Chromium running with --remote-debugging-port enabled, or a Browser Use Cloud account; Python 3.11 or later.
Verify before relying
- Repository star count and its relevance to package stability
- Whether the package works with headless Chrome or requires a display
- Performance characteristics when controlling complex web applications
- How agent-generated helper code persists and is versioned across runs
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — cdp-use, fetch-use, pillow, websockets |
| Maintenance | actively maintained — 19 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 7,072,341/month — #1,791 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: browser_harness-0.1.8-py3-none-any.whl
Keywords: agent, automation, browser, cdp, chrome, scraping
Tags
More Testing packages
Pluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
virtualenvvirtualenv creates isolated Python environments…
permissive · top 100 on PyPI
coverageCoverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
pytest-asynciopytest-asyncio is a pytest plugin that enables…
permissive · top 1,000 on PyPI
pytest-json-ctrfA pytest plugin that generates test reports in…
permissive · top 1,000 on PyPI
mycdpMyCDP provides autogenerated Chrome DevTools…
permissive · top 15,000 on PyPI
browser-useBrowser Use is a Python library that lets AI…
permissive · top 1,000 on PyPI
cdp-useGenerates type-safe Python bindings for the…
permissive · top 5,000 on PyPI
deepagentsDeep Agents is an opinionated agent harness…
permissive · top 5,000 on PyPI
pychromePychrome provides a Python interface to control…
permissive · top 15,000 on PyPI
cloakbrowserLaunches a stealth Chromium browser that evades…
permissive · top 15,000 on PyPI
marionette-harnessMarionette-harness is a test runner for…
copyleft · top 15,000 on PyPI
choreographerChoreographer provides remote control of…
unclear · top 5,000 on PyPI
browser-use-sdkPython SDK for controlling browsers…
permissive · top 5,000 on PyPI
seleniumSelenium provides Python bindings to automate…
permissive · top 1,000 on PyPI