DigiTwin
A personal AI assistant with long-term memory
An assistant that remembers your goals, preferences and life, gives you a daily brief and keeps you on track. It runs on a local model by default and only reaches for the cloud when you let it.
Highlights
- Local-first chat: a FastAPI backend talks to Mistral 7B through Ollama. In auto mode it health-checks the local model and falls back to a cloud LLM only when local inference is unavailable.
- Redacted before it leaves: anything sent to the cloud provider first goes through a local spaCy NER model plus regex, which swaps names, organisations, places, dates and amounts for placeholders.
- A “user brain” of typed memories: messages are split into phrases, chunked and classified as goals, preferences, facts, events or style, then embedded (nomic-embed-text through Ollama, with a local bge-small fallback) into ChromaDB, with metadata in SQL.
- Retrieval that ages like memory: each memory is scored by importance × type weight × similarity, with a 30-day half-life decay, a boost for frequently recalled memories and an emotional-weight term.
- Background tasks extract profile facts and decide what is worth remembering after every chat. Goals, reminders, sessions and onboarding each have their own API.
- Next: moving the memory store to a graph database (Neo4j) for GraphRAG, and running quantized GGUF models on the phone through llama.cpp.