# Hermes Chrome Profiles Plugin

> 仓库地址：https://github.com/anpicasso/hermes-plugin-chrome-profiles
> 作者/组织：anpicasso
> 成熟度：experimental
> 分析日期：2026-04-15

## 一句话总结
通过 Chrome DevTools Protocol 管理多个浏览器 profile，让 agent 在不同身份/账户间智能切换。

## 项目定位与架构
Chrome Profiles Plugin 解决 agent 浏览器自动化中的身份管理问题：agent 需要在不同的 Chrome/Edge profile 间切换，每个 profile 维护独立的 cookies、登录态和用户数据。

通过 CDP（Chrome DevTools Protocol）管理多个浏览器实例。单一 `browser_profile(name)` 接口处理所有切换逻辑：验证 profile 存在 → 确认/启动浏览器 → 设置 `BROWSER_CDP_URL` 环境变量 → 清理旧 session。

## 关键技术特性
- **Dual-browser Support**：Google Chrome + Microsoft Edge
- **Auto-launch**：本地 profile 未运行时自动启动
- **Session Persistence**：跨切换保持 cookies 和登录态
- **Single Tool Interface**：`browser_profile(name)` 统一入口
- **Dynamic Config**：`config.yaml` 变更即时生效，无需重启
- **Remote Profile Support**：支持远程浏览器连接

## 设计亮点与创新
单函数接口的极简设计非常优雅——`browser_profile()` 无参数调用列出所有 profile，带参数切换到指定 profile。`BROWSER_CDP_URL` 环境变量注入使得后续浏览器操作自动路由到正确实例。

## 局限性与风险
- 依赖 CDP 协议，Chrome 版本更新可能引入兼容性问题
- 多实例浏览器的资源消耗可能较高
- 安全敏感场景（银行、社交媒体）的 session 管理需格外谨慎

## 与生态系统的关联
与 hermes-cloudflare（Cloudflare 浏览器渲染）在浏览器能力层互补。Chrome Profiles 管身份切换，Cloudflare 管 headless 渲染。
