browser-use
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBrowser Use
浏览器自动化工具使用
AI-powered browser automation for web interactions, research, and data extraction powered by the browser-use library.
由browser-use库提供支持的、基于AI的浏览器自动化工具,用于网页交互、调研和数据提取。
When to Use
适用场景
- Automate web interactions (fill forms, click buttons, navigate pages)
- Perform deep research across multiple web sources
- Extract structured data from web pages
- Learn and replay browser workflows as reusable skills
- Monitor and manage long-running browser automation tasks
- 自动化网页交互(填写表单、点击按钮、页面导航)
- 跨多个网页来源执行深度调研
- 从网页中提取结构化数据
- 学习并可重放浏览器工作流作为可复用Skill
- 监控和管理长时间运行的浏览器自动化任务
Core Tools
核心工具
run_browser_agent
run_browser_agent
Execute a browser automation task using AI. Supports skill-based execution, learning mode, and background task execution.
Parameters:
- (string, required) - Natural language description of what to do in the browser
task - (integer, optional) - Maximum number of agent steps (default: from settings)
max_steps - (string, optional) - Name of a learned skill to use for hints
skill_name - (string or dict, optional) - Parameters for the skill (JSON string or dict)
skill_params - (boolean, optional) - Enable learning mode to discover and extract APIs
learn - (string, optional) - Name to save learned skill (requires learn=True)
save_skill_as
Returns: Result of the browser automation task. In learning mode, includes skill extraction status.
Examples:
undefined使用AI执行浏览器自动化任务。支持基于Skill的执行、学习模式和后台任务执行。
参数:
- (字符串,必填)- 对浏览器操作内容的自然语言描述
task - (整数,可选)- Agent的最大步骤数(默认值:来自设置)
max_steps - (字符串,可选)- 用于提供提示的已学习Skill名称
skill_name - (字符串或字典,可选)- Skill的参数(JSON字符串或字典)
skill_params - (布尔值,可选)- 启用学习模式以发现和提取API
learn - (字符串,可选)- 保存已学习Skill的名称(需要设置learn=True)
save_skill_as
返回值: 浏览器自动化任务的结果。在学习模式下,包含Skill提取状态。
示例:
undefinedBasic usage
基础用法
Search for "Claude Code plugins" on Google and summarize the top 3 results
在Google上搜索“Claude Code plugins”并总结前3条结果
With max steps
设置最大步骤数
Fill out the contact form at https://example.com/contact with my information
max_steps: 20
在https://example.com/contact填写联系表单,填入我的信息
max_steps: 20
Learning mode - discover and save a skill
学习模式 - 发现并保存Skill
Go to GitHub trending page and extract the top 5 repositories
learn: true
save_skill_as: github_trending
访问GitHub趋势页面并提取前5个仓库
learn: true
save_skill_as: github_trending
Using a learned skill
使用已学习的Skill
task: Get trending Python repositories
skill_name: github_trending
skill_params: {"language": "python", "limit": 10}
undefinedtask: 获取趋势Python仓库
skill_name: github_trending
skill_params: {"language": "python", "limit": 10}
undefinedrun_deep_research
run_deep_research
Perform multi-source research on a topic with AI-guided search and synthesis.
Parameters:
- (string, required) - The research topic or question to investigate
topic - (integer, optional) - Maximum number of web searches (default: from settings)
max_searches - (string, optional) - Optional file path to save the research report
save_to_file
Returns: A comprehensive research report in markdown format
Examples:
undefined通过AI引导的搜索和综合,对某个主题执行多来源调研。
参数:
- (字符串,必填)- 要调研的主题或问题
topic - (整数,可选)- 最大网页搜索次数(默认值:来自设置)
max_searches - (字符串,可选)- 保存调研报告的可选文件路径
save_to_file
返回值: 一份Markdown格式的综合调研报告
示例:
undefinedBasic research
基础调研
What are the latest developments in AI-powered browser automation?
AI驱动浏览器自动化的最新发展有哪些?
With search limit
设置搜索次数上限
Research the security implications of CDP-based browser automation
max_searches: 10
调研基于CDP的浏览器自动化的安全影响
max_searches: 10
Save to file
保存到文件
Compare Playwright, Puppeteer, and Selenium for 2025
save_to_file: /path/to/research/browser-automation-comparison.md
undefined对比2025年的Playwright、Puppeteer和Selenium
save_to_file: /path/to/research/browser-automation-comparison.md
undefinedSkill Management Tools
Skill管理工具
skill_list
skill_list
List all available learned browser skills with usage statistics.
Parameters: None
Returns: JSON list of skill summaries with name, description, success rate, usage count, and last used timestamp
Example:
json
{
"skills": [
{
"name": "github_trending",
"description": "Extract trending repositories from GitHub",
"success_rate": 95.0,
"usage_count": 20,
"last_used": "2025-12-20T18:00:00"
}
],
"skills_directory": "/Users/user/.config/browser-skills"
}列出所有可用的已学习浏览器Skill及使用统计数据。
参数: 无
返回值: 包含Skill摘要的JSON列表,内容包括名称、描述、成功率、使用次数和最后使用时间戳
示例:
json
{
"skills": [
{
"name": "github_trending",
"description": "Extract trending repositories from GitHub",
"success_rate": 95.0,
"usage_count": 20,
"last_used": "2025-12-20T18:00:00"
}
],
"skills_directory": "/Users/user/.config/browser-skills"
}skill_get
skill_get
Get full details of a specific skill including API endpoints, parameters, and execution hints.
Parameters:
- (string, required) - Name of the skill to retrieve
skill_name
Returns: Full skill definition in YAML format
Example:
skill_name: github_trending获取特定Skill的完整详情,包括API端点、参数和执行提示。
参数:
- (字符串,必填)- 要获取的Skill名称
skill_name
返回值: YAML格式的完整Skill定义
示例:
skill_name: github_trendingskill_delete
skill_delete
Delete a learned skill by name.
Parameters:
- (string, required) - Name of the skill to delete
skill_name
Returns: Success or error message
Example:
skill_name: outdated_skill按名称删除已学习的Skill。
参数:
- (字符串,必填)- 要删除的Skill名称
skill_name
返回值: 成功或错误消息
示例:
skill_name: outdated_skillTask Management Tools
任务管理工具
health_check
health_check
Check if the browser automation server is running and get system statistics.
Parameters: None
Returns: JSON with server health status, uptime, memory usage, and running tasks
Example Response:
json
{
"status": "healthy",
"uptime_seconds": 3600.5,
"memory_mb": 256.3,
"running_tasks": 2,
"tasks": [
{
"task_id": "a1b2c3d4",
"tool": "run_browser_agent",
"stage": "navigating",
"progress": "5/100",
"message": "Searching Google..."
}
],
"stats": {
"total_completed": 45,
"total_failed": 2,
"avg_duration_sec": 32.1
}
}检查浏览器自动化服务器是否运行,并获取系统统计数据。
参数: 无
返回值: 包含服务器健康状态、运行时间、内存使用情况和运行中任务的JSON
示例响应:
json
{
"status": "healthy",
"uptime_seconds": 3600.5,
"memory_mb": 256.3,
"running_tasks": 2,
"tasks": [
{
"task_id": "a1b2c3d4",
"tool": "run_browser_agent",
"stage": "navigating",
"progress": "5/100",
"message": "Searching Google..."
}
],
"stats": {
"total_completed": 45,
"total_failed": 2,
"avg_duration_sec": 32.1
}
}task_list
task_list
List recent browser automation and research tasks with filtering.
Parameters:
- (integer, optional) - Maximum number of tasks to return (default: 20)
limit - (string, optional) - Filter by status: "running", "completed", "failed", "pending"
status_filter
Returns: JSON list of recent tasks
Example:
undefined列出近期的浏览器自动化和调研任务,并支持筛选。
参数:
- (整数,可选)- 返回的最大任务数(默认值:20)
limit - (字符串,可选)- 按状态筛选:"running"、"completed"、"failed"、"pending"
status_filter
返回值: 近期任务的JSON列表
示例:
undefinedList recent tasks
列出近期任务
limit: 10
limit: 10
List only running tasks
仅列出运行中的任务
status_filter: running
limit: 5
status_filter: running
limit: 5
List failed tasks
列出失败的任务
status_filter: failed
undefinedstatus_filter: failed
undefinedtask_get
task_get
Get detailed information about a specific task including input, output, and progress.
Parameters:
- (string, required) - Task ID (full UUID or prefix match)
task_id
Returns: JSON with complete task details, timestamps, and result/error
Example:
task_id: a1b2c3d4获取特定任务的详细信息,包括输入、输出和进度。
参数:
- (字符串,必填)- 任务ID(完整UUID或前缀匹配)
task_id
返回值: 包含完整任务详情、时间戳和结果/错误的JSON
示例:
task_id: a1b2c3d4task_cancel
task_cancel
Cancel a running browser agent or research task.
Parameters:
- (string, required) - Task ID (full UUID or prefix match)
task_id
Returns: JSON with success status and message
Example:
task_id: a1b2c3d4取消运行中的浏览器Agent或调研任务。
参数:
- (字符串,必填)- 任务ID(完整UUID或前缀匹配)
task_id
返回值: 包含成功状态和消息的JSON
示例:
task_id: a1b2c3d4Common Workflows
常见工作流
Web Research Workflow
网页调研工作流
- Use with your research question
run_deep_research - Review the synthesized markdown report
- Use for follow-up exploration of specific sources
run_browser_agent - Check to monitor progress
task_list
undefined- 使用传入你的调研问题
run_deep_research - 查看生成的Markdown格式综合报告
- 使用对特定来源进行后续探索
run_browser_agent - 查看以监控进度
task_list
undefinedStep 1: Deep research
步骤1:深度调研
run_deep_research
topic: What are the best practices for MCP server development in 2025?
max_searches: 8
run_deep_research
topic: 2025年MCP服务器开发的最佳实践有哪些?
max_searches: 8
Step 2: Follow-up investigation
步骤2:后续调查
run_browser_agent
task: Go to the top-ranked article and extract code examples
undefinedrun_browser_agent
task: 访问排名第一的文章并提取代码示例
undefinedForm Automation Workflow
表单自动化工作流
- Use with task describing the form
run_browser_agent - Include URL if known, or let agent search for it
- Agent navigates, fills fields, and submits
- Use to verify completion
task_get
run_browser_agent
task: Fill out the contact form at https://example.com/contact with name "John Doe", email "john@example.com", and message "Request for demo"
max_steps: 30- 使用传入描述表单的任务
run_browser_agent - 如果已知URL则包含,否则让Agent自行搜索
- Agent会导航到页面、填写字段并提交
- 使用验证完成情况
task_get
run_browser_agent
task: 在https://example.com/contact填写联系表单,姓名为"John Doe",邮箱为"john@example.com",消息为"请求演示"
max_steps: 30Learning and Reusing Skills
学习并复用Skill
- Run with
run_browser_agentto discover APIslearn: true - Agent records network calls and extracts patterns
- Save skill with
save_skill_as - Use to see learned skills
skill_list - Reuse with parameter for faster execution
skill_name
undefined- 运行并设置
run_browser_agent以发现APIlearn: true - Agent会记录网络调用并提取模式
- 使用保存Skill
save_skill_as - 使用查看已学习的Skill
skill_list - 使用参数复用Skill以加快执行速度
skill_name
undefinedStep 1: Learn a skill
步骤1:学习Skill
run_browser_agent
task: Go to Hacker News and extract the top 10 stories with titles, URLs, and scores
learn: true
save_skill_as: hackernews_top_stories
run_browser_agent
task: 访问Hacker News并提取前10条故事的标题、URL和评分
learn: true
save_skill_as: hackernews_top_stories
Step 2: List learned skills
步骤2:列出已学习的Skill
skill_list
skill_list
Step 3: Reuse the skill (faster direct execution)
步骤3:复用Skill(更快的直接执行)
run_browser_agent
task: Get current top stories from Hacker News
skill_name: hackernews_top_stories
skill_params: {"limit": 5}
undefinedrun_browser_agent
task: 获取Hacker News当前的热门故事
skill_name: hackernews_top_stories
skill_params: {"limit": 5}
undefinedLong-Running Task Management
长时间运行任务管理
- Start a browser automation task (runs in background)
- Use to check status
task_list - Use for detailed progress
task_get - Use if needed
task_cancel
undefined- 启动浏览器自动化任务(在后台运行)
- 使用查看状态
task_list - 使用获取详细进度
task_get - 如有需要使用取消任务
task_cancel
undefinedStep 1: Start task
步骤1:启动任务
run_browser_agent
task: Research all articles on example.com blog and create a summary
max_steps: 200
run_browser_agent
task: 调研example.com博客上的所有文章并生成摘要
max_steps: 200
Step 2: Check progress
步骤2:检查进度
task_list
status_filter: running
task_list
status_filter: running
Step 3: Get details
步骤3:获取详情
task_get
task_id: a1b2c3d4
task_get
task_id: a1b2c3d4
Step 4: Cancel if needed
步骤4:如有需要取消任务
task_cancel
task_id: a1b2c3d4
undefinedtask_cancel
task_id: a1b2c3d4
undefinedAdvanced Features
高级功能
Skill-Based Execution
基于Skill的执行
When a skill is learned with API endpoints, it supports direct execution which bypasses the AI agent for much faster performance:
- First run: Agent explores the website (60-120 seconds)
- Skill learned: API patterns extracted and saved
- Subsequent runs: Direct API calls (2-5 seconds)
Fallback behavior: If direct execution fails (auth required, API changed), automatically falls back to agent-based execution.
当Skill通过API端点学习完成后,它支持直接执行,绕过AI Agent以大幅提升性能:
- 首次运行:Agent探索网站(60-120秒)
- Skill学习完成:提取并保存API模式
- 后续运行:直接调用API(2-5秒)
回退行为: 如果直接执行失败(需要授权、API变更),会自动回退到基于Agent的执行模式。
Progress Tracking
进度跟踪
Both and support real-time progress tracking:
run_browser_agentrun_deep_research- Step-by-step navigation updates
- Progress percentage (current step / total steps)
- Current stage (initializing, navigating, extracting, analyzing)
- Task message (current action description)
run_browser_agentrun_deep_research- 分步导航更新
- 进度百分比(当前步骤/总步骤)
- 当前阶段(初始化、导航、提取、分析)
- 任务消息(当前操作描述)
Background Task Support
后台任务支持
Long-running tasks automatically run in background when requested by the MCP client:
- Tasks tracked in SQLite database
- Persistent across server restarts
- Query status anytime with and
task_listtask_get - Cancel with
task_cancel
当MCP客户端请求时,长时间运行的任务会自动在后台运行:
- 任务在SQLite数据库中跟踪
- 服务器重启后仍可保留
- 可随时使用和
task_list查询状态task_get - 可使用取消任务
task_cancel
Configuration
配置
The browser-use MCP server can be configured via or environment variables. Key settings:
~/.config/mcp-server-browser-use/config.json- - Run browser in headless mode (default: true)
browser.headless - - Connect to external Chrome via CDP (optional)
browser.cdp_url - - Default maximum steps (default: 100)
agent.max_steps - - Default research searches (default: 5)
research.max_searches - - Enable skill learning and execution (default: true)
skills.enabled - - Where to store learned skills (default: ~/.config/browser-skills/)
skills.directory
browser-use MCP服务器可通过或环境变量进行配置。关键设置:
~/.config/mcp-server-browser-use/config.json- - 以无头模式运行浏览器(默认值:true)
browser.headless - - 通过CDP连接到外部Chrome(可选)
browser.cdp_url - - 默认最大步骤数(默认值:100)
agent.max_steps - - 默认调研搜索次数(默认值:5)
research.max_searches - - 启用Skill学习和执行(默认值:true)
skills.enabled - - 已学习Skill的存储位置(默认值:~/.config/browser-skills/)
skills.directory
Troubleshooting
故障排除
Server Not Responding
服务器无响应
undefinedundefinedCheck server health
检查服务器健康状态
health_check
health_check
Check if server is running
检查服务器是否运行
In terminal: mcp-server-browser-use status
在终端中执行:mcp-server-browser-use status
undefinedundefinedTask Stuck or Failing
任务卡住或失败
undefinedundefinedList running tasks
列出运行中的任务
task_list
status_filter: running
task_list
status_filter: running
Get task details
获取任务详情
task_get
task_id: <task_id>
task_get
task_id: <task_id>
Cancel if stuck
如果卡住则取消任务
task_cancel
task_id: <task_id>
undefinedtask_cancel
task_id: <task_id>
undefinedSkill Execution Fails
Skill执行失败
undefinedundefinedGet skill details to verify parameters
获取Skill详情以验证参数
skill_get
skill_name: my_skill
skill_get
skill_name: my_skill
Try without skill to re-learn
尝试不使用Skill重新学习
run_browser_agent
task: <original task>
learn: true
save_skill_as: my_skill_v2
undefinedrun_browser_agent
task: <原始任务>
learn: true
save_skill_as: my_skill_v2
undefinedBest Practices
最佳实践
- Start with health_check - Verify server is ready before running tasks
- Use descriptive task names - Help the AI understand your intent clearly
- Set reasonable max_steps - 30-50 for simple tasks, 100-200 for complex research
- Learn frequently-used workflows - Save time with skill-based execution
- Monitor long tasks - Use task_list and task_get to track progress
- Clean up failed tasks - Use task_cancel to free resources
- Save research to files - Use save_to_file to preserve research reports
- 先执行health_check - 运行任务前验证服务器是否就绪
- 使用描述性任务名称 - 帮助AI清晰理解你的意图
- 设置合理的max_steps - 简单任务设置30-50,复杂调研设置100-200
- 学习常用工作流 - 使用基于Skill的执行节省时间
- 监控长时间任务 - 使用task_list和task_get跟踪进度
- 清理失败任务 - 使用task_cancel释放资源
- 将调研结果保存到文件 - 使用save_to_file保留调研报告
Limitations
局限性
- Browser automation requires the MCP server to be running as a daemon
- CDP-based browsers must be on localhost (security restriction)
- Some websites may block automation (respect robots.txt and rate limits)
- Skill learning requires successful task completion and API discovery
- Task cancellation may take a few seconds to complete gracefully
- 浏览器自动化要求MCP服务器作为守护进程运行
- 基于CDP的浏览器必须在本地主机上(安全限制)
- 部分网站可能会阻止自动化操作(请遵守robots.txt和速率限制)
- Skill学习需要任务成功完成且能发现API
- 任务取消可能需要几秒时间才能优雅完成