browser-harness - 给 LLM 完全自由的浏览器自愈合自动化框架

browser-harness - 给 LLM 完全自由的浏览器自愈合自动化框架


基于 CDP 的轻量级 Python 框架,agent 中任务自动写代码补全功能,无需预定义流程,适合让 AI 完全控制浏览器

Browser Harness

最简洁、最轻量的自愈合 LLM 浏览器自动化框架,直接基于 Chrome DevTools Protocol (CDP)构建。总代码约 592 行 Python

核心特性

  • 自愈合代码: agent 在任务过程中自动检测缺少的函数,并直接编辑 helpers.py 补充实现
  • 无框架限制: 没有预定义流程、没有固定配方,一个 websocket 直连 Chrome
  • CDP 原生: 不依赖 Playwright/Selenium,直接操控 CDP,灵活度最高
  • 免费远程浏览器: 支持部署到云端,免费楼层 3 个并发浏览器,无需信用卡

代码结构

文件行数作用
run.py~36 行带预加载 helpers 的运行入口
helpers.py~195 行工具函数集,agent 会在运行时自动编辑扩展
admin.py + daemon.py~361 行daemon 启动 + CDP websocket + socket bridge
install.md首次安装与浏览器启动
SKILL.md日常使用指南

使用场景

  • AI Agent 开发者: 让 LLM 完全自主控制浏览器完成复杂任务
  • 自动化测试: 网站自动化、数据抓取、表单填写
  • Claude Code / Codex 用户: 直接贴上 setup prompt 即可让 agent 完整部署

技术栈

  • Python + CDP (Chrome DevTools Protocol)
  • WebSocket 连接本地或远程 Chrome
  • 无依赖框架(Playwright/Selenium 不需要)

如何开始

发送以下 prompt 给 Claude Code 或 Codex:

Set up https://github.com/browser-use/browser-harness for me.
Read install.md first to install and connect this repo to my real browser.
Then read SKILL.md for normal usage.
Always read helpers.py because that is where the functions are.

GitHub: https://github.com/browser-use/browser-harness

800举报0Xiao.Xi4天前
点击获取 ^_^

暂无评论