browser-harness: Instructions file for Codex

AGENTS.md

browser-harness AGENTS.md is an instructions file for Codex, OpenCode from browser-use/browser-harness. It costs 506 tokens per session, scanned A, original, MIT.

Repository instructions for browser-harness, a tool that lets an agent control a web browser through Chrome's debugging connection. They explain the project layout, command-line tool, browser connection, recording rules, and workspace limits.

In plain words
What is it for?
Use them when building, testing, debugging, recording, or demonstrating browser-based work with browser-harness.
Why use it?
They help the agent operate the browser consistently and avoid editing the wrong files or repeating completed browser tasks. They also point to installation and troubleshooting guidance.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

This is browser-use/browser-harness's own configuration. It tells Codex and OpenCode how to work on browser-harness itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything browser-harness configures →

About the project

Browser Harness connects a language model to a real browser through an editable CDP WebSocket, allowing the agent to perform browser tasks and create reusable helpers when needed. Developers and browser agents use it for browser automation, with an MCP server available for compatible clients. The catalogue entries provide setup instructions and teach coding agents its browser workflow.

browser-use/browser-harness · 19,353 stars · on GitHub · browser-harness.com

Reuse

Borrowing it

Nothing to install: this file belongs to browser-use/browser-harness. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/browser-use/browser-harness/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/browser-use/browser-harness

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for browser-harness AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/browser-use/browser-harness/agents-md/github.svg)](https://agentmods.dev/instructions/browser-use/browser-harness/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/browser-use/browser-harness/agents-md"><img src="https://agentmods.dev/badge/instructions/browser-use/browser-harness/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for browser-harness AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/browser-use/browser-harness/agents-md"><img src="https://agentmods.dev/badge/instructions/browser-use/browser-harness/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 506 This file is loaded in full into every session.
When invoked 506 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00506 $0.00506
Opus 5.5 $0.00202 $0.00202
Sonnet 5.5 $0.00101 $0.00101
Haiku 4.5 $0.00051 $0.00051

Measured 3mo ago against content hash 86dc889e7f18, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

browser-harness AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 57 lines

How it starts

The opening of the file, as written. The whole thing — 57 lines — stays where its author put it; the contents beside it link to each section on GitHub.

browser-harness is a thin layer that connects agents to browsers via an editable CDP harness.

Code priorities

  • Clarity
  • Precision
  • Low verbosity
  • Versatility

Overview

Core code lives in src/browser_harness/:

  • admin.py — daemon lifecycle, diagnostics, updates, profile management
  • daemon.py — the long-lived middleman process between the browser and the agent
  • helpers.py — CDP wrapper and core browser primitives auto-imported into the scripts the CLI reads from stdin
  • run.py — the browser-harness CLI

SKILL.md tells agents how to use the harness and CLI. install.md tells agents how to install it, attach a browser, and troubleshoot.

An agent operating the harness only edits inside agent-workspace/:

  • agent_helpers.py — task-specific browser helpers the agent adds
  • domain-skills/ — skills the agent writes and reads

Package/CLI name = browser-harness. Skill identity (name + trigger) = browser-use (do not rename).

Commands

From a git checkout (no global install required for local testing):

# doctor — install/daemon/browser state
./browser-harness --doctor

# smoke — CDP attach + page_info (Chrome remote debugging must be allowed)
./browser-harness <<'PY'
print(page_info())
PY

# unit tests (no live browser)
uv run --with pytest python -m pytest tests/unit -q

# after core/src edits: reload daemon so next call picks up code
./browser-harness --reload

Notes:

  • ./browser-harness = local tree launcher. Agents/docs outside this repo use the installed browser-harness command.
  • Integration tests under tests/integration/ may need a live browser/CDP — prefer unit + doctor for routine PR gates.
  • First-time install / blocked Chrome: follow install.md (chrome://inspect/#remote-debugging).

Security

  • Do not commit secrets, Browser Use Cloud tokens, or session cookies.
  • Prefer the smallest change that fixes the bug; do not expand CDP surface without need.

Contributing

Consider what is really needed. Prefer the smallest diff that fixes the bug. Domain skills under agent-workspace/domain-skills/ are agent-generated when possible — hand-author only when necessary.

Read the full file on GitHub · 57 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago Changed · +25 lines · +190 tokens per session 86dc889e7f18
  2. 3mo ago First seen · 32 lines · 316 tokens per session scan A 80b1176f8e91

Subscribe to this mod's changes

browser-harness AGENTS.md is an instructions file published in the GitHub repository browser-use/browser-harness (19,353 stars, last pushed yesterday), licensed MIT. It adds 506 tokens to every session, about $0.0020 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

browser-harness AGENTS.md compared with instructions from other repositories

browser-harness AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
browser-harness AGENTS.mdbrowser-use/browser-harnessInstructions file19kyesterdayMITA506Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA9,887GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file144ktodayMITA7,230Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA5,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file150ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA3,303GitHub Copilot
deno copilot-instructions.mddenoland/denoInstructions file109kyesterdayMITA3,077GitHub Copilot