介绍 B,一个浏览器代理模板!基于 @vercel 的 Eve 构建。为任何智能体提供真正的 Browser Use Cloud 浏览器。查看…

X AI KOLs Following 工具

摘要

介绍 B,一个开源的浏览器代理模板,基于 Vercel 的 Eve 构建,利用 Browser Use Cloud 为任何 AI 智能体提供真正的网页浏览器。它包含聊天界面和实时浏览器查看功能。

介绍 B,一个浏览器代理模板! 基于 @vercel 的 Eve 构建。为任何智能体提供真正的 Browser Use Cloud 浏览器。使用 browser-harness 实时查看浏览过程。 https://t.co/gDjUwPMpz0
查看原文
查看缓存全文

缓存时间: 2026/06/18 06:05

介绍 B——一个浏览器代理模板!基于 @vercel 的 Eve 构建。为任意代理提供一个真正的 Browser Use 云浏览器。使用 browser-harness 实时观看它浏览网页。https://t.co/gDjUwPMpz0


browser-use/browser-agent-template

来源:https://github.com/browser-use/browser-agent-template

Browser Agent Template

CI (https://github.com/browser-use/browser-agent-template/actions/workflows/ci.yml)

许可证:MIT (https://github.com/browser-use/browser-agent-template/blob/main/LICENSE)

Vercel (https://vercel.com)

模板。 Fork 它,自定义它,然后部署你自己的网页浏览代理。

使用 Vercel 部署 (https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fbrowser-use%2Fbrowser-agent-template&env=BROWSER_USE_API_KEY,AI_GATEWAY_API_KEY&envDescription=BROWSER_USE_API_KEY%20from%20browser-use.com%20%7C%20a%20model%20credential%20for%20the%20AI%20Gateway&envLink=https%3A%2F%2Fgithub.com%2Fbrowser-use%2Fbrowser-agent-template%2Fblob%2Fmain%2Fdocs%2FENVIRONMENT.md&project-name=browser-agent&repository-name=browser-agent)


一个能浏览真实网页的开源代理。包含一个 Vercel Eve (https://eve.dev) 代理,带有网页聊天界面和一个 Browser Use (https://browser-use.com) 云浏览器——同一代码库,持久会话,实时观看浏览过程。

特性

网页聊天 —— 在浏览器中执行任务

在浏览器中与你的代理聊天。响应流式传输,每次工具调用(打开浏览器、导航、提取)都会实时内联显示。

云浏览器 —— 真实的网页

代理会打开一个真实的 Browser Use (https://browser-use.com) 云浏览器来导航页面、抓取内容、填写表单、点击和截图——无需刮取 API,直接操作实况网页。

实时观看 —— 实时浏览器面板

每次浏览会话都会返回一个 liveUrl。界面将其嵌入侧边面板,让你在聊天旁边实时观看代理的浏览器操作。

安全加固 —— 密钥保持在服务端

你的 BROWSER_USE_API_KEY 存在于应用运行时中,永远不会暴露给代理沙箱或模型。浏览功能由 @browser_use/eve (https://www.npmjs.com/package/@browser_use/eve) 驱动。

架构

┌─────────────────────────────────────────────────────────────┐
│ Web chat (Next.js)                                          │
└──────────────────────────────┬──────────────────────────────┘
                               ▼
┌─────────────────────────────────────────────────────────────┐
│ eve agent (instructions, skill, tools)                      │
│ mounted into Next.js via withEve()                          │
└──────────────────────────────┬──────────────────────────────┘
                               ▼
┌─────────────────────────────────────────────────────────────┐
│ @browser_use/eve — provisions a Browser Use cloud browser   │
│ (key stays server-side; agent drives it via CDP)            │
└──────────────────────────────┬──────────────────────────────┘
                               ▼
                  Browser Use cloud browser

它是一个单一的 Next.js 服务:withEve()next.config.ts 中将 eve 代理挂载到应用中,因此聊天界面和代理一同部署。

快速开始

部署到 Vercel

使用 Vercel 部署 (https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fbrowser-use%2Fbrowser-agent-template&env=BROWSER_USE_API_KEY,AI_GATEWAY_API_KEY&envDescription=BROWSER_USE_API_KEY%20from%20browser-use.com%20%7C%20a%20model%20credential%20for%20the%20AI%20Gateway&envLink=https%3A%2F%2Fgithub.com%2Fbrowser-use%2Fbrowser-agent-template%2Fblob%2Fmain%2Fdocs%2FENVIRONMENT.md&project-name=browser-agent&repository-name=browser-agent)

系统会要求你提供 BROWSER_USE_API_KEY(来自 browser-use.com (https://browser-use.com))和一个模型凭据(将 Vercel 项目链接到 AI Gateway,或设置 AI_GATEWAY_API_KEY)。

自托管

前提条件: Node.js 24+

git clone https://github.com/browser-use/browser-agent-template.git
cd browser-agent-template
npm install
cp .env.example .env.local
npm run dev

打开 http://localhost:3000 并提问:“Go to news.ycombinator.com and give me the top 5 posts.”

必需的环境变量:

BROWSER_USE_API_KEY=bu_... # 来自 browser-use.com
AI_GATEWAY_API_KEY=...     # 或为 AI Gateway 链接一个 Vercel 项目

完整参考请参见 ENVIRONMENT.md

自定义

请参阅 自定义指南,了解如何:

  • 重命名你的代理并重写其指令
  • 修改 AI 模型
  • 添加工具和技能
  • 配置云浏览器(代理国家、配置文件、超时)
  • 为公开部署设置认证
  • 部署你的 Fork

工作原理

完整的技术深度解析,请参见 架构

  1. 聊天:网页界面通过 eve 内置的 Web Chat 通道(useEveAgent)进行流式通信。
  2. 浏览:当遇到网页任务时,代理加载 browser-use 技能并调用 open_cloud_browser
  3. 配置@browser_use/eve 启动一个 Browser Use 云浏览器(密钥保持在服务端),并返回一个 liveUrl。
  4. 驱动:代理在 eve 沙箱内使用 browser-harness-js(原始类型化 CDP)驱动浏览器。
  5. 观看:界面将 liveUrl 嵌入侧边面板;stop_cloud_browser 结束会话。

开发

npm run dev       # 启动开发服务器 (Next.js + eve)
npm run typecheck # TypeScript 类型检查
npm run build     # 生产构建

面向 AI 编码助手的说明请参见 AGENTS.md

基于以下技术构建

  • eve (https://eve.dev) —— 持久代理框架
  • @browser_use/eve (https://www.npmjs.com/package/@browser_use/eve) —— 适用于 eve 的 Browser Use 云浏览器
  • Browser Use (https://browser-use.com) —— 云浏览器基础设施
  • Next.js (https://nextjs.org) —— React 框架
  • AI SDK (https://ai-sdk.dev) —— 模型访问

贡献

参与方式请参见 CONTRIBUTING.md

许可证

MIT

相似文章