Files
ewoooc/docs/adr/ADR-001-three-agent-self-learning-division.md
ogt 1b4f3a7bbe
Some checks failed
CD Pipeline / deploy (push) Failing after 59s
feat: EwoooC 初始化 — 完整專案推版至 Gitea
- 建立 Gitea Actions CD pipeline (.gitea/workflows/cd.yaml)
- 部署模式: rsync Python 檔案至 188 → docker restart (volume mount)
- Dockerfile/requirements 變動時自動重建 Docker image
- 部署通知: Telegram (開始/成功/失敗)
- 健康檢查: https://mo.wooo.work/health (最多 5 次重試)
- 同步最新 CLAUDE.md / ADR-008 / memory (2026-04-19)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 01:21:13 +08:00

57 lines
2.3 KiB
Markdown
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.
# ADR-001三 Agent 自主學習分工Hermes / NemoTron / OpenClaw
- **Status**: Accepted
- **Date**: 2026-04-18
- **Decision Maker**: 統帥(系統架構顧問)
- **Author**: Claude
## Context
MOMO Pro 的 OpenClaw Bot 已具備三個 AI 服務Hermes 本地、NemoTron NIM、OpenClaw/Gemini 雲端),但學習工作流(採集→處理→應用)尚未明確分工。當前現象:
- PPT 每次重新呼叫 AI → token 浪費 + 半年前歷史簡報失真
- `services/openclaw_learning_service.py` 雖有 `store_insight()` 等 API但只寫不讀未形成 cache-aside 閉環
- 三個 Agent 沒有清楚邊界,可能未來重複工作或越權
## Decision
採用「**漏斗型算力分配**」:
| Agent | 模型 | 主機 | 角色 | 月成本目標 |
|---|---|---|---|---|
| Hermes | hermes3:latest 8B | Ollama @ 192.168.0.111 | 資料工程師(採集層) | $0 |
| NemoTron | meta/llama-3.1-8b-instruct | NVIDIA NIM | 神經中樞(處理層) | $0免費 60/天) |
| OpenClaw | gemini-2.0-flash | Google 雲端 | 策略大腦(應用層) | < $5 |
**三段分工**
1. **採集層Hermes**embedding 生成、tag 抽取、相似度去重、品質分數計算
2. **處理層NemoTron**Tool Calling 寫入 KM、對話分類、跨 Agent 派發
3. **應用層OpenClaw**PPT 主筆、用戶對話、週報 meta-analysis
## Alternatives Considered
| 方案 | 拒絕原因 |
|---|---|
| 全用 OpenClaw / Gemini | 月成本爆炸、外部依賴單點 |
| 全用 Hermes 本地 | 品質不夠、用戶感知差 |
| 用 LangChain Agent 自動路由 | 黑盒、debug 困難、不符 FinOps 透明原則 |
## Consequences
### Positive
- 月成本可控:< $5從 $50+ 降下來)
- 失真消除:歷史 snapshot 寫死後內容永遠一致
- 抗故障:單一 Agent 掛掉不影響全局fallback 鏈,見 ADR-004
### Negative / Trade-offs
- 增加維運複雜度(三個 Agent 都要監控)
- KM 表 schema 必須穩定schema 變動成本高
- Hermes 本地主機成為單點(需要 192.168.0.111 高可用)
## Related ADRs
- ADR-002pgvectorKM 儲存層
- ADR-003本地 embeddingHermes 採集層的具體實作
- ADR-004NemoTron fallback應對 NIM 配額耗盡
- ADR-005時間衰減應用層 RAG 取數的時間權重