Memory
A shared memory service across the AI tools I use daily, built to test what it actually takes to extract, deduplicate, and retrieve user context over months without losing track of contradictions.
Possibly the most important tool I have. Memory allows sessions to pick up yesterdays, last weeks, works, preferences from 6 months ago, regardless of vendor.
The service holds roughly 50,000 memories from daily use with a lot of ambiguity around the word “remember”: what’s worth remembering, which facts mean the same thing, when do old memories expire?
How a memory gets stored
At the end of a turn, a hook sends the exchange to the service. A background worker (Sonnet/Sol level) extracts facts worth keeping. Most conversation is temporary instructions and code; the extraction prompt has to separate that from durable context.
Each fact becomes a vector. Before storing it, the service checks for near-duplicates. I started with 0.92 and lowered it to 0.88. This has some parallels with the semantic gap problem in retrieval, but I digress.
How a memory gets found
Search follows two paths. One finds facts with similar meaning. The other follows relationships between projects, components, and concepts. A reranker scores the combined candidates against the question and returns the top five.
The entity path catches related facts that may use different language. The reranker helps remove passages that sound relevant but don’t answer the question. If it is unavailable, the service falls back to similarity ordering.
What the store looks like
This May 2026 snapshot contains 8,046 facts. The store has since grown to roughly 50,000. Each dot is a memory; UMAP projects the vectors onto a flat map so I can inspect clusters. Search itself runs in the original vector space.
Keeping old facts useful
A new fact can supersede an older claim without making every older fact about that subject wrong. “Uses Python” and “wrote a Go script today” can both be true. A model judges those relationships, and superseded claims get an expiry timestamp.
Weekly maintenance archives old claims, consolidates duplicates, and reviews profile facts. Directives are protected. Removed memories go to a recovery table for 30 days; profile triage can archive, but cannot delete, and is capped at 2% per run.
Seeding a Session
Every conversation starts with some loose recall (mostly preferences, current work, and enduring profiles). A new session is seeded with about 500 memories, and turn-hooks periodically look up related memories to fetch them into the running context window.
Stack
| Part | Tool |
|---|---|
| Runtime and access | AWS Lambda, API Gateway, MCP and REST |
| Extraction and conflict review | Claude Haiku |
| Embeddings and reranking | Voyage AI |
| Memory search | Pinecone |
| Profiles, relationships and recovery | DynamoDB |