EnSIMem: Entity-Structured Indexing for Long-Term Agent Memory

Xuanyu Meng, Xing Fan, Xinyi Fan, Chenlei Guo, Yixuan Xie, Jiawei HanarXiv 2026

TL;DR

EnSIMem is a novel long-term memory architecture that helps AI agents recall past interactions with high precision by using structure as an address system rather than a lossy compression mechanism. By organizing history into theme-coherent episodes and indexing them via structured [entity][type][property:value] handles, it allows agents to dynamically retrieve and reason over exact, uncompressed source dialogue. This approach achieves state-of-the-art accuracy on long-term memory benchmarks while maintaining compact context windows and high efficiency.

What Problem Does This Paper Address?

For AI agents deployed over long periods, memory isn't just about having a massive context window; it’s about retrieving the right evidence at the right time. Current memory systems suffer from a harsh trade-off between scalability and specificity:

  1. Full Context Windows: Passing the entire raw interaction history causes severe context bloat, high latency, and "lost in the middle" distraction effects.
  2. Summarization: Compressing history into text summaries strips away crucial details, temporal qualifiers, and evidentiary provenance.
  3. Standard RAG: Retrieving anonymous text chunks via dense vector similarity often fails to pinpoint specific entities or relations, especially when dealing with complex multi-hop or temporal queries.

The authors tackle this challenge by asking: How can we build a persistent memory layer that provides precise, structured access to facts without losing the rich context of the original conversation?

Methods

EnSIMem splits the problem into two decoupled stages: Offline Memory Construction and Online Agent Memory Access.

Overview of the EnSIMem architecture showing offline construction and online access workflows.

1. Offline Memory Construction

Instead of chunking by arbitrary token lengths or entire sessions, EnSIMem groups dialogue turns into theme-coherent episodes based on shared entities, events, or goals.

From each episode, it extracts query-independent, structured index records formatted as: $$\text{[entity][entity type][property : value]}$$ Crucially, these records do not replace the text; they act as an address system. Every record remains strictly linked back to its original source turns, timestamps, and multimodal fields (like image captions).

2. Granularity-Controlled Property Alignment

To ensure successful matching, properties are normalized to an intermediate level of granularity. For example, "took a helicopter to Chicago" and "traveled to Chicago" are both mapped to a travel-related property, while the specific detail ("helicopter") is preserved in the value field. This balances robust paraphrase matching with event-specific distinctions.

3. Online Retrieval and Adaptive Budgeting

When a user asks a question, a query planner decomposes it into explicit evidence requirements and classifies the reasoning type (e.g., point, temporal, compositional, or aggregation).

EnSIMem then uses structured entity-property lookup paired with a dense retrieval fallback. Instead of retrieving a fixed $k$ number of items, it uses adaptive retrieval: it stops early for simple point queries but exhaustively collects all relevant episodes for aggregation queries (e.g., counting occurrences). The agent then generates its final response using the fully expanded, uncompressed source turns from the retrieved episodes.

Datasets

The model was evaluated on two prominent long-term conversational memory benchmarks:

  • LoCoMo: Consists of 10 very long, multi-session conversations featuring speaker turns, timestamps, and optional image observations. It tests multi-hop reasoning, temporal grounding, and aggregation.
  • LongMemEval: Focuses on interactive long-term memory tasks, testing single-session preferences, assistant tasks, multi-session memory, and knowledge updates.

Key Insights and Ideas

  • Structure as an Address, Not a Summary: The core philosophical shift in EnSIMem is treating structured data as a pointer map to raw text, rather than using the structured data (or a summary) to generate the answer directly. This preserves the exact nuances and provenance of the source dialogue.
  • The "Goldilocks" Granularity: Chunking memory at the episode level provides a vital middle ground. Per-turn chunking loses anaphoric context (like pronouns), while per-session chunking introduces too much unrelated noise.
  • Query-Aware Stopping Rules: Standard RAG systems often fail on counting or tracking tasks because they use a fixed top-$k$ retrieval budget. EnSIMem’s ability to adjust its retrieval budget based on whether a query requires point-evidence or exhaustive aggregation is a major driver of its success.

Key Results

EnSIMem demonstrated substantial performance gains over existing state-of-the-art memory methods:

  • LoCoMo Benchmark: EnSIMem achieved an overall accuracy of 90.6% (evaluated by GPT-4o-mini) and 90.0% (evaluated by Qwen3-32B), significantly outperforming the strong baseline MEMORA (86.3%) and raw Full Context windows (82.5%).
  • LongMemEval Benchmark: It reached 92.8% overall accuracy, outperforming MEMORA by 5.4 percentage points, with the largest improvements observed in multi-session and assistant tracking tasks.
Figure 2: Ablation results on LoCoMo. The left panel compares episode granularity, showing that theme-coherent episodes outperform per-turn and per-session units. The right panel compares four property granularities: Fine, Broad (EnSIMem setting), Broad+, and Very broad. Broad+ is a slightly broader variant that merges additional action-like predicates into the shared property ac- tivity, while still preserving intermediate property distinctions. Higher accuracy is better.

Ablation studies highlighted the necessity of its design choices:

  • Episode Granularity: Theme-coherent episodes achieved 96.59% accuracy, beating per-session (94.32%) and per-turn (90.91%) approaches.
  • Property Granularity: Intermediate "Broad" property alignment outperformed hyper-specific ("Fine") and hyper-generic ("Very Broad") extractions.

Limitations and Future Work

While highly effective, the authors note several limitations:

  • Episodic Focus: EnSIMem currently focuses strictly on episodic conversational memory. It does not yet incorporate procedural memory (reusable agent skills) or semantic memory (consolidated, generalized facts).
  • LLM Dependence: The offline pipeline relies heavily on LLMs for episode partitioning and property extraction, making it sensitive to prompt engineering and the underlying model's capabilities.
  • Future Directions: The authors propose extending EnSIMem to create a unified agent harness that links episodic, procedural, and semantic stores via shared entity identifiers and provenance links.

Summary updated

BibTeX
@misc{meng2026ensimem,
  author = {Xuanyu Meng and Xing Fan and Xinyi Fan and Chenlei Guo and Yixuan Xie and Jiawei Han},
  title = {{EnSIMem: Entity-Structured Indexing for Long-Term Agent Memory}},
  year = {2026},
  eprint = {2609.27279},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.27279},
}
Figure