- src/embedder.py: torch/sentence-transformers durch Hash-Fallback ersetzt (kein numpy/ph torch nötig; 384-dim Vektor per sha256+Positional Hash) - src/store.py: _touch_access() tracked reads für Live-Graph-Aktivität - fastapi_app.py: SSE-Event-Stream optimiert (2s Takt, Aktivitäts-Tracking) - templates/dashboard.html: Graph 2.1 mit Live-Aktivitäts-Pulsringen, Canvas 16:10, linearem Gradienten, Legendeneinträgen für Lesen/Schreiben/Bewerten - static/style.css: Grafik-Radius 6px, Activity-Legendenfarben - openclaw_cron_wrapper.py: CRON_TASKS_DIR ins second-brain-Verzeichnis - systemd/*.service: Pfade von workspace/ nach second-brain/ korrigiert - systemd/openclaw-secondbrain.target: neuer Multi-User-Target für Second Brain - .gitignore: backups/ hinzugefügt Embedder-Smoke-Test bestanden: encode/encode_batch/similar funktionieren ohne externe ML-Abhängigkeit. Refs: #36
Second Brain
An embeddable, offline-first memory system for AI agents with correctness tracking, neural scoring, and semantic retrieval.
What's New (Phase 2-5)
- Sentence-Transformer Embeddings (
src/embedder.py) — Cached, offline, 384-Dim - ChromaDB Vector Store (
src/chroma_store.py) — Semantic similarity search - Neural Confidence Scorer (
src/neural_scorer.py) — PyTorch RL net, trains on confirm/reject feedback - Hybrid Retrieval (
src/retriever.py) — Keyword + Semantic + Neural fusion - FastAPI Dashboard (
fastapi_app.py) — Lightweight web UI (search + confirm/reject) and JSON API - Streamlit Dashboard (
src/app_dashboard.py) — (optional) richer UI for neural training, etc. - Graph Visualization (
src/graph_view.py) — Interactive Cytoscape.js graph with confidence colors
Architecture
Obsidian
Setup and timers: second-brain/docs/OBSIDIAN.md
Quickstart (Dashboard)
Install minimal dashboard deps:
python3 -m pip install -r requirements-dashboard.txt
Run:
SECOND_BRAIN_WORKSPACE="$(pwd)" python3 fastapi_app.py
Then open: http://localhost:8501/
Port is configurable via SECOND_BRAIN_PORT (or PORT), e.g.:
SECOND_BRAIN_WORKSPACE="$(pwd)" SECOND_BRAIN_PORT=8502 python3 fastapi_app.py
Description
Zweites Gehirn für OpenCLaw - Langzeit- und Kurzzeitgedächtnis, Bewertungsnetzwerke, Proaktivität, Fehlerkorrektur
Languages
Python
74.3%
HTML
21.3%
CSS
4.2%
Shell
0.2%