most “memory systems” in ai agents are actually just storage (let me explain)
there’s a subtle issue i keep running into when building agent systems
people talk about memory like it’s solved because they added a vector db
but in practice, the system still forgets decisions, reintroduces context, and behaves inconsistently across sessions
so the real problem isn’t storage
it’s structure + retrieval reliability over time
What i changed in my setup instead of trying to “store more context”
i rebuilt memory as a layered system that separates capture, compression, structure, and correction
architecture overview 1. capture layer (raw persistence) everything is logged first without filtering
daily files only
goal is simple: never lose information at ingestion time
2. distillation layer (information compression) a scheduled process (cron-based) converts raw logs into stable memory
only long-term relevant data is kept:
persistent preferences
decisions
stable facts
active projects
this is where noise gets removed
3. atomic memory structure memory is split into single-concept files
no mixed documents
tools
people
projects
ideas
this improves retrieval consistency significantly
4. implicit graph structure instead of using a graph database
files explicitly reference related files using markdown links
this creates a lightweight semantic network without extra infrastructure
5. retrieval optimization layer this is where most systems fail in practice
instead of relying purely on embeddings, i enforced:
synonym expansion (fr/en)
multiple semantic formulations per concept
keyword redundancy
rephrasing of key ideas in different contexts
this reduces retrieval blind spots caused by embedding mismatch
6. self-improvement loop retrieval failures are logged and periodically reviewed
the system adjusts:
file structure
keyword sets
placement of information
missing links between concepts
over time, memory quality improves instead of degrading
why this approach most systems optimize for retrieval accuracy in isolation
but memory in agents is not just retrieval
it’s also:
consistency over time
stability of decisions
ability to re-use context without re-injection
so the focus shifted from “better embeddings” to “better information architecture”
outcome so far after running this structure for a while:
fewer repeated context injections
more consistent behavior across sessions
reduced token usage due to better reuse of stored context
fewer contradictions in tool usage and decisions
the model didn’t fundamentally change
the system around it did
open question plz i’m still exploring:
how much distillation is optimal before losing nuance
whether explicit graph modeling would outperform implicit linking
how redundancy in retrieval scales in larger memory graphs
curious if anyone has pushed this further in production agent systems :))
[留言]
为什么值得关注
能改变理解方式,而不只是重复常识;符合当前抓取需求;它提供了新的理解或解释,而不只是表面观点
来源:reddit,领域:tech,保留分:0.58
讨论总结
讨论量较低,暂无明显增量信息。