核心信息
Browser Harness 是一个”瘦且可编辑的 CDP 桥接层”,让 LLM 直接连接真实浏览器。核心理念是代理在运行时自动补全缺失代码,桥接层在每次运行中自我改进。
- 作者:browser-use
- Stars:13k
- Forks:1.2k
- 许可证:MIT
- 技术栈:Python 100%
- 官网:browser-harness.com
核心理念
“The Bitter Lesson of Agent Harnesses” — 最小化桥接层,让代理自主学习和补全,而非预先编写所有可能性。
核心工作流:
agent: wants to upload a file
→ agent-workspace/agent_helpers.py 中 helper 缺失
→ agent 自动写入 helper_helpers.py
→ ✓ file uploaded
架构设计
两层隔离
| 层 | 目录 | 权限 | 代码量 |
|---|---|---|---|
| 保护核心 | src/browser_harness/ | 代理不可修改 | ~1k 行,4 文件 |
| 可编辑工作区 | agent-workspace/ | 代理可自由修改 | 动态增长 |
代理可编辑区
agent-workspace/agent_helpers.py— 辅助代码,代理运行时自动补全agent-workspace/domain-skills/— 站点特定操作手册,按域名自动匹配
Domain Skills 机制
通过环境变量 BH_DOMAIN_SKILLS=1 启用,goto_url 按域名自动匹配对应 skill。目前包含 amazon、github、linkedin 等站点技能。
技术原理
- CDP (Chrome DevTools Protocol) — 浏览器控制核心协议
- Playwright — 浏览器自动化
- WebSocket — 与 Chrome 直连,“nothing between”
- 远程调试 — 通过
chrome://inspect/#remote-debugging启用
安装方式
在 Claude Code 或 Codex 中粘贴提示即可让代理自动完成安装。也提供 Cloud Browser 免费层(3 个并发浏览器),从 cloud.browser-use.com 获取密钥。
关联连接
- Browser_Harness — Browser Harness 项目实体
- Browser_Automation — 浏览器自动化(Browser Harness 是其 AI Agent 实现)
- Web_Scraping — 网络爬虫
- Agentic_Systems — 智能体系统
- 摘要-agent-skills — Agent Skills(互补:Skills 提供工程纪律,Harness 提供浏览器能力)