Skip to main content

The simplest, thinnest, and most powerful harness to control your real browser with your agent.

Project description

Browser Harness

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.

Try browser-harness in Browser Use Cloud or paste the setup prompt into your coding agent.

  ● 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:

Install or upgrade browser-harness to the latest stable version with uv using Python 3.12, register the skill from `browser-harness skill`, and connect it to my browser. Ask whether I want local browser recordings enabled; default to no and preserve my existing preference on upgrades. Follow https://github.com/browser-use/browser-harness/blob/main/install.md if setup or connection fails.

The agent will open chrome://inspect/#remote-debugging. Tick the checkbox so the agent can connect to your browser:

Remote debugging setup

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

Allow remote debugging popup

See 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.

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
  • ${XDG_CONFIG_HOME:-~/.config}/browser-harness/agent-workspace/agent_helpers.py — helper code the agent edits
  • ${XDG_CONFIG_HOME:-~/.config}/browser-harness/agent-workspace/domain-skills/ — reusable site-specific skills the agent edits

Plain browser-harness helper calls attach to the running Chrome/Chromium CDP endpoint. For isolated automation, launch Chrome yourself with --remote-debugging-port and pass BU_CDP_URL, or use a Browser Use cloud browser.

Development

From a checkout, use ./browser-harness to run the current working tree without activating a virtualenv or depending on the globally installed command:

./browser-harness <<'PY'
print(page_info())
PY

Normal agent-facing docs should keep using browser-harness; the ./browser-harness launcher is only for local repo testing.

Contributing

PRs and improvements welcome. The best way to help: contribute a new domain skill under 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). Please don't hand-author skill files; agent-generated ones reflect what actually works in the browser.
  • Open a PR with the generated domain-skills/<site>/ folder copied into this repo's agent-workspace/domain-skills/ examples — 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 domain skills from the agent workspace. This repo's agent-workspace/domain-skills/ directory contains examples to contribute via PR.


The Bitter Lesson of Agent Harnesses · Web Agents That Actually Learn

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

browser_harness-0.1.6.tar.gz (94.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

browser_harness-0.1.6-py3-none-any.whl (99.5 kB view details)

Uploaded Python 3

File details

Details for the file browser_harness-0.1.6.tar.gz.

File metadata

  • Download URL: browser_harness-0.1.6.tar.gz
  • Upload date:
  • Size: 94.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for browser_harness-0.1.6.tar.gz
Algorithm Hash digest
SHA256 90c0c019e0bc0a1f189da28592abf4e7b4e3ebfb0d530ea173c0432829dba882
MD5 72b62544db8a922d56fc4a4f0f3eb7da
BLAKE2b-256 a3bca3aefcad0df4450f560969f64a1fab86d1b3cf0e1ec66ce3bd55aa63ece3

See more details on using hashes here.

Provenance

The following attestation bundles were made for browser_harness-0.1.6.tar.gz:

Publisher: release.yml on browser-use/browser-harness

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file browser_harness-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: browser_harness-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 99.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for browser_harness-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 65d92ac05b71b5702ab734a389d4142dd749eb1f005d71792106c5da8e8eddca
MD5 4ee4809110c17a1ddc51d8ba8a4dc644
BLAKE2b-256 24d578013b7229843880d7f18945022662793eb00daeec2e5d2ea62687bc00c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for browser_harness-0.1.6-py3-none-any.whl:

Publisher: release.yml on browser-use/browser-harness

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page