-
Notifications
You must be signed in to change notification settings - Fork 2
research(memory): Memex(RL) indexed experience memory — compact trajectory + external KV store for long-horizon agents (arXiv:2603.04257) #2432
Description
Summary
arXiv:2603.04257 — Memex(RL): Scaling Long-Horizon LLM Agents via Indexed Experience Memory
Problem
Long tool-use trajectories grow unboundedly, filling context windows. Standard compaction discards evidence (tool outputs, intermediate results) that may be needed later.
Technique
Memex replaces a long tool-use trajectory in working context with a compact indexed summary while archiving full artifacts in an external key-value experience store. When needed, the agent dereferences an index entry to recover exact archived content and re-inject it into the working context — no hallucination of past tool results.
Core components:
IndexedExperienceMemory: compresses trajectory into summary + index entries- External KV store: full tool output archived by hash key
- Dereference-and-inject: on demand, exact content recovered
Applicability to Zeph
Zeph's compress_context (always_on compaction) currently summarizes past turns but discards raw tool outputs. With Memex-style indexing:
- Tool outputs could be compressed to summary + index reference in context
- Full tool output archived in SQLite with key → recoverable if LLM references the index
- Prevents hallucination of past read/shell/web output contents after compaction
Direct improvement path: extend compress_context.rs to emit index references instead of discarding content; add a tool_output_archive table in SQLite; resolve index keys on demand during context assembly.
Priority
P2 — directly applicable to zeph-core compaction; addresses a known limitation (tool output loss after compaction).
Source
arXiv:2603.04257 (March 2026)