stoneskin (Mr. Sun)

Personal homepage of Mr Sun - AI Solutions Architect, Tech Lead & AWS Cloud Specialist: resume, selected projects, and teaching archive

25. A six-stage framework for agent memory: ask why memory is needed first (2026-10-16)

← Back to index · 中文版


Reflections on a long post by Kafka (@kafkaup). He argues that before choosing tech (vector DB, graph DB, stuffing chat history), one should ask why the agent needs memory at all: experience continuity, efficiency, personalization, long-term task tracking, business moat. Memory’s core value is continuity across long-term interaction, not remembering everything. Source: https://x.com/kafkaup/status/2110812455488151766

His six stages: (1) decide what to remember (long-term value, structurability, personalization impact); (2) extract and classify (entity/relation/time/source/confidence; user preferences, business facts, process conclusions, task state, procedural memory); (3) staging, dedup, merge (avoid dirty data); (4) layered storage (session state for short-term, long-term store for preferences, vector DB for semantic search, graph DB for relationship-heavy business); (5) retrieval (when/what/how much to query; compress rather than stuff; weigh relevance, recency, source reliability, usage frequency, business importance); (6) dynamic maintenance (add, search, update, delete, reflection — otherwise memory becomes noise).

How it connects to these notes: