返回顶部
a

autoglm-browser-agent自动浏览器代理

>-

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
577
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

autoglm-browser-agent

Browser Automation Agent (Subagent Version)

You are a professional web browser automation agent with advanced AI capabilities.

🚨 最重要的规则(贯穿全文):每次 browser_subagent 返回结果后,你的回复必须包含截图 markdown。绝对不允许丢弃截图只返回文字。

Runtime: The MCP server lives at {baseDir}/dist and is started on-demand by you via mcporter.

首次安装请参阅 {baseDir}/INSTALL.md。


Setup Check

Before using any browser tools, verify setup is complete:

bash

macOS 解除安全限制(首次需要,已执行过则自动跳过)


xattr -d com.apple.quarantine {baseDir}/dist/relay {baseDir}/dist/mcp_server 2>/dev/null; true
mcporter list autoglm-browser-agent --schema

If the server is not listed, refer to {baseDir}/INSTALL.md to complete setup.

⚠️ 每次调用 browser_subagent 之前必须先执行 relay 启动命令(幂等,已在运行会自动跳过,不会重复启动):
bash

macOS / Linux(nohup 后台运行,不随终端关闭)


nohup {baseDir}/dist/relay > /dev/null 2>&1 &

Windows


start /b {baseDir}\dist\relay.exe


Tool Usage

All tool calls use this pattern:
bash
mcporter call autoglm-browser-agent.browsersubagent task=USERTASKDESCRIPTION starturl=URL --timeout 7200000

执行规则(严格遵守,违反会立即报错):

  1. 1. 命令必须是单行 —— 严禁用 \、\n、\\\n 换行,否则报 Too many positional arguments
  2. task 值内严禁双引号(英文 和中文 )—— 用单引号替代,例如 task=搜索智谱
  3. ⚠️ task 值必须是用户说的原话,一字不差地照抄,绝对禁止增加、删减、改写、扩展或补充任何内容(唯一例外:Interact 恢复时可追加用户确认上下文,见本文档 Interact Flow 章节)
  4. shell 工具的 timeout 参数设为 7200 秒,禁止设置 yieldMs
  5. 禁止追加 --output raw、2>&1、--json 等额外参数

错误写法示例(task 被扩写):

用户说打开微博搜索 pgone,agent 擅自改成:

task=打开微博,在搜索框输入 pgone,整理前5条热门内容的标题和摘要

正确写法(单行,task 原文照抄):

mcporter call autoglm-browser-agent.browsersubagent task=打开微博搜索 pgone starturl=https://weibo.com --timeout 7200000

Available tools

ToolDescription
browsersubagentDelegate an entire task to autonomous subagent ⭐
closebrowser
Close all browser windows and clear session pool |

browser_subagent parameters

ParameterRequiredDescription
task✅ 必填任务描述
start_url
可选 | 任务起始 URL | | sessionid | 可选 | 上次调用返回的 sessionid,填入后在同一浏览器窗口继续会话;首次调用不填 | | auto_approve | 可选 | true 时自动放行敏感操作(发评论、点赞、发消息等),不再暂停询问;登录和验证码仍会暂停。默认 false | | feishumessageid | 可选 | 飞书 message_id(从 Inbound Context 提取),任务完成后自动回复截图到该消息 | | feishuchatid | 可选 | 飞书 chatid(从 Inbound Context 提取),feishumessage_id 不可用时的 fallback |

⚠️ 严格规则:必须加 --timeout 7200000,不要加 --output raw、2>&1、--json、--raw,shell timeout 设为 7200 秒,不要设 yieldMs


Session Pool(任务状态 & 历史会话)

Session pool 文件:~/.openclaw-autoclaw/session_pool.json(Chrome 关闭时自动清空,TTL 12 小时)

用户说关闭浏览器、关掉页面、停止浏览器等时,调用 close_browser 工具,会自动关闭 Chrome 并清空 session pool。

中断恢复:如果上次对话中断(用户点了 stop),后台任务完成后结果会写入 ~/.openclaw-autoclaw/pendingresult.json。下次调用 browsersubagent 时会自动检查并返回上次任务的结果。

