两端分工
Hermai 有两端:- CLI(hermai-cli,开源)— 在你的机器上运行。贡献者用它检视网站、编写描述端点的 schema,然后把 schema 推送到 registry。
- Platform(api.hermai.ai)— schema registry。存储并提供贡献者推送的 schema。agent 在运行时查询以获取 registry 中任何域名的即时、结构化端点数据。无需浏览器、零发现成本、200 毫秒内响应。
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 是一个纯查询的 registry:GET /v1/catalog/{domain}— 返回该域名所有端点与 action。这是主要的 agent 接口,需要 intent 说明用途。GET /v1/schemas— 浏览并搜索整个 registry。POST /v1/schemas— 推送新 schema。将按照 intent 分类 进行校验并立即发布。
为什么要这样分工?
发现很贵(浏览器 + LLM + 时间)。查询很便宜(数据库读取)。分开之后:- 贡献者只需在自己机器上,本地付一次发现成本
- 之后的每个 agent都能免费获得即时结构化数据
- Platform完全没有发现的运算成本 — 它只是一个加了认证与分析的 registry
- 不锁死平台 — CLI 是开源(AGPL-3.0)且可离线运行