Skip to content

research(memory): MemReader active memory extraction — teach agent when NOT to write to long-term memory #3222

@bug-ops

Description

@bug-ops

Description

MemReader (arXiv:2604.07877) introduces a family of small, trainable models for active long-term memory extraction in agent systems that reason about whether to write a memory at all — not just what to write.

  • MemReader-0.6B: compact passive extractor distilled for accurate and schema-consistent structured outputs
  • MemReader-4B: active extractor optimized with Group Relative Policy Optimization (GRPO). Under a ReAct-style paradigm, it evaluates information value, reference ambiguity, and completeness before acting — and can selectively write, defer incomplete inputs, retrieve historical context, or discard irrelevant chatter.

Results: Outperforms existing extraction-based baselines on LOCOMO, LongMemEval, and HaluMem. Integrated into MemOS and deployed in production applications.

Relevance to Zeph

Zeph's memory_save tool fires whenever the agent decides to save — there is no gate that evaluates whether a piece of information is worth writing. The result is:

  • Memory pollution from low-value or redundant writes
  • Inconsistency from incomplete references written mid-conversation
  • Growing cost in embedding + Qdrant indexing of noise

MemReader's insight: selective extraction is more valuable than comprehensive extraction. Applying this to Zeph's memory write path means adding a pre-write quality gate that scores:

  1. Information value (is this new knowledge or a repetition?)
  2. Reference completeness (is this a fragment that depends on context not yet in memory?)
  3. Temporal relevance (does this update or contradict existing memory?)

This complements the existing A-MAC admission control (threshold on embedding similarity) with reasoning-driven filtering.

User Stories

  • As a Zeph user, I want memory saves to be high-quality and non-redundant so that memory retrieval surfaces relevant context rather than noise
  • As an operator, I want memory write costs to be proportional to information value, not conversation length

Implementation Sketch

  1. Add a memory write quality scorer in zeph-memory (lightweight LLM call or rule-based heuristic)
  2. Score: information value, reference completeness, contradiction with existing entries
  3. Gate memory_save on score threshold — reject, defer, or rewrite as structured update
  4. Track rejection rate in memory metrics for observability

Source

Estimated Complexity

Medium. Can be implemented as a pre-write filter in MemoryRouter. The RL fine-tuned model approach (MemReader-4B) is a stretch goal — a rule-based scorer is sufficient for MVP.

Spec

Pending /sdd specify session.

Metadata

Metadata

Assignees

Labels

P4Long-term / exploratorymemoryzeph-memory crate (SQLite)researchResearch-driven improvement

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions