← All systems
05 / 06Agent memory · Self-hosted infrastructure

Private agent memory

An agent remembers more usefully when its memory is treated as private infrastructure, not a rented feature.

mem0OllamaQdrantCoolify
Role
Builder & operator · Personal stack
Setting
Personal infrastructure
Period
2026
System architecture / simplified
  1. 01Conversationcapture + recall
  2. 02mem0memory layer
  3. 03Ollamalocal extraction
  4. 04Qdrantpersistent vectors
Private memory services → loopback-only exposure

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.

  1. 01

    Used mem0 as the gateway memory layer instead of inventing a bespoke memory abstraction.

  2. 02

    Ran extraction and embeddings locally through Ollama, with Qdrant as the persistent vector store.

  3. 03

    Kept Ollama and Qdrant private on loopback, with persistent volumes and deliberate backups.

  4. 04

    Packaged the stack as one Docker Compose definition for repeatable Coolify deployments.

04 / Outcome

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.

768local embedding dimensions
~2GBquantized extraction model
0cloud APIs in the loop

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.