分工
Hermai 有三个组成部分:- CLI(hermai-cli,开源)- 在你的机器上运行。贡献者用它检视网站、编写描述端点的 schema,然后把 schema 推送到 registry。
-
Registry(
api.hermai.ai)- 存储并提供贡献者推送的 schema。agent 在运行时查询它,获取 registry 中任何域名的端点名称、参数、URL template 和响应形状。 -
Hosted fetch(
POST /v1/fetch)- 通过 Hermai 执行已注册端点并返回结果。当你希望 Hermai 运行请求,而不是自行执行 schema 时使用。
CLI 做什么
CLI 提供一组确定性的工具组 - 每个子命令做一件事,并输出可供下一步处理的 JSON:hermai detect- 分类网站平台(Shopify、WordPress、Next.js 等)并检测 anti-bot 系统。hermai wellknown- 探测robots.txt、sitemap、RSS feed 与 GraphQL 端点。hermai probe --body | hermai extract- 从页面提取嵌入数据。可识别 13 种 SSR/hydration 模式(__NEXT_DATA__、ytInitialData、__APOLLO_STATE__、SIGI_STATE等)。hermai intercept- 启动浏览器并捕获真实 XHR 流量,适用于动态功能(搜索、购物车、筛选)。hermai introspect- 获取 GraphQL schema。hermai session bootstrap- 为 anti-bot 网站预热浏览器 session。
hermai registry push 推送。不需要 LLM key 或托管服务。
Platform 做什么
Platform 同时提供 lookup 和 hosted execution:GET /v1/catalog/{domain}- 返回该域名所有端点与 action。这是主要的 agent 接口,需要 intent 说明用途。GET /v1/schemas- 浏览并搜索整个 registry。POST /v1/fetch- 通过 Hermai 执行已注册端点。需要 API key。POST /v1/schemas- 推送新 schema。将按照 intent 分类 进行校验并立即发布。
为什么要这样分工?
发现很贵(浏览器 + LLM + 时间)。查询很便宜(数据库读取)。分开之后:- 贡献者只需在自己机器上,本地付一次发现成本
- 之后的每个 agent都能免费获得即时结构化数据
- Registry把发现和运行时执行分开
- 不锁死平台 - CLI 是开源(AGPL-3.0)且可离线运行