GrepMem pairs a compact working summary with an append-only record of every message and tool result. An agent, a model working through tasks with tools, can search that record after compression removes details from active context.

The memory mechanism needs neither embeddings nor a retrieval index. Its grep_history tool uses text patterns, returns source locations and supports counting matches. Reinforcement learning trains task actions, summaries and recall together.

  • With Qwen3.5-9B and a 32,768-token context, trained GrepMem reaches 46.9% on three-question research sessions, versus 38.1% for summary-only SUPO.
  • On ContextBench log recall, it scores 95.3%, versus SUPO’s 6.6%. Before training, GrepMem already scores 75.0%, so searchable history itself contributes substantially.
  • Benefits vary by task. On streamed agent trajectories, it uses 2.3 times SUPO’s tokens for a small, statistically uncertain accuracy gain.

The public implementation makes this a practical baseline for more elaborate memory systems. “Lossless” describes the stored record; useful recall still depends on choosing the right search.

Caveat: Results cover one model, and the repository lists trained checkpoints as pending. Its base-model quickstart does not reproduce the trained model’s scores.

Daily coverage