Reading + AI

SimpleMem: Efficient Lifelong Memory for LLM Agents

Jiaqi Liu, Yaofeng Su, Peng Xia, Siwei Han, Zeyu Zheng, Cihang Xie, Mingyu Ding, Huaxiu Yao

arXiv:2601.02553v3 · This workspace stays on this version. Check arXiv for newer versions

Affiliations and author notes
  • UNC-Chapel Hill
  • jqliu@cs.unc.edu
  • University of California, Berkeley
  • University of California, Santa Cruz
  • md@cs.unc.edu
  • huaxiu@cs.unc.edu
Source comparison finished

Original formulas, table values and figures are preserved. Comparison can miss differences; use the original PDF to check details.

Reading view checked: 85 math expressions, 0 rendering failures; 10 of 10 images available.

Compared 87 of 87 source passages against 14 of 14 PDF pages.

10 of 10 figure, table and graphic images captured. Open original PDF

Abstract

To support long-term interaction in complex environments, LLM agents require memory systems that manage historical experiences. Existing approaches either retain full interaction histories via passive context extension, leading to substantial redundancy, or rely on iterative reasoning to filter noise, incurring high token costs. To address this challenge, we introduce SimpleMem, an efficient memory framework based on semantic lossless compression. We propose a three-stage pipeline designed to maximize information density and token utilization: (1) Semantic Structured Compression, which distills unstructured interactions into compact, multi-view indexed memory units; (2) Online Semantic Synthesis, an intra-session process that instantly integrates related context into unified abstract representations to eliminate redundancy; and (3) Intent-Aware Retrieval Planning, which infers search intent to dynamically determine retrieval scope and construct precise context efficiently. Experiments on benchmark datasets show that our method consistently outperforms baseline approaches in accuracy, retrieval efficiency, and inference cost, achieving an average F1 improvement of 26.4% in LoCoMo while reducing inference-time token consumption by up to 30×, demonstrating a superior balance between performance and efficiency. Code is available at https://github.com/aiming-lab/SimpleMem.

Large Language Model (LLM) agents have recently demonstrated remarkable capabilities across a wide range of tasks (Xia et al., 2025; Team et al., 2025; Qiu et al., 2025). However, constrained by fixed context windows, existing agents exhibit significant limitations when engaging in long-context and multi-turn interaction scenarios (Liu et al., 2023; Wang et al., 2024a; Liu et al., 2025; Hu et al., 2025; Tu et al., 2025). To facilitate reliable long-term interaction, LLM agents require robust memory systems to efficiently manage and utilize historical experience (Dev and Taranjeet, 2024; Fang et al., 2025; Wang and Chen, 2025; Tang et al., 2025; Yang et al., 2025; Ouyang et al., 2025).

While recent research has extensively explored the design of memory modules for LLM agents, current systems still suffer from suboptimal retrieval efficiency and low token utilization (Fang et al., 2025; Hu et al., 2025). On one hand, many existing systems maintain complete interaction histories through full-context extension (Li et al., 2025; Zhong et al., 2024). However, this approach introduce substantial redundant information (Hu et al., 2025). Specifically, during long-horizon interactions, user inputs and model responses accumulate substantial low-entropy noise (e.g., repetitive logs, non-task-oriented dialogue), which degrades the effective information density of the memory buffer. This redundancy adversely affects memory retrieval and downstream reasoning, often leading to middle-context degradation phenomena (Liu et al., 2023), while also incurring significant computational overhead during retrieval and secondary inference. On the other hand, some agentic frameworks mitigate noise through online filtering based on iterative reasoning procedures (Yan et al., 2025; Packer et al., 2023). Although such approaches improve retrieval relevance, they rely on repeated inference cycles, resulting in substantial computational cost, including increased latency and token usage. As a result, neither paradigm achieves efficient allocation of memory and computation resources.

Figure 1
Figure 1: Performance vs. Efficiency Trade-off. Comparison of F1 against Token Cost on the LoCoMo benchmark. SimpleMem achieves high accuracy with minimal token consumption.

To address these limitations, we introduce SimpleMem, an efficient memory framework inspired by the Complementary Learning Systems (CLS) theory (Kumaran et al., 2016) and built around structured semantic compression. The objective of SimpleMem is to improve information efficiency under fixed context and token budgets. We develop a three-stage pipeline that supports dynamic memory compression, organization, and adaptive retrieval: (1) Semantic Structured Compression: we apply a semantic density gating mechanism via LLM-based qualitative assessment. The system uses the foundation model as a semantic judge to estimate information gain relative to history, preserving only content with high downstream utility. Retained information is reformulated into compact memory units and indexed jointly using dense semantic embeddings, sparse lexical features, and symbolic metadata. (2) Online Semantic Synthesis: inspired by biological consolidation and optimized for real-time interaction, we introduce an intra-session process that reorganizes memory on-the-fly. Related memory units are synthesized into higher-level abstract representations during the write phase, allowing repetitive or structurally similar experiences to be denoised and compressed immediately. (3) Intent-Aware Retrieval Planning: we employ a planning-based retrieval strategy that infers latent search intent to determine retrieval scope dynamically. The system constructs a precise context by querying multiple indexes (symbolic, semantic, lexical) and unifying results through ID-based deduplication, balancing structural constraints and semantic relevance without complex linear weighting.

Our primary contribution is SimpleMem, an efficient memory framework grounded in structured semantic compression, which improves information efficiency through principled memory organization, online synthesis, and intent-aware planning. As shown in Figure 1, our empirical experiments demonstrate that SimpleMem establishes a new state-of-the-art with an F1 score, outperforming strong baselines like Mem0 by 26.4%, while reducing inference token consumption by 30×\times compared to full-context models.

In this section, we present SimpleMem, which operates through a three-stage pipeline (see Figure 2 for the detailed architecture). Specifically, we first describe the Semantic Structured Compression, which utilizes implicit semantic gating to filter redundant interaction content and reformulate raw dialogue streams into compact memory units. Next, we describe Online Semantic Synthesis, an on-the-fly mechanism that instantly synthesizes related memory units into higher-level abstract representations, ensuring a compact and noise-free memory topology. Finally, we present Intent-Aware Retrieval Planning, which infers latent search intent to dynamically adjust retrieval scope, constructing precise and token-efficient contexts for downstream reasoning.

Figure 2
Figure 2: The SimpleMem Architecture. SimpleMem follows a three-stage pipeline: (1) Semantic Structured Compression filters low-utility dialogue and converts informative windows into compact, context-independent memory units. (2) Online Semantic Synthesis consolidates related fragments during writing, maintaining a compact and coherent memory topology. (3) Intent-Aware Retrieval Planning infers search intent to adapt retrieval scope and query forms, enabling parallel multi-view retrieval and token-efficient context construction.

A primary bottleneck in long-term interaction is context inflation, the accumulation of raw, low-entropy dialogue. For example, a large portion of interaction segments in the real-world consists of phatic chit-chat or redundant confirmations, which contribute little to downstream reasoning but consume substantial context capacity. To address this, we introduce a mechanism to actively filter and restructure information at the source.

Specifically, first, incoming dialogue is segmented into overlapping sliding windows WW of fixed length, where each window represents a short contiguous span of recent interaction. These windows serve as the basic units for processing.

Unlike traditional approaches that rely on rigid heuristic filters or separate classification models, we employ an implicit semantic density gating mechanism integrated directly into the generation process. We model the information assessment as an instruction-following task performed by the foundation model itself. The system leverages the attention mechanism of the LLM ff to identify high-entropy spans within the window WW relative to the immediate history HH.

Formally, we define the gating function Φgate\Phi_{\text{gate}} not as a binary classifier, but as a generative filter resulting from the model’s extraction capability:

Φgate(W)→{mk}s.t.∣{mk}∣≥0\Phi_{\text{gate}}(W)\to\{m_{k}\}\quad\text{s.t.}\quad|\{m_{k}\}|\geq 0
(1)

Here, the generation of an empty set (∅\emptyset) inherently signifies a low-density window (e.g., pure phatic chitchat), effectively discarding it without explicit threshold tuning. This instruction-driven gating allows the system to capture subtle semantic nuances while naturally filtering redundancy through the model’s semantic compression objectives.

For windows containing valid semantic content, the system performs a unified De-linearization Transformation Fθ\mathcal{F}_{\theta}. Instead of sequential independent modules, we optimize the extraction, coreference resolution, and temporal anchoring as a joint generation task. The transformation projects the raw dialogue window WW directly into a set of context-independent memory units {mk}\{m_{k}\}:

{mk}=Fθ(W;H)≈(gtime∘gcoref∘gext)(W).\{m_{k}\}=\mathcal{F}_{\theta}(W;H)\approx(g_{\text{time}}\circ g_{\text{coref}}\circ g_{\text{ext}})(W).
(2)

In this unified pass, the model follows strict instructional constraints to: (1) resolve ambiguous pronouns to specific entity names (gcorefg_{\text{coref}}), (2) convert relative temporal expressions into absolute ISO-8601 timestamps (gtimeg_{\text{time}}), and (3) atomize complex dialogue flows into self-contained factual statements. By aggregating all resulting units mkm_{k} across sliding windows, we obtain the complete memory set M\mathcal{M}.

Following compression, the system organizes the memory units to support storage and retrieval. This stage consists of two synergistic processes: (i) structured multi-view indexing for precise access, and (ii) online semantic synthesis for minimizing redundancy at the point of creation.

To support flexible and high-fidelity retrieval, each memory unit is indexed through three complementary representations. First, at the Semantic Layer, we map the entry to a dense vector space sks_{k} using embedding models, capturing abstract meaning to enable fuzzy matching (e.g., retrieving "latte" when querying "hot drink"). Second, the Lexical Layer utilizes an inverted index-based sparse representation. This acts as a high-dimensional sparse vector lkl_{k} focusing on exact keyword matches and rare proper nouns, ensuring that specific entities are not diluted in dense vector space. Third, the Symbolic Layer extracts structured metadata, such as timestamps and entity types, to enable deterministic filtering logic. Formally, for a given memory unit mkm_{k}, these projections form the comprehensive indexing I\mathcal{I}:

I(mt,k)={sk=Edense(mk)(Semantic Layer)lk=Esparse(mk)(Lexical Layer)rk=Esym(mk)(Symbolic Layer)\mathcal{I}(m_{t,k})=\begin{cases}s_{k}=E_{\text{dense}}(m_{k})&\text{(Semantic Layer)}\\ l_{k}=E_{\text{sparse}}(m_{k})&\text{(Lexical Layer)}\\ r_{k}=E_{\text{sym}}(m_{k})&\text{(Symbolic Layer)}\end{cases}
(3)

This architecture allows the system to flexibly query information based on conceptual similarity, exact keyword matches, or structured metadata constraints.

While this multi-view indexing strategy facilitates access, naively accumulating raw extractions leads to fragmentation, causing the memory structure to grow in a purely additive and unregulated manner that fails to adapt in real time to the evolving semantic context of an ongoing interaction. To address this, we introduce Online Semantic Synthesis, an intra-session consolidation mechanism. Unlike traditional systems that rely on asynchronous background maintenance, SimpleMem performs synthesis on-the-fly during the write phase. The model analyzes the stream of extracted facts within the current session scope and synthesizes related fragments into unified, high-density entries before they are committed to the database.

Formally, we define this synthesis as a transformation function Fsyn\mathcal{F}_{\text{syn}} that maps a set of new observations OsessionO_{\text{session}} to a consolidated memory entry Fsyn(Osession,Ccontext;f)\mathcal{F}_{\text{syn}}(O_{\text{session}},\mathcal{C}_{\text{context}};f), where Ccontext\mathcal{C}_{\text{context}} represents the current conversational context. This operation denoises the input by merging scattered details into a coherent whole. For instance, rather than storing three separate fragments like "User wants coffee", "User prefers oat milk", and "User likes it hot", the synthesis layer consolidates them into a single, comprehensive entry: "User prefers hot coffee with oat milk". This proactive synthesis ensures that the memory topology remains compact and free of redundant fragmentation, significantly reducing the burden on the retrieval system during future interactions.

After memory entries are organized, the final challenge is to retrieve relevant information under constrained context budgets. Standard retrieval approaches typically fetch a fixed number of entries, which often results in recall failure for complex queries or token wastage for simple ones. To address this, we introduce Intent-Aware Retrieval Planning, a mechanism that dynamically determines the retrieval scope and depth by inferring the user’s latent search intent.

Unlike systems that rely on scalar complexity classifiers, SimpleMem leverages the reasoning capabilities of the LLM to generate a comprehensive retrieval plan. Given a query qq and history HH, the planning module P\mathcal{P} acts as a reasoner to decompose the information needs and estimate the necessary search depth dd:

{qsem,qlex,qsym,d}∼P(q,H)\{q_{\text{sem}},q_{\text{lex}},q_{\text{sym}},d\}\sim\mathcal{P}(q,H)
(4)

where qsemq_{\text{sem}}, qlexq_{\text{lex}}, and qsymq_{\text{sym}} are optimized queries for semantic, lexical, and symbolic retrieval respectively. The parameter dd represents the adaptive retrieval depth, which reflects the estimated complexity of the query. Based on dd, the system utilizes a candidate limit nn (where n∝dn\propto d) to balance recall coverage against context window constraints.

Guided by this plan, the system executes a parallel multi-view retrieval. We simultaneously query all three index layers defined in Section 2.1, imposing the quantity limit nn on each path:

Rsem=Top-⁡n(cos⁡(E(qsem),E(mi))∣mi∈M)Rlex=Top-⁡n(BM25⁡(qlex,mi)∣mi∈M)Rsym=Top-⁡n({mi∈M∣Meta(mi)⊨qsym})\begin{aligned}\displaystyle\mathcal{R}_{\text{sem}} & \displaystyle=\operatorname{Top-}n(\cos(E(q_{\text{sem}}),E(m_{i}))\mid m_{i}\in\mathcal{M}) \\ \displaystyle\mathcal{R}_{\text{lex}} & \displaystyle=\operatorname{Top-}n(\operatorname{BM25}(q_{\text{lex}},m_{i})\mid m_{i}\in\mathcal{M}) \\ \displaystyle\mathcal{R}_{\text{sym}} & \displaystyle=\operatorname{Top-}n(\{m_{i}\in\mathcal{M}\mid\text{Meta}(m_{i})\models q_{\text{sym}}\})\end{aligned}
(5)

Here, each view captures distinct relevance signals: Rsem\mathcal{R}_{\text{sem}} retrieves based on dense embedding similarity; Rlex\mathcal{R}_{\text{lex}} matches exact keywords or proper nouns; and Rsym\mathcal{R}_{\text{sym}} filters entries based on structured metadata constraints.

Finally, we construct the context Cq\mathcal{C}_{q} by merging the results from these three views using a set union operation. This step naturally deduplicates overlapping entries, ensuring a comprehensive yet compact context:

Cq=Rsem∪Rlex∪Rsym\mathcal{C}_{q}=\mathcal{R}_{\text{sem}}\cup\mathcal{R}_{\text{lex}}\cup\mathcal{R}_{\text{sym}}
(6)

This hybrid approach ensures that strong signals from any view are preserved, allowing the system to adaptively scale its retrieval volume nn based on the inferred depth dd.

In this section, we evaluate SimpleMem on the benchmark to answer the following research questions: (1) Does SimpleMem outperform other memory systems in complex long-term reasoning understanding tasks? (2) Can SimpleMem achieve a superior trade-off between retrieval accuracy and token consumption? (3) How effective are the proposed components? (4) What factors account for the observed performance and efficiency gains?

Table 1
ModelMethodMultiHopTemporalOpenDomainSingleHopAverageToken
F1BLEUF1BLEUF1BLEUF1BLEUF1BLEUCost
GPT-4.1-miniLoCoMo25.0221.6212.0410.6319.0517.0718.6815.8718.7016.3016,910
ReadAgent6.485.65.314.237.666.629.187.917.166.09643
MemoryBank5.004.685.944.785.164.525.724.865.464.71432
MemGPT17.7216.0219.4416.5411.2910.1825.5924.2518.5116.7516,977
A-Mem25.0617.3251.0144.7513.2214.7541.0236.9932.5828.452,520
LightMem24.9621.6620.5518.3919.2117.6833.7929.6624.6321.85612
Mem030.1427.6248.9144.8216.4314.9441.336.1734.2030.89973
SimpleMem43.4638.8258.6250.1019.7618.0451.1243.5343.2437.62531
GPT-4oLoCoMo28.0018.479.095.7816.4714.8061.5654.1928.7823.3116,910
ReadAgent14.619.954.163.198.848.3712.4610.2910.027.95805
MemoryBank6.494.692.472.436.435.308.287.105.924.88569
MemGPT30.3622.8317.2913.1812.2411.8740.1636.3525.0121.0616,987
A-Mem32.8623.7639.4131.2317.1015.8444.4338.9733.4527.451,216
LightMem28.1521.8336.5329.1213.3811.5433.7628.0227.9622.63645
Mem035.1327.5652.3844.1517.7315.9239.1235.4336.0930.77985
SimpleMem35.8932.8356.7120.5718.2316.3445.4139.2539.0627.25550
Qwen3-PlusLoCoMo24.1518.9416.5713.2811.8110.5838.5828.1622.7817.7416,910
ReadAgent9.526.8311.228.155.415.239.857.969.007.04742
MemoryBank5.254.941.776.265.886.006.905.574.955.69302
MemGPT25.8017.5024.1018.509.507.8040.2042.1024.9021.4816,958
A-Mem26.5019.8046.1035.1011.9011.5043.8036.5032.0825.731,427
LightMem28.9524.1342.5838.5216.5413.2340.7836.5232.2128.10606
Mem032.4221.2447.5339.8217.1814.5346.2537.5235.8528.281,020
SimpleMem33.7429.0450.8743.3118.4116.2446.9438.1637.4931.69583
Table 1: Performance on the LoCoMo benchmark with High-Capability Models (GPT-4.1 series and Qwen3-Plus). SimpleMem achieves superior efficiency-performance balance.
View original tableOriginal Table 1
Table 2
ModelMethodTemporalMulti-SessionKnowledge-UpdateSingle-Session-UserSingle-Session-AssistantSingle-Session-PreferenceAverage
GPT-4.1-miniFull-context27.06%30.08%41.03%47.14%32.14%60.00%39.57%
Mem040.60%50.37%69.23%87.14%48.21%63.33%59.81%
LightMem85.71%47.37%92.30%88.57%21.43%76.67%68.67%
SimpleMem83.46%60.92%79.48%85.71%75.00%76.67%76.87%
GPT-4.1Full-context51.88%39.10%70.51%65.71%96.43%16.67%56.72%
Mem043.61%54.89%75.64%54.29%39.29%83.33%58.51%
LightMem84.96%57.89%89.74%87.14%71.43%70.00%76.86%
SimpleMem86.47%81.20%80.76%98.57%76.79%80.00%83.97%
Table 2: Performance comparison on the LongMemEval benchmark. The evaluation uses gpt-4.1-mini as the judge. SimpleMem achieves the best overall performance while maintaining balanced capabilities across different sub-tasks.
View original tableOriginal Table 2
Table 3
ModelMethodMultiHopTemporalOpenDomainSingleHopAverageToken
F1BLEUF1BLEUF1BLEUF1BLEUF1BLEUCost
Qwen2.5-1.5bLoCoMo9.056.554.254.049.918.5011.158.678.596.9416,910
ReadAgent6.614.932.552.515.3112.2410.137.546.156.81752
MemoryBank11.148.254.462.878.056.2113.4211.019.277.09284
MemGPT10.447.614.213.8913.4211.649.567.349.417.6216,953
A-Mem18.2311.9424.3219.7416.4814.3123.6319.2320.6716.311,300
LightMem16.4311.3922.9218.5615.0611.2323.2819.2419.4215.11605
Mem020.1814.5327.4222.1419.8315.6827.6323.4223.7718.94942
SimpleMem21.8516.1029.1223.5021.0516.8028.9024.5025.2320.23678
Qwen2.5-3bLoCoMo4.614.293.112.714.555.977.035.694.834.6716,910
ReadAgent2.471.783.013.015.575.223.252.513.583.13776
MemoryBank3.603.391.721.976.636.584.113.324.023.82298
MemGPT5.074.312.942.957.047.107.265.525.584.9716,961
A-Mem12.579.0127.5925.077.127.2817.2313.1216.1313.621,137
LightMem16.4311.396.924.568.067.2318.2815.2412.429.61605
Mem016.8911.548.526.2310.248.8216.4712.4313.039.76965
SimpleMem17.0311.8721.4719.5012.5210.1920.9018.0117.9814.89572
Qwen3-1.7bLoCoMo10.288.826.455.7810.429.0211.1610.359.588.4916,910
ReadAgent7.505.603.152.956.1012.4510.808.156.897.29784
MemoryBank11.508.654.953.208.556.8013.9011.509.737.54290
MemGPT11.508.204.654.1013.8511.9010.257.8510.068.0116,954
A-Mem18.4511.8025.8218.4510.909.9521.5816.7219.1914.231,258
LightMem14.8411.569.357.8513.7610.5928.1422.8916.5213.22679
Mem018.2313.4418.5414.2216.8213.5431.1526.4221.1916.91988
SimpleMem20.8515.4226.7518.6317.9214.1532.8526.4624.5918.67730
Qwen3-8bLoCoMo13.509.206.805.5010.108.8014.5011.2011.238.6816,910
ReadAgent7.205.103.503.105.505.408.106.206.084.95721
MemoryBank9.507.103.802.507.506.509.207.507.505.90287
MemGPT14.209.805.504.2012.5010.8011.509.1010.938.4816,943
A-Mem20.5013.8022.5018.2013.2010.5026.8021.5020.7516.001,087
LightMem18.5314.2326.7821.5214.1211.2429.4823.8322.2317.71744
Mem022.4216.8332.4826.1315.2312.5433.0527.2425.8020.691,015
SimpleMem28.9724.9342.8536.4915.3513.9046.6240.6933.4529.00621
Table 3: Performance on the LoCoMo benchmark with Efficient Models (Small parameters). SimpleMem demonstrates robust performance even on 1.5B/3B models, often surpassing larger models using baseline memory systems.
View original tableOriginal Table 3

Benchmark Dataset. We evaluate performance on the LoCoMo (Maharana et al., 2024) and LongMemEval-S (Wu et al., 2024) benchmarks. Brief descriptions are provided below, with additional details in Appendix B.

LoCoMo (Maharana et al., 2024) is specifically designed to test the limits of LLMs in processing long-term conversational dependencies. The dataset comprises conversation samples ranging from 200 to 400 turns, containing complex temporal shifts and interleaved topics. The evaluation set consists of 1,986 questions categorized into four distinct reasoning types: (1) multi-hop reasoning; (2) temporal reasoning; (3) open Domain; (4) single hop.

LongMemEval-S (Wu et al., 2024) features extreme context lengths that pose severe challenges for memory systems. Unlike standard benchmarks, it requires precise answer localization across multiple sub-categories (e.g., temporal events, user preferences) within exceptionally long interaction histories. We use gpt-4.1-mini to evaluate answer correctness against ground-truth references, labeling responses as Correct or Wrong based on semantic and temporal alignment. The full evaluation prompt is provided in Appendix A.4.

Baselines. We compare SimpleMem with representative memory-augmented systems: LoCoMo (Maharana et al., 2024), ReadAgent (Lee et al., 2024), MemoryBank (Zhong et al., 2024), MemGPT (Packer et al., 2023), A-Mem (Xu et al., 2025), LightMem (Fang et al., 2025), and Mem0 (Dev and Taranjeet, 2024).

Backbone Models. To test robustness across capability scales, we instantiate each baseline and SimpleMem on multiple LLM backends: GPT-4o, GPT-4.1-mini, Qwen-Plus, Qwen2.5 (1.5B/3B), and Qwen3 (1.7B/8B).

Implementation Details. For semantic structured compression, we use a sliding window of size W=20W=20. Memory indexing is implemented using LanceDB with a multi-view design: Qwen3-embedding-0.6b (1024 dimensions) for dense semantic embeddings, BM25 for sparse lexical indexing, and SQL-based metadata storage for symbolic attributes. During retrieval, we employ adaptive query-aware retrieval, where the retrieval depth is dynamically adjusted based on estimated query complexity, ranging from kmin⁡=3k_{\min}=3 for simple lookups to kmax⁡=20k_{\max}=20 for complex reasoning queries.

Evaluation Metrics. For LoCoMo, we report F1 and BLEU-1 (accuracy), Adversarial Success Rate (robustness to distractors), and Token Cost (retrieval efficiency). For LongMemEval-S, we use its standard accuracy-style metric.

Tables 1 and 3 present detailed performance comparisons on the LoCoMo benchmark across different model scales, while Table 2 reports results on LongMemEval-S.

Performance on High-Capability Models. Across LoCoMo and LongMemEval-S, SimpleMem consistently outperforms existing memory systems across model scales, achieving strong and robust gains in accuracy.

On LoCoMo (Table 1), SimpleMem leads all baselines. Using GPT-4.1-mini, it achieves an Average F1 of 43.24, substantially exceeding Mem0 (34.20) and the full-context baseline (18.70). The largest gains are observed in Temporal Reasoning, where SimpleMem reaches 58.62 F1 compared to 48.91 for Mem0, underscoring the effectiveness of semantic structured compression in resolving complex temporal dependencies. These improvements persist at larger scales: on GPT-4o, SimpleMem attains the highest Average F1 (39.06), outperforming Mem0 (36.09) and A-Mem (33.45).

A task-level breakdown on LoCoMo further highlights the balanced capabilities of SimpleMem. In SingleHop QA, SimpleMem consistently achieves the best performance (e.g., 51.12 F1 on GPT-4.1-mini), demonstrating precise factual retrieval. In more challenging MultiHop settings, SimpleMem significantly outperforms Mem0 and LightMem on GPT-4.1-mini, indicating its ability to bridge disconnected facts and support deep reasoning without relying on expensive iterative retrieval loops.

Results on LongMemEval-S (Table 2) further demonstrate the robustness of SimpleMem under extreme context lengths. Using the gpt-4.1-mini backbone, SimpleMem achieves the highest average accuracy of 76.87%, outperforming LightMem (68.67%) and substantially exceeding Mem0 (59.81%) and the full-context baseline (39.57%). Gains are most pronounced in the challenging Multi-Session category, where SimpleMem attains 60.92% accuracy, compared to 47.37% for LightMem and 30.08% for full-context, highlighting its effectiveness in cross-session information integration under severe context constraints.

When scaled to the more capable gpt-4.1 backbone, SimpleMem maintains its state-of-the-art performance with an average accuracy of 83.97%. It is particularly strong in the Single-Session User task (98.57%), demonstrating near-perfect recall of immediate user-provided details. While LightMem exhibits strong performance on temporally specific queries, SimpleMem offers a more balanced profile: it avoids catastrophic failures in assistant-focused recall (where LightMem drop significantly on the mini model) while maintaining high accuracy in complex multi-session retrieval. This balance suggests that SimpleMem’s structured indexing strategy effectively disentangles episodic noise from salient facts, providing a reliable memory substrate for long-term interaction.

Token Efficiency. A key strength of SimpleMem lies in its inference-time efficiency. As reported in the rightmost columns of Tables 1 and 3, full-context approaches such as LoCoMo and MemGPT consume approximately 16,900 tokens per query. In contrast, SimpleMem reduces token usage by roughly 30×30\times, averaging 530-580 tokens per query. Furthermore, compared to optimized retrieval baselines like Mem0 (∼\sim980 tokens) and A-Mem (∼\sim1,200+ tokens), SimpleMem reduces token usage by 40-50% while delivering superior accuracy. For instance, on GPT-4.1-mini, SimpleMem uses only 531 tokens to achieve state-of-the-art performance, whereas ReadAgent consumes more (643 tokens) but achieves far lower accuracy (7.16 F1). This validates the effectiveness of SimpleMem in strictly controlling context bandwidth without sacrificing information density.

Performance on Smaller Models. Table 3 highlights the ability of SimpleMem to empower smaller parameter models. On Qwen3-8b, SimpleMem achieves an impressive Average F1 of 33.45, significantly surpassing Mem0 (25.80) and LightMem (22.23). Crucially, a 3B-parameter model (Qwen2.5-3b) paired with SimpleMem achieves 17.98 F1, outperforming the same model with Mem0 (13.03) by nearly 5 points. Even on the extremely lightweight Qwen2.5-1.5b, SimpleMem maintains robust performance (25.23 F1), beating larger models using inferior memory strategies (e.g., Qwen3-1.7b with Mem0 scores 21.19).

We conduct a comprehensive evaluation of computational efficiency, examining both end-to-end system latency and the scalability of memory indexing and retrieval. To assess practical deployment viability, we measured the full lifecycle costs on the LoCoMo-10 dataset using GPT-4.1-mini.

As illustrated in Table 4, SimpleMem exhibits superior efficiency across all operational phases. In terms of memory construction, our system achieves the fastest processing speed at 92.6 seconds per sample. This represents a dramatic improvement over existing baselines, outperforming Mem0 by approximately 14×\times (1350.9s) and A-Mem by over 50×\times (5140.5s). This massive speedup is directly attributable to our semantic structured compression, which processes data in a streamlined single pass, thereby avoiding the complex graph updates required by Mem0 or the iterative summarization overheads inherent to A-Mem.

Beyond construction, SimpleMem also maintains the lowest retrieval latency at 388.3 seconds per sample, which is approximately 33% faster than LightMem and Mem0. This gain arises from the adaptive retrieval mechanism, which dynamically limits retrieval scope and prioritizes high-level abstract representations before accessing fine-grained details. By restricting retrieval to only the most relevant memory entries, the system avoids the expensive neighbor traversal and expansion operations that commonly dominate the latency of graph-based memory systems.

When considering the total time-to-insight, SimpleMem achieves a 4×\times speedup over Mem0 and a 12×\times speedup over A-Mem. Crucially, this efficiency does not come at the expense of performance. On the contrary, SimpleMem achieves the highest Average F1 among all compared methods. These results support our central claim that structured semantic compression and adaptive retrieval produce a more compact and effective reasoning substrate than raw context retention or graph-centric memory designs, enabling a superior balance between accuracy and computational efficiency.

Table 4
ModelConstruction TimeRetrieval TimeTotal TimeAverage F1
A-mem5140.5s796.7s5937.2s32.58
Lightmem97.8s577.1s675.9s24.63
Mem01350.9s583.4s1934.3s34.20
SimpleMem92.6s388.3s480.9s43.24
Table 4: Comparison of construction time, retrieval time, total experiment time, and average F1 score across different memory systems (tested on LoCoMo-10 with GPT-4.1-mini; time values are reported as per-sample averages on LoCoMo-10).
View original tableOriginal Table 4

In addition, we conduct an ablation study using the GPT-4.1-mini backend. We investigate the contribution of three key components. The results are summarized in Table 5.

Table 5
ConfigurationMulti-hopTemporalOpen DomainSingle HopAverage
F1DiffF1DiffF1DiffF1DiffF1Diff
Full SimpleMem43.46-58.62-19.76-51.12-43.24-
w/o Semantic Compression34.20(↓\downarrow21.3%)25.40(↓\downarrow56.7%)17.50(↓\downarrow11.4%)48.05(↓\downarrow6.0%)31.29(↓\downarrow27.6%)
w/o Online Synthesis29.85(↓\downarrow31.3%)55.10(↓\downarrow6.0%)18.20(↓\downarrow7.9%)49.80(↓\downarrow2.6%)38.24(↓\downarrow11.6%)
w/o Intent-Aware Retrieval38.60(↓\downarrow11.2%)56.80(↓\downarrow3.1%)14.50(↓\downarrow26.6%)41.20(↓\downarrow19.4%)37.78(↓\downarrow12.6%)
Table 5: Full ablation analysis with GPT-4.1-mini backend. The "Diff" columns indicate the percentage drop relative to the full SimpleMem model. The results confirm that each stage contributes significantly to specific reasoning capabilities.
View original tableOriginal Table 5
Figure 3
Figure 3: A Case of SimpleMem for Long-Term Multi-Session Dialogues. SimpleMem processes multi-session dialogues by filtering redundant content, normalizing temporal references, and organizing memories into compact representations. During retrieval, it adaptively combines semantic, lexical, and symbolic signals to select relevant entries.

Impact of Semantic Structured Compression. Replacing the proposed compression pipeline with standard chunk-based storage leads to a substantial degradation in temporal reasoning performance. Specifically, removing semantic structured compression reduces the Temporal F1 by 56.7%, from 58.62 to 25.40. This drop indicates that without context normalization steps such as resolving coreferences and converting relative temporal expressions into absolute timestamps, the retriever struggles to disambiguate events along the timeline. As a result, performance regresses to levels comparable to conventional retrieval-augmented generation systems that rely on raw or weakly structured context.

Impact of Online Semantic Synthesis. Disabling online semantic synthesis results in a 31.3% decrease in multi-hop reasoning performance. Without on-the-fly consolidation during the write phase, semantically related facts accumulate as fragmented entries, forcing the retriever to assemble dispersed evidence at query time. This fragmentation inflates contextual redundancy and rapidly exhausts the available context window in complex queries. The observed degradation demonstrates that proactive, intra-session synthesis is essential for maintaining a compact and semantically coherent memory topology, and for transforming local observations into reusable, high-density abstractions.

Intent-Aware Retrieval Planning. Removing intent-aware retrieval planning and reverting to a fixed-depth retrieval strategy primarily degrades performance on open-domain and single-hop tasks, with drops of 26.6% and 19.4%, respectively. In the absence of query-aware adjustment, the system either retrieves insufficient context for entity-specific queries or introduces excessive irrelevant information for simple queries. These results highlight the importance of dynamically modulating retrieval scope to balance relevance and efficiency during inference.

To illustrate how SimpleMem handles long-horizon conversational history, Figure 3 presents a representative multi-session example spanning two weeks and approximately 24,000 raw tokens. SimpleMem filters low-information dialogue during ingestion and retains only high-utility memory entries, reducing the stored memory to about 800 tokens without losing task-relevant content.

Temporal Normalization. Relative temporal expressions such as last week” and yesterday” refer to different absolute times across sessions. SimpleMem resolves it into absolute timestamps at memory construction time, ensuring consistent temporal grounding over long interaction gaps.

Precise Retrieval. When queried about Sarah’s past artworks, the intent-aware retrieval planner infers both the semantic focus (art-related activities) and the temporal constraints implied by the query. The system then performs parallel multi-view retrieval, combining semantic similarity with symbolic filtering to exclude unrelated activities and return only temporally valid entries. This example demonstrates how structured compression, temporal normalization, and adaptive retrieval jointly enable reliable long-term reasoning under extended interaction histories.

Memory Systems for LLM Agents. Recent approaches manage memory through virtual context or structured representations. Virtual context methods, including MemGPT (Packer et al., 2023), MemoryOS (Kang et al., 2025), and SCM (Wang et al., 2023), extend interaction length via paging or stream-based controllers (Wang et al., 2024b) but typically store raw conversation logs, leading to redundancy and increasing processing costs. In parallel, structured and graph-based systems, such as MemoryBank (Zhong et al., 2024), Mem0 (Dev and Taranjeet, 2024), Zep (Rasmussen et al., 2025), A-Mem (Xu et al., 2025), and O-Mem (Wang et al., 2025), impose structural priors to improve coherence but still rely on raw or minimally processed text, preserving referential and temporal ambiguities that degrade long-term retrieval. In contrast, SimpleMem adopts a semantic compression mechanism that converts dialogue into independent, self-contained facts, explicitly resolving referential and temporal ambiguities prior to storage.

Context Management and Retrieval Efficiency. Beyond memory storage, efficient access to historical information remains a core challenge. Existing approaches primarily rely on either long-context models or retrieval-augmented generation (RAG). Although recent LLMs support extended context windows (OpenAI, 2025; Deepmind, 2025; Anthropic, 2025), and prompt compression methods aim to reduce costs (Jiang et al., 2023a; Liskavetsky and others, 2025), empirical studies reveal the “Lost-in-the-Middle” effect (Liu et al., 2023; Kuratov and others, 2024), where reasoning performance degrades as context length increases, alongside prohibitive computational overhead for lifelong agents. RAG-based methods (Lewis et al., 2020; Asai et al., 2023; Jiang et al., 2023b), including structurally enhanced variants such as GraphRAG (Edge et al., 2024; Zhao et al., 2025) and LightRAG (Guo et al., 2024), decouple memory from inference but are largely optimized for static knowledge bases, limiting their effectiveness for dynamic, time-sensitive episodic memory. In contrast, SimpleMem improves retrieval efficiency through Intent-Aware Retrieval Planning, jointly leveraging semantic, lexical, and symbolic signals to construct query-specific retrieval plans and dynamically adapt the retrieval budget, achieving token-efficient reasoning under constrained context budgets.

We introduce SimpleMem, an efficient agent memory architecture grounded in the principle of semantic lossless compression. By treating memory as an active process rather than passive storage, SimpleMem integrates Semantic Structured Compression to filter noise at the source, Online Semantic Synthesis to consolidate fragmented observations during writing, and Intent-Aware Retrieval Planning to dynamically adapt retrieval scope. Empirical evaluation on the LoCoMo and LongMemEval-S benchmark demonstrates the effectiveness and efficiency of our method.

This work is partially supported by Amazon Research Award, Cisco Faculty Research Award, and Coefficient Giving. This work is also partly supported by the National Center for Transportation Cybersecurity and Resiliency (TraCR) (a U.S. Department of Transportation National University Transportation Center) headquartered at Clemson University, Clemson, South Carolina, USA (USDOT Grant #69A3552344812). Any opinions, findings, conclusions, and recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of TraCR, and the U.S. Government assumes no liability for the contents or use thereof.

References

  1. Anthropic (2025) Anthropic Claude 3.7 sonnet and claude code. Note: https://www.anthropic.com/news/claude-3-7-sonnet Cited by: §4.Source
  2. Asai et al. (2023) A. Asai, Z. Wu, Y. Wang, A. Sil, and H. Hajishirzi Self-rag: learning to retrieve, generate, and critique through self-reflection. arXiv preprint arXiv:2310.11511. Cited by: §4.
  3. Deepmind (2025) G. Deepmind Gemini 2.5: Our most intelligent AI model — blog.google. Note: https://blog.google/technology/google-deepmind/gemini-model-thinking-updates-march-2025/#gemini-2-5-thinkingAccessed: 2025-03-25 Cited by: §4.Source
  4. Dev and Taranjeet (2024) K. Dev and S. Taranjeet Mem0: the memory layer for ai agents.. Note: https://github.com/mem0ai/mem0 Cited by: §1, §3.1, §4.Source
  5. Edge et al. (2024) D. Edge, H. Trinh, N. Cheng, J. Bradley, A. Chao, A. Mody, S. Truitt, and J. Larson From local to global: a graph rag approach to query-focused summarization. arXiv preprint arXiv:2404.16130. Cited by: §4.
  6. Fang et al. (2025) J. Fang, X. Deng, H. Xu, Z. Jiang, Y. Tang, Z. Xu, S. Deng, Y. Yao, M. Wang, S. Qiao, et al. LightMem: lightweight and efficient memory-augmented generation. arXiv preprint arXiv:2510.18866. Cited by: §1, §1, §3.1.
  7. Guo et al. (2024) Z. Guo, L. Xia, Y. Yu, T. Ao, and C. Huang Lightrag: simple and fast retrieval-augmented generation. arXiv preprint arXiv:2410.05779. Cited by: §4.
  8. Hu et al. (2025) Y. Hu, S. Liu, Y. Yue, G. Zhang, B. Liu, F. Zhu, J. Lin, H. Guo, S. Dou, Z. Xi, et al. Memory in the age of ai agents. arXiv preprint arXiv:2512.13564. Cited by: §1, §1.
  9. Jiang et al. (2023a) H. Jiang, Q. Wu, C. Lin, Y. Yang, and L. Qiu LLMLingua: compressing prompts for accelerated inference of large language models. arXiv preprint arXiv:2310.05736. Cited by: §4.
  10. Jiang et al. (2023b) Z. Jiang, F. F. Xu, L. Gao, Z. Sun, Q. Liu, J. Dwivedi-Yu, Y. Yang, J. Callan, and G. Neubig Active retrieval augmented generation. arXiv preprint arXiv:2305.06983. Cited by: §4.
  11. Kang et al. (2025) J. Kang, M. Ji, Z. Zhao, and T. Bai Memory os of ai agent. arXiv preprint arXiv:2506.06326. Cited by: §4.
  12. Kumaran et al. (2016) D. Kumaran, D. Hassabis, and J. L. McClelland What learning systems do intelligent agents need? complementary learning systems theory updated. Trends in cognitive sciences 20 (7), pp. 512–534. Cited by: §1.
  13. Kuratov et al. (2024) Y. Kuratov et al. In case of context: investigating the effects of long context on language model performance. arXiv preprint. Cited by: §4.
  14. Lee et al. (2024) K. Lee, X. Chen, H. Furuta, J. Canny, and I. Fischer A human-inspired reading agent with gist memory of very long contexts. arXiv preprint arXiv:2402.09727. Cited by: §3.1.
  15. Lewis et al. (2020) P. Lewis, E. Perez, A. Piktus, F. Petroni, V. Karpukhin, N. Goyal, H. Küttler, M. Lewis, W. Yih, T. Rocktäschel, et al. Retrieval-augmented generation for knowledge-intensive nlp tasks. Advances in Neural Information Processing Systems 33, pp. 9459–9474. Cited by: §4.
  16. Li et al. (2025) Z. Li, S. Song, H. Wang, S. Niu, D. Chen, J. Yang, C. Xi, H. Lai, J. Zhao, Y. Wang, J. Ren, Z. Lin, J. Huo, T. Chen, K. Chen, K. Li, Z. Yin, Q. Yu, B. Tang, H. Yang, Z. Xu, and F. Xiong MemOS: an operating system for memory-augmented generation (mag) in large language models. ArXiv abs/2505.22101. External Links: Link Cited by: §1.Source
  17. Liskavetsky et al. (2025) A. Liskavetsky et al. COMPRESSOR: context-aware prompt compression for enhanced llm inference. arXiv preprint. Cited by: §4.
  18. Liu et al. (2025) J. Liu, K. Xiong, P. Xia, Y. Zhou, H. Ji, L. Feng, S. Han, M. Ding, and H. Yao Agent0-vl: exploring self-evolving agent for tool-integrated vision-language reasoning. arXiv preprint arXiv:2511.19900. Cited by: §1.
  19. Liu et al. (2023) N. F. Liu, K. Lin, J. Hewitt, A. Paranjape, M. Bevilacqua, F. Petroni, and P. Liang Lost in the middle: how language models use long contexts. arXiv preprint arXiv:2307.03172. Cited by: §1, §1, §4.
  20. Maharana et al. (2024) A. Maharana, D. Lee, S. Tulyakov, M. Bansal, F. Barbieri, and Y. Fang Evaluating very long-term conversational memory of llm agents. External Links: 2402.17753, Link Cited by: §B.1, §3.1, §3.1, §3.1.Source
  21. OpenAI (2025) OpenAI Introducing gpt-5. Note: https://openai.com/index/introducing-gpt-5/ Cited by: §4.Source
  22. Ouyang et al. (2025) S. Ouyang, J. Yan, I. Hsu, Y. Chen, K. Jiang, Z. Wang, R. Han, L. T. Le, S. Daruki, X. Tang, et al. Reasoningbank: scaling agent self-evolving with reasoning memory. arXiv preprint arXiv:2509.25140. Cited by: §1.
  23. Packer et al. (2023) C. Packer, V. Fang, S. G. Patil, K. Lin, S. Wooders, and J. Gonzalez MemGPT: towards llms as operating systems. ArXiv abs/2310.08560. External Links: Link Cited by: §1, §3.1, §4.Source
  24. Qiu et al. (2025) J. Qiu, X. Qi, T. Zhang, X. Juan, J. Guo, Y. Lu, Y. Wang, Z. Yao, Q. Ren, X. Jiang, et al. Alita: generalist agent enabling scalable agentic reasoning with minimal predefinition and maximal self-evolution. arXiv preprint arXiv:2505.20286. Cited by: §1.
  25. Rasmussen et al. (2025) P. Rasmussen, P. Paliychuk, T. Beauvais, J. Ryan, and D. Chalef Zep: a temporal knowledge graph architecture for agent memory. arXiv preprint arXiv:2501.13956. Cited by: §4.
  26. Tang et al. (2025) X. Tang, T. Qin, T. Peng, Z. Zhou, D. Shao, T. Du, X. Wei, P. Xia, F. Wu, H. Zhu, et al. Agent kb: leveraging cross-domain experience for agentic problem solving. arXiv preprint arXiv:2507.06229. Cited by: §1.
  27. Team et al. (2025) T. D. Team, B. Li, B. Zhang, D. Zhang, F. Huang, G. Li, G. Chen, H. Yin, J. Wu, J. Zhou, et al. Tongyi deepresearch technical report. arXiv preprint arXiv:2510.24701. Cited by: §1.
  28. Tu et al. (2025) A. Tu, W. Xuan, H. Qi, X. Huang, Q. Zeng, S. Talaei, Y. Xiao, P. Xia, X. Tang, Y. Zhuang, et al. Position: the hidden costs and measurement gaps of reinforcement learning with verifiable rewards. arXiv preprint arXiv:2509.21882. Cited by: §1.
  29. Wang et al. (2023) B. Wang, X. Liang, J. Yang, H. Huang, S. Wu, P. Wu, L. Lu, Z. Ma, and Z. Li Enhancing large language model with self-controlled memory framework. arXiv preprint arXiv:2304.13343. Cited by: §4.
  30. Wang et al. (2025) P. Wang, M. Tian, J. Li, Y. Liang, Y. Wang, Q. Chen, T. Wang, Z. Lu, J. Ma, Y. E. Jiang, et al. O-mem: omni memory system for personalized, long horizon, self-evolving agents. arXiv e-prints, pp. arXiv–2511. Cited by: §4.
  31. Wang et al. (2024a) T. Wang, M. Tao, R. Fang, H. Wang, S. Wang, Y. E. Jiang, and W. Zhou Ai persona: towards life-long personalization of llms. arXiv preprint arXiv:2412.13103. Cited by: §1.
  32. Wang and Chen (2025) Y. Wang and X. Chen Mirix: multi-agent memory system for llm-based agents. arXiv preprint arXiv:2507.07957. Cited by: §1.
  33. Wang et al. (2024b) Z. Z. Wang, J. Mao, D. Fried, and G. Neubig Agent workflow memory. arXiv preprint arXiv:2409.07429. Cited by: §4.
  34. Wu et al. (2024) D. Wu, H. Wang, W. Yu, Y. Zhang, K. Chang, and D. Yu Longmemeval: benchmarking chat assistants on long-term interactive memory. arXiv preprint arXiv:2410.10813. Cited by: §3.1, §3.1.
  35. Xia et al. (2025) P. Xia, K. Zeng, J. Liu, C. Qin, F. Wu, Y. Zhou, C. Xiong, and H. Yao Agent0: unleashing self-evolving agents from zero data via tool-integrated reasoning. arXiv preprint arXiv:2511.16043. Cited by: §1.
  36. Xu et al. (2025) W. Xu, Z. Liang, K. Mei, H. Gao, J. Tan, and Y. Zhang A-mem: agentic memory for llm agents. ArXiv abs/2502.12110. External Links: Link Cited by: §3.1, §4.Source
  37. Yan et al. (2025) B. Yan, C. Li, H. Qian, S. Lu, and Z. Liu General agentic memory via deep research. arXiv preprint arXiv:2511.18423. Cited by: §1.
  38. Yang et al. (2025) B. Yang, L. Xu, L. Zeng, K. Liu, S. Jiang, W. Lu, H. Chen, X. Jiang, G. Xing, and Z. Yan ContextAgent: context-aware proactive llm agents with open-world sensory perceptions. arXiv preprint arXiv:2505.14668. Cited by: §1.
  39. Zhao et al. (2025) Y. Zhao, J. Zhu, Y. Guo, K. He, and X. Li Eˆ 2graphrag: streamlining graph-based rag for high efficiency and effectiveness. arXiv preprint arXiv:2505.24226. Cited by: §4.
  40. Zhong et al. (2024) W. Zhong, L. Guo, Q. Gao, H. Ye, and Y. Wang Memorybank: enhancing large language models with long-term memory. In Proceedings of the AAAI Conference on Artificial Intelligence, Vol. 38, pp. 19724–19731. Cited by: §1, §3.1, §4.

To ensure full reproducibility of the SimpleMem pipeline, we provide the exact system prompts used in the key processing stages. All prompts are designed to be model-agnostic but were optimized for GPT-4o-mini in our experiments to ensure cognitive economy.

This prompt performs entropy-aware filtering and context normalization. Its goal is to transform raw dialogue windows into compact, context-independent memory units while excluding low-information interaction content.

You are a memory encoder in a long-term memory system. Your task is to transform raw conversational input into compact, self-contained memory units.
INPUT METADATA:
Window Start Time: {window_start_time} (ISO 8601)
Participants: {speakers_list}
INSTRUCTIONS:
1. Information Filtering:
- Discard social filler, acknowledgements, and conversational routines that introduce no new factual or semantic information.
- Discard redundant confirmations unless they modify or finalize a decision.
- If no informative content is present, output an empty list.
2. Context Normalization:
- Resolve all pronouns and implicit references into explicit entity names.
- Ensure each memory unit is interpretable without access to prior dialogue.
3. Temporal Normalization:
- Convert relative temporal expressions (e.g., "tomorrow", "last week") into absolute ISO 8601 timestamps using the window start time.
4. Memory Unit Extraction:
- Decompose complex utterances into minimal, indivisible factual statements.
INPUT DIALOGUE:
{dialogue_window}
OUTPUT FORMAT (JSON):
{
"memory_units": [
{
"content": "Alice agreed to meet Bob at the Starbucks on 5th Avenue on 2025-11-20T14:00:00.",
"entities": ["Alice", "Bob", "Starbucks", "5th Avenue"],
"topic": "Meeting Planning",
"timestamp": "2025-11-20T14:00:00",
"salience": "high"
}
]
}

This prompt analyzes the user query prior to retrieval. Its purpose is to estimate query complexity and generate a structured retrieval plan that adapts retrieval scope accordingly.

Analyze the following user query and generate a retrieval plan. Your objective is to retrieve sufficient information while minimizing unnecessary context usage.
USER QUERY:
{user_query}
INSTRUCTIONS:
1. Query Complexity Estimation:
- Assign "LOW" if the query can be answered via direct fact lookup or a single memory unit.
- Assign "HIGH" if the query requires aggregation across multiple events, temporal comparison, or synthesis of patterns.
2. Retrieval Signals:
- Lexical layer: extract exact keywords or entity names.
- Temporal layer: infer absolute time ranges if relevant.
- Semantic layer: rewrite the query into a declarative form suitable for semantic matching.
OUTPUT FORMAT (JSON):
{
"complexity": "HIGH",
"retrieval_rationale": "The query requires reasoning over multiple temporally separated events.",
"lexical_keywords": ["Starbucks", "Bob"],
"temporal_constraints": {
"start": "2025-11-01T00:00:00",
"end": "2025-11-30T23:59:59"
},
"semantic_query": "The user is asking about the scheduled meeting with Bob, including location and time."
}

This prompt guides the final answer generation using retrieved memory. It combines high-level abstract representations with fine-grained factual details to produce a grounded response.

You are an assistant with access to a structured long-term memory.
USER QUERY:
{user_query}
RETRIEVED MEMORY (Ordered by Relevance):
[ABSTRACT REPRESENTATIONS]:
{retrieved_abstracts}
[DETAILED MEMORY UNITS]:
{retrieved_units}
INSTRUCTIONS:
1. Hierarchical Reasoning:
- Use abstract representations to capture recurring patterns or general user preferences.
- Use detailed memory units to ground the response with specific facts.
2. Conflict Handling:
- If inconsistencies arise, prioritize the most recent memory unit.
- Optionally reference abstract patterns when relevant.
3. Temporal Consistency:
- Ensure all statements respect the timestamps provided in memory.
4. Faithfulness:
- Base the answer strictly on the retrieved memory.
- If required information is missing, respond with: "I do not have enough information in my memory."
FINAL ANSWER:

For the LongMemEval benchmark, we employed gpt-4.1-mini as the judge to evaluate the correctness of the agent’s responses. The prompt strictly instructs the judge to focus on semantic and temporal consistency rather than exact string matching. The specific prompt template used is provided below:

Your task is to label an answer to a question as ’CORRECT’ or ’WRONG’.
You will be given the following data:
(1) a question (posed by one user to another user),
(2) a ’gold’ (ground truth) answer,
(3) a generated answer
which you will score as CORRECT/WRONG.
The point of the question is to ask about something one user should know about the other user based on their prior conversations.
The gold answer will usually be a concise and short answer that includes the referenced topic, for example:
Question: Do you remember what I got the last time I went to Hawaii?
Gold answer: A shell necklace
The generated answer might be much longer, but you should be generous with your grading - as long as it touches on the same topic as the gold answer, it should be counted as CORRECT.
For time related questions, the gold answer will be a specific date, month, year, etc. The generated answer might be much longer or use relative time references (like "last Tuesday" or "next month"), but you should be generous with your grading - as long as it refers to the same date or time period as the gold answer, it should be counted as CORRECT. Even if the format differs (e.g., "May 7th" vs "7 May"), consider it CORRECT if it’s the same date.
Now it’s time for the real question:
Question: {question}
Gold answer: {gold_answer}
Generated answer: {generated_answer}
First, provide a short (one sentence) explanation of your reasoning, then finish with CORRECT or WRONG.
Do NOT include both CORRECT and WRONG in your response, or it will break the evaluation script.
Just return the label CORRECT or WRONG in a json format with the key as "label".

LoCoMo (Maharana et al., 2024) is specifically designed to test the limits of LLMs in processing long-term conversational dependencies. The dataset comprises conversation samples ranging from 200 to 400 turns, containing complex temporal shifts and interleaved topics. The evaluation set consists of 1,986 questions categorized into four distinct reasoning types: (1) Multi-Hop Reasoning: Questions requiring the synthesis of information from multiple disjoint turns (e.g., ‘‘Based on what X said last week and Y said today...’’); (2) Temporal Reasoning: Questions testing the model’s ability to understand event sequencing and absolute timelines (e.g., ‘‘Did X happen before Y?’’); (3) Open Domain: General knowledge questions grounded in the conversation context; (4) Single Hop: Direct retrieval tasks requiring exact matching of specific facts.

LongMemEval-S benchmark. The defining characteristic of this dataset is its extreme context length, which poses a unique and severe challenge for memory systems. Unlike standard benchmarks, LongMemEval-S requires the system to precisely locate specific answers across various sub-categories (e.g., temporal events, user preferences) within an exceptionally long interaction history. This massive search space significantly escalates the difficulty of retrieval and localization, serving as a rigorous stress test for the system’s precision. We utilized an LLM-as-a-judge protocol (using gpt-4.1-mini) to score the correctness of generated answers against ground-truth references, categorizing responses as either Correct or Wrong based on semantic and temporal alignment. The full evaluation prompt is provided in Appendix A.4.

Table 7 summarizes the hyperparameters used to obtain the results reported in Section 3. These values were selected to balance memory compactness and retrieval recall, with particular attention to the thresholds governing semantic structured compression and recursive consolidation.

To assess the effectiveness of semantic structured compression and to motivate the design of adaptive retrieval, we analyze system sensitivity to the number of retrieved memory entries (kk). We vary kk from 1 to 20 and report the average F1 score on the LoCoMo benchmark using the GPT-4.1-mini backend.

Table 6
MethodTop-kk Retrieved Entries
kk=1kk=3kk=5kk=10kk=20
ReadAgent6.128.459.188.928.50
MemGPT18.4022.1525.5924.8023.10
SimpleMem35.2042.8543.2443.4543.40
Table 6: Performance sensitivity to retrieval count (kk). SimpleMem demonstrates "Rapid Saturation," reaching near-optimal performance at k=3k=3 (42.85) compared to its peak at k=10k=10 (43.45). This validates the high information density of Atomic Entries, proving that huge context windows are often unnecessary for accuracy.
View original tableOriginal Table 6

Table 6 provides two key observations. First, rapid performance saturation is observed at low retrieval depth. SimpleMem achieves strong performance with a single retrieved entry (35.20 F1) and reaches approximately 99% of its peak performance at k=3k=3. This behavior indicates that semantic structured compression produces memory units with high information content, often sufficient to answer a query without aggregating many fragments.

Second, robustness to increased retrieval depth distinguishes SimpleMem from baseline methods. While approaches such as MemGPT experience performance degradation at larger kk, SimpleMem maintains stable accuracy even when retrieving up to 20 entries. This robustness enables adaptive retrieval to safely expand context for complex reasoning tasks without introducing excessive irrelevant information.

Table 7
ModuleParameterValue / Description
Stage 1: Semantic Structured CompressionWindow Size (WW)20 turns
Sliding Stride5 turns (25% overlap)
Model Backendgpt-4.1-mini (temperature = 0.0)
Output ConstraintStrict JSON schema enforced
Stage 2: Online Semantic SynthesisEmbedding ModelQwen3-embedding-0.6b (1024 dimensions)
Vector DatabaseLanceDB (v0.4.5) with IVF-PQ indexing
Stored Metadatatimestamp, entities, topic, salience
Stage 3: Intent-Aware Retrieval PlanningQuery Complexity Estimatorgpt-4.1-mini
Retrieval Range[3, 20]
Minimum Depth1
Maximum Depth20
Re-rankingDisabled (multi-view score fusion applied directly)
Table 7: Detailed hyperparameter configuration for SimpleMem. The system employs adaptive thresholds to balance memory compactness and retrieval effectiveness.
View original tableOriginal Table 7