Hermes Web 架構對照

A) Open WebUI + hermes proxy 最小架構 · B) 20 人 Web Agent(有工具)推薦架構

A · Open WebUI + hermes proxy 最小架構 定位:聊天 UI + 模型 API 轉發 · 無工具 · 共享你的 OAuth 憑證 HOST / LAN · 建議僅 127.0.0.1 或內網 + 閘道 Users ×N Browser Open WebUI Chat UI + history Docker :8080 OpenAI-compatible client hermes proxy :8645 /v1/* attach OAuth bearer credential forwarder only Auth / Gateway Nginx / Caddy / CF 建議加,非內建 Upstream Models Nous Portal OAuth ready xAI Grok optional adapter Other LLM API not via this proxy 這條路徑沒有: • Hermes tools / skills / memory • per-user isolation / quota • agent loop · 只是模型對話 HTTPS /v1/chat OAuth attach auth gate Legend Frontend Backend / Proxy Cloud / Upstream Security Optional / Missing

適合什麼

  • • 內部 demo / 輕量 Web 聊天
  • • 只需要模型對話,不要工具
  • • 已有 Open WebUI,想接 Hermes 訂閱
  • • 1–數人試用,非正式 SaaS

啟動要點

  • hermes proxy start --provider nous
  • • Open WebUI 指向 http://host:8645/v1
  • • API Key 可填任意字串(proxy 會丟棄)
  • • 預設綁 127.0.0.1;公網務必加閘道

硬傷

  • • 全走你的 OAuth / 配額
  • • 無多租戶隔離 / 無工具
  • • 任意 bearer 可打(需前置 Auth)
  • • 20 人正式用:不建議
# 1) 啟動 proxy(本機) hermes proxy start --provider nous --host 127.0.0.1 --port 8645 # 2) Open WebUI 連線設定 OPENAI_API_BASE_URL=http://host.docker.internal:8645/v1 OPENAI_API_KEY=sk-anything # proxy 不驗證,但客戶端常要求有值 # 3)(建議)前面再加 Nginx 基本 auth / IP allowlist / rate limit # 不要直接 0.0.0.0 裸奔公網
B · 20 人 Web Agent(有工具)推薦架構 定位:多租戶閘道 + 佇列 + 受控工具執行 · Hermes 只做意圖/規劃,業務動作走你的 handler Users ×20 Web / App Edge Auth JWT / OAuth / SSO Rate limit · WAF per-user quota Chat / Agent API PHP / Node / FastAPI session · policy intent route 你的產品後端 Job Queue Redis / RQ / Bull Worker Pool (cap concurrency) Worker Hermes job Worker N ≤ 3–8 Hermes Layer · 只做理解 / 規劃 / 結構化 JSON Intent LLM classify / plan structured output Agent Runtime optional tool loop scoped tools only Controlled Handlers · 業務動作不交給裸 Hermes Wiki / DB query handlers allowlisted SQL Business API order / CRM / ... idempotent actions Sandbox Tool docker / VM no host shell Session DB per-user chats Audit Log tools · cost · who Model Provider API key pool Realtime Channel WS / SSE stream Hard rules for 20 concurrent users with tools 1) Hermes 不做裸 terminal 對公網用戶 2) 工具必須 allowlist + 沙箱 3) 並發用佇列硬上限(例如 4–8 active agents) 4) per-user session / memory 隔離 5) 每次工具調用寫 audit 6) 成本與 rate limit 按 user_id 計 7) 業務寫入走你的 handler,不讓模型直連 DB intent JSON route persist model calls WS/SSE reply

核心分工

  • • 前端:Web Chat(可 Open WebUI 客製 / 自研)
  • • 閘道:Auth + 限流 + session
  • • Hermes:意圖分類 / 規劃 / JSON
  • • Handlers:Wiki/DB/業務/沙箱工具

20 人關鍵參數

  • • active agent 硬上限:4–8
  • • 佇列排隊,避免同時 20 人跑工具
  • • 每 user:RPM / 日 token / 工具次數
  • • 工具只在 sandbox / allowlist

與 LikeShop 一致

  • • Hermes 不做直接 wiki/DB 查詢
  • • PHP/後端路由到受控 Python handler
  • • 結構化輸出 → 業務動作
  • • 可演化知識層保持 local-first 邊界
# 請求流(簡化) User → Edge Auth → Chat API → (fast path) intent LLM → JSON {intent, slots, confidence} → Router: if intent in [chat, explain]: stream LLM reply if intent in [wiki.query, order.create]: call allowlisted handler if intent needs multi-step: enqueue Agent job (scoped tools) → Worker pulls job → Hermes agent loop (bounded tools) → result → Session DB + Audit + SSE back to user # 不要做 把 hermes proxy 當多用戶 Agent 後台 給公網用戶裸 terminal / 全檔案系統 讓模型直接寫生產 DB
維度 A · Open WebUI + proxy B · 20人 Web Agent
定位 模型聊天後端 多租戶 Agent 產品
工具 有(受控)
隔離 共享你的 OAuth per-user session/quota
20 人同時 僅輕量聊天可試 佇列 + 並發上限
安全 需自加 Auth 閘道 Edge + audit + sandbox
開發成本 很低(小時級) 中高(天–週)
推薦場景 內部試聊 / demo LikeShop / 團隊 Agent 產品

你現在若只想驗證

  • • 先上 A:Open WebUI + hermes proxy
  • • 驗證模型體驗與延遲
  • • 不要開工具、不要公網裸奔

要做 20 人有工具

  • • 走 B:閘道 + 佇列 + handler
  • • Hermes 只做意圖/JSON
  • • 與你現有 PHP 路由思路一致

下一步可落地

  • • A:給你 Docker compose 一鍵起
  • • B:給你 API 合約 + 佇列 worker 骨架
  • • 或先畫 LikeShop 意圖 JSON schema