代理浏览器
- 作者仓库星标 3,082
- 作者仓库 grok-cli
- 领域
- 人工智能
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @superagent-ai · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 即装即用
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- 未检出明确要求
- 检测到的文件与系统行为
-
- 只读
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
# agent-browser
Use this skill when verification needs a real browser after the app is booted from the sandbox.
This project uses `agent-browser` on the host, not inside Shuru. The usual flow is:
1. Start the app with sandboxed bash.
2. Expose it through a forwarded localhost port.
3. Use `agent-browser` against that localhost URL.
## Requirements
- The `agent-browser` CLI must be installed and available on `PATH`.
- Prefer `http://127.0.0.1:<port>` or another explicit localhost URL.
- Use a named browser session when there is any chance of concurrent runs.
## Core flow
```bash
agent-browser --session verify open http://127.0.0.1:3000
agent-browser --session verify wait --load networkidle
agent-browser --session verify snapshot -i
```
After any click or navigation, re-snapshot before using old refs again.
## Common commands
```bash
# Open and wait for readiness
agent-browser --session verify open <url>
agent-browser --session verify wait --load networkidle
# Inspect the page
agent-browser --session verify snapshot -i
agent-browser --session verify get title
agent-browser --session verify get url
# Interact with elements from snapshot refs
agent-browser --session verify click @e1
agent-browser --session verify fill @e2 "text"
agent-browser --session verify press Enter
# Record the smoke test as video
agent-browser record start .grok/verify-artifacts/verify-smoke.webm
# Capture screenshot proof (use --screenshot-dir, not a positional path)
mkdir -p .grok/verify-artifacts
agent-browser --screenshot-dir .grok/verify-artifacts screenshot
agent-browser --screenshot-dir .grok/verify-artifacts screenshot --full
# Stop recording and clean up
agent-browser record stop
agent-browser close
```
## Guidance
- Keep browser checks narrow in phase 1: page load, one or two critical controls, and optional screenshot evidence.
- Save screenshots to stable workspace-relative paths under `.grok/verify-artifacts/` so verify can report them back to the user.
- Prefer `wait --load networkidle` after `open`.
- If the page is dynamic, use `snapshot -i` again after each meaningful DOM change.
- If the target URL is ambiguous because multiple forwarded ports exist, stop and report the ambiguity instead of guessing.
- If `agent-browser` is unavailable, fall back to bash-only verification and say so clearly.
章节与文件索引
按说明文件中的顺序排列。
要求
核心流程
指导
文件/命令 -> agent-browser · PATH · http://127.0.0.1:<port> · .grok/verify-artifacts/ · wait --load networkidle · open · snapshot -i
内容校验值 -> 0ef65b37de27
当前原文的自动摘译,尚未人工审校。
要求
agent-browserCLI 必须在PATH上安装并可用。首选http://127.0.0.1:<port>或其他显式本地主机 URL。当有可能并发运行时,请使用命名的浏览器会话。核心流程
任何点击或导航后,请在再次使用旧参考之前重新拍摄快照。
指导
在第一阶段缩小浏览器检查范围:页面加载、一两个关键控件以及可选的屏幕截图证据。将屏幕截图保存到
.grok/verify-artifacts/下稳定的工作区相对路径,以便验证可以将它们报告给用户。在open之后更喜欢wait --load networkidle。如果页面是动态的,则在每次有意义的 DOM 更改后再次使用snapshot -i。如果由于存在多个转发端口而导致目标 URL 不明确,请停止并报告该不明确性,而不是猜测。