R1 · AGENT MEMORY · MCPIN USEAug 2025–May 2026

Long-term memory for AI agents

THE QUESTION

Can a small, fully local server give AI coding agents a memory that lasts between sessions?


Founder, Bodham Labs
Updated

What did we build?

  • Nexus RAG: a local MCP server, over stdio, that gives AI coding agents long-term memory.
  • Vectors in ChromaDB with HOT, WARM and COLD tiers and time decay. An entity graph in Neo4j.
  • Small models for each job: all-MiniLM for embeddings, GLiNER for entity extraction, and Qwen3:8b only for offline consolidation.
  • Decay score = exp(−λ · days since last access), with λ = 0.05 and a floor of 0.3.
  • A surprise flag: a new chunk that is very similar to an old one but says something different is flagged. This prevents silent overwrite of decisions.
  • A router with no ML model in it, because the set of operations is small and deterministic.

What does the evidence show?

Values exactly as recorded. The source column says where each one was recorded.
WHATVALUESOURCE
Bootstrap starts505MCP server log, 9 Mar – 21 May 2026
memory_query calls111MCP server log, 9 Mar – 21 May 2026
memory_ingest calls82MCP server log, 9 Mar – 21 May 2026
Tier movesReal hot → warm → cold moves recordedMCP server log, 9 Mar – 21 May 2026
Local 8B model, generation speed on CPUabout 3.58 tokens/sCPU benchmark, cited in our internal research paper
Time to write one answer with that modelroughly 60–120 sinternal research paper
Query latencyNot published yetwe'll publish percentiles after a proper re-run

Where has it led us?

  1. The biggest change was removing synthesis from the query hot path. A local 8B model took roughly 60–120 s to write an answer. Now the server returns raw passages, and the calling agent writes the answer.

  2. A 1.7B model (SmolLM2) hallucinated entities during extraction. We switched to GLiNER, because it can only select substrings that exist in the input text.

  3. An SSE transport through a Node bridge failed. We moved to stdio.

  4. The project moved from a first cloud version (Neon and OpenAI, Aug 2025) to fully local (Mar 2026). It was then used daily until May 2026.

What is still open?

  • What are the real latency percentiles over a large, repeatable set of queries?
  • How much memory does the full stack need when measured rather than estimated?
  • Does the surprise flag catch the contradictions that matter, and how often does it flag by mistake?

NEXT STEP · NOT DONE YET

What would we do next?

Re-run the latency benchmark with a proper query set, measure RAM directly, and publish the percentiles.

Have a problem that needs this kind of research?

Tell us about it