📊 auto-update: system snapshot 2026-06-22

This commit is contained in:
Floki 2026-06-22 13:01:07 +02:00
parent bc99874bc7
commit b9485f5384
6 changed files with 373 additions and 90 deletions

View File

@ -0,0 +1,88 @@
# LiteLLM Integration — Zukünftiger Plan
> **Status:** Zurückgestellt ( Juni 2026 )
> **Grund:** Aktuell wird alles direkt über Ollama (lokal) und OpenRouter (API) genutzt. LiteLLM als Proxy ist nicht notwendig solange wir nur 2-3 Provider haben.
## Was ist LiteLLM?
**LiteLLM** ist ein **OpenAI-kompatibler LLM Proxy / API Gateway**.
```
Dein Code → LiteLLM Proxy (:4000) → OpenRouter / Ollama / Anthropic / Google / ...
```
### Vorteile
| Feature | Beschreibung |
|---------|-------------|
| **Einheitliche API** | OpenAI-kompatible API für ALLE Anbieter |
| **Multi-Provider Fallback** | Automatischer Wechsel bei Ausfall |
| **Kosten-Tracking** | Token-Nutzung pro Anbieter tracken |
| **Rate Limiting** | Zentrale Kontrolle |
| **Load Balancing** | Requests auf mehrere Keys verteilen |
## Wann LiteLLM sinnvoll wird
- **5+ AI-Provider** gleichzeitig
- **Automatisches Failover** zwischen Anbietern nötig
- **Kosten-Tracking** pro Team/User
- **Rate Limiting** für verschiedene User-Gruppen
- **Model-Routing** (einfache Anfragen → billiges Modell, komplexe → teures)
## Konfiguration (für später)
### docker-compose.yml
```yaml
litellm:
image: ghcr.io/berriai/litellm:latest
ports:
- "4000:4000"
volumes:
- ./litellm-config.yaml:/app/config.yaml
environment:
- OPENROUTER_API_KEY=${OPENROUTER_KEY_PRIMARY}
- OPENROUTER_FALLBACK_KEY=${OPENROUTER_KEY_FALLBACK1}
- OLLAMA_BASE_URL=http://ollama:11434
```
### litellm-config.yaml
```yaml:
model_list:
- model_name: hermes-default
litellm_params:
model: openrouter/anthropic/claude-sonnet-4
api_key: ${OPENROUTER_KEY_PRIMARY}
- model_name: hermes-fast
litellm_params:
model: openrouter/google/gemini-2.0-flash-001:free
api_key: ${OPENROUTER_KEY_FALLBACK1}
- model_name: hermes-local
litellm_params:
model: ollama/llama3.1:8b
api_base: http://ollama:11434
fallbacks:
- hermes-default: [hermes-fast, hermes-local]
- hermes-fast: [hermes-local]
```
### Nächste Schritte (wenn implementiert)
1. LiteLLM Container in docker-compose.yml
2. Config mit allen Providern
3. Scripts auf `localhost:4000/v1/chat/completions` umstellen
4. Fallback-Konfiguration testen
5. Kosten-Tracking Dashboard
## Aktueller Stand (Juni 2026)
- ❌ LiteLLM Container läuft OHNE Konfiguration
- ✅ Ollama direkt: `http://localhost:11434`
- ✅ OpenRouter direkt: `https://openrouter.ai/api/v1`
- ✅ API Key Rotation: PRIMARY → FALLBACK1 → Ollama
## Referenzen
- Docs: https://docs.litellm.ai/
- GitHub: https://github.com/BerriAI/litellm
- Docker: https://docs.litellm.ai/docs/proxy/docker

View File

