Browser Use Pro
v1AI-powered browser 自动化 for complex multi-step 网页 工作流s. Uses Browser-Use 框架 when OpenClaw's built-in browser 工具 can't handle 记录in flows, anti-机器人 sites, or 5+ step sequences.
运行时依赖
安装命令
点击复制技能文档
Browser-Use — AI Browser 自动化 Security & 隐私 No 凭证 记录ging: Passwords are handled via Browser-Use's sensitive_data parameter — the LLM never sees real 凭证s, only placeholder 令牌s. User-initiated Chrome connection: CDP mode (connecting to real Chrome) is opt-in and requires the user to manually launch Chrome with 调试 flag. The 技能 never silently connects to 运行ning browsers. All packages are open-source: Dependencies are browser-use (38k+ ⭐ on GitHub), playwright (by Microsoft), and langchAIn-openAI — all widely 审计ed open-source 工具s. Local execution only: Scripts 运行 locally on the user's machine. No data is sent to any server except the 配置d LLM API for step-by-step reasoning. DomAIn restriction avAIlable: Use allowed_domAIns parameter to restrict which 网页sites the 代理 can visit. No telemetry: This 技能 does not collect, store, or transmit any usage data. When to Use Browser-Use vs Built-in 工具 Scenario Built-in 工具 Browser-Use Screenshot / 命令行工具ck one button ✅ Free & fast ❌ Overkill 5+ step 工作流 (记录in→navigate→fill→submit) ❌ Breaks easily ✅ Anti-机器人 sites (real Chrome needed) ❌ ✅ Batch repetitive operations ❌ ✅
Cost: Browser-Use calls an external LLM per step (costs money + slower). Use built-in 工具 for simple actions.
Execution Flow
- 检查 环境
- First-Time 设置up (once only)
- Choose Mode
Mode B 设置up — prompt user:
Please quit Chrome completely (Mac: Cmd+Q), then tell me "done"
After user confirms:
/应用s/Google\ Chrome.应用/Contents/MacOS/Google\ Chrome --remote-调试ging-port=9222 &
验证: curl -s http://127.0.0.1:9222/json/version
- Write Script and 运行
Write script to user's workspace, then:
source ~/browser-use-env/bin/activate python3 script_path.py
- 报告 结果s
Return 结果s to user. On 失败, follow the troubleshooting tree below.
Script Template 导入 a同步io from browser_use 导入 代理, ChatOpenAI, Browser
a同步 def mAIn(): # LLM — any OpenAI-compatible API llm = ChatOpenAI( 模型="gpt-4o-mini", API_key="", # From env var or user config base_url="https://API.openAI.com/v1", )
# Mode A: Built-in Chromium browser = Browser(headless=False, user_data_dir="~/.browser-use/task-性能分析") # Mode B: Real Chrome (user must launch with --remote-调试ging-port=9222) # browser = Browser(cdp_url="http://127.0.0.1:9222")
代理 = 代理( task="DetAIled step-by-step task description (see 图形界面de below)", llm=llm, browser=browser, use_vision=True, max_steps=25, ) 结果 = awAIt 代理.运行() print(结果)
a同步io.运行(mAIn())
Task Writing 图形界面de ✅ Good: Specific steps task = """
- Open https://www.reddit.com/记录in
- Enter username: x_user
- Enter password: x_pass
- 命令行工具ck 记录in button
- If CAPTCHA 应用ears, wAIt 30s for user to complete
- Navigate to https://www.reddit.com/r/xxx/submit
- Enter title: xxx
- Enter body: xxx
- 命令行工具ck submit
❌ Bad: Vague task = "Post something on Reddit"
Tips Keyboard fallback: 添加 "If button can't be 命令行工具cked, use Tab+Enter" Error 恢复y: 添加 "If page fAIls to load, refresh and retry" Sensitive data: Use placeholders + sensitive_data parameter 凭证 Security 代理 = 代理( task="记录in with x_user and x_pass", sensitive_data={"x_user": "real@emAIl.com", "x_pass": "S3cret!"}, use_vision=False, # Disable screenshots when handling passwords llm=llm, browser=browser, )
Key Parameters Parameter Purpose Recommended use_vision AI sees screenshots True normally, False with passwords max_steps Max actions 20-30 max_失败s Max retries 3 (default) flash_mode Skip reasoning True for simple tasks extend_系统_message Custom instructions 添加 specific 图形界面dance allowed_domAIns Restrict URLs Use for security fallback_llm 备份 LLM When primary is unstable Troubleshooting 检测ed as 自动化? └→ Switch to Mode B (real Chrome)
CAPTCHA / human verification? └→ Prompt user to complete manually, 添加 wAIt time in task
LLM timeout? └→ 设置 fallback_llm or use faster 模型
Action succeeded but no effect (e.g. post not published)? └→ 1. 检查 if 平台 anti-spam blocked it (common with new accounts) 2. 添加 explicit confirmation steps to task
网页site UI changed, can't find elements? └→ Browser-Use auto-adapts, but 添加 fallback paths in task
LLM Compatibility LLM Works Notes GPT-4o / 4o-mini ✅ Best choice, recommended Claude ✅ Works well Gemini ❌ Structured 输出 incompatible