An agent that auto-captures preferences, projects, and decisions accumulates a uniquely personal dataset. The memory layer needed to be always available, affordable at high frequency, and fully under my control.
The obvious automation was not the whole problem.
Hosted memory APIs make the easy path attractive, but they outsource the most intimate dataset in an agent system and meter a task that needs to run on every turn. The hard part was not retrieval—it was sovereignty, repeatability, and a sensible operating model.
Memory extraction is a narrow, high-frequency task. It does not need frontier-model economics; it needs a small local model, a clear storage boundary, and a reproducible deployment.
Build the operating loop, not only the intelligent step.
- 01
Used mem0 as the gateway memory layer instead of inventing a bespoke memory abstraction.
- 02
Ran extraction and embeddings locally through Ollama, with Qdrant as the persistent vector store.
- 03
Kept Ollama and Qdrant private on loopback, with persistent volumes and deliberate backups.
- 04
Packaged the stack as one Docker Compose definition for repeatable Coolify deployments.
The gateway retains useful context across sessions with zero cloud calls in the memory loop and a deployment definition that can be rebuilt instead of merely maintained.
What stayed after shipping.
Small local models are underrated for constrained, always-on tasks. The product question is not simply whether an agent remembers—it is whether a person can understand, control, and trust where that memory lives.