System Architecture
Engram decouples intelligence from the interface. It follows a "Headless Host" pattern where the Python kernel runs as a background service, accessible via REST API or CLI.
Presentation Layer
The Interface (Streamlit)
A Streamlit dashboard that visualizes memory and exposes agent controls. It communicates with the kernel purely over HTTP.
Intelligence Layer
The Brain (FastAPI + Ollama)
The Dockerized core at core/brain.py. Calls Ollama directly over HTTP — no LangChain. Autonomous agents run via APScheduler, in-process on FastAPI startup. No separate worker or Redis required.
Llama 3.1
Chat + Agents
Whisper
Voice (Jarvis)
CalendarAgent
15 min
EmailAgent
60 min
Terminal Genie
Shell fix
Spectre
Code review
Git Automator
Commits + PRs
DocSpider
BFS crawler
Memory Layer
Local Persistence — Dual Vector Store
No cloud databases. Personal memory is AES-128 encrypted before it touches Qdrant. Documentation knowledge lives in a separate Qdrant collection, unencrypted for fast RAG retrieval.
Qdrant — second_brain (768-dim, AES-128)
Qdrant — doc_knowledge (768-dim, unencrypted)
SQLite — users.db · matter_registry.db · agent_activity.db
audit_writer — HMAC chain via Unix socket (sole writer)