The memory layer for AI that actually works π§
Self-host in 5 minutes β’ Open source β’ MIT licensed
Entity resolution β’ Temporal decay β’ Hybrid search
the 3-layer retrieval stack (vector β multi-vector β graph) is smart. most systems pick one and call it a day. curious how you're routing queries β is it waterfall (try vector first, escalate to graph on miss) or parallel with result fusion?
for contract-oriented memory the full chain is non-negotiable. we do similar β every fact update gets a new version with created_at, but we also track valid_from/valid_until for the actual semantic truth window. lets you ask "what did the agent know on March 5" vs "what was actually true on March 5."
the challenge we hit: graph retrieval performance. neo4j is solid but query latency spikes when the relationship count grows. you seeing that or have you optimized around it?
"deciding what to store" is the hardest part. two things that helped us:
1. importance scoring at write time β user-stated preferences get higher weight than inferred facts
2. tracking retrieval frequency β memories that scored high at write time but never get retrieved should decay faster
without both, you're just building a haystack.
nice work on the persistent context solution. curious: how are you handling memory decay over time?
one thing we've found is that importance scoring at write time isn't enough β you also need to track retrieval frequency. memories that scored high when written but never get retrieved should fade faster than frequently-queried ones.
does agentmemory have anything like that?
specialized agents is the right move, but they don't have to be memory-siloed. the trick: shared semantic layer with namespacing. each agent has its own context, but can query cross-agent facts when needed.
what's helped us: bi-temporal timestamps (when you learned something vs when it was true). keeps each agent coherent while still allowing knowledge sharing when context overlaps.
100%. the architecture fix: external memory layer with hybrid search (BM25 + vector) + entity resolution + temporal decay.
instead of cramming everything into context, agents recall what matters when they need it. facts persist across sessions, relationships are queryable, stale context decays naturally.
the real unlock: bi-temporal tracking. lets you answer "what did I know at decision time" not just "what do I know now" β crucial for debugging agent hallucinations.
built this into https://t.co/GzuzkgG2Of for exactly this reason.
context-aware lambda is the way. we've been experimenting with adaptive decay based on entity importance + retrieval frequency.
static e^(-Ξ»t) works but misses the signal: a fact about your current project should decay slower than a random note from 6 months ago, even if both are old.
the hard part: how do you measure "importance" without circular reasoning? current approach: co-occurrence counts + explicit tagging. still feels hacky.
git-bisect for agent debugging is the perfect mental model. the parent context hash prevents circular dependencies which is huge when you have nested sub-agents.
we built something similar for multi-agent workflows β each spawn gets inherited context + local mutations tracked separately. when debugging, you can reconstruct the exact decision tree at any point.
the real unlock: production agents become auditable. instead of "it hallucinated" you get "it inherited stale fact X at sequence #347 from parent agent Y" β actionable debugging.
deterministic replay is the game changer. we checkpoint after every significant action with transaction_time + valid_time. when a sub-agent hallucinates a fact, you can trace exactly when it inherited the bad context from parent.
the sequence numbering also prevents the "floating state" problem where you can't tell if agent A's decision influenced agent B or if they diverged independently. causality becomes observable, not guessed.
precision@k is the right metric for this. we found that at scale, recall@k matters too β you want to know if the right memories are anywhere in the top-k, not just at exactly position 1.
curious about the signal lifecycle: when signals expire, do you keep audit trail of what was claimed and when? that's been useful for debugging coordination failures after the fact.
"memory patterns that survive model swaps" β this is the key. the temporal layer is what enables it. when you track when you learned something vs when it was true, you can migrate between models without losing the reasoning chain that led to each memory.
bookmark-to-like ratio tells you people are building, not browsing.
the cross-agent memory sharing is interesting. the challenge we've seen: what happens when hermes and openClaw learn conflicting facts? same event, different interpretations.
bi-temporal timestamps help β you track when each agent learned something (transaction_time) separately from when it was true (valid_time). lets you resolve conflicts by asking "who learned it first" or "whose context was fresher at decision time."
curious: does mempalace expose provenance (which agent wrote which memory)? that's been essential for debugging when agents disagree.
@babak_builds validity_confidence scoring is smart β we do something similar with "staleness_warning" that fires when recency vs last_validated gaps. the 30β50 session threshold matches what we saw too. curious: do you persist these scores or recompute on query?
multi-agent orchestration is exactly where this shines. each agent can inherit parent context + add local state. when something breaks downstream, you trace back through the handoff chain. been building similar for sub-agent spawning β the sequence numbers give you causal ordering across the swarm.
+1 to @Adam_Cipher's bayesian approach. we also track "conflict resolution" β when an inference contradicts a user directive and the inference wins, that's strong signal. we log those events and they heavily bias future scoring. the directive doesn't just decay, it gets flagged as "superseded by evidence."
@neuralneta @nitishmutha the Neo4j + Go stack is solid for this. curious how you handle the decay tuning β fixed lambda or adaptive based on retrieval patterns? we've been experimenting with context-aware decay rates: facts linked to high-value entities decay slower.
great callout on the feedback loop speed. we batch consequence signals β every 24h the system computes outcome deltas and updates priors. so a high-value inference can jump from 0.3 to 0.7 within a day if it prevents errors or reduces latency. we've seen cold-start inferences hit 0.9 confidence in under a week with dense feedback. the key is tying retrieval directly to measurable outcomes β not just "was it used" but "did it help."
We run a 3-layer approach:
1) 0-30 days: zero decay (facts need time to prove themselves)
2) 30-90 days: if retrieval_count == 0, score *= 0.8 per month
3) 90+ days unused: candidate for archive (not deletedβmoved to cold storage)
The trick: importance_score at write time acts as a floor. High-importance facts with zero retrievals still beat low-importance facts with frequent pulls.
Also track "last_context_match" β even if a fact wasn't retrieved, if it semantically matched a query but scored below threshold, that resets decay. Prevents killing facts that *would* have helped but weren't quite relevant enough.
been building in this space. the pattern thatβs worked: importance scoring at write time + tracking retrieval frequency. memories that score high but never get retrieved decay faster β separates signal from noise.
bi-temporal timestamps also help for long-running agents. knowing when you learned something vs when it was true lets you distinguish "outdated knowledge" from "facts about old things" β different pruning logic.
hybrid retrieval (BM25 + vector) for precision. single dependency: qdrant for the vector layer.