{"id":38821067,"url":"https://github.com/agentsdance/browser-use-agent","last_synced_at":"2026-01-17T13:04:52.067Z","repository":{"id":311567393,"uuid":"1015121715","full_name":"agentsdance/browser-use-agent","owner":"agentsdance","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-25T07:28:14.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-25T09:54:25.770Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/agentsdance.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-07T03:26:59.000Z","updated_at":"2025-08-25T07:28:14.000Z","dependencies_parsed_at":"2025-08-25T09:54:37.987Z","dependency_job_id":"0b9e1514-b67e-479e-b67b-4219447d51a2","html_url":"https://github.com/agentsdance/browser-use-agent","commit_stats":null,"previous_names":["agentsdance/browser-use-agent"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/agentsdance/browser-use-agent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentsdance%2Fbrowser-use-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentsdance%2Fbrowser-use-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentsdance%2Fbrowser-use-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentsdance%2Fbrowser-use-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agentsdance","download_url":"https://codeload.github.com/agentsdance/browser-use-agent/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentsdance%2Fbrowser-use-agent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28508943,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T11:50:55.898Z","status":"ssl_error","status_checked_at":"2026-01-17T11:50:55.569Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-17T13:04:51.345Z","updated_at":"2026-01-17T13:04:52.045Z","avatar_url":"https://github.com/agentsdance.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 浏览器使用智能体  Browser Use Agent\n\n## 应用介绍\n\nBrowser Use Agent是火山引擎函数服务（veFaaS）面向终端用户和 AI 套件开发者推出的浏览器自动化服务。仅输入检索任务，就可以由大模型分析拆解任务，调用浏览器实时搜索任务，最后整合输出任务结果。整个操作过程可以实时查看大模型的步骤规划和浏览器操作，同时支持人工介入浏览器操作，例如输入验证码、接收 Cookie、输入用户名和密码等。该服务主要支持浏览器自动化业务，并可以作为大模型本身或大模型应用扩展实时检索的工具。\n\n## 效果预览\n\n\u003cvideo width=\"800\" height=\"400\" controls\u003e\n  \u003csource src=\"./resources/video.mov\" type=\"video/mp4\"\u003e\n\u003c/video\u003e\n\n## 直接体验\nhttps://exp.volcengine.com/ai-cloud-native-agentkit\n\n## 流程架构\n\n```mermaid\ngraph TB\n    %% Client and API\n    Client[\"`**Client**\u003cbr/\u003eWeb UI / API`\"] --\u003e API[\"`**FastAPI Server**\u003cbr/\u003eREST + WebSocket`\"]\n    \n    %% Core Components\n    API --\u003e TaskMgr[\"`**Task Manager**\u003cbr/\u003e任务管理`\"]\n    API --\u003e Controller[\"`**Custom Controller**\u003cbr/\u003e自定义控制器`\"]\n    \n    %% AI and Browser\n    TaskMgr --\u003e Agent[\"`**AI Agent**\u003cbr/\u003e智能代理`\"]\n    Agent --\u003e LLM[\"`**Multi-LLM**\u003cbr/\u003eOpenAI/DeepSeek/ARK`\"]\n    Agent --\u003e Browser[\"`**Browser Session**\u003cbr/\u003ePlaywright + Chrome`\"]\n    \n    %% Support Services\n    Controller --\u003e I18N[\"`**i18n**\u003cbr/\u003e中文支持`\"]\n    Browser --\u003e Storage[\"`**Storage**\u003cbr/\u003eScreenshots/Videos`\"]\n    \n    %% Styling\n    classDef primary fill:#1976d2,stroke:#0d47a1,stroke-width:2px,color:#ffffff\n    classDef secondary fill:#388e3c,stroke:#1b5e20,stroke-width:2px,color:#ffffff\n    classDef support fill:#f57c00,stroke:#e65100,stroke-width:2px,color:#ffffff\n    \n    class Client,API primary\n    class TaskMgr,Agent,Browser secondary\n    class Controller,LLM,I18N,Storage support\n```\n\n## 关联模型及云产品\n\n### 模型\n\n|相关服务|描述|计费说明|\n|---------|---------|---------|\n|火山方舟大模型|详见下方|https://www.volcengine.com/docs/82379/1544106|\n\n| 模型            | 说明 |\n|-----------------|------|\n| **模型资源 API Key** | 用于代码生成服务的资源 API Key。支持从当前账号下已有的 API Key 列表中选择，也可以自定义输入 API Key。获取方法，请参见 [API Key 管理](#)。\u003cbr\u003e\u003cbr\u003e模型资源 API Key 对应的环境变量 Key（Env key）为：`ARK_API_KEY`。创建完应用后，您可以通过 `ARK_API_KEY` 查看或修改模型资源 API Key。 |\n| **驱动检索模型** | 火山方舟大模型的模型 ID，如 `doubao-seed-1-6-250615`。获取方法，请参见 [获取 Model ID](#)。\u003cbr\u003e\u003cbr\u003e驱动检索模型 对应的 Env key 为：`ARK_MODEL_ID`。创建完应用后，您可以通过 `ARK_MODEL_ID` 查看或修改 驱动检索模型。 |\n| **抽取内容模型** | 用于抽取浏览器内容的火山方舟大模型的 Endpoint ID。根据实际需求选择 **预置推理接入点** 和 **自定义推理接入点**。更多说明，请参见 [通过 Endpoint ID 调用模型](#)。\u003cbr\u003e\u003cbr\u003e抽取内容模型 对应的 Env key 为：`ARK_EXTRACT_MODEL_ID`。创建完应用后，您可以通过 `ARK_EXTRACT_MODEL_ID` 查看或修改 抽取内容模型。 |\n\n### 云服务\n\n| 相关服务 | 描述     | 计费说明 |\n|----------|----------|----------|\n| **函数计算** | 详见下方 | [函数计算计费说明](https://www.volcengine.com/docs/6662/107454) |\n| **API 网关** | 详见下方 | [API 网关计费说明](https://www.volcengine.com/docs/6569/185249) |\n\n\n- Browser Use Agent 后端\n  - 函数服务：提供大模型驱动浏览器自动化、实时查看和操作浏览器的接口。\n  - API 网关：通过 API 网关暴露接口。\n- Browser Use Agent 前端\n  - 函数服务：Browser Use Agent 交互控制台。\n  - API 网关：通过 API 网关访问控制台。\n\n# 环境准备\n- 已开通本应用关联的所有云服务。\n- IAM 用户需确保已授权 VeFaaSFullAccess、APIGFullAccess、STSAssumeRoleAccess 策略。如果缺少以上策略，请联系主账号或管理员进行授权。具体操作，请参见[创建用户并授权](https://www.volcengine.com/docs/6257/94013)。\n- 已创建 Serverless 网关类型的 API 网关实例。详细操作，请参见[创建实例](https://www.volcengine.com/docs/6569/85693)。\n- 首次使用函数服务，需确保已完成跨服务授权。如未授权，控制台会弹出跨服务授权页面引导您进行授权。\n- Python版本要求：3.12\n- [获取火山方舟 API KEY](https://www.volcengine.com/docs/82379/1298459#api-key-%E7%AD%BE%E5%90%8D%E9%89%B4%E6%9D%83)\n\n# 快速入门\n\n## 环境配置\n- 下载代码\n\nhttps://github.com/volcengine/ai-app-lab/tree/main/demohouse/vefaas-browser-use\n\n- 虚拟环境安装\n\n```shell\npip install virtualenv\n\nvirtualenv venv --python {your_python_execution_file}\n\nsource venv/bin/activate\n\npip install -r requirements.txt\n```\n\n- 环境变量设置\n\n```shell\nexport ARK_API_KEY=\"\"\nexport ARK_MODEL_ID=\"\"\nexport ARK_EXTRACT_MODEL_ID=\"\"\n```\n\n- 启动命令\n```shell\n✗ python index.py\nusing llm:  openai\n2025-07-22 14:37:55 - INFO - no browser session endpoint provided, using local browser\nINFO:     Started server process [14560]\nINFO:     Waiting for application startup.\n2025-07-22 14:37:55 - INFO - Stale task cleanup service started\n2025-07-22 14:37:55 - INFO - Starting stale task cleanup service\nINFO:     Application startup complete.\nINFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)\n```\n\n## 发起浏览器自动化任务\n\n```shell\n✗ curl -XPOST 127.0.0.1:8000/tasks   --header 'Content-Type: application/json' --data '{\"messages\":[{\"role\":\"user\",\"content\":\"visit apple.com.cn and search informatio on iPhone 16\"}]}'\n{\"task_id\":\"49394edc-fc97-4ae6-a55a-e458f64a4297\",\"status\":\"queued\"}\n```\n\n可以查看拉起的浏览器\n\n![](./resources/brorwser.png)\n\n## [optional]查询任务执行详情\n\n```shell\n✗ curl 127.0.0.1:8000/tasks/49394edc-fc97-4ae6-a55a-e458f64a4297/stream\ndata: {\"task_id\": \"49394edc-fc97-4ae6-a55a-e458f64a4297\", \"data\": \"data: {\\\"task_id\\\": \\\"49394edc-fc97-4ae6-a55a-e458f64a4297\\\", \\\"status\\\": \\\"started\\\"}\\n\\n\"}\n\ndata: {\"task_id\": \"49394edc-fc97-4ae6-a55a-e458f64a4297\", \"data\": \"data: {\\\"task_id\\\": \\\"49394edc-fc97-4ae6-a55a-e458f64a4297\\\", \\\"status\\\": \\\"browser_initialized\\\"}\\n\\n\"}\n\ndata: {\"task_id\": \"49394edc-fc97-4ae6-a55a-e458f64a4297\", \"data\": \"data: {\\\"task_id\\\": \\\"49394edc-fc97-4ae6-a55a-e458f64a4297\\\", \\\"status\\\": \\\"agent_initialized\\\"}\\n\\n\"}\n\ndata: {\"task_id\": \"49394edc-fc97-4ae6-a55a-e458f64a4297\", \"data\": \"data: {\\\"task_id\\\": \\\"49394edc-fc97-4ae6-a55a-e458f64a4297\\\", \\\"status\\\": \\\"conversation_update\\\", \\\"metadata\\\": {\\\"type\\\": \\\"message\\\", \\\"data\\\": {\\\"message\\\": \\\"开始新步骤...\\\"}}}\\n\\n\"}\n\ndata: {\"task_id\": \"49394edc-fc97-4ae6-a55a-e458f64a4297\", \"data\": \"data: {\\\"task_id\\\": \\\"49394edc-fc97-4ae6-a55a-e458f64a4297\\\", \\\"status\\\": \\\"conversation_update\\\", \\\"metadata\\\": {\\\"type\\\": \\\"planning_step\\\", \\\"data\\\": {\\\"step\\\": 1, \\\"goal\\\": \\\"Navigate to apple.com.cn to find the search feature and inquire about iPhone 16.\\\", \\\"memory\\\": \\\"User is interested in finding information about iPhone 16 on apple.com.cn. Planning to visit the site and use the search feature.\\\", \\\"evaluation\\\": \\\"Not applicable as this is the initial step.\\\", \\\"task_status\\\": \\\"running\\\", \\\"actions\\\": [{\\\"go_to_url\\\": {\\\"url\\\": \\\"https://www.apple.com.cn\\\", \\\"new_tab\\\": false}}]}}}\\n\\n\"}\n\ndata: {\"task_id\": \"49394edc-fc97-4ae6-a55a-e458f64a4297\", \"data\": \"data: {\\\"task_id\\\": \\\"49394edc-fc97-4ae6-a55a-e458f64a4297\\\", \\\"status\\\": \\\"conversation_update\\\", \\\"metadata\\\": {\\\"type\\\": \\\"message\\\", \\\"data\\\": {\\\"message\\\": \\\"执行动作 #1：{'go_to_url': {'url': 'https://www.apple.com.cn', 'new_tab': False}}\\\"}}}\\n\\n\"}\n\ndata: {\"task_id\": \"49394edc-fc97-4ae6-a55a-e458f64a4297\", \"data\": \"data: {\\\"task_id\\\": \\\"49394edc-fc97-4ae6-a55a-e458f64a4297\\\", \\\"status\\\": \\\"conversation_update\\\", \\\"metadata\\\": {\\\"type\\\": \\\"message\\\", \\\"data\\\": {\\\"message\\\": \\\"开始新步骤...\\\"}}}\\n\\n\"}\n\ndata: {\"task_id\": \"49394edc-fc97-4ae6-a55a-e458f64a4297\", \"data\": \"data: {\\\"task_id\\\": \\\"49394edc-fc97-4ae6-a55a-e458f64a4297\\\", \\\"status\\\": \\\"conversation_update\\\", \\\"metadata\\\": {\\\"type\\\": \\\"planning_step\\\", \\\"data\\\": {\\\"step\\\": 2, \\\"goal\\\": \\\"Click on the search button with index 25 to initiate the search for iPhone 16.\\\", \\\"memory\\\": \\\"Navigated to apple.com.cn successfully. Preparing to search for iPhone 16 information.\\\", \\\"evaluation\\\": \\\"Successfully navigated to the Apple China website. Verdict: Success\\\", \\\"task_status\\\": \\\"running\\\", \\\"actions\\\": [{\\\"click_element_by_index\\\": {\\\"index\\\": 25}}]}}}\\n\\n\"}\n\ndata: {\"task_id\": \"49394edc-fc97-4ae6-a55a-e458f64a4297\", \"data\": \"data: {\\\"task_id\\\": \\\"49394edc-fc97-4ae6-a55a-e458f64a4297\\\", \\\"status\\\": \\\"conversation_update\\\", \\\"metadata\\\": {\\\"type\\\": \\\"message\\\", \\\"data\\\": {\\\"message\\\": \\\"执行动作 #1：{'click_element_by_index': {'index': 25}}\\\"}}}\\n\\n\"}\n\ndata: {\"task_id\": \"49394edc-fc97-4ae6-a55a-e458f64a4297\", \"data\": \"data: {\\\"task_id\\\": \\\"49394edc-fc97-4ae6-a55a-e458f64a4297\\\", \\\"status\\\": \\\"conversation_update\\\", \\\"metadata\\\": {\\\"type\\\": \\\"message\\\", \\\"data\\\": {\\\"message\\\": \\\"开始新步骤...\\\"}}}\\n\\n\"}\n\ndata: {\"task_id\": \"49394edc-fc97-4ae6-a55a-e458f64a4297\", \"data\": \"data: {\\\"task_id\\\": \\\"49394edc-fc97-4ae6-a55a-e458f64a4297\\\", \\\"status\\\": \\\"conversation_update\\\", \\\"metadata\\\": {\\\"type\\\": \\\"planning_step\\\", \\\"data\\\": {\\\"step\\\": 3, \\\"goal\\\": \\\"Input 'iPhone 16' into the search field with index 30 and execute the search.\\\", \\\"memory\\\": \\\"Located the search bar on apple.com.cn to search for iPhone 16 information. Preparing to input 'iPhone 16' into the search bar.\\\", \\\"evaluation\\\": \\\"Successfully found the search input on the Apple site. Verdict: Success\\\", \\\"task_status\\\": \\\"running\\\", \\\"actions\\\": [{\\\"input_text\\\": {\\\"index\\\": 30, \\\"text\\\": \\\"iPhone 16\\\"}}]}}}\\n\\n\"}\n\ndata: {\"task_id\": \"49394edc-fc97-4ae6-a55a-e458f64a4297\", \"data\": \"data: {\\\"task_id\\\": \\\"49394edc-fc97-4ae6-a55a-e458f64a4297\\\", \\\"status\\\": \\\"conversation_update\\\", \\\"metadata\\\": {\\\"type\\\": \\\"message\\\", \\\"data\\\": {\\\"message\\\": \\\"执行动作 #1：{'input_text': {'index': 30, 'text': 'iPhone 16'}}\\\"}}}\\n\\n\"}\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagentsdance%2Fbrowser-use-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagentsdance%2Fbrowser-use-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagentsdance%2Fbrowser-use-agent/lists"}