docs: Rewrite README.md with complete project overview

- Add full architecture diagram with all machines (FolzoCorp, EffiServer, NAS)
- Document all services on each machine with ports and roles
- Add memory management section (auto-unload scripts)
- Add project structure tree
- Update technologies list
- Add documentation links
This commit is contained in:
Folzo
2026-04-12 12:30:28 +02:00
parent b69dee1d3a
commit 952a9da41a
+236 -133
View File
@@ -1,15 +1,6 @@
# 🤖 Effi - Assistant IA Personnel Self-Hosted
Effi est un assistant IA personnel **100% auto-hébergé**, avec mémoire persistante entre sessions, discussion vocale (STT + TTS), et intégration avec les outils de productivité.
## 🎯 Objectifs
- **Assistant conversationnel** avec personnalité joyeuse et mécanismes de mémoire
- **Discussion vocale complète** : Speech-to-Text (Whisper) + Text-to-Speech (XTTS)
- **Mémoire persistante** entre les sessions via mémoire manuelle OpenWebUI
- **Intégration Joplin** (en cours) pour la prise de notes
- **Automatisation** via n8n et Sub Agent Tool
- **Infrastructure entièrement locale** - aucun appel API externe obligatoire
Effi est un assistant IA personnel **100% auto-hébergé**, avec mémoire persistante, discussion vocale, génération d'images/audio, et surveillance système.
---
@@ -17,161 +8,273 @@ Effi est un assistant IA personnel **100% auto-hébergé**, avec mémoire persis
### Infrastructure Multi-Machines
| Machine | IP | Rôle | Spécifications |
|---------|-----|------|----------------|
| **effi-server** | `192.168.1.27` | Serveur Docker principal | Intel J5040 / 8 GB RAM |
| **folzo-Corp** | `192.168.1.11` | LLM + STT + TTS | AMD Ryzen 5800X3D / RX 7800 XT 16GB VRAM / 32GB RAM |
| Machine | IP | Rôle | Services |
|---------|-----|------|----------|
| **effi-server** | `192.168.1.27` | Serveur Docker principal | OpenWebUI, Qdrant, n8n, Ollama proxy |
| **folzo-Corp** | `192.168.1.11` | LLM + STT + TTS + Gen | Ollama, ComfyUI, effi-stt, openedai-speech, kreuzberg |
| **NAS Synology** | `192.168.1.25` | Monitoring | Beszel Hub |
### Schéma Global (Configuration Actuelle)
### Schéma Global
```
┌─────────────────────────────────────────────────────────────────────────────┐
│ EFFI SERVER (192.168.1.27) │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Open WebUI │ │ Qdrant │ │ n8n │ │
│ │ Port 3000 │ │ Port 6333 │ │ Port 5678 │ │
│ └──────┬───────┘ └──────────────┘ └──────────────┘ │
│ │ │
│ ┌──────────────┐ │
│ │ wol-proxy │ │
│ │ Port 3011 │ │
│ └──────┬───────┘ │
└─────────┼───────────────────────────────────────────────────────────────────┘
│ Wake-on-LAN + Proxy
▼
┌─────────────────────────────────────────────────────────────────────────────┐
│ FOLZO-CORP (192.168.1.11) │
│ ┌─────────────────────────────────────────────────────────────────────┐ │
│ │ RX 7800 XT (ROCm) │ │
│ │ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │ │
│ │ │ Ollama │ │ speaches │ │ openedai │ │ │
│ │ │ qwen3.5:9b │ │ Whisper STT │ │ speech TTS │ │ │
│ │ │ Port 11434 │ │ Port 8200 │ │ Port 8100 │ │ │
│ │ │ 32K context │ │ (CPU) │ │ XTTS/ROCm │ │ │
│ │ └──────────────┘ └──────────────┘ └──────────────┘ │ │
│ └─────────────────────────────────────────────────────────────────────┘ │
│ NAS SYNOLOGY (192.168.1.25) │
│ Beszel Hub :8090 │
└─────────────────────────────────────────────────────────────────────────────┘
│ │ │
│ Monitoring │ Monitoring │ Monitoring
▼ ▼ ▼
┌─────────────────────────────────┐ ┌─────────────────────────────────────────┐
│ EFFI SERVER (192.168.1.27) │ │ FOLZO-CORP (192.168.1.11) │
│ │ │ │
│ ┌──────────────┐ ┌──────────┐ │ │ ┌──────────────┐ ┌──────────────┐ │
│ │ Open WebUI │ │ Qdrant │ │ │ │ Ollama │ │ ComfyUI │ │
│ │ Port 3000 │ │ Port 6333│ │ │ │ Port 11434 │ │ Port 8188 │ │
│ └──────────────┘ └──────────┘ │ │ │ qwen3:8b │ │ Image/Audio │ │
│ │ │ └──────────────┘ └──────────────┘ │
│ ┌──────────────┐ ┌──────────┐ │ │ │
│ │ n8n │ │ wol-proxy│ │ │ ┌──────────────┐ ┌──────────────┐ │
│ │ Port 5678 │ │ Port 3011│ │ │ │ effi-stt │ │ openedai │ │
│ └──────────────┘ └──────────┘ │ │ │ Port 8200 │ │ Port 8100 │ │
│ │ │ │ Whisper STT │ │ TTS │ │
│ ┌──────────────┐ ┌──────────┐ │ │ └──────────────┘ └──────────────┘ │
│ │ Beszel Agent │ │ Watchtower│ │ │ │
│ └──────────────┘ └──────────┘ │ │ ┌──────────────┐ ┌──────────────┐ │
└─────────────────────────────────┘ │ │ kreuzberg │ │ Beszel Agent │ │
│ │ Port 8300 │ │ Monitoring │ │
│ │ Doc Extract │ └──────────────┘ │
│ └──────────────┘ │
│ RX 7800 XT (VRAM 17GB) │
└─────────────────────────────────────────┘
```
**Historique des services supprimés** : CouchDB (Obsidian abandonné), mcpo, pipelines (mem0 abandonné) - voir [l'historique complet](./docs/ARCHIVE/HISTORIQUE-COMPLET-EFFI.md)
---
## 🐳 Stack Services (7 services)
## 📦 Services
| Service | Hôte | Port | Image | Rôle | Statut |
|---------|------|------|-------|------|--------|
| Open WebUI | effi-server | 3000 | `ghcr.io/open-webui/open-webui:main` | Interface IA principale | ✅ Actif |
| Qdrant | effi-server | 6333 | `qdrant/qdrant:latest` | Base vectorielle RAG | ✅ Actif |
| n8n | effi-server | 5678 | `docker.n8n.io/n8nio/n8n:latest` | Automatisation workflows | ✅ Actif |
| wol-proxy | effi-server | 3011 | Build local | Wake-on-LAN + Proxy Ollama | ✅ Actif |
| speaches | folzo-Corp | 8200 | `speaches:latest` (build local) | STT Whisper (CPU) | ✅ Actif |
| openedai-speech | folzo-Corp | 8100 | `ghcr.io/matatonic/openedai-speech` | TTS XTTS ROCm | ✅ Actif |
| Ollama | folzo-Corp | 11434 | Installation native | LLM qwen3.5:9b, bge-m3 | ✅ Actif |
### FolzoCorp (192.168.1.11)
**Services supprimés** (voir historique) :
- ~~CouchDB~~ : Supprimé (Obsidian abandonné)
- ~~mcpo~~ : Supprimé (MCP Obsidian trop fragile)
- ~~pipelines~~ : Supprimé (mem0 abandonné)
| Service | Port | Image | Rôle | RAM/VRAM | Auto-unload |
|---------|------|-------|------|----------|-------------|
| **Ollama** | 11434 | Native | LLM inference | Variable | N/A |
| **ComfyUI** | 8188 | `yanwk/comfyui-boot:rocm` | Image + Audio generation | 18GB shm | ✅ après 10min idle |
| **effi-stt** | 8200 | Build local | Whisper STT | ~20MB | ✅ après 5min idle |
| **openedai-speech** | 8100 | `ghcr.io/matatonic/openedai-speech` | TTS | ~15MB | Non (GPU) |
| **kreuzberg** | 8300 | `ghcr.io/kreuzberg-dev/kreuzberg:latest` | Document extraction | ~5MB | ✅ après 10min idle |
| **beszel-agent** | - | `henrygd/beszel-agent:latest` | Monitoring | ~5MB | Auto-start |
### EffiServer (192.168.1.27)
| Service | Port | Image | Rôle |
|---------|------|-------|------|
| **Open WebUI** | 3000 | `ghcr.io/open-webui/open-webui:main` | Interface IA |
| **Qdrant** | 6333 | `qdrant/qdrant:latest` | Vector DB (RAG) |
| **n8n** | 5678 | `docker.n8n.io/n8nio/n8n:latest` | Automatisation |
| **wol-proxy** | 3011 | Build local | Wake-on-LAN + Ollama proxy |
| **beszel-agent** | - | `henrygd/beszel-agent:latest` | Monitoring |
### NAS Synology (192.168.1.25)
| Service | Port | Image | Rôle |
|---------|------|-------|------|
| **Beszel Hub** | 8090 | `henrygd/beszel:latest` | Monitoring central |
---
## 🎯 Fonctionnalités
### 💬 Chat IA
- **Interface**: Open WebUI
- **LLM principal**: qwen3:8b (via Ollama)
- **Autres modèles disponibles**: qwen3.5, gemma4, deepseek-r1, mistral, etc.
### 🎤 Pipeline Vocal
- **STT**: Whisper large-v3 via effi-stt (CPU, déchargement auto)
- **TTS**: XTTS v2 via openedai-speech (GPU ROCm)
### 🖼️ Génération Images/Audio
- **ComfyUI**: Workflows pour image et audio
- **Modèle audio**: ACE-Step ( génération musicale)
- **Modèles image**: Multiples checkpoints disponibles
### 📄 Extraction Documents
- **Kreuzberg**: Extraction 90+ formats (PDF, DOCX, images, etc.)
- Intégré à OpenWebUI via CONTENT_EXTRACTION_ENGINE=docling
### 🧠 Mémoire
- **Type**: Mémoire manuelle via OpenWebUI (snippets)
- **RAG**: Qdrant pour embeddings sémantiques
### 📊 Monitoring
- **Beszel**: CPU, RAM, VRAM, GPU sur toutes les machines
- **Alertes**: Configurables par système
---
## 📁 Structure du Projet
```
effi/
├── beszel/ # Configuration Beszel
│ ├── docker-compose-hub.yml # Hub (Synology)
│ ├── docker-compose-agent-folzocorp.yml # Agent FolzoCorp
│ └── docker-compose-agent-effiserver.yml # Agent EffiServer
│
├── comfyui/ # ComfyUI (Image/Audio)
│ ├── docker-compose.yml
│ ├── custom_nodes/ # Nodes personnalisés
│ ├── models/ # Modèles checkpoints, VAE, LoRA
│ └── workflows/ # Workflows JSON
│
├── effi-stt/ # STT Whisper
│ ├── docker-compose.yml
│ ├── Dockerfile
│ └── main.py # API avec timeout auto-unload
│
├── effi-kreuzberg/ # Documentation Kreuzberg
│ ├── README.md
│ └── MIGRATION.md
│
├── scripts/ # Scripts utilitaires
│ ├── beszel_client.py # Client API Beszel
│ ├── comfyui-memory-manager.py # Restart ComfyUI après idle
│ ├── kreuzberg-memory-manager.py # Restart Kreuzberg si >2GB
│ └── start-memory-monitors.sh
│
├── systemd/ # Services systemd
│ ├── comfyui-memory-manager.service
│ ├── kreuzberg-memory-manager.service
│ └── beszel-agent-wake.service
│
├── docs/ # Documentation
│ ├── SESSION-2026-04-12-RAM-BESZEL.md
│ ├── BESZEL-INSTALLATION.md
│ └── MEMOIRE-GESTION.md
│
└── docker-compose*.yml # Divers compose files (legacy/backup)
```
---
## 🚀 Démarrage
### FolzoCorp
```bash
# Tous les services Docker
cd ~/Documents/OpenCode/Projets/Effi/comfyui && docker compose up -d
cd ~/Documents/OpenCode/Projets/Effi/effi-stt && docker compose up -d
cd ~/Documents/OpenCode/Projets/Effi/beszel && docker compose -f docker-compose-agent-folzocorp.yml up -d
# Services memory (systemd)
sudo systemctl start comfyui-memory-manager
sudo systemctl start kreuzberg-memory-manager
# Ollama (native)
systemctl --user start ollama
```
### EffiServer
```bash
cd ~/effi
docker compose up -d
```
---
## 🔧 Configuration
### Variables d'Environnement
**effi-stt**:
- `INACTIVITY_TIMEOUT=300` - Timeout avant déchargement (secondes)
**ComfyUI**:
- shm_size: 8GB (mémoire partagée)
- Monitoring: Script comfyui-memory-manager.py
**Beszel**:
- HUB_URL: http://192.168.1.25:8090
---
## 📊 Monitoring
### Beszel
- **URL**: http://192.168.1.25:8090
- **Agents actifs**:
- FolzoCorp (192.168.1.11) - GPU AMD RX 7800 XT
- EffiServer (192.168.1.27) - Intel J5040
### Scripts Memory
| Script | Condition | Action |
|--------|-----------|--------|
| comfyui-memory-manager.py | 10min idle + VRAM<1% + RAM>5GB | Restart container |
| kreuzberg-memory-manager.py | 10min idle + RAM>2GB | Restart container |
| effi-stt | 5min idle | Déchargement modèle Whisper |
### Commandes Utiles
```bash
# Statut services
sudo systemctl status comfyui-memory-manager kreuzberg-memory-manager
docker ps
# Logs
journalctl -u comfyui-memory-manager -f
docker logs -f comfyui
# Métriques Beszel
python3 scripts/beszel_client.py --system folzocorp --check stats
```
---
## 📚 Documentation
- [📁 Architecture](./docs/01-architecture/) - Infrastructure et réseau
- [⚙️ Configuration](./docs/02-configuration/) - Docker, audio, mémoire
- [📖 Guides](./docs/03-guides/) - Installation et configuration initiale
- [🔧 Dépannage](./docs/04-depannage/) - Erreurs courantes et solutions
- [📓 Journal](./docs/05-journal/) - Historique des évolutions
- [📚 Historique Complet](./docs/ARCHIVE/HISTORIQUE-COMPLET-EFFI.md) - Toute l'histoire du projet
- [Installation Beszel](./docs/BESZEL-INSTALLATION.md)
- [Gestion Mémoire](./docs/MEMOIRE-GESTION.md)
- [Session 2026-04-12](./docs/SESSION-2026-04-12-RAM-BESZEL.md)
- [Guide ACE-Step](./docs/guide-ace-step.md)
- [Guide ComfyUI](./comfyui/README.md)
---
## 🚀 Démarrage Rapide
### Prérequis
- **Serveur** : Ubuntu 22.04+ avec Docker et Docker Compose
- **PC Gaming** : Ollama installé avec modèles `qwen3.5:9b` et `bge-m3`
- **Réseau** : Les deux machines sur le même LAN
### Installation
```bash
# 1. Cloner le dépôt
git clone https://gitea.folzocorp.fr/Folzo/effi.git
cd effi
# 2. Configurer les variables d'environnement
cp .env.example .env
# Éditer .env avec tes valeurs
# 3. Démarrer les services
docker compose up -d
```
### Configuration OpenWebUI
1. Accéder à `http://192.168.1.27:3000`
2. Créer un compte admin
3. Configurer les connexions :
- **Ollama** : `http://192.168.1.11:3011` (via WOL proxy)
- **Audio STT** : `http://192.168.1.11:8200/v1`
- **Audio TTS** : `http://192.168.1.11:8100/v1`
4. Voir le [guide de première configuration](./docs/03-guides/premiere-config.md)
---
## 🔑 Caractéristiques Clés
### 🎤 Pipeline Vocal
- **STT** : Whisper large-v3-turbo en CPU (~10s pour 5s audio)
- *Note* : Build ROCm GPU en pause (complexité)
- **TTS** : XTTS v2 avec voix "nova" sur GPU ROCm
- **Latence** : ~500ms pour le TTS, ~10s pour STT
### 🧠 Mémoire Persistante
- **Type** : Mémoire manuelle via OpenWebUI (snippets)
- **Avantage** : Rapide et prévisible (vs mem0 qui était trop lent)
- **Stockage** : Base SQLite intégrée à OpenWebUI
- **Utilisation** : Snippets courts injectés dans le contexte
### 🔗 Intégrations
- **Sub Agent Tool** : Délégation de tâches complexes
- **n8n** : Workflows d'automatisation
- **Joplin** : En cours d'intégration pour prise de notes
---
## 🛠️ Technologies
## 🔗 Technologies
| Domaine | Technologies |
|---------|-------------|
| **LLM** | Ollama, Qwen 3.5 9B (32K context) |
| **LLM** | Ollama, qwen3:8b |
| **Interface** | Open WebUI |
| **STT** | Faster Whisper (CPU) |
| **TTS** | XTTS v2, OpenedAI-Speech (ROCm) |
| **TTS** | XTTS v2 (ROCm GPU) |
| **Image/Audio** | ComfyUI + ACE-Step |
| **Vector DB** | Qdrant |
| **Document** | Kreuzberg (docling) |
| **Automatisation** | n8n |
| **GPU** | AMD ROCm (RX 7800 XT gfx1100) |
| **GPU** | AMD RX 7800 XT (ROCm) |
| **Monitoring** | Beszel |
---
## 📝 Historique des Changements Majeurs
## 📝 Historique
**Avril 2026** : Simplification majeure
- Suppression de CouchDB, mcpo, pipelines
- Passage à mémoire manuelle (abandon de mem0)
- Mise à jour qwen2.5:14b → **qwen3.5:9b** (meilleures performances)
- Abandon Obsidian/MCP → future intégration Joplin
**Avril 2026** - Optimisation RAM + Monitoring
- Ajout scripts déchargement mémoire (ComfyUI, Kreuzberg, effi-stt)
- Installation Beszel (Hub + 2 agents)
- Service systemd pour restart après veille
Voir l'[historique complet](./docs/ARCHIVE/HISTORIQUE-COMPLET-EFFI.md) pour tous les détails.
**Mars 2026** - Génération Audio
- Intégration ACE-Step pour génération musicale
- ComfyUI avec ROCm
---
## 📄 Licence
Ce projet est personnel et documenté à des fins d'apprentissage.
**Février 2026** - Stack Vocale
- effi-stt avec Whisper large-v3
- openedai-speech avec XTTS v2
- Kreuzberg pour extraction documents
---