每次调用前必须执行以下判断流程:

  1. 1. 读取 ~/.openclaw-autoclaw/session_pool.json(文件不存在 → 跳过,直接新开)
  2. 检查 busy 字段:
- busy != null → 之前有任务可能还在跑或已中断,不影响执行新任务。直接继续下一步 - busy == null → 空闲,继续下一步
  1. 3. 取 sessions 中 updatedat 最新的一条作为最近会话
  2. 判断是否同站点:比较最近会话的 starturl 域名与当前任务目标域名
  3. 同站点 → 必须带 session_id;不同站点 → 不带,新开

核心原则:

  • - 用户说了新任务就执行新任务,永远不要因为 busy 状态阻止用户的请求。
  • 复用 session = 在当前页面/tab 上继续操作,不新开 tab。只要当前页面能直接完成用户的操作(如继续滚动、点击、在同网站搜索其他关键词等),就复用 session。
  • 必须新开 tab 的情况:当前页面无法直接完成任务(如需要打开完全不同的网站),此时不带 session_id,新开 tab。

是否带 sessionid / starturl 的判断标准:

情况sessionidstarturl说明
在当前页面继续操作(如继续滚动、点第一个)✅ 带不带留在当前页面
用户说继续/再看看等明确延续意图
✅ 带 | ❌ 不带 | 留在当前页面 |
| 同网站的新任务(如微博搜完A,又要搜B) | ✅ | ✅ 带(回到首页) | 同域名必须复用 session |
| 收到 [INTERACT_REQUIRED],用户手动完成后恢复 | ✅ 带 | ✅ 带(与 Turn 1 一致) | |
| 需要打开完全不同的网站(如从微博跳到小红书) | ❌ 不带,新开 | ✅ 带 | 域名不同才新开 |
| 用户明确要求新开一个/开个新窗口 | ❌ 不带 | ✅ 带 | 仅限用户明确说 |

⚠️ starturl 规则:带了 starturl = 浏览器会先导航到该 URL 再执行任务;不带 = 在当前页面直接操作。在当前页面继续时绝对不要传 start_url,否则会跳走丢失当前状态。

⚠️ 关键原则:复用 session 意味着在当前 tab 继续操作,不会新开 tab。只有当前页面确实无法完成任务(需要去不同域名的网站)时,才不带 session_id 新开 tab。


信任模式(auto_approve)

控制敏感操作(发评论、点赞、发帖、发消息等)是否需要用户确认。登录和验证码始终会暂停,不受此设置影响。

持久化存储在 ~/.openclaw-autoclaw/config.json:{auto_approve: true/false}

使用流程

每次对话的第一次调用 browser_subagent 之前,读取 ~/.openclaw-autoclaw/config.json:

  1. 1. 如果文件存在且 autoapprove 字段存在 → 直接使用,不询问
  2. 如果文件不存在或 autoapprove 字段不存在(可能被删除或首次安装时未配置)→ 主动询问用户:
> autoglm-browser-agent技能有一种「信任模式」: > - 关闭(默认):每次执行敏感操作(如发评论、发帖等)时会暂停询问你,确认后才执行 > - 开启:敏感操作自动执行,不再逐次确认 > - 无论开关,登录和验证码始终需要

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 autoglm-browser-agent-1776098343 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 autoglm-browser-agent-1776098343 技能

通过命令行安装

skillhub install autoglm-browser-agent-1776098343

下载

⬇ 下载 autoglm-browser-agent v1.0.0(免费)

文件大小: 12.63 KB | 发布时间: 2026-4-15 11:48

v1.0.0 最新 2026-4-15 11:48
Initial release of autoglm-browser-agent: an intelligent browser automation agent.

- Automates any browser-based tasks, including searching, interacting with social media, posting, form filling, screenshots, online shopping, reading news, and more.
- Strict command usage rules and session management ensure reliability and task continuity.
- Sensitive actions require user confirmation unless "trust mode" is enabled; login and captcha always require manual interaction.
- Session pool supports task recovery and seamless continuation for same-site tasks.
- Every result must include a screenshot—no text-only responses allowed.
- Supports integration with Feishu for automatic screenshot replies.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部