docs: sync status, hermes setup, and cutover docs with box reality
This commit is contained in:
+57
-40
@@ -1,65 +1,82 @@
|
||||
# Hermes-Schicht — Box-Runbook (Phase 4)
|
||||
# Hermes-Schicht — Box-Runbook
|
||||
|
||||
> Diese Schritte laufen **auf der Bosgame** (`192.168.178.151`, User `hitonabi`).
|
||||
> MC betreibt Hermes nicht — es zeigt nur Status + verlinkt das WebUI. Hier wird die
|
||||
> eigentliche **volle Verdrahtung** gemacht (das war in v1 der „Hermes ist dumm"-Grund).
|
||||
|
||||
## Reihenfolge der Dienste
|
||||
`llama-swap (:8080)` → `LiteLLM-Gateway (:4000)` → `hermes-gateway (:8642)` → `hermes-webui (:8787)`
|
||||
`llama-swap (:8080)` → **builtin Gateway (`:9001/v1`, Teil von MC2)** → `hermes-gateway (:8642)` →
|
||||
`hermes-webui (:8787, nesquena)`
|
||||
|
||||
## 1. LiteLLM-Gateway starten + Auto-Routing prüfen
|
||||
## 1. Gateway = builtin (kein LiteLLM)
|
||||
LiteLLM scheitert auf Python 3.14 (uvloop/orjson). MC2 bringt einen **eingebauten** OpenAI-kompatiblen
|
||||
Gateway auf `:9001/v1` mit: `model: auto` (kurz→`fast`, komplex→`heavy`) + explizite Aliase
|
||||
(`fast`/`heavy`/`coder`/`vision`/`hermes`). Verifizieren:
|
||||
```bash
|
||||
uv pip install "litellm[proxy]" # oder pipx
|
||||
litellm --config /opt/mission-control-2/gateway/config.yaml --port 4000
|
||||
curl -s http://127.0.0.1:4000/v1/models # fast/heavy/vision/coder/auto?
|
||||
# 'auto' testen: einfacher Prompt → fast; harter/zu langer → Fallback heavy.
|
||||
```
|
||||
⚠️ **Complexity-Auto-Router** (model:auto wählt nach Schwierigkeit) ist versionsabhängig — gegen die
|
||||
installierte LiteLLM-Version verifizieren (docs.litellm.ai/docs/proxy/auto_routing). Baseline =
|
||||
fast + Fallback heavy ist bereits in `gateway/config.yaml`.
|
||||
|
||||
## 2. Engine: Hirne + Ko-Residenz (llama-swap groups)
|
||||
In MC (Modelle & Routing) bzw. direkt: Qwen3.6-35B-A3B (Alias `fast`, `--jinja`!) und
|
||||
Qwen3.5-122B-A10B (Alias `heavy`) eintragen, Gruppe `brains` mit `swap:false` (ko-resident).
|
||||
```bash
|
||||
curl -s http://127.0.0.1:9001/api/groups # MC2 (Phase 0/1 API)
|
||||
curl -s http://127.0.0.1:9001/v1/models
|
||||
```
|
||||
|
||||
## 3. hermes-webui installieren (standalone)
|
||||
## 2. Engine: Rollen (llama-swap)
|
||||
Aliase sauber: `fast` (Qwen3.6-35B-A3B), `heavy` (Qwen3.5-122B-A10B), `coder`, `vision`, `scout`,
|
||||
`hermes` (Hermes-4-14B, `ttl 99999` = immer warm). Verwaltung im Cockpit (Modelle & Routing).
|
||||
**Ko-Residenz** (optional): Gruppe `swap:false` für `hermes`+`fast` → beide warm; `heavy`/`vision`
|
||||
on-demand. GTT beobachten (~124 GB Limit).
|
||||
|
||||
## 3. hermes-webui installieren (nesquena, standalone)
|
||||
```bash
|
||||
cd ~ && git clone https://github.com/nesquena/hermes-webui && cd hermes-webui
|
||||
python3 bootstrap.py # erkennt hermes-agent, installiert Abhängigkeiten
|
||||
# Dienst: deploy/hermes-webui.service → ~/.config/systemd/user/, Passwort setzen:
|
||||
python3 bootstrap.py # erkennt hermes-agent, baut venv, installiert Deps
|
||||
mkdir -p ~/.config/environment.d
|
||||
echo 'HERMES_WEBUI_PASSWORD=<dein-passwort>' > ~/.config/environment.d/hermes-webui.conf
|
||||
# Unit deploy/hermes-webui.service → ~/.config/systemd/user/ (HOST=0.0.0.0, PORT=8787)
|
||||
systemctl --user enable --now hermes-webui
|
||||
loginctl enable-linger hitonabi
|
||||
```
|
||||
Zugriff vom Windows-PC: `http://192.168.178.151:8787` (mit Passwort).
|
||||
Zugriff vom Windows-PC: `http://192.168.178.151:8787` (mit Passwort). MC2-Unit
|
||||
`HERMES_WEBUI_URL=http://192.168.178.151:8787` setzen → „Hermes öffnen" zeigt darauf.
|
||||
**Danach das alte offizielle Dashboard stilllegen** (eine WebUI):
|
||||
`systemctl --user disable --now hermes-dashboard` (:9119).
|
||||
|
||||
## 4. Hermes-Brain = `model: auto` über den Gateway
|
||||
In `~/.hermes/config.yaml` (bzw. via `hermes`-CLI/WebUI-Settings) das Modell auf den **Gateway** zeigen:
|
||||
## 4. Hermes-Hirn = dediziertes Hermes-4-14B + Delegation (NICHT model:auto)
|
||||
In `~/.hermes/config.yaml`:
|
||||
```yaml
|
||||
model:
|
||||
provider: openai # NICHT 'custom' → Hänger-Bug #26489
|
||||
base_url: http://127.0.0.1:4000/v1
|
||||
default: Hermes-4-14B
|
||||
provider: custom
|
||||
base_url: http://127.0.0.1:9001/v1
|
||||
api_key: local
|
||||
name: auto # schnell im Alltag, eskaliert auf heavy
|
||||
model: hermes # Hermes' eigenes Hirn (Alias→Hermes-4-14B), NICHT 'auto'
|
||||
delegation:
|
||||
model: heavy # harte Teilaufgaben → Qwen3.5-122B
|
||||
provider: custom
|
||||
base_url: http://127.0.0.1:9001/v1
|
||||
api_key: local
|
||||
orchestrator_enabled: true
|
||||
subagent_auto_approve: true
|
||||
```
|
||||
`model:auto` bleibt ausschließlich Gateway-Funktion für Vibe Coding/IDEs.
|
||||
|
||||
## 5. Tools/MCP verdrahten (der eigentliche Fix)
|
||||
Hermes' Tools sind by-default AUS. Aktivieren:
|
||||
- **Built-in:** terminal/shell, read_file/search_files, file-ops. `approvals: auto` (rein lokal).
|
||||
- **MCP-Server** (`hermes mcp` oder config `mcp_servers`):
|
||||
- geteiltes Gedächtnis: `python /opt/mission-control-2/mcp/mcp_memory.py` (Env `MC_URL=http://127.0.0.1:9001`)
|
||||
- Stack-Management: `python /opt/mission-control-2/mcp/mcp_mc.py` (Env `MC_URL=http://127.0.0.1:9001`)
|
||||
- **SSH→Windows-PC** (voller Zugriff auf deinen PC): OpenSSH-Server auf Windows aktiv + Key
|
||||
`~/.ssh/id_ed25519_hermes_agent` autorisiert; Hermes nutzt sein Shell-Tool für `ssh TobisPC@<win-ip> …`.
|
||||
- **100 % lokal:** Hermes' eingebauter web_search/browser laufen über Nous Portal (Cloud). Für rein
|
||||
lokal stattdessen einen **lokalen Browser-/Such-MCP** binden (optional, später).
|
||||
## 5. Tools/MCP verdrahten — UND kaputte Tools abschalten (Thrash-Fix!)
|
||||
- **Kaputte/Cloud-Tools global abschalten** (sonst Endlos-Loops, siehe Memory `hermes-thrash-rootcause-fix`):
|
||||
```yaml
|
||||
agent:
|
||||
disabled_toolsets: [browser, vision, computer_use, image_gen, tts, video, video_gen, memory]
|
||||
memory:
|
||||
memory_enabled: false
|
||||
user_profile_enabled: false
|
||||
```
|
||||
⚠️ `hermes tools disable <x>` wirkt nur für die cli-Plattform, **nicht den api_server** — nutze
|
||||
`agent.disabled_toolsets` (gilt für ALLE Plattformen).
|
||||
- **Behalten:** terminal/shell, file, code_execution, skills, todo, session_search, clarify,
|
||||
delegation, cronjob, web. `approvals: auto` (rein lokal).
|
||||
- **MCP-Server** (`mcp_servers` in config) — laufen über die v1-venv (hat das `mcp`-Modul):
|
||||
- geteiltes Gedächtnis: `/opt/mission-control/.venv/bin/python ~/mission-control-v2/mcp/mcp_memory.py` (Env `MC_URL=http://127.0.0.1:9001`)
|
||||
- Stack-Management: `… ~/mission-control-v2/mcp/mcp_mc.py` (Env `MC_URL=http://127.0.0.1:9001`)
|
||||
- **SSH→Windows-PC** (voller Zugriff): OpenSSH-Server auf Windows aktiv + Key
|
||||
`~/.ssh/id_ed25519_hermes_agent` autorisiert; Hermes nutzt sein terminal-Tool für `ssh TobisPC@<win-ip>`.
|
||||
|
||||
## 6. Verifikation
|
||||
- WebUI öffnet vom Windows-PC, Chat antwortet (Brain via Gateway).
|
||||
- Hermes kann via `mcp_mc` ein Modell listen/Routing ändern (`list_models`, `set_route`).
|
||||
- Hermes erreicht den Windows-PC (SSH-Kommando) und das Netz.
|
||||
- 14B-Loop weg (Guard-Beschreibungen in mcp_memory + tool-fähiges Brain).
|
||||
- `curl :8642/v1/chat/completions` „bist du da?" → kurze Antwort in wenigen Sekunden, **kein** Tool-Loop
|
||||
im `journalctl --user -u hermes-gateway`; llama-swap `/running` zeigt `Hermes-4-14B`.
|
||||
- WebUI öffnet vom Windows-PC, Chat antwortet.
|
||||
- Hermes kann via `mcp_mc` Modelle listen/Routing ändern; erreicht (nach §5-SSH) den Windows-PC.
|
||||
|
||||
Reference in New Issue
Block a user