CDP-native browser automation runtime for agents, with editable skills and reliable Gemini image workflows.
• Real Chrome Control • Skill-Driven Automation • Upload-Verified Image Generation •
Features • Quick Start • Workflows • Safety Model • Agent Guide
Tip
I'm a human -> Read this README for install, setup, and safe workflows.
I'm an agent -> Read SKILL.md for operation rules and execution patterns. (Recommended)
browser-agent is a minimal runtime that lets agents control your real Chrome session directly over CDP, while keeping task logic editable in-repo.
- For operators: one command surface for browser actions, diagnostics, and updates.
- For agents: stable helper APIs (
new_tab,js,click_at_xy,upload_file, rawcdp). - For reliability: interaction skills and domain skills to encode repeatable mechanics.
Tell your coding agent:
Install Browser Agent from
https://github.com/PaulClawX/browser-agentand set it up to control my Chrome via CDP.
git clone https://github.com/PaulClawX/browser-agent
cd browser-agent
uv tool install -e .command -v browser-agent
browser-agent --version
browser-agent --doctorbrowser-agent -c 'print(page_info())'- Open
chrome://inspect/#remote-debugging - Enable
Allow remote debugging for this browser instance - Accept the Chrome allow popup when prompted
- Re-run:
browser-agent -c 'print(page_info())'For full setup and troubleshooting, see install.md.
- Direct CDP control against real Chrome tabs.
- Minimal daemon + IPC architecture.
- Rich helper APIs for navigation, DOM eval, input, uploads, screenshots, tabs.
- Interaction skills for repeatable UI mechanics.
- Domain skills for site-specific workflows.
- Gemini image generation/editing workflow with upload verification gate.
| Tier | Workflow | Expected Behavior |
|---|---|---|
| Stable | General browser automation | Deterministic tab + DOM + input operations through CDP helpers |
| Stable | Upload-driven tasks | Upload confirmation before submit; fail-fast if upload isn't verifiable |
| Stable | Gemini image generation/editing | Prompt + reference flow with strict upload-first gating and export |
| Stable | Diagnostics and lifecycle | --doctor, daemon auto-start, update checks |
| Best-effort | Complex anti-bot sites | Fallback to coordinate actions, retries, and skill-specific patterns |
browser-agent -c '
new_tab("https://example.com")
wait_for_load()
print(page_info())
'Common helpers:
new_tab(url),goto_url(url)page_info(),wait_for_load(),wait_for_element()click_at_xy(x, y),type_text(text),press_key(key)js(expression),cdp(method, **params)upload_file(selector, path)capture_screenshot(path=None)
src/browser_harness/- core runtime modulesSKILL.md- operator rules for day-to-day useinstall.md- first-time install and connectiondocs/interaction-skills/- reusable browser mechanics playbookssrc/agent-workspace/agent_helpers.py- task-specific helper extensionsdocs/domain-skills/- site-specific playbooks
See docs/interaction-skills/ for practical playbooks, including:
- connection, dialogs, dropdowns, uploads
- tabs, iframes, cross-origin iframes, shadow DOM
- screenshots, scrolling, viewport
- Gemini image generation + editing
Panwang Pan paulpanwang@gmail.com |
Feel free to open an issue if you have any questions or suggestions.
If this project helps you, please give it a ⭐ Star!
This project builds on and is inspired by the following open-source work:
- browser-use/browser-harness - the primary code and architecture source.
- OpenClaudex/openreview-agent - OpenReview dry-run workflow inspiration.
