Files
AgentsMeeting/gateway/scripts/specs/hermes_gateway.json
T

51 lines
2.6 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"module": "hermes_gateway",
"version": "1.0",
"purpose": "Hermes AI Gateway — 运行在 246 Linux,为每个 Hermes Agent(莫荷、知微)提供 OpenAI 兼容 API 端点。Mohe 端口 8642Zhiwei 端口 8643。",
"ui_location": "F Tab → AI网关 → Hermes网关-莫荷 / Hermes网关-知微",
"human_help": {
"title": "Hermes AI 网关",
"description": [
"这是 Hermes Agent 的 API 服务器,提供 OpenAI 兼容的 /v1/chat/completions 接口。",
"每个 Hermes Agent 对应一个独立的实例:莫荷(8642)和知微(8643)。",
"Gateway 负责接收 LLM 请求、管理 session 上下文、调用底层 AI Provider。",
"所有 Agent 间的消息路由和 AI 处理都通过 Hermes Gateway 完成。"
],
"usage": [
"状态在 F Tab 的 AI网关 层查看,健康检查通过 /v1/health 端点检测。",
"如果状态 stopped:检查 systemd 服务 hermes-gateway@mohe 或 hermes-gateway@zhiwei",
"查看日志:journalctl -u hermes-gateway@mohe -n 50 --no-pager"
],
"troubleshooting": [
"如果 Hermes 不回复消息:检查 Gateway 进程是否运行 — curl http://127.0.0.1:8642/v1/models",
"如果 session 上下文丢失:检查是否误开了 session 自动重置(正常应关闭)",
"如果 Provider 报错:检查 ~/.hermes/config.yaml 中的 provider 配置是否正确"
],
"related": "依赖 ejabberd XMPP 服务器进行 Agent 间通信;依赖 AI Provider(如 ocg-new、volcengine)进行 LLM 推理"
},
"ai_spec": {
"apis": [
{"method": "GET", "path": "/v1/models", "returns": "模型列表", "desc": "查询可用模型"},
{"method": "GET", "path": "/v1/health", "returns": "{ok, version, uptime}", "desc": "健康检查"},
{"method": "POST", "path": "/v1/chat/completions", "body": "OpenAI chat completion 格式", "returns": "OpenAI 格式响应", "desc": "LLM 推理主端点"}
],
"dependencies": [
"ejabberd 192.168.1.246:5222 — XMPP 服务器",
"AI Provider 配置 (ocg-new / volcengine)",
"~/.hermes/config.yaml — 主配置"
],
"constraints": [
"每个 Gateway 实例绑定唯一端口(8642/8643),不可共享",
"sisyphus session 永不自动重置,api_server session 可能自动重置",
"Gateway 必须通过 systemd 管理(hermes-gateway@.service 模板)"
],
"related_files": [
"~/.hermes/config.yaml — 主配置",
"deploy/linux/hermes-gateway@.service — systemd 模板",
"gateway/scripts/specs/hermes_gateway.json — 本 spec"
]
}
}