Browser Harness

πŸš€ Description

browser-use/browser-harness β€” minimal editable CDP harness. One websocket to Chrome, nothing between. The agent writes what’s missing during execution and the harness improves itself every run.

Same org as Browser Use and Video Use. Where Browser Use is a full framework, Browser Harness goes the opposite direction: a thin shell where the agent writes its own helpers. Embodies the β€œbitter lesson of agent harnesses” β€” stop over-engineering, let the agent fill in gaps as it works.

The thesis won (2026-07-01)

Browser Use CLI 3.0 is now officially powered by Browser Harness. The parent framework dropped its fixed action menu (click/type) in favor of this harness’s model β€” the agent executes arbitrary Python in the browser and self-heals in one coding loop. So Browser Harness is no longer just the minimal sibling; it is the engine behind Browser Use’s flagship CLI. As of pip browser-use 0.13.4, the package pins browser-harness==0.1.5 and browser-use-sdk==3.4.2.

🧩 Features

  • ~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
  • agent-workspace/agent_helpers.py β€” helper code the agent edits
  • agent-workspace/domain-skills/ β€” reusable per-site playbooks the agent builds (LinkedIn, Amazon, GitHub…)
  • Set BH_DOMAIN_SKILLS=1 to enable surfacing of community-contributed per-domain skills
  • Works with Claude Code, Codex, any agent with shell access
  • Connects via chrome://inspect/#remote-debugging (Chrome 144+ allow popup)

🎨 Self-healing pattern

agent: wants to upload a file
agent-workspace/agent_helpers.py β†’ helper missing
agent writes it β†’ + custom helper
βœ“ file uploaded

Skills are written by the harness, not by you. When the agent figures something non-obvious out, it files the skill itself. Don’t hand-author skill files β€” agent-generated ones reflect what actually works in the browser.

πŸ› οΈ Install & bring-up (verified 2026-07-10)

Distribution has converged: the harness now ships inside the browser-use pip package β€” uv tool install browser-use (pkg v0.13.3) gives you the CLI browser-use, and browser-use --doctor self-identifies as browser-harness. The browser-use CLI is this harness. browser-use --version reports the internal 0.1.4, not the pip version.

Day-to-day: browser-use <<'PY' ... PY heredocs, helpers pre-imported (new_tab, page_info, js, click_at_xy, fill_input, wait_for_load…). First navigation must be new_tab(url). No LLM key needed in this mode β€” the agent writes the Python; keys are only for the framework Agent(...) loop or the hosted cloud agent.

Full real-world Windows bring-up (no Chrome β†’ isolated Edge over CDP, BU_CDP_WS, launcher, skill install, gotchas): Running Browser Use on Windows via Edge CDP.

Reasoning for

For browser tasks where you need complete freedom β€” no opinionated framework boxing you in. Lets a competent coding agent build a per-site automation library on the fly. Pair with Browser Use Cloud for stealth/proxies when needed.

Alternatives considered

  • Browser Use β€” fuller framework, opinionated agent loop
  • Playwright with custom selectors β€” no learning, no self-improvement
  • Stagehand / Skyvern β€” agentic browser frameworks with more structure

πŸ“– Further reading


Template: tool