browser-use

库

browser-use/browser-use

让AI代理像人类一样操作浏览器完成任务。

项目简介

Browser Use 是基于 Python 的库,让大语言模型代理通过 Playwright 操控真实浏览器,完成点击、输入、填表与数据提取等任务,支持本地运行或云端托管。

README 预览

\n\n  \n  \n  \n\n\n\n    \n    \n    \n    \n    \n\n\n\n\n\n\n---\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n# What can Browser Use do?\n\nBrowser Use lets an AI agent use a web browser the same way humans do — it opens pages, clicks buttons, types, and fills in forms. You describe the task, and it completes it. For example, you can have it:\n\n\n### 📋 Fill Forms\n#### Task: "Fill in this job application with my resume and information."\n\n\n\n[Example code ↗](https://github.com/browser-use/browser-use/blob/main/examples/use-cases/apply_to_job.py)\n\n\n### 🍎 Extract data\n#### Task: "Extract structured data about my followers and export it as a CSV."\n\nhttps://github.com/user-attachments/assets/485fd3ec-61b9-4afc-9e86-ee9b85acb592\n\n[Browser Use Cloud Docs ↗](https://docs.browser-use.com/cloud/quickstart)\n\n\n\n\n# Start with Browser Use Cloud\n\nEligible new Google, GitHub or Microsoft signups get a one-time **$15 Cloud credit**. No card required; email/password signups do not qualify. [Pricing and eligibility](https://browser-use.com/pricing.md).\n\n- **Hosted agent:** [V4 quickstart](https://docs.browser-use.com/cloud/agent/quickstart), using `browser-use-sdk`.\n- **Your own agent:** [Managed browser quickstart](https://docs.browser-use.com/cloud/browser/quickstart).\n- **Local framework:** the `browser-use` Python library below.\n\n# Quickstart\n\nIf you want to use Browser Use in your agent (Claude Code, Codex, Cursor, Hermes, OpenClaw, etc.), paste this prompt, and it sets everything up itself:\n\n```text\nInstall or upgrade browser-use to the latest stable version with uv using Python 3.12, run `browser-use skill install` to register the skill, and connect it to my browser. If setup or connection fails, follow https://github.com/browser-use/browser-harness/blob/main/install.md.\n```\n\nThen tell your agent what you want done.\n\n\n\n# Python library: the easiest way to automate the web\n\nWant to automate the web at scale, from your own code, and with 

常见问题 (1)

故障排除
如何修复在 Windows 11 上运行 browser-use 时出现的 "An Application Control policy has blocked this file"(WinError 4551)错误?

这不是恶意软件:Windows 11 Smart App Control (SAC) 会拦截 uv/uvx 生成的未签名 browser-use.exe 控制台脚本启动器(Code Integrity 事件 3033/3077,Authenticode 状态为 NotSigned)。消费版 SAC 没有针对单个应用的允许列表,因此没有可以豁免它的开关。

解决方法:改为通过 Python 解释器调用该包,完全绕过未签名的 .exe 存根:

python -m browser-use <command>

或通过 uv:

uv run python -m browser-use <command>

这会跳过被拦截的 PE 启动器,通过受信任的解释器运行 CLI,从而恢复本地 Chrome/CDP 和 Browser Use Cloud 会话。

其他选项:
- 在企业管理的设备上,管理员可以添加范围严格限定的 App Control/WDAC 策略(对于已签名的发布版本,优先使用发布者规则;哈希规则在每次更新时都会失效)。
- 使用基于 CDP 的自动化后端,避免调用本地 Browser Use CLI。
- 不要为了运行该启动器而禁用 Smart App Control;这会削弱系统范围的代码执行保护。

永久修复:上游需要发布经过 Authenticode 签名且具有 Microsoft 信誉的 Windows CLI/安装程序。可在 browser-use issue #5539 中跟踪此问题。

来源 Issue #5539