Skip to main content
Browser Harness

Browser Harness ♞

Browser Harness lets Claude Code, Codex or Cursor use your real Chrome browser: open pages, click, type, read and download, logged in as you. Paste one prompt into your coding agent to set it up. It talks to Chrome over the DevTools Protocol (CDP), and the agent writes any missing helper as it works, so the harness gets better with each task. Open source, MIT licensed.

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.

See it work

Task: "Open my X profile, find my latest 20 video posts, and download them."

Download my latest 20 X videos

Setup prompt

Paste into Claude Code or Codex (Cursor: use the MCP config below):

Install browser-use with `uv tool install browser-use`, run `browser-use skill install` to register the skill, and connect it to my browser. If setup or connection fails, run `browser-use --doctor` and follow its output and the error message.

The agent will open chrome://inspect/#remote-debugging. On first setup, tick the checkbox so the agent can connect to your browser:

Remote debugging setup

How it works

  • install.md connects the agent to your browser.
  • SKILL.md teaches it the browser workflow.
  • src/browser_harness/ stays protected while the agent writes reusable helpers in its local workspace.

Compared with other browser tools

Works with Browser it drives What you approve in your own Chrome
Browser Harness Claude Code, Codex, Cursor, any MCP client via browser-harness-mcp Your running Chrome, logged in as you Whole browser: on Chrome 144+, tick remote debugging in chrome://inspect, then click Allow
Playwright MCP Any MCP client (Claude Code, Codex, Cursor, Copilot and more) Its own browser profile by default. Your Chrome with --extension (Playwright Extension) or --cdp-endpoint Chosen tabs (one tab group per client) via the extension, approval skippable with a token; or whole browser via --cdp-endpoint
Playwright CLI Claude Code, GitHub Copilot and other agents that run shell commands Its own browser by default. Your Chrome with attach --extension=chrome or attach --cdp=chrome Chosen tab via the Playwright Extension, or whole browser via --cdp
Chrome DevTools MCP Any MCP client (Claude Code, Cursor, Copilot, Antigravity and more), plus a CLI A new Chrome with a dedicated profile by default. Your Chrome 144+ with --autoConnect Whole browser: the same Chrome 144+ toggle and Allow dialog; the server sees every open window of that profile
agent-browser Claude Code, Codex, Cursor, Gemini CLI, Copilot and more, as a CLI with a skill, plus an MCP server Its own Chrome for Testing by default. A copy of your Chrome profile with --profile. Your running Chrome with --auto-connect or --cdp Whole browser via --auto-connect or --cdp: the same Chrome 144+ toggle and Allow dialog
Claude in Chrome Claude Code (CLI or VS Code) with the Claude extension, signed in with a direct Anthropic plan (Pro, Max, Team, Enterprise), not an API key Your Chrome, Edge or other Chromium browser, logged in as you Per site: allow sites in the extension, or per action in Claude Code (auto mode can skip the per-site check). Claude works in a tab group it opens
ChatGPT Browser and browser extension Codex and ChatGPT chats in the ChatGPT desktop app, not Codex CLI or the Codex IDE extension Browser: a separate profile. Extension: your Chrome, Edge, Brave, Opera or Vivaldi profile Per site: asks before each new website (allow once, for this site, or for all sites)

Matched eval by Browser Use on 100 of the 200 public BU Bench V2.1 tasks (bu2-001 to bu2-100; 101-200 not run). Measured 2026-10-14.

  • Same agent for every tool: Codex CLI 0.144.6, GPT-6 Luna, medium reasoning, web search off. Same frozen judge.
  • Browser Harness was given to the agent as its CLI and SKILL.md, not browser-harness-mcp. Playwright MCP and Chrome DevTools MCP ran as MCP servers with default settings. agent-browser ran as its CLI and skill.
  • Every tool drove the same fresh Browser Use cloud browser over CDP. This does not measure each tool's default or local-Chrome mode.
  • One run per task. Agent failures were never retried. Runner, browser and judge failures were rerun once (Browser Harness 3 tasks, Playwright MCP 4, Chrome DevTools MCP 6, agent-browser 0).
