Communitygithub.com

agent-browser

面向 AI 智能体的浏览器自动化 CLI。当用户需要与网站交互时使用,包括导航页面、填写表单、点击按钮、截取屏幕截图、提取数据、测试 Web 应用或自动化任何浏览器任务。触发条件包括请求...

agent-browser 是什么?

agent-browser 是一款基于 Rust 构建的高性能浏览器自动化 CLI,专为 AI 智能体设计。它通过 Chrome DevTools Protocol (CDP) 与 Chrome/Chromium 浏览器通信,不依赖 Playwright 或 Puppeteer,实现了快速可靠的交互。该工具提供了丰富的功能,包括可访问性树快照与元素引用(`@eN` 格式)、会话管理、认证库、状态持久化、视频录制以及可观测性仪表盘(端口 4848)。支持多种 AI 智能体平台(如 Cursor、Claude Code、Codex、Continue、Windsurf 等),并内置了针对 Electron 应用、Slack 工作区、探索性测试、API 客户端派生以及 Vercel 部署等场景的专业技能。用户可以通过 `agent-browser skills get core` 获取最新的使用指南和工作流,确保指令与安装版本一致。

兼容平台✓Claude Code✓Codex CLI✓Cursor✓Windsurf
npx skills add https://github.com/vercel-labs/agent-browser/tree/main/skills/agent-browser

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

agent-browser 是做什么的?

面向 AI 智能体的快速浏览器自动化 CLI。通过可访问性树快照和紧凑的 @eN 元素引用,支持 Chrome/Chromium via CDP。

安装:npm i -g agent-browser && agent-browser install

从这里开始

此文件为发现存根,而非使用指南。在执行任何 agent-browser 命令之前,请先从 CLI 加载实际的工作流内容:

agent-browser skills get core             # 从这里开始 — 工作流、常见模式、故障排除
agent-browser skills get core --full      # 包含完整的命令参考和模板

CLI 提供的技能内容始终与安装版本匹配,因此指令不会过时。此存根中的内容在不同版本间无法更改,这也是它仅指向 skills get core 的原因。

专业技能

当任务超出浏览器网页范围时,加载相应的专业技能:

agent-browser skills get electron          # Electron 桌面应用(VS Code、Slack、Discord、Figma 等)
agent-browser skills get slack             # Slack 工作区自动化
agent-browser skills get dogfood           # 探索性测试 / 质量保证 / 漏洞狩猎
agent-browser skills get derive-client     # 录制 HAR,为站点派生独立的 API 客户端
agent-browser skills get vercel-sandbox    # 在 Vercel Sandbox 微虚拟机中运行 agent-browser
agent-browser skills get protected-vercel-deployments  # 访问受保护的 Vercel 部署
agent-browser skills get agentcore         # AWS Bedrock AgentCore 云端浏览器

运行 agent-browser skills list 查看已安装版本中所有可用的技能。

为什么选择 agent-browser

  • 快速的本地 Rust CLI,非 Node.js 封装
  • 可与任何 AI 智能体配合使用(Cursor、Claude Code、Codex、Continue、Windsurf 等)
  • 通过 CDP 连接 Chrome/Chromium,无需 Playwright 或 Puppeteer 依赖
  • 可访问性树快照与元素引用,确保可靠的交互
  • 会话、认证库、状态持久化、视频录制
  • 专为 Electron 应用、Slack、探索性测试、云提供商设计的专业技能

可观测性仪表盘

仪表盘独立于浏览器会话运行在端口 4848 上,也可以通过代理或转发的 URL(例如 https://dashboard.agent-browser.localhost)打开。智能体应保持在仪表盘原点:会话标签页、状态和流量流在内部进行代理,因此无需暴露会话端口。

Individual skills in this repo

This repo contains 8 individual skills — each has its own dedicated page.

vercel-labs/agentcore

Run agent-browser on AWS Bedrock AgentCore cloud browsers. Use when the user wants to use AgentCore, run browser automation on AWS, use a cloud browser with AWS credentials, or needs a managed browser session backed by AWS infrastructure. Triggers include "use agentcore", "run on AWS", "cloud browser with AWS", "bedrock browser", "agentcore session", or any task requiring AWS-hosted browser automation.

vercel-labs/derive-client

Reverse-engineer a website's internal API by recording browser traffic into a HAR file, then generate a standalone client or CLI that calls the endpoints directly, with no browser needed after the first recording. Use when asked to "derive a client", "build a CLI for <site>", "reverse engineer this site's API", "record network requests", "turn this site into an API", or when the same site will be automated repeatedly and direct HTTP calls would beat driving the browser every time.

vercel-labs/dogfood

Systematically explore and test a web application to find bugs, UX issues, and other problems. Use when asked to "dogfood", "QA", "exploratory test", "find issues", "bug hunt", "test this app/site/platform", or review the quality of a web application. Produces a structured report with full reproduction evidence -- step-by-step screenshots, repro videos, and detailed repro steps for every issue -- so findings can be handed directly to the responsible teams.

vercel-labs/electron

Automate Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify, etc.) using agent-browser via Chrome DevTools Protocol. Use when the user needs to interact with an Electron app, automate a desktop app, connect to a running app, control a native app, or test an Electron application. Triggers include "automate Slack app", "control VS Code", "interact with Discord app", "test this Electron app", "connect to desktop app", or any task requiring automation of a native Electron application.

vercel-labs/protected-vercel-deployments

Access and test Vercel deployments protected by Vercel Authentication, SSO, or Deployment Protection with agent-browser. Use when a preview or production URL redirects to a Vercel login page, returns a protection 401 or 403, or needs short-lived Trusted Sources OIDC authentication instead of a static bypass secret or public exception.

vercel-labs/slack

Interact with Slack workspaces using browser automation. Use when the user needs to check unread channels, navigate Slack, send messages, extract data, find information, search conversations, or automate any Slack task. Triggers include "check my Slack", "what channels have unreads", "send a message to", "search Slack for", "extract from Slack", "find who said", or any task requiring programmatic Slack interaction.

vercel-labs/vercel-sandbox

Run agent-browser + Chrome inside Vercel Sandbox microVMs for browser automation from any Vercel-deployed app. Use when the user needs browser automation in a Vercel app (Next.js, SvelteKit, Nuxt, Remix, Astro, etc.), wants to run headless Chrome without binary size limits, needs persistent browser sessions across commands, or wants ephemeral isolated browser environments. Triggers include "Vercel Sandbox browser", "microVM Chrome", "agent-browser in sandbox", "browser automation on Vercel", or any task requiring Chrome in a Vercel Sandbox.

vercel-labs/webmcp-gen

Build and validate experimental WebMCP tools for an existing web page. Use when an agent needs to expose a site's real workflows as page tools, create webmcp.init.js, define deterministic checks, or compare WebMCP with accessibility-tree automation.

相关技能