134 lines
4.3 KiB
Markdown
134 lines
4.3 KiB
Markdown
> Automatisch generiert von OWL am 2026-06-21
|
|
> Dieses File dient als externes Memory für Hermes Agent
|
|
> NICHT manuell bearbeiten — wird bei jedem Memory-Update überschrieben
|
|
|
|
# KPT-LABS Systemübersicht
|
|
|
|
## 🏗️ Architektur
|
|
|
|
| Komponente | Port | Tech | Status |
|
|
|-----------|------|------|--------|
|
|
| Dashboard | :5555 | Next.js + SQLite | ✅ Läuft |
|
|
| Hermes Gateway | :8787 | FastAPI | ✅ Läuft |
|
|
| LiteLLM Proxy | :4000 | Docker | ✅ Läuft |
|
|
| Redis | :6379 | Docker | ✅ Läuft |
|
|
| Ollama | :11434 | Lokal | ✅ Läuft |
|
|
| Gitea | intern | Docker | ✅ Läuft |
|
|
|
|
## 📂 Pfade
|
|
|
|
- **Projekt**: `E:\OpenCode_Projekte\KPT-LABS`
|
|
- **Dashboard**: `E:\OpenCode_Projekte\KPT-LABS\dashboard`
|
|
- **Database**: `E:\OpenCode_Projekte\KPT-LABS\dashboard\data\kptlabs.db`
|
|
- **Obsidian Vault**: `E:\OpenCode_Projekte\obsidianVault`
|
|
- **Logs**: `E:\OpenCode_Projekte\KPT-LABS\logs`
|
|
- **System Scripts**: `E:\OpenCode_Projekte\KPT-LABS\system`
|
|
|
|
## 🗄️ Database Schema (wichtigste Tabellen)
|
|
|
|
### Core
|
|
- `users` — Benutzer (FK@KPT-LABS)
|
|
- `sessions` — Chat-Sessions
|
|
- `messages` — Nachrichten
|
|
- `projects` — Projekte
|
|
- `scheduled_tasks` — Geplante Tasks (Cron)
|
|
|
|
### YouTube
|
|
- `yt_playlists` — Playlists
|
|
- `yt_videos` — Videos
|
|
- `yt_summaries` — KI-Zusammenfassungen
|
|
- `yt_ideas` — Aus Videos generierte Ideen
|
|
- `yt_watcher_state` — Watcher Status
|
|
|
|
### Wissensbank
|
|
- `knowledge_entries` — Erkenntnisse
|
|
- `dashboard_ideas` — Dashboard-Verbesserungen
|
|
- `knowledge_idea_links` — Verknüpfungen
|
|
|
|
### Agenten
|
|
- `agents` — Agenten-Registry (hermes, youtube-watcher, scout, forge, researcher)
|
|
- `agent_activities` — Aktivitäten
|
|
|
|
### Token & Provider
|
|
- `token_usage` — API-Request-Logging
|
|
- `provider_health` — Provider-Status
|
|
- `token_budgets` — Budget-Limits
|
|
|
|
### Inbox
|
|
- `inbox_entries` — Ungefilterte Einträge (text, link, voice, idea)
|
|
- `is_selected` — Markierung
|
|
- `is_archived` — Archiv-Status
|
|
- `moved_to` — Wohin verschoben (task/idea)
|
|
- `moved_to_id` — ID im Zielsystem
|
|
|
|
## 🤖 Agenten
|
|
|
|
| Agent | ID | Funktion |
|
|
|-------|----|----------|
|
|
| Hermes | `hermes` | Haupt-Agent (Chat, Research, Code) |
|
|
| YouTube Watcher | `youtube-watcher` | Playlist-Monitoring, Transkription, Summary |
|
|
| Scout | `scout` | Scannt neue Modelle/Technologien |
|
|
| Forge | `forge` | Code-Generation, Refactoring |
|
|
| Researcher | `researcher` | Deep Research, Synthese |
|
|
|
|
## 🔑 API-Keys
|
|
|
|
- **OpenRouter**: PRIMARY + FALLBACK1 (2 Keys)
|
|
- **Ollama**: Lokal (unbegrenzt, kostenlos)
|
|
- **NVIDIA**: 1 Key
|
|
- **Google**: 1 Key
|
|
|
|
Multi-Key-Rotation: OpenRouter Primary → Fallback1 → Ollama (lokal)
|
|
|
|
## 🖥️ Hardware
|
|
|
|
- **CPU**: AMD Ryzen 9 5900X (12C/24T)
|
|
- **RAM**: 64 GB
|
|
- **GPU**: Radeon RX Vega 4GB (kein NVIDIA — keine CUDA)
|
|
- **OS**: Windows 10
|
|
|
|
## 🐍 Python
|
|
|
|
- `python` = Python 3.11.15 (NICHT `python3` — das ist MS Store Redirect)
|
|
- `uv` installiert
|
|
- `faster-whisper` installiert (small model, CPU int8)
|
|
|
|
## 📝 .env / Umgebungsvariablen
|
|
|
|
- `TELEGRAM_BOT_TOKEN` — Fehlt noch! Muss gesetzt werden für Telegram Bot
|
|
- `CRON_SECRET` = `kpt-labs-cron-2026`
|
|
|
|
## ⚠️ Bekannte Issues
|
|
|
|
### yt-dlp
|
|
- YouTube Block without cookies → Fix: `--extractor-args "youtube:client=android"`
|
|
- Manchmal 403 Forbidden → Android Client + PO Token
|
|
- yt-dlp als CLI hat Venv/urllib3 Konflikte → Workaround: System Python mit clean PATH
|
|
|
|
### Hermes Venv
|
|
- Alter urllib3 breaking System Python → Fix: `PYTHONPATH=""` prefix
|
|
|
|
### Gitea Push
|
|
- Große Repos (>1000 Dateien) → hängt bei git-receive-pack
|
|
- Fix: URL-encode creds, `core.compression=0`, `http.postBuffer=104857600`
|
|
|
|
### Next.js TypeScript
|
|
- Pre-existing TS Fehler in node_modules (RuleSetUseItem, esModuleInterop etc.)
|
|
- Blockieren NICHT den Build — sind in Next.js dependencies
|
|
|
|
## 🔧 Tool Quirks (Windows)
|
|
|
|
1. `patch` mit Backtick/SQL Content → Nutze `terminal` oder `write_file`
|
|
2. `write_file` relative Pfade → Nutze absolute Windows Pfade
|
|
3. `python3` → Nutze `python` (3.11.15)
|
|
4. `jq` → Fehlt, installieren via `winget`
|
|
5. `lsof` → Fehlt unter Windows → Nutze `netstat -ano` + `taskkill /F /PID`
|
|
6. Shell ist git-bash (MSYS) → POSIX Syntax, KEIN PowerShell
|
|
|
|
## 🌐 Gitea
|
|
|
|
- **URL**: `gitea.intern.kpt-lab.de`
|
|
- **Repo**: `fk/kpt-labs`
|
|
- **Auth**: HTTPS, Credentials in Windows Credential Manager
|
|
- **API**: Kann nur Repos erstellen & Release Assets hochladen, NICHT pushen
|