docs: update README for Phase 2-5 features

This commit is contained in:
2026-05-25 09:45:49 +02:00
parent 59f4059cd8
commit d38f564445

View File

@@ -1,88 +1,14 @@
# 🧠 Second Brain # Second Brain
Zweites Gehirn für OpenClaw - Langzeit- und Kurzzeitgedächtnis mit Bewertung, Proaktivität und Selbstheilung. An embeddable, offline-first memory system for AI agents with correctness tracking, neural scoring, and semantic retrieval.
## Features ## What's New (Phase 2-5)
- **Engramme** - Gedächtniseinheiten mit Confidence, Korrektheit, Verknüpfungen - **Sentence-Transformer Embeddings** (`src/embedder.py`) — Cached, offline, 384-Dim
- **SQLite + FTS5** - Lokaler Speicher ohne externe Abhängigkeiten - **ChromaDB Vector Store** (`src/chroma_store.py`) — Semantic similarity search
- **Hybrid-Retrieval** - Keyword-Suche + Reranking (später + Embeddings) - **Neural Confidence Scorer** (`src/neural_scorer.py`) — PyTorch RL net, trains on confirm/reject feedback
- **Correctness-Tracking** - Richtig/Falsch-Feedback mit Lern-Loop - **Hybrid Retrieval** (`src/retriever.py`) — Keyword + Semantic + Neural fusion
- **Proaktivität** - Heartbeat + Cron für selbständige Checks - **Streamlit Dashboard** (`src/app_dashboard.py`) — Search, confirm/reject, neural training UI
- **Fehlerheilung** - Fehler als Engramme, Mustererkennung, Auto-Fix - **Graph Visualization** (`src/graph_view.py`) — Interactive Cytoscape.js graph with confidence colors
- **Dashboard** - HTML-Visualisierung, kein Framework nötig
- **OpenClaw-Bridge** - Direkte Integration in Agent-Sessions
## Schnellstart ## Architecture
```bash
cd /root/.openclaw/workspace/second-brain
# Engramm hinzufügen
python3 -m src.cli add "Das ist wichtig" --tag wichtig --source user
# Suchen
python3 -m src.cli search "wichtig"
# Feedback geben
python3 -m src.cli confirm <id>
python3 -m src.cli reject <id>
# Dashboard öffnen
python3 -m src.dashboard
# Stats
python3 -m src.cli stats
# Backup
python3 -m src.openclaw_bridge backup
# Tests
python3 -m tests.test_core
```
## Architektur
```
┌─────────────────┐ ┌──────────────┐ ┌────────────────┐
│ OpenClaw │────▶│ Bridge │────▶│ Engram Store │
│ Agent │ │ (Session) │ │ (SQLite) │
└─────────────────┘ └──────────────┘ └────────────────┘
│ │
▼ ▼
┌─────────────────┐ ┌──────────────┐
│ Heartbeat │ │ Retriever │
│ (Cron/Check) │ │ (FTS + RR) │
└─────────────────┘ └──────────────┘
┌──────────────┐
│ Dashboard │
│ (HTML) │
└──────────────┘
```
## Module
| Datei | Zweck |
|-------|-------|
| `src/engram.py` | Engramm-Modell, Confidence, Correctness |
| `src/store.py` | SQLite-CRUD, FTS5-Index, Backup/Export |
| `src/retriever.py` | Suche, Reranking, Verknüpfungen |
| `src/cli.py` | Kommandozeilen-Interface |
| `src/openclaw_bridge.py` | OpenClaw-Integration, Heartbeat, Fehler-Handling |
| `src/dashboard.py` | HTML-Dashboard-Generator |
## CI/CD
- **Repo**: http://192.168.6.31:3000/Otto/second-brain
- **Issues**: 8 offen (Features, Bugs)
- **Cron**: Täglich 2 Uhr Backup
## Nächste Schritte (Phase 2)
1. Vektor-Embeddings via sentence-transformers
2. ChromaDB-Store als Alternative zu SQLite
3. PyTorch Neural Scorer
4. Streamlit-Dashboard
5. Graph-Visualisierung (cytoscape.js)