Agent memory, part 4: storage is one INSERT — retrieval at the right moment is what actually breaks
_jaydeepkarale · x · 2026-10-08
Part 4 of a 7-part series on agent memory. The thesis: storage is almost boring — one INSERT, one row, done. The hard half is retrieving the right memory at the right time.
Instead of arguing in the abstract, the author took the Day 3 code — an agent memory built from scratch with Python, Ollama, SQLite, and a cosine similarity function, where the agent decides what's worth remembering, embeds, stores, and pulls it back into the prompt — and pushed it until it broke. It broke in two distinct ways: the first is the one everyone expects; the second is the one that actually matters (analyzed in the post).
Key point: the bottleneck of agent memory isn't the storage layer but retrieval — when to fetch, what to fetch, and how to judge relevance. A practical series for engineers building memory into agents.
More from coding & agent
- Agent harnesses are crutches; least-privilege action authorization is what matters — andreisavu · 2026-10-09
- Workers Refuse to Write Markdown Files for Agents, Seeing Knowledge Extraction — mattbeane · 2026-10-08
- Fallout: New York runs in your browser, built with Claude Opus 5.5, zero texture or sound files — chrisfirst · 2026-10-08
- When is AI automation worth it? Only for five-minute tasks that keep repeating — gethackteam · 2026-10-08
- Dad dispatches an agent to build an ESP32 music player to quit Spotify for good — natesiggard · 2026-10-08
- Andy Pavlo: AI agents create 80% of new databases and keep deleting production ones — mattturck · 2026-10-08