---
title: "Browser Harness: give your agent a browser"
description: "Open-source browser harness: one tool, raw Chrome over CDP. Your agent drives Chrome directly. Your logged-in Chrome or our cloud. Open source, MIT licensed."
canonical: "https://browser-use.com/browser-harness"
last_updated: "2026-11-13"
---

# Browser Harness: give your agent a browser

> Open-source browser harness: one tool, raw Chrome over CDP. Your agent drives Chrome directly. Your logged-in Chrome or our cloud. Open source, MIT licensed.

[HTML page](https://browser-use.com/browser-harness) · [GitHub](https://github.com/browser-use/browser-harness) · [install.md](https://github.com/browser-use/browser-harness/blob/main/install.md) · [Browser for coding agents](https://browser-use.com/coding-agents.md) · [Browser Harness vs Playwright MCP](https://browser-use.com/playwright-mcp.md) · [Browser Harness vs Chrome DevTools MCP](https://browser-use.com/chrome-devtools-mcp.md)

Browser Harness is the engine behind the Browser Use CLI: the `browser-use` command is built on it and ships with the rest of Browser Use ([CLI docs](https://docs.browser-use.com/open-source/browser-use-cli)). Browser Harness is the standalone open-source repo. Either one gives your agent your browser.

## Setup prompt

Paste into Claude Code, Codex or Cursor:

```text
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.
```

Chrome asks once for permission. After that, ask your agent for browser work in plain words, like "open my X profile, find my latest 20 video posts, and download them".

## One tool, not 32

The model writes the browser code it needs, instead of choosing among a fixed list of browser tools (Chrome DevTools MCP lists 32). Hermes made it the default: 12 tools → 1, 48–66% fewer tokens ([Hermes Agent case study](https://browser-use.com/case-studies/hermes)).

## Own loop: +4.6 points

Browser Harness in its own agent loop: 75.0 vs 70.5 inside Codex. Same model, same 200 tasks (paired 95% CI +0.9 to +8.3). BU Bench V2.1 score, GPT-6.1 Terra medium. [Raw data](https://browser-use.com/benchmarks/harness-bakeoff-2026-11.json)

| Setup | Score |
|---|---:|
| Browser Harness, own loop* | 75.0 |
| Browser Harness in Codex | 70.5 |

\* Measured with [Browser Use Pi](https://github.com/browser-use/browser-use-pi), raw CDP, Nov 7. Codex row Nov 12.

## Your Chrome or ours

- Local: your logged-in Chrome. The agent works in your Chrome with your tabs, cookies and logins; the tab it controls gets a 🐴 at the start of its title, and it works in the background so your visible tab stays yours.
- Cloud: our [stealth browsers](https://browser-use.com/stealth-browsers), 1,000+ at once, $0.06 per browser-hour with stealth, CAPTCHA solving and proxies, one per agent.
- Works in: Claude Code, Codex, Cursor, Gemini CLI, Hermes, OpenClaw, Pi, and anything that can run a shell command.
- It fixes itself: when a site needs something unusual, the agent writes the missing tool, uses it, and keeps it for next time.

## FAQ

**What is an agent harness?** The code between a model and the world. Ours: one tool, raw Chrome DevTools Protocol.

**What is Browser Harness, and is it open source?** Yes, MIT. A Python tool that lets any AI agent drive Chrome.

**How do I give Claude Code, Codex or Cursor a browser?** Paste our setup prompt into the agent. Guides: [/claude-code-browser](https://browser-use.com/claude-code-browser), [/codex-browser](https://browser-use.com/codex-browser), [/cursor-browser](https://browser-use.com/cursor-browser).

**Browser Harness vs Playwright MCP?** Inside Codex, same model, same 200 tasks: no significant difference in score. Browser Harness costs $0.73 vs $0.79 per task, all-in.

**Does it run without my laptop?** Yes. One call starts a cloud stealth browser, $0.06 per hour.

---

BROWSER USE

- Browser Use Agents: give Browser Use a task and receive completed work. API V4 is current for new integrations.
- Browser Infrastructure: connect your agent or automation to managed browsers through SDK, REST, or CDP. Starts at $0.06/browser-hour.
- Developer tools: Open Source, Browser Harness, SDK, and MCP support the two products above.

[Developer Index](https://browser-use.com/index.md)
[Product Map](https://browser-use.com/llms.txt)
[Full Product Context](https://browser-use.com/llms-full.txt)
[Pricing](https://browser-use.com/pricing.md)
[Cloud Docs](https://docs.browser-use.com/cloud/quickstart)
[Open Source Docs](https://docs.browser-use.com/open-source/introduction)