Tool Mean rubric score 0-100 (95% CI) Fully solved Median input tokens per task Median model cost per task (GPT-6 Luna list price) Median agent time per task
Browser Harness a6426f84 (main) 60.4 (55.2-65.4) 11% 2.1M $0.042 9.0 min
Playwright MCP 0.0.83 60.0 (55.1-65.0) 11% 4.4M $0.066 8.3 min
Chrome DevTools MCP 1.10.1 61.0 (55.8-65.9) 11% 6.7M $0.097 8.7 min
agent-browser 0.39.1 56.3 (51.1-61.5) 9% 3.3M $0.056 11.2 min

No tool wins on score: every paired difference against Browser Harness has a 95% CI that includes zero (other tool minus Browser Harness: agent-browser -4.0, CI -10.0 to +1.8; Playwright MCP -0.4, -6.6 to +5.7; Chrome DevTools MCP +0.6, -5.6 to +6.6).

Browser Harness had the lowest median input tokens (2.1M vs 3.3-6.7M) and the lowest median model cost ($0.042 vs $0.056-0.097). Model cost excludes browser, proxy and judge. It was slower than Playwright MCP and Chrome DevTools MCP (median 9.0 vs 8.3 and 8.7 min) and faster than agent-browser (11.2 min). These are medians, with no confidence intervals.

A first agent-browser run was discarded: a setup bug on our side let it launch its own local browser instead of the shared cloud browser. The row shows the corrected rerun.

Measured with Codex only. Claude Code, Cursor, Playwright CLI and Claude in Chrome were not measured. Method and per-task scores: coding-agent-browser-tools.json.

When to use something else

  • Playwright (Test, MCP or CLI): isolated, repeatable CI tests of your own app, in a clean browser with no personal logins.
  • Chrome DevTools MCP: performance traces and DevTools debugging (network, console, source-mapped stack traces).
  • Claude in Chrome: you only use Claude and have a Pro, Max, Team or Enterprise plan.
  • Cursor's built-in Browser: the agent doesn't need your logged-in Chrome. It runs in its own per-workspace profile.

OpenAI's Codex labels its browser feature "Browser use" in its settings. It is separate from Browser Use, the company behind this repo.

Scale with Browser Use Cloud

Use your local browser for logged-in, personal work. When you want many browsers in parallel, with live previews, proxies, stealth, CAPTCHA solving, and more, scale with Browser Use Cloud.

MCP server

browser-use --cli-mcp exposes the browser control helpers as MCP tools over stdio, so any MCP client (Claude Code, Devin, Cursor, etc.) can drive the browser without writing a second CDP layer. The older browser-harness-mcp keeps working; see docs/MCP.md.

Cursor

Add this to .cursor/mcp.json in your project, or to ~/.cursor/mcp.json for every project. It needs uv.

{
  "mcpServers": {
    "browser-use": {
      "type": "stdio",
      "command": "uvx",
      "args": ["browser-use", "--cli-mcp"]
    }
  }
}

Contributing

Bug fixes, documentation improvements, and agent-generated domain skills are welcome. See CONTRIBUTING.md.


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

Metadata

Release files for browser-harness 0.1.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for browser-harness 0.1.14
File Size Uploaded Provenance Actions
browser_harness-0.1.14.tar.gz 150.0 kB With provenance Details for browser_harness-0.1.14.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for browser-harness 0.1.14
File Interpreter ABI Platform Actions
browser_harness-0.1.14-py3-none-any.whl Python 3 none any Details for browser_harness-0.1.14-py3-none-any.whl

Total release size: 304.9 kB

Release files / browser_harness-0.1.14.tar.gz

Download URL browser_harness-0.1.14.tar.gz
Size 150.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c3f0f3bda480ae3591f5839d0dc4913df4a64dd93fbda7af35fab69e09bd1c2d
BLAKE2b-256 checksum
How to use checksums
47ccbcd2940c8b53eec46d3ff774c56439f3ccd6aef0ccd9d48638e55c55dc3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Release files / browser_harness-0.1.14-py3-none-any.whl

Download URL browser_harness-0.1.14-py3-none-any.whl
Size 154.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c8b7db245d477a6a6f4c067e91e7b013b98de0fad499c493607e1869a0783a6c
BLAKE2b-256 checksum
How to use checksums
48e8c032268f730593864dd26195c3be52cb02fc74cc4d7ef520d6a733aee00a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Security for browser-harness 0.1.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for browser_harness-0.1.14.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page