@ -0,0 +1,189 @@
# LiteLLM Re-Implementierungsplan
> Erstellt: 2026-06-22
> Status: ⏳ Idee / Backlog
## 🎯 Ziel
LiteLLM als **LLM Proxy / API Gateway** wieder einfach nutzen — aber diesmal **richtig konfiguriert** und **optional** (Fallback auf direkte Ollama/OpenRouter-Calls).
## 📋 Aktueller Stand (Juni 2026)
- ❌ LiteLLM Container wurde entfernt
- ❌ Scanner, Memory (ChromaDB), Redis wurden entfernt
- ✅ Ollama läuft direkt auf localhost:11434
- ✅ OpenRouter Keys sind in .env hinterlegt
- ✅ YouTube-Watcher nutzt Ollama direkt
## 🔄 Warum LiteLLM wieder einführen?
| Vorteil | Beschreibung |
|---------|--------------|
| **Einheitliche API** | OpenAI-kompatible API für ALLE Anbieter |
| **Multi-Provider Fallback** | Automatischer Wechsel bei 429/Outage |
| **Kosten-Tracking** | Token-Nutzung pro Anbieter tracken |
| **Rate Limiting** | Zentrale Kontrolle |
| **Model-Routing** | Automatisches Routing basierend auf Availability |
## 🏗️ Architektur (geplant)
```
┌─────────────────────────────────────────────────────────┐
│ KPT-LABS System │
│ │
│ Dashboard / Scripts / Bots │
│ │ │
│ ▼ │
│ ┌─────────────┐ ┌──────────────┐ │
│ │ LiteLLM │────▶│ OpenRouter │ (Primary) │
│ │ Proxy │ └──────────────┘ │
│ │ :4000 │ ┌──────────────┐ │
│ │ │────▶│ Ollama │ (Local, Free) │
│ │ │ │ :11434 │ │
│ │ │ └──────────────┘ │
│ │ │ ┌──────────────┐ │
│ │ │────▶│ NVIDIA API │ (Backup) │
│ └─────────────┘ └──────────────┘ │
│ │
│ Fallback-Kette: │
│ OpenRouter PRIMARY → OpenRouter FALLBACK1 → Ollama │
└─────────────────────────────────────────────────────────┘
```
## 📝 Konfiguration (config.yaml)
```yaml
model_list:
# === OpenRouter (Primary) ===
- model_name: "openrouter/primary"
litellm_params:
model: "openrouter/anthropic/claude-sonnet-4"
api_key: "${OPENROUTER_KEY_PRIMARY}"
# === OpenRouter (Fallback 1) ===
- model_name: "openrouter/fallback1"
litellm_params:
model: "openrouter/anthropic/claude-sonnet-4"
api_key: "${OPENROUTER_KEY_FALLBACK1}"
# === Ollama (Local, Free) ===
- model_name: "ollama/llama3.1:8b"
litellm_params:
model: "ollama/llama3.1:8b"
api_base: "http://localhost:11434"
- model_name: "ollama/gemma4:12b"
litellm_params:
model: "ollama/gemma4:12b"
api_base: "http://localhost:11434"
# === NVIDIA (Backup) ===
- model_name: "nvidia/backup"
litellm_params:
model: "nvidia/nemotron-3-ultra-550b"
api_key: "${NVIDIA_API_KEY}"
# Router Settings
router_settings:
routing_strategy: "simple-shuffle"
fallbacks:
- ["openrouter/primary"]: ["openrouter/fallback1"]
- ["openrouter/fallback1"]: ["ollama/llama3.1:8b"]
- ["ollama/llama3.1:8b"]: ["ollama/gemma4:12b"]
# General Settings
general_settings:
master_key: "${LITELLM_MASTER_KEY}"
database_url: "sqlite:///litellm.db"
```
## 🐳 Docker Compose (geplant)
```yaml
services:
litellm:
image: ghcr.io/berriai/litellm:latest
ports:
- "4000:4000"
volumes:
- ./litellm/config.yaml:/app/config.yaml
env_file: .env
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4000/health"]
interval: 30s
timeout: 10s
retries: 3
```
## 🔧 Anpassungen im KPT-LABS Code
### 1. YouTube-Watcher (`yt_pipeline_v8.py`)
```python
# Vorher (direkt Ollama):
OLLAMA_URL = "http://localhost:11434"
# Nachher (über LiteLLM):
LITELLM_URL = "http://localhost:4000"
MODEL = "ollama/llama3.1:8b" # oder "openrouter/primary"
```
### 2. API Key Rotation (`api_key_monitor.py`)
```python
# Vorher: Direkte OpenRouter-Calls
# Nachher: LiteLLM Health-Check + Key-Rotation
LITELLM_URL = "http://localhost:4000"
```
### 3. Dashboard API
```python
# Vorher: Direkte Ollama-Calls
# Nachher: LiteLLM Proxy
```
## 📊 Kostenvergleich
| Anbieter | Kosten | Geschwindigkeit | Verfügbarkeit |
|----------|--------|-----------------|---------------|
| Ollama (lokal) | $0 | ~3-15s | 24/7 |
| OpenRouter Primary | ~$1/Tag | ~1-3s | Rate-Limited |
| OpenRouter Fallback1 | ~$1/Tag | ~1-3s | Rate-Limited |
| NVIDIA | ~$0.50/Tag | ~2-5s | Rate-Limited |
## 🚀 Implementierungsplan
### Phase 1: LiteLLM Grundkonfiguration
- [ ] `litellm/config.yaml` erstellen
- [ ] Docker Compose Service hinzufügen
- [ ] Health-Check testen
- [ ] Model-Liste verifizieren
### Phase 2: Fallback-Kette testen
- [ ] OpenRouter 429 simulieren
- [ ] Automatischer Wechsel zu Ollama testen
- [ ] Latenz messen
### Phase 3: KPT-LABS Code anpassen
- [ ] YouTube-Watcher auf LiteLLM umstellen
- [ ] API Key Rotation anpassen
- [ ] Dashboard API anpassen
### Phase 4: Monitoring
- [ ] LiteLLM Dashboard aktivieren
- [ ] Kosten-Tracking einrichten
- [ ] Alerts bei 429/Outage
## ⚠️ Risiken
- **Single Point of Failure**: Wenn LiteLLM down → kein LLM verfügbar
- **Mitigation**: Fallback auf direkte Ollama-Calls im Code
- **Komplexität**: Mehr Moving Parts
- **Mitigation**: Einfache Config, gutes Monitoring
- **Kosten**: LiteLLM selbst ist kostenlos, aber OpenRouter-Kosten bleiben
## 📚 Referenzen
- [LiteLLM Docs](https://docs.litellm.ai/)
- [LiteLLM Docker](https://docs.litellm.ai/docs/proxy/docker)
- [OpenRouter API](https://openrouter.ai/docs/api-reference/overview)
- [Ollama API](https://github.com/ollama/ollama/blob/main/docs/api.md)

View File

@ -28,6 +28,16 @@
| 3 | YouTube-Watcher als Service | Business-Plan | | 3 | YouTube-Watcher als Service | Business-Plan |
| 4 | Custom AI-Lösungen | Business-Plan | | 4 | Custom AI-Lösungen | Business-Plan |
| 5 | Dashboard-Templates & Plugins | Business-Plan | | 5 | Dashboard-Templates & Plugins | Business-Plan |
| 6 | **LiteLLM Re-Implementation** | [Idee/Plan](Ideen/LiteLLM-Re-Implementation.md) |
## ✅ Abgeschlossen (2026-06-22)
- ✅ YouTube-Watcher v8 — volle Pipeline (Subs → Translate → Summary → Vault)
- ✅ Cron-Jobs auf standalone Python Scripts umgestellt (kein Next.js API mehr)
- ✅ Docker Container bereinigt (Scanner, Memory, Redis, LiteLLM entfernt)
- ✅ Ollama als primärer LLM Provider (llama3.1:8b)
- ✅ faster-whisper im System-Python installiert
- ✅ API Key Monitor Script erstellt
## ✅ Abgeschlossen (2026-06-21) ## ✅ Abgeschlossen (2026-06-21)

View File

@ -8,12 +8,14 @@
| Komponente | Port | Tech | Status | | Komponente | Port | Tech | Status |
|-----------|------|------|--------| |-----------|------|------|--------|
| Dashboard | :5555 | Next.js + SQLite | ✅ Läuft | || Dashboard | :3000 | Next.js + SQLite | ✅ Läuft |
| Hermes Gateway | :8787 | FastAPI | ✅ Läuft | || Hermes Gateway | :8787 | FastAPI | ✅ Läuft |
| LiteLLM Proxy | :4000 | Docker | ✅ Läuft | || Ollama | :11434 | Lokal | ✅ Läuft |
| Redis | :6379 | Docker | ✅ Läuft | || Gitea | intern | Docker | ✅ Läuft |
| Ollama | :11434 | Lokal | ✅ Läuft |
| Gitea | intern | Docker | ✅ Läuft | > **Hinweis (2026-06-22)**: LiteLLM Proxy, Redis, Scanner und Memory (ChromaDB) wurden entfernt.
> KPT-LABS nutzt jetzt Ollama direkt + OpenRouter als Backup.
> Re-Implementierungsplan für LiteLLM: `05-Dashboard/Ideen/LiteLLM-Re-Implementation.md`
## 📂 Pfade ## 📂 Pfade

View File

@ -1,5 +1,5 @@
{ {
"timestamp": "2026-06-22T09:10:22.618361", "timestamp": "2026-06-22T13:01:06.823133",
"version": "2.0.0", "version": "2.0.0",
"tokenUsage24h": { "tokenUsage24h": {
"requests": 0, "requests": 0,
@ -16,8 +16,8 @@
"failures": 0 "failures": 0
}, },
"vault": { "vault": {
"totalFiles": 34, "totalFiles": 36,
"totalSizeKB": 86 "totalSizeKB": 97
}, },
"scheduledTasks": { "scheduledTasks": {
"total": 0, "total": 0,

156
README.md
View File

@ -1,6 +1,6 @@
# 🚀 KPT-LABS Agent OS — System Recovery & Onboarding Guide # 🚀 KPT-LABS Agent OS — System Recovery & Onboarding Guide
> **Letzte Aktualisierung:** 22.06.2026 09:10 | **Version:** 2.0.0 > **Letzte Aktualisierung:** 22.06.2026 13:01 | **Version:** 2.0.0
> **Vault Hash:** `v1.0-20260619-1400` > **Vault Hash:** `v1.0-20260619-1400`
--- ---
@ -28,13 +28,15 @@ Das KPT-LABS Agent OS ist ein **Multi-Agent Dashboard** mit folgenden Kernkompon
| Komponente | Beschreibung | Port/Ort | | Komponente | Beschreibung | Port/Ort |
|------------|-------------|----------| |------------|-------------|----------|
| **Dashboard** | Next.js Web-UI | `http://localhost:5555` | || **Dashboard** | Next.js Web-UI | `http://localhost:3000` |
| **Datenbank** | SQLite (better-sqlite3) | `dashboard/data/kptlabs.db` | || **Datenbank** | SQLite (better-sqlite3) | `dashboard/data/kptlabs.db` |
| **Obsidian Vault** | Wissensdatenbank | `E:\OpenCode_Projekte\obsidianVault` | || **Obsidian Vault** | Wissensdatenbank | `E:\OpenCode_Projekte\obsidianVault` |
| **Hermes Gateway** | Telegram/Discord Bot | `localhost:8642` | || **Hermes Gateway** | Telegram/Discord Bot | `localhost:8642` |
| **LiteLLM Proxy** | LLM API Proxy | `localhost:4000` | || **Ollama** | LLM API (lokal) | `localhost:11434` |
| **Redis** | Cache/Session Store | `localhost:6379` |
| **Memory Service** | Agent Memory | `localhost:5002` | > **Hinweis**: LiteLLM Proxy, Redis, Scanner und Memory (ChromaDB) wurden entfernt (2026-06-22).
> KPT-LABS nutzt jetzt **OpenRouter direkt** (Primary + Fallback) + **Ollama als lokalen Fallback**.
> Re-Implementierungsplan für LiteLLM: `05-Dashboard/Ideen/LiteLLM-Re-Implementation.md`
### Architektur-Diagramm ### Architektur-Diagramm
@ -45,22 +47,24 @@ Das KPT-LABS Agent OS ist ein **Multi-Agent Dashboard** mit folgenden Kernkompon
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────────┐ │ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────────────┐ │
│ │ Dashboard │ │ Hermes │ │ Telegram/Discord │ │ │ │ Dashboard │ │ Hermes │ │ Telegram/Discord │ │
│ │ (Next.js) │ │ Gateway │ │ Bots │ │ │ │ (Next.js) │ │ Gateway │ │ Bots │ │
│ │ Port 5555 │ │ Port 8642 │ │ │ │ │ │ Port 3000 │ │ Port 8642 │ │ │ │
│ └──────┬───────┘ └──────┬──────┘ └──────────┬──────────┘ │ │ └──────┬───────┘ └──────┬──────┘ └──────────┬──────────┘ │
│ │ │ │ │ │ │ │ │ │
│ └─────────────────┼─────────────────────┘ │ │ └─────────────────┼─────────────────────┘ │
│ │ │ │ │ │
│ ┌──────┴──────┐ │ │ ┌──────┴──────┐ │
│ │ LLM APIs │ │ │ │ Ollama │ ← LLM API (lokal, free) │
│ │ (OpenRouter │ │ │ │ :11434 │ │
│ │ Anthropic │ │ │ └─────────────┘ │
│ │ OpenAI...) │ │ │ ┌─────────────┐ │
│ │ OpenRouter │ ← Backup (API Keys) │
│ │ (direkt) │ │
│ └─────────────┘ │ │ └─────────────┘ │
│ │ │ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────────┐ │ ┌─────────────┐ ┌─────────────┐
│ │ SQLite DB │ │ Obsidian │ │ Docker │ │ │ SQLite DB │ │ Obsidian │
│ │ (kptlabs) │ │ Vault │ │ (LiteLLM,Redis) │ │ │ (kptlabs) │ │ Vault │
│ └─────────────┘ └─────────────┘ └─────────────────────┘ │ └─────────────┘ └─────────────┘
└─────────────────────────────────────────────────────────────┘ └─────────────────────────────────────────────────────────────┘
``` ```
@ -71,7 +75,7 @@ Das KPT-LABS Agent OS ist ein **Multi-Agent Dashboard** mit folgenden Kernkompon
### Voraussetzungen ### Voraussetzungen
- Node.js 18+ & npm - Node.js 18+ & npm
- Git - Git
- Docker & Docker Compose - Ollama (optional, für lokale LLM)
- Obsidian (optional, für Vault) - Obsidian (optional, für Vault)
### Git Setup (bereits konfiguriert) ### Git Setup (bereits konfiguriert)
@ -112,15 +116,16 @@ npm install
npm run build npm run build
npm start npm start
# 3. Docker Services (LiteLLM, Redis) # 3. Ollama (optional, für lokale LLM)
docker-compose up -d # Ollama installieren: https://ollama.com
ollama pull llama3.1:8b
# 4. Hermes Gateway (optional) # 4. Hermes Gateway (optional)
hermes setup hermes setup
hermes gateway start hermes gateway start
# 5. Öffne Dashboard # 5. Öffne Dashboard
open http://localhost:5555 open http://localhost:3000
``` ```
### Erste Schritte ### Erste Schritte
@ -219,23 +224,23 @@ SELECT * FROM tasks WHERE status != 'done';
--- ---
## 🔑 API-Keys & Credentials ## 🔑 API-Keys & Credentials
### Provider-Konfiguration ### Provider-Konfiguration
| Provider | API-Key env var | Status | | Provider | API-Key env var | Status |
|----------|----------------|--------| |----------|----------------|--------|
| OpenRouter | `OPENROUTER_API_KEY` | ✅ Aktiv | | OpenRouter Primary | `OPENROUTER_KEY_PRIMARY` | ✅ Primär |
| Anthropic | `ANTHROPIC_API_KEY` | ⬜ Optional | | OpenRouter Fallback1 | `OPENROUTER_KEY_FALLBACK1` | ✅ Fallback |
| OpenAI | `OPENAI_API_KEY` | ⬜ Optional | | NVIDIA | `OPENROUTER_KEY_FALLBACK2` | ⚠️ Inaktiv |
| DeepSeek | `DEEPSEEK_API_KEY` | ⬜ Optional | | Ollama (lokal) | — | ✅ Lokaler Fallback (llama3.1:8b, gemma4:12b) |
### Hermes Auth ### Hermes Auth
```bash ```bash
# Credentials anzeigen # Credentials anzeigen
hermes auth list hermes auth list
# Neuen Key hinzufügen # API Keys in .env hinterlegen:
hermes auth add openrouter # OPENROUTER_KEY_PRIMARY=sk-or-...
hermes auth add anthropic # OPENROUTER_KEY_FALLBACK1=sk-or-...
# Token-Status prüfen # Token-Status prüfen
hermes status hermes status
@ -253,27 +258,12 @@ hermes status
| Service | Port | Starten | Status | | Service | Port | Starten | Status |
|---------|------|---------|--------| |---------|------|---------|--------|
| Dashboard | 5555 | `npm start` (in dashboard/) | 🟢 | | Dashboard | 3000 | `npm start` (in dashboard/) | 🟢 |
| Hermes Gateway | 8642 | `hermes gateway start` | 🟢 | | Hermes Gateway | 8642 | `hermes gateway start` | 🟢 |
| LiteLLM Proxy | 4000 | `docker-compose up -d` | 🟢 | | Ollama | 11434 | `ollama serve` | 🟢 |
| Redis | 6379 | `docker-compose up -d` | 🟢 |
| Memory Service | 5002 | `docker-compose up -d` | 🟢 |
### Docker Services > **Hinweis**: LiteLLM Proxy, Redis, Scanner und Memory (ChromaDB) wurden entfernt.
```bash > Nutze stattdessen Ollama direkt (:11434) und OpenRouter als Backup.
# Starten
cd KPT-LABS
docker-compose up -d
# Stoppen
docker-compose down
# Logs
docker-compose logs -f
# Status
docker-compose ps
```
--- ---
@ -321,7 +311,7 @@ npm run build
npm start npm start
# 3. Testen # 3. Testen
curl http://localhost:5555/api/system curl http://localhost:3000/api/system
``` ```
--- ---
@ -373,13 +363,13 @@ docker-compose up -d
### Schritt 3: Verifizieren ### Schritt 3: Verifizieren
```bash ```bash
# Dashboard öffnen # Dashboard öffnen
open http://localhost:5555 open http://localhost:3000
# System Status prüfen # System Status prüfen
curl http://localhost:5555/api/system | jq '.status' curl http://localhost:3000/api/system | jq '.status'
# Obsidian Sync prüfen # Obsidian Sync prüfen
curl http://localhost:5555/api/obsidian/sync | jq '.vaultStats' curl http://localhost:3000/api/obsidian/sync | jq '.vaultStats'
``` ```
--- ---
@ -410,23 +400,15 @@ curl http://localhost:5555/api/obsidian/sync | jq '.vaultStats'
## 📅 Cron-Jobs ## 📅 Cron-Jobs
| Job | Zeit | API-Call | | Job | Zeit | Script |
|-----|------|----------| |-----|------|--------|
| Daily Backup | 03:00 | `POST /api/cron/backup` | | System Snapshot | Stündlich | `python system_snapshot_v2.py` |
| Weekly Report | Montag 09:00 | `POST /api/cron/weekly-report` | | Daily Backup | 03:00 | `python daily_backup.py` |
| Obsidian Sync Check | Alle 6h | `GET /api/obsidian/sync` | | Obsidian Sync Check | Alle 6h | `python obsidian_sync_check.py` |
| Weekly Report | Montag 09:00 | `python weekly_report.py` |
### Cron-Jobs verwalten > **Hinweis**: Alle Cron-Jobs laufen als **standalone Python Scripts** — keine Next.js API-Calls mehr.
```bash > Das umgeht das Auth/Redirect Problem.
# Liste
hermes cron list
# Erstellen
hermes cron create "Name" "Prompt" "Schedule"
# Manuell ausführen
hermes cron run <ID>
```
--- ---
@ -439,7 +421,7 @@ cd dashboard
npm run build 2>&1 | tail -20 npm run build 2>&1 | tail -20
# Port prüfen # Port prüfen
netstat -ano | findstr :5555 netstat -ano | findstr :3000
# Neu starten # Neu starten
pkill -f next pkill -f next
@ -460,7 +442,7 @@ sqlite3 dashboard/data/kptlabs.db < backup.sql
### Obsidian Sync Fehler ### Obsidian Sync Fehler
```bash ```bash
# Manuell synchronisieren # Manuell synchronisieren
curl -X POST http://localhost:5555/api/obsidian/sync \ curl -X POST http://localhost:3000/api/obsidian/sync \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{"action":"list-sessions"}' -d '{"action":"list-sessions"}'
``` ```
@ -468,7 +450,7 @@ curl -X POST http://localhost:5555/api/obsidian/sync \
### API-Key Probleme ### API-Key Probleme
```bash ```bash
# Testen # Testen
curl http://localhost:5555/api/system curl http://localhost:3000/api/system
# Neustart mit frischem Port # Neustart mit frischem Port
pkill -f next && sleep 2 && npm start pkill -f next && sleep 2 && npm start
@ -515,7 +497,7 @@ pkill -f next && sleep 2 && npm start
## 🔗 Nützliche Links ## 🔗 Nützliche Links
- **Dashboard**: http://localhost:5555 - **Dashboard**: http://localhost:3000
- **Hermes Docs**: https://hermes-agent.nousresearch.com/docs - **Hermes Docs**: https://hermes-agent.nousresearch.com/docs
- **OpenRouter**: https://openrouter.ai/keys - **OpenRouter**: https://openrouter.ai/keys
- **Obsidian**: https://obsidian.md - **Obsidian**: https://obsidian.md
@ -538,21 +520,33 @@ go install github.com/opencode-ai/opencode@latest
### Konfiguration für KPT-LABS ### Konfiguration für KPT-LABS
Opencode nutzt lokale Modelle via LiteLLM Proxy: Opencode nutzt Ollama direkt oder OpenRouter als Backup:
```bash ```bash
# ~/.config/opencode/config.yaml # ~/.config/opencode/config.yaml
model: "hermes-default" # LiteLLM Proxy Model # Option A: Ollama (lokal, kostenlos)
base_url: "http://localhost:4000/v1" model: "llama3.1:8b"
api_key: "dummy" # LiteLLM braucht keinen echten Key base_url: "http://localhost:11434/v1"
api_key: "ollama"
# Option B: OpenRouter (Backup)
# model: "openrouter/anthropic/claude-sonnet-4"
# base_url: "https://openrouter.ai/api/v1"
# api_key: "sk-or-..."
``` ```
Oder als Umgebungsvariablen: Oder als Umgebungsvariablen:
```bash ```bash
export OPENAI_BASE_URL=http://localhost:4000/v1 # Ollama
export OPENAI_API_KEY=dummy export OPENAI_BASE_URL=http://localhost:11434/v1
export MODEL=hermes-default export OPENAI_API_KEY=ollama
export MODEL=llama3.1:8b
# OpenRouter (Backup)
# export OPENAI_BASE_URL=https://openrouter.ai/api/v1
# export OPENAI_API_KEY=sk-or-...
# export MODEL=openrouter/anthropic/claude-sonnet-4
``` ```
### Opencode starten ### Opencode starten
@ -627,7 +621,7 @@ opencode "Lies die Spec in 02-Projekte\Feature-X.md und implementiere Phase 1"
- [ ] Dashboard geöffnet und Login getestet - [ ] Dashboard geöffnet und Login getestet
- [ ] Obsidian Vault Pfad geprüft - [ ] Obsidian Vault Pfad geprüft
- [ ] API-Keys vorhanden (`.env`) - [ ] API-Keys vorhanden (`.env`)
- [ ] Docker Services laufend - [ ] Ollama läuft (`ollama serve`)
- [ ] Erste Chat-Nachricht gesendet - [ ] Erste Chat-Nachricht gesendet
- [ ] Token-Tracking geprüft - [ ] Token-Tracking geprüft
- [ ] Backup getestet - [ ] Backup getestet