Paper deep dive
Retrieval-Driven Memory Reconsolidation for Long-Term LLM Agents
Yuanyi Song, Yukai Wang, Xinbei Ma, Zhihui Fu, Jianghao Lin, Weiwen Liu, Jun Wang, Huarong Deng, Yong Yu, Weinan Zhang
Intelligence
Status: not_run | Model: - | Prompt: - | Confidence: 0%
Entities (0)
Relation Signals (0)
No relation signals yet.
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:Long-term memory is essential for LLM-based agents operating over extended interactions. Existing memory systems primarily update memory when new information arrives, treating retrieval as the endpoint of memory access rather than a driver of memory evolution. Consequently, retrieval feedback is rarely exploited to reorganize memory for future access continuously. Moreover, most existing approaches rely on predefined memory structures together with fixed retrieval pipelines, limiting the agent's ability to organize and evolve its own memory autonomously. Inspired by memory reconsolidation in cognitive neuroscience, we propose \textbf{REALM}, a \textbf{r}econsolidation-\textbf{e}volution \textbf{a}gentic \textbf{l}ong-term \textbf{m}emory framework. It models long-term memory as a continual lifecycle by autonomously organizing memories into a heterogeneous cognitive graph, retrieving evidence via adaptively composed graph-search atoms, and continually reconsolidating memories based on retrieval feedback. REALM achieves an average accuracy of 75.97\% on LoCoMo and 65.11\% on LongMemEval, outperforming the strongest baselines by 7.17 and 1.31 points respectively. Ablation studies confirm that memory reconsolidation consistently boosts performance, with further analyses revealing that it progressively reorganizes related memory units into more coherent local structures for collective evidence recall and utilization during reasoning. These results suggest that retrieval-driven memory reconsolidation provides an effective mechanism for continually evolving long-term memory in LLM agents.
Tags
Links
- Source: https://arxiv.org/abs/2609.16053v1
- Canonical: https://arxiv.org/abs/2609.16053v1
Trouble viewing inline? Open PDF directly →
Full Text
81,979 characters extracted from source content.
Expand or collapse full text
Retrieval-Driven Memory Reconsolidation for Long-Term LLM Agents Yuanyi Song †thanks: This work was done during Yuanyi Song’s internship at OPPO. Affiliation: Shanghai Jiao Tong University Email: norsheep919@sjtu.edu.cn Yukai Wang Affiliation: Shanghai Jiao Tong University Email: linjianghao@sjtu.edu.cn Xinbei Ma Affiliation: Shanghai Jiao Tong University Affiliation: National University of Singapore Email: wwliu@sjtu.edu.cn Zhihui Fu Affiliation: OPPO Email: wnzhang@sjtu.edu.cn Jianghao Lin Affiliation: Shanghai Jiao Tong University Weiwen Liu Affiliation: Shanghai Jiao Tong University Jun Wang Affiliation: OPPO Huarong Deng Affiliation: OPPO Yong Yu Affiliation: Shanghai Jiao Tong University Weinan Zhang †thanks: J. Lin, W. Liu, J. Wang and W. Zhang are the corresponding authors. Affiliation: Shanghai Jiao Tong University Abstract Long-term memory is essential for LLM-based agents operating over extended interactions. Existing memory systems primarily update memory when new information arrives, treating retrieval as the endpoint of memory access rather than a driver of memory evolution. Consequently, retrieval feedback is rarely exploited to reorganize memory for future access continuously. Moreover, most existing approaches rely on predefined memory structures together with fixed retrieval pipelines, limiting the agent’s ability to organize and evolve its own memory autonomously. Inspired by memory reconsolidation in cognitive neuroscience, we propose REALM, a reconsolidation-evolution agentic long-term memory framework. It models long-term memory as a continual lifecycle by autonomously organizing memories into a heterogeneous cognitive graph, retrieving evidence via adaptively composed graph-search atoms, and continually reconsolidating memories based on retrieval feedback. REALM achieves an average accuracy of 75.97% on LoCoMo and 65.11% on LongMemEval, outperforming the strongest baselines by 7.17 and 1.31 points respectively. Ablation studies confirm that memory reconsolidation consistently boosts performance, with further analyses revealing that it progressively reorganizes related memory units into more coherent local structures for collective evidence recall and utilization during reasoning. These results suggest that retrieval-driven memory reconsolidation provides an effective mechanism for continually evolving long-term memory in LLM agents. 1 Introduction Recent advances in Large Language Model (LLM)-based agents have enabled their deployment in long-term interactive scenarios like personal assistants, long-horizon task collaboration, and continual decision-making (Zhang et al., 2025; Du, 2026; Song et al., 2026). In these scenarios, agents must accumulate knowledge across extensive histories and leverage past experiences for future reasoning, making long-term memory a foundational capability of intelligent agents (Wang et al., 2024; Li et al., 2026; Fang et al., 2026; Chai et al., 2026). As shown in the left part of Figure 1, existing long-term memory research predominantly follows a forward evolution paradigm, where memory updates, including addition, deletion, and merging of memory units, are triggered exclusively by newly acquired information (Zhong et al., 2024; Hu et al., 2025; Wang and Chen, 2025). Under this paradigm, memory retrieval is treated as a passive, terminal endpoint of utilization rather than a catalyst for structural refinement. Figure 1: Motivation of retrieval-driven memory reconsolidation. Existing memory systems mainly update memories with new information using predefined data structures and a fixed retrieval pipeline, while REALM forms a closed-loop memory lifecycle, leveraging retrieval feedback to dynamically reorganize the memory topology upon utilization. This prevailing paradigm stands in sharp contrast to memory reconsolidation in cognitive neuroscience, a foundational mechanism where recalled memory is not static data (Adam, 2026; Lee and Jung, 2025; Samieiyeganeh et al., 2026); instead, reactivation initiates a labile state where connections are strengthened, weakened, or newly established, allowing memory networks to actively evolve through usage and enabling them to remain adaptable to new experiences while maintaining stability (Nader et al., 2000a). Driven by this, long-term memory should be a dynamic memory lifecycle that possesses the feedback-driven autonomy to realign its organization after each retrieval. However, achieving such post-retrieval evolution requires balancing a highly flexible memory structure with an adaptive retrieval mechanism over evolving topologies (Hu et al., 2026). To address this challenge, we propose REALM, a reconsolidation-evolution agentic long-term memory lifecycle framework, which instantiates this holistic lifecycle through three complementary components: (1) Autonomous Organization: We define atomic memory nodes and relations, empowering agents to autonomously construct local topologies that organically emerge into a unified agentic cognitive graph. (2) Adaptive Retrieval: We decompose complex graph traversal into atomic search actions, allowing agents to compose context-tailored retrieval policies dynamically. (3) Memory Reconsolidation: After each task, we perform local reconsolidation on the activated subgraph, dynamically updating connections to achieve continually retrieval-driven evolution. Experiments on standard benchmarks demonstrate that REALM consistently outperforms conventional post-static paradigms, with further analyses confirming that memory reconsolidation effectively optimizes memory structures over long horizons. At the same time, the agentic cognitive graph enables efficient memory organization and retrieval. These findings support our hypothesis that long-term memory should continuously evolve through usage rather than merely accumulate new information. Our main contributions are summarized as follows: • Memory Lifecycle Concept. We introduce a lifecycle perspective for long-term memory in LLM agents, where memory continuously evolves through usage rather than remaining static after construction. • REALM Framework. We propose a unified agentic memory framework that integrates autonomous memory organization, adaptive retrieval, and post-retrieval reconsolidation into a unified evolution lifecycle. • Empirical Validation. Comprehensive evaluations show that lifecycle-driven memory evolution consistently improves long-term memory performance, revealing the autonomous emergence of reusable memory topologies and retrieval policies. 2 Related Work 2.1 Agent Long-term Memory Existing long-term memory systems mainly focus on memory organization and retrieval, continuously accumulating, organizing, and utilizing historical information (LangChain Inc., 2025; Zhou et al., 2026). Early works rely on flat incremental stores to extract and summarize historical interactions (Zhong et al., 2024; Chhikara et al., 2025; Wang et al., 2025). To enhance representation, recent approaches adopt explicit structures, including hierarchical trees or mind maps (Rezazadeh et al., 2025; Li et al., 2026; Xu et al., 2026), knowledge graphs (Edge et al., 2024; Yang et al., 2026), temporal (Rasmussen et al., 2025) or OS-inspired management (Li et al., 2025; Packer et al., 2023; Kang et al., 2025; Zhu et al., 2026), and multimodal representations (Wang and Chen, 2025). Correspondingly, retrieval research enhances utilization via multi-hop graph reasoning (Gutiérrez et al., 2024), iterative search (Yan et al., 2025; Du et al., 2025), dual-process retrieval (You et al., 2026) and adaptive graph traversal Jiang et al. (2026a). However, these methods typically adhere to predefined organizations with static post-retrieval states. In contrast, we formulate a unified memory lifecycle that augments organization and retrieval with dynamic, autonomous memory reorganization. 2.2 Agent Memory Evolution and Lifecycle Inspired by cognitive neuroscience, incorporating memory stages like encoding and consolidation has gained traction (Gutiérrez et al., 2024; Khiste and Ilie, 2014; Jiang et al., 2026b). Neuroscience reveals that recalled memories become transiently labile and undergo reconsolidation for continual adaptation (Nader et al., 2000b), implying that long-term memory evolves through repeated use rather than one-time storage (Gonzalez et al., 2026). While several studies explore memory evolution via offline compression (Fang et al., 2025), recency and frequency heuristics (Zhong et al., 2024; LangChain Inc., 2025), or temporal decay with selective forgetting (Gu et al., 2026), their updates are driven by time or new inputs rather than memory usage itself. Another research approach uses reinforcement learning to estimate memory values (Zhang et al., 2026), but this method only optimizes isolated entries without modifying the relational structure. Evoked by memory reconsolidation, REALM instantiates a retrieval-driven lifecycle, dynamically reorganizing the activated local cognitive graph upon each retrieval. Figure 2: Overview of REALM. The framework organizes observations into an agentic cognitive graph memory, retrieves evidence through adaptive graph-search atoms, and reconsolidates the activated subgraph to evolve memory topology after use. 3 Method 3.1 Problem Formulation We model a long-horizon agent interacting with an environment over an information stream =o1,o2,⋯,oTO=\o_1,o_2,·s,o_T\. Conventional agent memory paradigms sequentially evolve a memory graph tG_t upon receiving oto_t via forward operations including insertion, consolidation, or forgetting, and passively extract a static subgraph q⊂tG_q _t to answer a query q. In contrast, we contend that memory utilization yields crucial cognitive feedback that should actively drive structural refinement. We therefore introduce a post-retrieval memory reconsolidation phase. Given a query q and its answer feedback f, the agent dynamically reorganizes the activated topology qG_q into an optimized state q′G _q. The global memory state transition is thus formulated as: t+1=Reconsolidating(t∖q∪q′,f)G_t+1=Reconsolidating(G_t _q _q,\ f) (1) The overall framework is illustrated in Figure 2. 3.2 Memory Organization: Unified Cognitive Graph 3.2.1 Graph Representation To enable schema-free local configurations, we model memory as a graph =(,ℰ)G=(V,E) where nodes correspond to different categories of memory units and edges encode their relations. Decomposing the structure into logically orthogonal dimensions, we formally define the node space as ⊂entity,event,episode,factV⊂\entity,event,episode,fact\, and the edge space as ℰ⊂logical,causal,hierarchical,associativeE⊂\logical,causal,hierarchical,associative\. Formally, each agent-generated cognitive node v∈v is structured as: v=(κv,cv,desv,kv,tv),v= ( _v,\ c_v,\ des_v,\ k_v,\ t_v ), (2) where κv _v denotes the node type, cvc_v is the raw source content, desvdes_v represents the semantic description, kvk_v signifies the type-specific keywords or names), and tvt_v specifies the temporal span constraint if applicable. Correspondingly, each agent-generated directed edge eij∈ℰe_ij is formalized as: eij=(vi,vj,κij,desij,wij),e_ij= (v_i,\ v_j,\ _ij,\ des_ij,\ w_ij ), (3) where κij _ij represents the relation type, desijdes_ij is the relational description text, and wij∈[0,1]w_ij∈[0,1] denotes the confidence weight. This formulation decouples raw memory content from topology, providing the essential structural variables for downstream retrieval and topology evolution. 3.2.2 Memory Construction Unlike conventional methods that separate insertion, merging, and forgetting, REALM unifies these operations into a single integration phase, treating forgetting as redundant (Ong et al., 2025). Upon receiving new observation oto_t, the agent first extracts m candidate memory units X=xii=1mX=\x_i\_i=1^m with the context of the current conversation summary sts_t and the recent information ctc_t, where each xi∈x_i is autonomously typed by the agent. Then for each candidate unit x∈Xx∈ X, the agent queries its related neighborhood nodes: N(x)=Nsim(x)∪Nrecent(x)N(x)=N_sim(x)∪ N_recent(x), where NsimN_sim and NrecentN_recent denote semantically similar and recently processed nodes, respectively. Conditioned on N(x)N(x), the agent determines whether a new candidate should be added to memory as a new node, merged with an existing memory node, or skipped and not saved in memory. If add or merge is selected, the agent subsequently infers a set of directed relational edges EvE_v between x and N(x)N(x) within the predefined edge space ℰE. This unified pipeline empowers the agent to autonomously determine not only whether to remember an observation through selective retention, but also how to represent it via dynamic topological integration. 3.3 Memory Retrieval: Strategy Atom Combination Building on existing retrieval methods Peng et al. (2025), REALM formalizes graph search into a dynamic pipeline of three sequential phases: seeding, expanding, and filtering. Rather than employing rigid heuristics, the agent autonomously formulates a composite retrieval policy π: π=πseed⊕πexpand⊕πfilterπ= _seed _expand _filter (4) based on the real-time search state, where each phase-specific policy combines atomic strategies from a predefined action space: πp=(a1p,a2p,⋯,akp),aip∈p. _p=(a^p_1,a^p_2,·s,a^p_k), a^p_i _p. (5) 3.3.1 Seed Localization Given a query q, the agent first generates πseed _seed consisting of multiple parameterized retrieval plans to identify starting nodes via keyword, query, or hybrid matching modes. Each plan is formalized as a tuple pi=(Qi,Ki,Ti,τi)p_i=(Q_i,K_i,T_i, _i), explicitly defining the query string QiQ_i, keywords KiK_i, target node types TiT_i, and temporal constraints τi _i. The aggregate initial seed set is formed via Si=Retrieveseed(,pi)\S_i\=\Retrieve_seed(G,p_i)\. 3.3.2 Adaptive Evidence Expansion Starting from the seeds, the agent iteratively expands the evidence graph. At iteration t, it evaluates the collected memories RtR_t (where R0=⋃SiR_0= S_i) to determine whether RtR_t already provides enough evidence to answer the query. If sufficiency is met, search terminates; otherwise, it selects an active frontier Ft⊆RtF_t R_t. For each frontier node v∈Ftv∈ F_t, the LLM predicts an individualized expansion action: av=(mode,predicate,decay,inhibit)a_v=(mode,\ predicate,\ decay,\ inhibit) (6) where components regulate the traversal behavior, edge-type predicates, temporal decay, and path inhibition, respectively. The newly discovered nodes are aggregated as Nt=⋃v∈FtExpand(v,av),N_t= _v∈ F_tExpand(v,a_v), (7) which update the state via Rt+1=Rt∪NtR_t+1=R_t∪ N_t. During graph exploration, each newly discovered node vi∈Ntv_i∈ N_t reached via edge eije_ij receives a context-aware access score saces(v)s_aces(v), formulated as: saces(v)=βssim(q,desij)+(1−β)wij−Δdecay(tv),s_aces(v)=β s_sim(q,\ des_ij)+(1-β)w_ij- _decay(t_v), (8) where ssims_sim measures the semantic similarity between query q and edge description desijdes_ij, wijw_ij is the topological relation confidence, Δdevay(tv) _devay(t_v) scales the temporal penalty based on the permitted expansion decay and node’s temporal span tvt_v, and β is a balancing coefficient. Detailed strategy atoms and hyper-parameters are provided in the appendix. The expansion loop repeats until topological convergence or the predefined search depth and memory budgets are exhausted. 3.3.3 Evidence Aggregation Upon termination, the retrieved set R is globally reranked. The final score for each node combines its accumulation weight and semantic relevance: Score(v)=αsaces(v)+(1−α)ssim(v,q)Score(v)=α s_aces(v)+(1-α)s_sim(v,q) (9) The top-K nodes constitute the final evidence set q=TopK(R)V_q=Top_K(R) for downstream generation. Crucially, qV_q induces the activated local cognitive subgraph q=(q,ℰq)G_q=(V_q,E_q), where ℰq=(u,v)∈ℰ∣u,v∈qE_q=\(u,v) u,v _q\, which serves as the direct topology input for the subsequent memory reconsolidation. 3.4 Memory Reconsolidation: Topology Evolution While memory organization structures the graph and retrieval utilizes it, reconsolidation leverages retrieval feedback to iteratively evolve the memory topology G beyond its initial semantic constraints into a usage-aware cognitive structure. 3.4.1 Retrieval-Induced Structural Feedback For each interaction, the retrieval phase yields the activated subgraph q=(q,ℰq)G_q=(V_q,E_q) and task feedback f. Rather than modifying memory content, REALM exploits the topological co-utilization patterns within qV_q. The agent first distills the contextual guidance by inferring the underlying topic structure: Tq=InferTopicStructure(q,q),T_q= InferTopicStructure(q,V_q), (10) which summarizes the semantic relations among recalled memories to guide subsequent refinement. 3.4.2 Local Topology Reconsolidation We model reconsolidation as an agent-driven topology decision process. Conditioned on qG_q and TqT_q, the agent generates a modification set =d1,d2,…,dnD=\d_1,d_2,…,d_n\, where each decision is parameterized as a 5-tuple d=(vi,vj,a,r,c)d=(v_i,v_j,a,r,c). Here, vi,vj∈qv_i,v_j _q denote target nodes, r is the relation type, c∈[0,1]c∈[0,1] is the decision confidence, and a∈add,strengthen,weakena∈\add,strengthen,weaken\ defines the atomic edge operation space. The agent may create new relations between previously disconnected memories when they are repeatedly activated under the same reasoning context. Existing relations can be strengthened when they consistently support successful retrieval, while weak or misleading relations can be suppressed when they repeatedly introduce irrelevant evidence. Confidence-Guided Topology Update. To execute modifications without exceeding the valid edge weight boundaries, we unify the adaptive bounded adjustment. The confidence score determines the magnitude of topology modification. Let wijw_ij be the current edge weight and wminw_ be the minimum allowable threshold. We first define a bounded representation wb=max(wmin,min(1,wij))w_b= (w_ ,\, (1,w_ij)). The weight updating pipeline is then compactly formulated as: wij←Clip(wij+η⋅c,wmin, 1),w_ij (w_ij+η· c,\ w_ ,\ 1 ), (11) where η=0.8,a=add,1−wb,a=strengthen,−(wb−wmin),a=weaken.η= cases0.8,&a=add,\\ 1-w_b,&a=strengthen,\\ -(w_b-w_ ),&a=weaken. cases (12) This formulation smoothly regulates the update scale near the weight boundaries, protecting the topology from destabilization by isolated or duplicate retrieval instances. 3.4.3 Closed-Loop Memory Evolution As formalized in Eq.1, this mechanism establishes a seamless, closed-loop memory lifecycle: t→Retrieve(q,f)→Reconsolidatet+1.G_t Retrieve(G_q,f) ReconsolidateG_t+1. (13) Through continuous task-driven interaction, the memory graph progressively adapts from an initially semantic organization into a usage-aware cognitive structure. Frequently co-utilized memory paths are dynamically reinforced while ineffective retrieval pathways are gradually weakened. Therefore, long-term memory is no longer a static storage component, but an evolving cognitive graph. Method LoCoMo-Category Average Multi Hop Temporal Open Domain Single Hop MIRIX (Wang and Chen, 2025) 54.26 68.54 46.88 68.22 64.33 Mem0 (Chhikara et al., 2025) 58.75 52.34 45.83 73.33 64.57 Zep (Rasmussen et al., 2025) 52.12 54.82 33.33 66.23 59.22 MAGMA (Jiang et al., 2026a) 52.80 65.00 51.70 77.60 68.80 Nemori (Nan et al., 2025) 56.90 64.90 48.50 76.40 68.70 A-Mem (Xu et al., 2026) 53.55 50.16 41.67 61.83 56.62 REALM (Ours) 64.54 76.64 58.33 81.57 75.97 Table 1: Accuracy (%) on LoCoMo by question category using GPT-4o-mini as both the backbone model and the LLM judge. Bold and underlined values indicate the best and second-best results respectively. Method LongMemEval-Category Average single-session preference single-session assistant temporal reasoning multi- session knowledge update single- session user MIRIX 53.30 63.60 25.60 30.10 52.60 72.90 43.49 Zep 53.30 75.00 54.10 47.40 74.40 92.90 63.80 MAGMA 73.30 83.90 45.10 50.40 66.70 72.90 61.20 Nemori 62.70 73.20 43.00 51.40 52.60 77.70 56.20 REALM (Ours) 36.66 82.14 56.69 46.28 88.89 89.06 65.11 Table 2: Accuracy (%) on LongMemEval by question category using GPT-4o-mini as both the backbone model and the LLM judge. Bold and underlined values indicate the best and second-best results respectively. 4 Experiment To comprehensively evaluate the proposed framework, we conduct experiments from four complementary perspectives. Specifically, we aim to answer the following research questions: RQ1. Does REALM consistently outperform existing long-term memory systems on representative long-term memory benchmarks? RQ2. Does memory reconsolidation contribute to performance improvement, and is its effectiveness robust under different interaction orders? RQ3. What enables REALM to remain effective prior to reconsolidation, and how does agentic autonomy shape memory organization and retrieval? RQ4. How does memory reconsolidation continuously reshape memory organization and influence future retrieval behaviors? We first introduce the experimental setup and then answer these research questions in the following sections. 4.1 Experimental Setup Benchmarks & Baselines. We evaluate REALM on two standard long-term memory benchmarks: LoCoMo (Maharana et al., 2024) and LongMemEval_S (Wu et al., 2024). We compare our method against representative systems across three principal paradigms: (1) flat and temporal retrieval (Mem0, Zep); (2) multi-component and agentic adaptive memory (MIRIX, A-Mem, Nemori); and (3) strategy-guided graph architectures (MAGMA). Detailed benchmark statistics and baseline descriptions are deferred to the appendix. Metrics. Following Li et al. (2025), we employ LLM-as-a-Judge (Zheng et al., 2023) for accuracy evaluation, excluding unanswerable queries. To ensure strict consistency, all baseline results from both newly conducted experiments and aligned literature utilize identical judge prompts and models, as detailed in the appendix. 4.2 RQ1: Overall Performance Table 1 and Table 2 summarize the overall performance of REALM compared with representative long-term memory systems. The evaluation protocol and question scheduling strategy are provided in the appendix. Our method consistently achieves the best performance across both benchmarks, demonstrating the effectiveness of the proposed framework in diverse long-term memory scenarios. On LoCoMo, REALM achieves an average score of 75.97, outperforming the strongest baseline by 7.17 points and ranking first across all four question categories. On LongMemEval, REALM also obtains the highest overall average (65.11), surpassing the previous best method by 1.31 points. The consistent improvements across two benchmarks with different evaluation settings indicate that the proposed framework generalizes well to a wide range of long-term memory tasks. Figure 3: Robustness to randomized question orders on LoCoMo. Accuracy remains stable across original and shuffled orders, suggesting that reconsolidation improves memory topology rather than overfitting to a particular query sequence. The shaded region denotes performance variation. Looking into different question categories, the performance gains are particularly evident on memory-intensive reasoning tasks. On LoCoMo, REALM improves multi-hop and temporal reasoning by more than 8 and 5 points, respectively, while also consistently outperforming existing methods on open domain and single-hop questions. These results indicate that the proposed framework is effective across both complex reasoning tasks requiring long-range memory integration and more straightforward retrieval scenarios. A similar trend is observed on LongMemEval. REALM achieves the best performance on temporal reasoning and knowledge update, while remaining competitive on single-session assistant and single-session user. In particular, the improvement on knowledge update suggests that the framework effectively handles continuously evolving user information. In contrast, the gains on temporal reasoning demonstrate its ability to leverage long-term interaction histories. Overall, the results demonstrate that REALM provides a more effective long-term memory framework than existing approaches across diverse benchmarks and task types. 4.3 RQ2: Effect of Memory Reconsolidation Category LoCoMo LongMemEval w/o recon w/ recon w/o recon w/ recon Multiple 59.57 64.54+4.97 43.80 46.28+2.48 Temporal 74.14 76.64+2.50 55.12 56.69+1.57 Single(-P) 81.09 81.57+0.48 30.00 36.66+6.66 Open/Update 53.12 58.33+5.21 84.72 88.89+4.17 Average 73.96 75.97+2.01 62.98 65.11+2.13 Table 3: Effect of reconsolidation across different categories on LoCoMo and LongMemEval. Subscripts report absolute gains from enabling reconsolidation; “Single(-P)” denotes the single-session preference category in LongMemEval because the other single-session categories remain unchanged. Memory reconsolidation is the key mechanism distinguishing REALM from existing long-term memory systems. To evaluate its effectiveness, we conduct two ablation studies: (1) removing the reconsolidation module while keeping all other components unchanged, and (2) randomizing the question order on LoCoMo to test whether the gains depend on a particular interaction sequence. Effect of Memory Reconsolidation. Table 3 shows that removing memory reconsolidation consistently degrades performance on both benchmarks. On LoCoMo, enabling reconsolidation improves the overall accuracy by 2.01 points, with the largest gains observed on Multi-Hop (+4.97) and Open-Domain (+5.21) questions. Similar improvements are observed on LongMemEval, where reconsolidation increases the overall performance by 2.13 points, particularly benefiting Single-session Preference (+6.66) and Knowledge Update (+4.17). These improvements indicate that updating the cognitive graph after each retrieval enables the system to progressively strengthen useful memory associations and improve subsequent retrieval quality. Robustness to Interaction Order. One possible concern is that the gains from reconsolidation may arise from adapting to a specific question sequence. To verify this, we evaluate REALM under multiple randomly shuffled question orders on LoCoMo. As shown in Figure 3, the performance across different random seeds remains highly consistent for all question categories, with only minor fluctuations around the mean. This result demonstrates that the effectiveness of memory reconsolidation is largely independent of the interaction order. Rather than memorizing a particular sequence of queries, reconsolidation continuously refines the memory graph according to the retrieval process itself, leading to stable improvements under different evaluation orders. 4.4 RQ3: Dissecting Agentic Memory Autonomy Figure 4: Deviation between graph composition and evidence retrieval. The left figure illustrates that heterogeneous memory node types remain unbiased in both graph structure and evidence utilization, while the right figure shows that different relationship types are selectively exploited according to downstream reasoning requirements. This section investigates why REALM remains competitive even without reconsolidation by analyzing memory organization, utilization, and retrieval strategy selection. Memory Organization and Utilization. We first compare the distributions of node and relation types in the cognitive graph with those in the retrieved evidence, as shown in Figure 4. Node distributions are highly consistent, with differences below 1.5 percentage points across all types. This suggests that each memory type contributes to retrieval according to both its semantic role and its frequency in the graph. Even less frequent types, such as episode nodes, are retrieved when needed rather than overlooked, indicating that the automatically constructed graph preserves diverse memory forms without introducing retrieval bias. Relation usage exhibits a much stronger task-dependent pattern. During retrieval, causal and logical relations increase by 13.39 and 6.57 percentage points, respectively, whereas associative relations become markedly less frequent. This suggests that different relation types naturally play distinct functional roles: associative relations mainly maintain broad semantic connectivity, while causal and logical relations form the primary reasoning paths for question answering. Overall, these results show that the heterogeneous cognitive graph is not only automatically organized by the agent but also effectively exploited to support downstream reasoning. Figure 5: Retrieval depth for correct answers on LoCoMo and LongMemEval. The proportion first decreases and then increases with expansion depth, indicating that straightforward queries are answered early, and more challenging ones require deeper graph exploration. Retrieval Efficiency. We further analyze the expansion depth at which supporting evidence is first retrieved. As shown in Figure 5, 84.87% of LoCoMo evidence is found immediately from the seed nodes, found directly from the seed nodes, with only a small fraction requiring one to three additional expansion steps. On LongMemEval, 40.52% of evidence is retrieved directly from the seed layer, whereas a considerable proportion is found only after reaching the maximum expansion depth. This pattern reflects two complementary properties of the proposed retrieval mechanism. For relatively straightforward queries, relevant memories are organized close to effective retrieval entry points, enabling efficient retrieval with minimal graph exploration. For more challenging questions, the cognitive graph still provides sufficient structural connectivity for the retrieval agent to progressively discover distant evidence through multi-hop expansion, indicating both retrieval efficiency and scalability. Strategy Acc (%) Correct (#) path_search only 39.84 147 subgraph_beam only 43.09 159 adaptive selection 43.36 160 Table 4: Effect of expansion strategy selection on questions requiring graph expansion. Adaptive selection slightly improves over fixed path search and subgraph beam, showing the value and current limitation of strategy composition. Adaptive Retrieval Strategy. Finally, we evaluate whether allowing the agent to compose retrieval strategies adaptively is beneficial. Table 4 shows that adaptive strategy selection achieves the highest accuracy, slightly outperforming either fixed expansion strategy. Although the improvement over always using “subgraph_beam” is modest, this result is consistent with the observed strategy distribution, where the agent selects subgraph-based expansion for most queries while switching to alternative traversal strategies only when necessary. This behavior suggests that adaptive composition does not seek diversity for its own sake; instead, it learns to recover the strongest default strategy while preserving the flexibility to handle structurally different retrieval scenarios. At the same time, the relatively small margin also reveals a limitation of the current design: the benefit of adaptive retrieval ultimately depends on reliable strategy selection, and inaccurate decisions may reduce the advantage over carefully designed fixed strategies. These analyses suggest that agents can also improve by autonomously constructing memory that aligns well with retrieval demands. 4.5 RQ4: Memory Evolution through Reconsolidation Figure 6: Evidence gains from topology evolution during the expansion stage. “Found” denotes cases where the supporting evidence is retrieved during expansion, and “Only” those where it is retrieved exclusively during expansion. While the previous section analyzes the static memory organization and retrieval mechanism, this section investigates how memory reconsolidation continuously improves future retrieval through graph evolution. We compare retrieval behaviors before and after topology evolution to understand how reconsolidation influences evidence discovery and utilization over continual interactions. As shown in Figure 6, after enabling memory reconsolidation, more questions successfully retrieve supporting evidence during graph expansion, resulting in a corresponding increase in correctly answered questions. More importantly, topology evolution brings substantially larger improvements in evidence utilization than in evidence discovery. The proportion of questions that successfully retrieve supporting evidence increases by only 3.70% and 5.41%, whereas the proportion of correctly answered questions after evidence retrieval increases by 20.83% and 19.23%, respectively. This indicates that memory reconsolidation does not primarily improve performance by retrieving substantially more memories. Instead, it continuously reorganizes the cognitive graph so that retrieved evidence becomes more relevant and informative for downstream reasoning. These results suggest that the value of memory reconsolidation lies not in expanding the retrievable memory space, but in continuously improving the quality of memory organization through retrieval-driven graph evolution. As interactions accumulate, the cognitive graph becomes increasingly aligned with future retrieval requirements, thereby complementing static memory organization. 5 Conclusion This work conceptualizes LLM agent long-term memory as a dynamic, closed-loop lifecycle, demonstrating that memory networks can actively adapt through utilization rather than merely expanding with new inputs. By treating retrieval not as a passive terminal checkpoint but as a continuous feedback loop, our framework, REALM, instantiates this lifecycle over a heterogeneous cognitive graph, enabling post-retrieval local topology updates driven by co-utilization patterns. Empirical evaluations indicate that introducing retrieval-driven memory reconsolidation effectively mitigates the rigidity of conventional predefined memory architectures, yielding robust performance gains across long-term memory scenarios. Further analyses reveal that this topology evolution induces highly compact evidence clustering, successfully organizing scattering interactions into structural subgraphs that facilitate collective recall. We hope that shifting from a flat accumulation model to a continuous lifecycle perspective will inspire future research into adaptive, self-evolving memory foundations for intelligent agents. References Adam (2026) A. M. I. Adam Eval-driven memory (edm): a persistence governance layer for reliable agentic ai via metric-guided selective consolidation. Preprints. External Links: Document, Link Cited by: §1. Chai et al. (2026) H. Chai, Y. Wang, Y. Yang, D. Peng, Y. Song, Z. Fu, W. Liu, J. Lin, J. Wang, and W. Zhang SMMBench: a benchmark for source-distributed multimodal agent memory. arXiv preprint arXiv:2605.15710. Cited by: §1. Chhikara et al. (2025) P. Chhikara, D. Khant, S. Aryan, T. Singh, and D. Yadav Mem0: building production-ready ai agents with scalable long-term memory. arXiv preprint arXiv:2504.19413. Cited by: 1st item, §A.2, §2.1, Table 1. Du (2026) P. Du Memory for autonomous llm agents: mechanisms, evaluation, and emerging frontiers. arXiv preprint arXiv:2603.07670. Cited by: §1. Du et al. (2025) X. Du, L. Li, D. Zhang, and L. Song MemR3^3: memory retrieval via reflective reasoning for llm agents. arXiv preprint arXiv:2512.20237. Cited by: §2.1. Edge et al. (2024) D. Edge, H. Trinh, N. Cheng, J. Bradley, A. Chao, A. Mody, S. Truitt, D. Metropolitansky, R. O. Ness, and J. Larson From local to global: a graph rag approach to query-focused summarization. arXiv preprint arXiv:2404.16130. Cited by: §2.1. 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: §2.2. Fang et al. (2026) R. Fang, Y. Liang, X. Wang, J. Wu, S. Qiao, P. Xie, F. Huang, H. Chen, and N. Zhang Memp: exploring agent procedural memory. In Findings of the Association for Computational Linguistics: ACL 2026, p. 17490–17502. Cited by: §1. Gonzalez et al. (2026) J. Gonzalez, M. Vöröslakos, D. Aykan, N. Soto, N. Nitzan, R. Swanson, M. Karadas, Z. S. Chen, and G. Buzsáki Subspace communication in the hippocampal–retrosplenial axis. Nature, p. 1–10. Cited by: §2.2. Gu et al. (2026) Y. Gu, W. Xiong, L. Wang, P. Ren, C. Li, X. Zhang, Y. Guo, Q. Sun, J. Ma, and S. Shi FSFM: a biologically-inspired framework for selective forgetting of agent memory. arXiv preprint arXiv:2604.20300. Cited by: §2.2. Gutiérrez et al. (2024) B. J. Gutiérrez, Y. Shu, Y. Gu, M. Yasunaga, and Y. Su Hipporag: neurobiologically inspired long-term memory for large language models. Advances in neural information processing systems 37, p. 59532–59569. Cited by: §2.1, §2.2. Hu et al. (2026) S. Hu, Y. Wei, J. Ran, X. Han, Z. Yao, H. Wang, R. Chen, and L. Zou Does memory need graphs? a unified framework and empirical analysis for long-term dialog memory. In Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), p. 26758–26782. Cited by: §1. 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. Jiang et al. (2026a) D. Jiang, Y. Li, G. Li, and B. Li MAGMA: a multi-graph based agentic memory architecture for ai agents. arXiv preprint arXiv:2601.03236. Cited by: 6th item, §A.2, §A.5, §2.1, Table 1. Jiang et al. (2026b) H. Jiang, J. Chen, Y. Pan, L. Chen, W. You, Y. Zhou, R. Zhang, Y. Abate, and T. Liu SYNAPSE: empowering llm agents with episodic-semantic memory via spreading activation. arXiv preprint arXiv:2601.02744. Cited by: §2.2. Kang et al. (2025) J. Kang, M. Ji, Z. Zhao, and T. Bai Memory os of ai agent. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing, p. 25972–25981. Cited by: §2.1. Khiste and Ilie (2014) N. Khiste and L. Ilie E-mem: efficient computation of maximal exact matches for very large genomes. Bioinformatics 31 (4), p. 509–514. Cited by: §2.2. LangChain Inc. (2025) LangChain Inc. LangMem documentation. Note: https://langchain-ai.github.io/langmem/Accessed: 2026-06-04 Cited by: §2.1, §2.2. Lee and Jung (2025) J. W. Lee and M. W. Jung Memory consolidation from a reinforcement learning perspective. Frontiers in Computational Neuroscience 18, p. 1538741. Cited by: §1. Li et al. (2026) R. Li, Z. Zhang, X. Bo, Z. Tian, X. Chen, Q. Dai, Z. Dong, and R. Tang Cam: a constructivist view of agentic memory for llm-based reading comprehension. Advances in Neural Information Processing Systems 38, p. 113381–113406. Cited by: §1, §2.1. Li et al. (2025) Z. Li, C. Xi, C. Li, D. Chen, B. Chen, S. Song, S. Niu, H. Wang, J. Yang, C. Tang, et al. Memos: a memory os for ai system. arXiv preprint arXiv:2507.03724. Cited by: §A.4, §A.5, §2.1, §4.1. 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. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), p. 13851–13870. Cited by: 1st item, §A.4, §4.1. Nader et al. (2000a) K. Nader, G. E. Schafe, and J. E. Le Doux Fear memories require protein synthesis in the amygdala for reconsolidation after retrieval. Nature 406 (6797), p. 722–726. Cited by: §1. Nader et al. (2000b) K. Nader, G. E. Schafe, and J. E. LeDoux The labile nature of consolidation theory. Nature reviews neuroscience 1 (3), p. 216–219. Cited by: §2.2. Nan et al. (2025) J. Nan, W. Ma, W. Wu, and Y. Chen Nemori: self-organizing agent memory inspired by cognitive science. arXiv preprint arXiv:2508.03341. Cited by: 5th item, §A.2, §A.4, Table 1. Ong et al. (2025) K. T. Ong, N. Kim, M. Gwak, H. Chae, T. Kwon, Y. Jo, S. Hwang, D. Lee, and J. Yeo Towards lifelong dialogue agents via timeline-based memory management. In Proceedings of the 2025 Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), p. 8631–8661. Cited by: §3.2.2. Packer et al. (2023) C. Packer, V. Fang, S. G. Patil, K. Lin, S. Wooders, and J. E. Gonzalez MemGPT: towards llms as operating systems. arXiv preprint arXiv:2310.08560. Cited by: §2.1. Peng et al. (2025) B. Peng, Y. Zhu, Y. Liu, X. Bo, H. Shi, C. Hong, Y. Zhang, and S. Tang Graph retrieval-augmented generation: a survey. ACM Transactions on Information Systems 44 (2), p. 1–52. Cited by: §3.3. 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: 3rd item, §A.2, §2.1, Table 1. Rezazadeh et al. (2025) A. Rezazadeh, Z. Li, W. Wei, and Y. Bao From isolated conversations to hierarchical schemas: dynamic tree memory representation for llms. In International Conference on Learning Representations, Vol. 2025, p. 990–1023. Cited by: §2.1. Samieiyeganeh et al. (2026) M. Samieiyeganeh, P. Bahraminikoo, S. Saeed, S. Gunasekaran, and S. Ahmed Forgetting as control: a theoretical framework for selective behavioral erasure in post-deployment reinforcement learning agents. Preprints. External Links: Document, Link Cited by: §1. Song et al. (2026) Y. Song, H. Huang, Q. Lin, Y. Zhao, X. Qu, J. Wang, X. Lou, W. Liu, Z. Zhang, J. Wang, et al. Colorbench: benchmarking mobile agents with graph-structured framework for complex long-horizon tasks. In Proceedings of the ACM Web Conference 2026, p. 7024–7035. Cited by: §1. 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: 2nd item, §A.2, §1, §2.1, Table 1. Wang et al. (2024) Y. Wang, Y. Gao, X. Chen, H. Jiang, S. Li, J. Yang, Q. Yin, Z. Li, X. Li, B. Yin, et al. Memoryllm: towards self-updatable large language models. arXiv preprint arXiv:2402.04624. Cited by: §1. Wang et al. (2025) Y. Wang, D. Krotov, Y. Hu, Y. Gao, W. Zhou, J. McAuley, D. Gutfreund, R. Feris, and Z. He M+: extending memoryllm with scalable long-term memory. arXiv preprint arXiv:2502.00592. Cited by: §2.1. 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: 2nd item, §A.4, §4.1. Xu et al. (2026) W. Xu, Z. Liang, K. Mei, H. Gao, J. Tan, and Y. Zhang A-mem: agentic memory for llm agents. Advances in Neural Information Processing Systems 38, p. 17577–17604. Cited by: 4th item, §A.2, §2.1, Table 1. 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: §2.1. Yang et al. (2026) K. Yang, Z. Chen, X. He, J. Jiang, M. Galley, C. Wang, J. Gao, J. Han, and C. Zhai Plugmem: a task-agnostic plugin memory module for llm agents. arXiv preprint arXiv:2603.03296. Cited by: §2.1. You et al. (2026) Z. You, J. Yuan, and J. Cai D-mem: a dual-process memory system for llm agents. arXiv preprint arXiv:2603.18631. Cited by: §2.1. Zhang et al. (2026) S. Zhang, J. Wang, R. Zhou, J. Liao, Y. Feng, Z. Li, Y. Zheng, W. Zhang, Y. Wen, Z. Li, et al. Memrl: self-evolving agents via runtime reinforcement learning on episodic memory. arXiv preprint arXiv:2601.03192. Cited by: §2.2. Zhang et al. (2025) Z. Zhang, Q. Dai, X. Bo, C. Ma, R. Li, X. Chen, J. Zhu, Z. Dong, and J.-R. Wen A survey on the memory mechanism of large language model-based agents. ACM Transactions on Information Systems 43 (6), p. 1–47. Cited by: §1. Zheng et al. (2023) L. Zheng, W. Chiang, Y. Sheng, S. Zhuang, Z. Wu, Y. Zhuang, Z. Lin, Z. Li, D. Li, E. Xing, et al. Judging llm-as-a-judge with mt-bench and chatbot arena. Advances in neural information processing systems 36, p. 46595–46623. Cited by: §4.1. 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, p. 19724–19731. Cited by: §1, §2.1, §2.2. Zhou et al. (2026) C. Zhou, H. Chai, W. Chen, Z. Guo, R. Shan, Y. Song, T. Xu, Y. Yang, A. Yu, W. Zhang, et al. Externalization in llm agents: a unified review of memory, skills, protocols and harness engineering. arXiv preprint arXiv:2604.08224. Cited by: §2.1. Zhu et al. (2026) Q. Zhu, S. Chen, R. Yu, Z. Wu, and B. Wang From lossy to verified: a provenance-aware tiered memory for agents. arXiv preprint arXiv:2602.17913. Cited by: §2.1. Appendix A Experimental Details A.1 Benchmarks We evaluated REALM on two commonly used long-term memory benchmarks. • LoCoMo (Maharana et al., 2024). LoCoMo evaluates LLM-based agents over extended interaction histories. Each sample contains multi-session conversations and question-answering tasks that require locating, integrating, and reasoning over information distributed across the dialogue history. • LongMemEval (Wu et al., 2024). LongMemEval focuses on long-context and long-term memory abilities of LLM-based agents. In our experiments, we tested only LongMemEval_S, which require memory-intensive question answering and covers various question types. A.2 Baselines We compare our method against representative long-term memory systems covering the major design paradigms in agent memory. Mem0 (Chhikara et al., 2025) represents the classical paradigm of memory extraction and management with flat retrieval. MIRIX (Wang and Chen, 2025) decomposes memory into multiple components, while Zep (Rasmussen et al., 2025) introduces temporal memory structures. A-Mem (Xu et al., 2026) dynamically determines memory formation through agentic decisions. Nemori (Nan et al., 2025) further models memory evolution through adaptive memory granularity and predictive retrieval. MAGMA (Jiang et al., 2026a) integrates a multi-graph memory architecture with strategy-guided graph traversal to enhance long-term memory. Together, these methods cover the principal design paradigms of modern long-term agent memory systems, providing a comprehensive set of baselines for comparison. The following is a detailed description of each baseline method. • Mem0 (Chhikara et al., 2025). Mem0 maintains a flat memory store through an extraction-update pipeline: an LLM first extracts salient facts from each new message pair conditioned on a running conversation summary and recent history, then a second LLM call retrieves the top-s semantically similar existing memories and issues one of four tool-call operations (ADD, UPDATE, DELETE, NOOP) to reconcile the new fact with the existing store, without modeling relations between memories. • MIRIX (Wang and Chen, 2025). MIRIX decomposes memory into six predefined components (Core, Episodic, Semantic, Procedural, Resource, and Knowledge Vault), each maintained by a dedicated memory manager agent coordinated by a meta memory manager that routes incoming information to the relevant components. At inference time, an active retrieval mechanism first infers a topic from the ongoing context and then retrieves the top-k entries from each memory component independently. • Zep (Rasmussen et al., 2025). Zep organizes memory as a temporally-aware knowledge graph (Graphiti) comprising three hierarchical subgraphs: episodes (raw messages), semantic entities and facts extracted from episodes, and higher-level community summaries obtained via label propagation. Facts carry bi-temporal validity intervals, and newly ingested edges can invalidate contradicting existing edges. Retrieval combines cosine similarity, BM25, and breadth-first graph search, followed by reranking. • A-Mem (Xu et al., 2026). Following the Zettelkasten method, A-Mem represents each interaction as an atomic note enriched with LLM-generated keywords, tags, and a contextual description. When a new note is added, the system retrieves its top-k nearest notes by embedding similarity and prompts an LLM to decide which links to establish among them; the same neighborhood is then passed to a separate memory evolution step, where an LLM updates each neighbor’s context, keywords, and tags in light of the new note, allowing existing memories to evolve as new experience arrives. • Nemori (Nan et al., 2025). Nemori separates memory construction into episodic integration and semantic distillation. Raw messages are first partitioned into coherent episodes and rewritten into narrative form; each episode is then compared against an LLM-synthesized anticipatory schema retrieved from existing knowledge, and only the prediction-error residual, i.e., information the schema fails to anticipate, is distilled into semantic memory, following the predictive-coding principle that predictable content is redundant. • MAGMA (Jiang et al., 2026a). MAGMA represents each memory event across four orthogonal relation graphs (semantic, temporal, causal, and entity). Retrieval is formulated as policy-guided graph traversal: a router classifies query intent (WHY/WHEN/ENTITY) to reweight edge types, fuses anchor nodes across embedding, keyword, and temporal signals via reciprocal rank fusion, and performs an intent-weighted beam search before linearizing the retrieved subgraph into context. Memory evolution follows a dual-stream design that decouples fast temporal-edge ingestion from asynchronous LLM-based causal/entity edge consolidation. A.3 Memory Graph Configuration. During retrieval, the number of seed plans for LoCoMo is limited to 1, with a maximum expansion depth of 3; for LongMemEval, the number of seed plans is limited to 3, with a maximum expansion depth of 5; and the maximum number of retrieved nodes is 10. The α value for evidence aggregation is set to 0.8, and the β value for access score is set to 0.6.After each question is evaluated, memory reconsolidation is performed once, and the memory graph is updated. Each question is answered only once, simulating the continuous evolution of memory in real-world usage scenarios. Our framework does not require specialized hardware and can be executed on standard computing environments. All experiments rely on API-based LLM inference and lightweight graph operations. A.4 Evaluation Protocol and Question Scheduling The two benchmarks LoCoMo (Maharana et al., 2024) and LongMemEval (Wu et al., 2024) adopt different evaluation protocols due to their distinct data characteristics. Each LoCoMo sample contains a long conversation together with multiple questions of different types. Accordingly, we evaluate the questions sequentially within each sample. After answering each question, the memory graph undergoes one round of memory reconsolidation, allowing its structure to evolve throughout the evaluation process. In contrast, each LongMemEval sample contains only a single question of a specific type, which does not provide sufficient opportunities for memory reconsolidation. Therefore, for each sample, we use GPT-4o-mini and GPT-4.1 to generate one to six additional questions based on the corresponding oracle session, simulating historical memory usage before evaluating the original benchmark question. Following prior agent memory studies (Li et al., 2025; Nan et al., 2025), we exclude unanswerable questions from both benchmarks. We choose LoCoMo and LongMemEval_S because they are the two most widely used benchmarks for evaluating long-term memory in LLM-based agents. Our goal is not to optimize leaderboard performance, but to validate the effectiveness of memory reconsolidation as a continual memory organization mechanism. A.5 Evaluation Details Due to the limited availability of reproducible implementations and the substantial computational cost of reproducing all baselines, we reuse officially reported results whenever possible. All compared methods are evaluated under the same backbone and evaluation protocol whenever possible. Specifically, we only compare methods using “gpt-4o-mini” as the backbone model and adopt the same “gpt-4o-mini”-based LLM-as-a-Judge prompts as used in the corresponding papers. For methods whose official implementations or evaluation results are unavailable under our setting, we reproduce them ourselves. In the main results, the performance of MIRIX and Mem0 is taken from the MemOS paper (Li et al., 2025), while the results of MAGMA and Nemori are adopted from the MAGMA paper (Jiang et al., 2026a). We reproduced the A-Mem results under the same experimental settings. Algorithm 1 Cognitive Graph Memory Organization Input: Observation oto_t, Conversation Summary sts_t, Recent Updates ctc_t, Memory Graph G Output: Updated Memory Graph G 1: X←ExtractMemoryUnits(ot,st,ct)X← ExtractMemoryUnits(o_t,s_t,c_t) 2: for x in X do 3: N←RetrieveSimilarAndRecent(x)N← RetrieveSimilarAndRecent(x) 4: a←PredictOperation(x,N)a← PredictOperation(x,N) 5: v←Execute(a)v← Execute(a) 6: E←InferRelations(v,N)E← InferRelations(v,N) 7: UpdateGraph(E)(E) 8: end for 9: return G Algorithm 2 Retrieval via Strategy Atom Combination Input: Query q, Memory Graph G Output: Evidence Set qV_q, Activated Subgraph qG_q 1: πseed←ComposeSeedStrategy(q) _seed← ComposeSeedStrategy(q) 2: R←∅R← 3: for each retrieval plan p∈πseedp∈ _seed do 4: R←R∪SeedRetrieve(,p)R← R∪ SeedRetrieve(G,p) 5: end for 6: while not StopRetrieval(R)(R) do 7: F←SelectFrontier(R)F← SelectFrontier(R) 8: for each node v∈Fv∈ F do 9: av←ComposeExpandStrategy(v,R,q)a_v← ComposeExpandStrategy(v,R,q) 10: N←Expand(v,av)N← Expand(v,a_v) 11: UpdateAccessScore(N)(N) 12: R←R∪NR← R∪ N 13: end for 14: end while 15: Rerank(R,q)(R,q) 16: q←TopK(R)V_q← TopK(R) 17: q←InduceSubgraph(,q)G_q← InduceSubgraph(G,V_q) 18: return q,qV_q,G_q Algorithm 3 Feedback-Driven Topology Evolution Input: Question q, Retrieved Subgraph qG_q, Feedback f, Memory Graph G Output: Updated Graph G 1: T←InferTopicStructure(q,q)T← InferTopicStructure(q,G_q) 2: Pkey,Pnoise←IdentifyGroup(q,q,f,T)P^key,P^noise← IdentifyGroup(q,G_q,f,T) 3: OPEN←AgentEdit(T,P,q))D← AgentEdit(T,P,G_q)) 4: for all d=(vi,vj,a,r,c)∈d=(v_i,v_j,a,r,c) do 5: if a=createa= create then 6: AddEdge(vi,r,vj,ηc)(v_i,r,v_j,η c) 7: else 8: if a=strengthena= strengthen then 9: wij←wij+ηc(1−wij)w_ij← w_ij+η c(1-w_ij) 10: else if a=weakena= weaken then 11: wij←wij−ηcwijw_ij← w_ij-η cw_ij 12: end if 13: end if 14: end for 15: return G Appendix B Algorithms for REALM To facilitate understanding and reproducibility, we provide the complete pseudo-code for the proposed REALM framework. The algorithms correspond to the three stages introduced in the method section: memory organization, memory retrieval, and memory reconsolidation. They summarize the control flow and interactions among the LLM, memory graph, and retrieval modules while omitting implementation-specific details for readability. The pseudo-code is presented in Algorithms 1, 2, and 3, respectively. Appendix C Retrieval Details C.1 Strategy Atoms This section walks through the three retrieval prompts (Prompt D, D, D) by option, describing how each option that actively affects retrieval is executed. Seed Retrieval Planner (Prompt D). Each seed retrieval plan pi=(Qi,Ki,Ti,τi)p_i=(Q_i,K_i,T_i, _i) involves three key decisions: matching mode that determines how QiQ_i and KiK_i are used to score candidate nodes, TiT_i and τi _i are used to filter node types and time, respectively. Multiple seed plans issued for one question are executed independently and merged into a single seed set by node id. • matching_mode is determines how QiQ_i and KiK_i are used to score candidate nodes: – query_match. Only QiQ_i is embedded and matched against node embeddings by cosine similarity; keywords are not used. – keywords_match. Only KiK_i is matched against nodes through lexical, inverted-index keyword search; the query embedding is not used. – hybrid_match. Both signals are computed for every node and combined as a weighted sum (embedding weight 0.6, keyword weight 0.4 by default), so a node found by either signal can be recalled. • allowed_node_types (TiT_i) is applied as a memory node type filter in all three modes, but is not strictly enforced. If restricting to TiT_i together with the score threshold would leave no candidates, the filter is relaxed in two steps: first the score threshold is dropped while keeping TiT_i, and then if the result is still empty, TiT_i itself is dropped. Therefore, seed retrieval never returns an empty set. • time_range (τi _i) is only enforced when matching mode is hybrid_match: a node is kept only if its own time interval overlaps τi _i, nodes outside this window are excluded outright, and a node carrying no resolvable timestamp is treated as always inside the window and kept by default. Retrieval Sufficiency Controller (Prompt D). Before each expansion round, this atom inspects the current retrieved nodes set and returns two fields that control the loop: • is_enough. If true, retrieval terminates immediately with the current retrieved memory nodes. • nodes_to_expand. If is_enough is false, this list of node ids becomes the next expansion frontier FtF_t. If the list is empty or none of its ids belong to the current nodes set, the frontier instead defaults to the highest-scoring nodes that have not yet been expanded. Graph Expansion Policy (Prompt D). For each frontier node v∈Ftv∈ F_t, this atom produces an expansion action av=(mode,predicate,decay,inhibit)a_v=(mode,\ predicate,\ decay,\ inhibit) together with score_threshold and reasoning. Every candidate edge e reachable from v, with endpoint node u, is scored as score(e,u)=wsem⋅sim(e,r)+wedge⋅ωe+δtemporal,score(e,u)=w_sem·sim(e,r)+w_edge· _e+ _temporal, (14) clipped to [0,1][0,1], where sim(e,r)sim(e,r) is the cosine similarity between the embedding of edge e’s description and the embedding of the reasoning text r, ωe _e is the current edge weight, δtemporal _temporal is the penalty contributed by decay (zero when disabled), and wsem=0.6,wedge=0.4w_sem=0.6,w_edge=0.4 by default. A candidate is discarded before scoring if it revisits a node already on the current path, has already been reached from another seed, or is excluded by predicate; after scoring, it is further discarded if its score falls below score_threshold. • predicate (layer_predicate_include): restricts candidate edges to a given relation layer sets from logical, causal, taxonomic, associative, optionally one predicate within that layer, and a traversal direction (forward, backward, or both); this is a hard filter applied before scoring. • decay (temporal_decay): is used to compare a candidate node’s timestamp against a reference window (time ± Δt t). hard mode drops out-of-window candidates entirely; soft mode instead applies a continuous penalty that grows with the distance beyond the window boundary. Nodes lacking timestamp information are kept with a fixed penalty under missing_time_mode=keep, or dropped outright under missing_time_mode=drop. • inhibit (conflict_inhibit): is used to discard any candidate edge whose predicate is contradicts before scoring when enabled. The mode atom determines how candidates in the expansion stage are selected and carried into the next hop: • subgraph_beam. At each hop, aggregate all candidate nodes from the active frontiers, remove duplicates based on the target node ID (retaining the entry with the highest score), and admit them in order of score until a single node budget shared by the whole seed (subgraph_max_nodes) is exhausted. The frontier is then completely replaced by the newly accepted nodes. • path_search. Each active path is extended independently. The generated paths are deduplicated based on their terminal nodes (retaining the path with the highest cumulative path score, calculated as the average hop score minus a fixed penalty of 0.030.03 for each additional hop), and only the top-path_top_k paths remain active for the next hop, for a maximum of path_max_depth hops. Paths that are pruned at a particular hop will not be reconsidered. Appendix D Prompts For completeness, we provide the detailed prompt templates across all three functional stages of our framework: • Memory Organization: – Memory Unit Construction (Prompt D): Extracts memory units and updates dialogue summaries. – Memory Operation Selection (Prompt D): Decides node insertion, merging, or skipping. – Memory Relation Prediction (Prompt D): Determines edge operations and semantic relations between nodes. • Retrieval Stage: – Seed Planning (Prompt D): Selects retrieval modes and constraints to identify anchor nodes. – Sufficiency Assessment (Prompt D): Evaluates evidence completeness and identifies candidate expansion nodes. – Retrieval Expansion (Prompt D): Defines traversal modes and edge constraints for graph propagation. • Topology Evolution: – Topology Refinement (Prompt D): Guides local graph topology evolution based on retrieved subgraphs. Prompt D.1: Memory Construction You are a memory construction agent of an agent memory system. You must perform two tasks: Task A: Memory Unit Generation. Based on your relevant past memories, create memory units for the Latest Information. Task B: Dialogue Summary Generation. Based on the latest information, update the current conversation summary. The past memories include a summary of the past conversation and related conversation content. The latest information is the new input information. When generating new memory units, you need to assess their relationship to past memories. For example, the new information might answer a question raised before, or it might serve as a supplement or extension to a past memory, and so on. You need to establish this relationship within the memory units you’ve extracted. Use the principle of the Fewest Memory Nodes: represent the Latest Information clearly and completely with the fewest nodes. Task A: Memory Unit Generation Step 1. Extract Information. Referring to the supplementary information provided by past memories, identify the key points in the latest information and represent them using the most appropriate of the following four levels of granularity: - entity: a referable object such as a person, place, object, or concept. - event: a single action, interaction or occurrence, describing something that happened at a specific time - episode: a multi-step experience with context and outcome, lasting for a period of time - fact: a stable and general statement about somebody and something, or a universal rule and knowledge, derived or deduced from latest information INSTRUCTIONS: - The past memories have already been saved and does not need to be saved again. - Avoid mixing multiple semantics in one unit. - It is allowed to generate multiple units if needed - Ensure that each unit is semantically coherent and complete Step 2. Construct Memory Units. Follow the structure below to construct memory units: entity: name; aliases (a list of alternative names, NOT pronouns); category (person | object | place | concept | etc); role (describe the role or significance of this entity). event: name (general event name); participants (a list of relevant entity names); description (a description of the event); time (exact happened time of described event: none | x-x-x). episode: name (general episode name); description (a description of the episode, contains the why it happened and the outcome); keywords (a list of keywords for the episode, not more than 3); time_range (exact time range of described episode: none | x-x-x to x-x-x). fact: statement (a clear and universal factual statement); keywords (a list of keywords for the fact, not more than 3). INSTRUCTIONS: - When declaring each field in a memory unit, you must specify the fully qualified name of the element. - Each of these memory units should be able to be semantically understood independently. Task B: Dialogue Summary Generation Based on the latest information, update the current conversation summary. This summary serves as your long-term working memory as a memory construction agent, helping you understand the context and progress of the information currently being processed. The current conversation summary should include content such as how the conversation topic has evolved and any ongoing, unfinished tasks, to provide a high-level overview of the conversation’s progress. Keep the content concise and general; avoid using any demonstrative pronouns, and do not exceed 200 words. GOOD example slices: - ‘A is asking B about winter travel plans.’ - ‘They are discussing John’s son’s academic situation.’ Prompt D.2: Node Operation Decision You are maintaining a memory graph. Your task is to decide how to handle a new memory unit. Task Overview Given a new memory unit and candidate nodes (retrieved by similarity and/or recency), you need to: 1. Decide the operation type. - add: Create a new node for this memory unit - modify: Merge this memory unit into an existing candidate node - skip: Skip storing because an existing node already completely covers this content 2. Output the final node information. (for both ‘add’ and ‘modify’): - You may adjust/refine the node’s metadata based on context - For ‘modify’: output the merged node information - For ‘add’: output the new node information (can be same as input or refined) 3. Identify related candidates. - Select candidates that have semantic and logical relationships with the final node - These will be used for edge creation in the next step - You do NOT need to specify edge types here, just identify which candidates are related Decision Criteria Choose modify only if all of the following conditions are met: - The new information refers to the SAME underlying entity/event/fact - It only adds detail, clarification, or minor correction - It does NOT introduce: a new state, a temporal change, or a contradiction - Merging will NOT cause loss of previously stored information and the memory unit information (their content are duplicated) Choose skip if: - An existing node already completely covers the content - Storing this would create pure duplication Otherwise, choose add. Important Principle When uncertain, prefer ‘add’ over ‘modify’, since an incorrect merge may cause irreversible information loss. Candidate Sources Candidates come from two sources (marked in the input): - similarity: Retrieved by semantic similarity to the new memory unit - time: Recently modified/created nodes (temporal proximity) - similarity+time: Retrieved by both methods Consider both similarity scores and temporal context when making decisions. Prompt D.3: Edge Connection Decision You are maintaining a memory graph. Your task is to decide how to establish edges between a target node and related nodes. Task Overview: Given a target node and its related candidate nodes (some may already have edges to the target), decide: - For each candidate: what edge operation to perform - Edge operations: ‘add’ (new edge), ‘modify’ (change existing edge), ‘delete’ (remove edge), ‘no_change’ (keep as is) Edge Predicates (Organized by Type) 1. Logical - contradicts(A,B): A and B are logically mutually exclusive. When A is detected, the activation of B should be suppressed. - implies(A,B): If A holds, then B must hold. - constrains(A,B): The existence of A restricts the boundaries or execution parameters of B. - verifies(A,B): A serves as evidence for B, increasing confidence in B. 2. Causal - precedes(A,B): Pure temporal sequence; A occurs before B, with no direct causality. - enables(A,B): A is a necessary condition for B to occur (necessary Condition). Without A, B cannot be initiated. - triggers(A,B): The occurrence of A directly causes B (Sufficient Condition). - results_in(A,B): B is the state change resulting from the execution of A (State Transition). 3. Taxonomic - comprises(A,B): A whole-part relationship. A is composed of multiple parts, including B. - instantiates(A,B): A relationship between abstract class A and concrete instance B. - summarizes(A,B): A is a high-level semantic compression of B (typically episodes or events). 4. Associative - correlates(A,B): Semantically highly similar or statistically strongly correlated. - supersedes(A,B): A is the latest version or correction of B; B should be considered obsolete or historical. - analogous_to(A,B): An analogical relationship. A and B are similar in structure or function, although they belong to different domains. - contextualizes(A,B): A provides necessary background information or contextual clarification for B. Decision Guidelines For add: Create a new edge only when the relationship is clear. Specify the predicate, weight, and description. For modify: Update an existing edge when the predicate is more appropriate or the weight should be adjusted. Output the complete updated edge. For delete: Remove an edge only when the relationship is clearly invalid. Prefer no_change when uncertain. For no_change: Keep the existing edge unchanged when it remains valid. Direction Rules - For single-direction predicates: source -> target indicates the relationship direction - For bidirectional predicates (contradicts, correlates, analogous_to): the system will automatically create reverse edges Weight Guidelines: Weight represents the certainty/strength of the relationship [0, 1]: - 0.9-1.0: Very confident, explicit relationship - 0.7-0.8: Confident, clear relationship - 0.5-0.6: Moderate confidence, implicit relationship - 0.3-0.4: Low confidence, weak relationship - 0.0-0.2: Very uncertain Prompt D.4: Seed Retrieval Planner Task Analysis the question, thinking about the key entities, contents, potential logical chains, potential related factors, etc., and generate a strategy to locate the anchor points on the memory graph. Choose one mode from following three modes: - query_match: generate a new query based on the question, and only uses embedding semantic similarity to search the memory graph. It is good at recalling memories expressed with different wording, implicit context, paraphrased situations, and broad semantic targets. - keywords_match: generate a list of keywords based on the question, and only uses lexical keyword matching to search the memory graph. It is good at preserving precise surface anchors such as names, places, organizations, project, object, event, and quoted phrases. - hybrid_match: generate a new query and a list of keywords based on the question, and take both scores into consideration to search the memory graph. It is good when initial recall should preserve exact anchors while also matching the semantic condition. Return strict JSON keys: - allowed_node_types: the types of the nodes to retrieve. -time_range: the temporal constraint for retrieval. Allowed Node Types Candidates: - entity: A referable object such as a person, place, object, or concept. - event: a single action or something happened at a specific time - episode: a multi-step experience with context and outcome, lasting for a period of time - fact: stable, complete, generalizable and explicit statement derived or deduced from NEW CONTENT Prompt D.5: Retrieval Sufficiency Controller You are a retrieval controller in a graph memory system. Decide whether the displayed candidate nodes already contain enough information to answer the question. First decide global sufficiency using all displayed candidate nodes together. Return ‘is_enough’: ‘true’ when at least one candidate node, or the combination of multiple candidate nodes, contains the answer and you can directly answer the question from the shown evidence. It is NOT required that every candidate node can answer the question. When ‘is_enough’ is ‘true’, ‘nodes_to_expand’ must be [] and ‘nodes_to_skip’ must be []. Do not expand other nodes just because they do not contain the answer. Return ‘is_enough’: ‘false’ only when all displayed candidate nodes together still do not contain the answer. In that case, choose which candidate nodes should be used as starting points for the next graph expansion round. In Graph Memory System, content-related nodes are connected by various semantic and logical relationships. - nodes_to_expand: Select a node only if it is relevant to the topic of the question, contains partial evidence, provides a reasoning bridge to the answer, is located in a graph neighborhood that may contain the answer, or holds the potential to lead to evidence. Do not expand a node just to confirm an answer that is already explicitly stated in that node. Only select the nodes with the highest expansion potential, no more than 5 nodes. Prompt D.6: Graph Expansion Policy Given the current retrieval state, generate graph expansion strategy for each selected seed node. The available edge predicates are identical to those defined in the Edge Connection Decision prompt. Strategy of Each action: Necessary Parameters: - seed_id: the id of the seed node. - expansion_mode: choose one of [‘subgraph_beam’, ‘path_search’]. - subgraph_beam: builds a compact relevant subgraph by globally selecting high-quality candidates. Use this when the question needs broad evidence aggregation, related facts, constraints, or contextual support. - path_search: searches coherent reasoning paths. Discarded paths/candidates must not be reconsidered later. Use this when the question needs chain-like evidence, causal/logical progression, or one consistent explanation route. - layer_predicate_include: the layer-predicate-direction constraints to include. Each item is a dictionary with the format of ‘layer’: str, ‘predicate’: str, ‘direction’: ‘forward|backward|both|none’. - layer must be one of [‘logical’, ‘causal’, ‘taxonomic’, ‘associative’]. - predicate must belong to the selected layer. If you only want to restrict by layer, use an empty predicate. - score_threshold: minimum candidate score to keep. Candidates below this threshold should be filtered before adding them to a subgraph or path. Mode-specific Parameters: - For expansion_mode = ‘subgraph_beam’: - subgraph_max_nodes: maximum number of unique non-seed nodes to collect for this seed under this action. Use a small number for focused retrieval and a larger number only when the question needs broad supporting evidence. - For expansion_mode = ‘path_search’: - path_max_depth: maximum path length measured by number of edges from the seed. This is the hard upper bound for coherent path exploration. - path_top_k: maximum number of active paths to keep at each hop. Use 1 for a single greedy path, and a larger value only when multiple plausible reasoning chains should be explored. Optional Parameters: - temporal_decay: optional time constraint operator. Use this only when the question requires explicit temporal constraints. - strict JSON format: ‘time’: ‘Y | Y-M | Y-M-D | Y-M-D H:M | [start, end]’, ‘delta_t’: ‘supports value+unit, e.g. ‘value’: 7, ‘unit’: ‘days’, ‘mode’: ‘hard | soft’, ‘missing_time_mode’: ‘keep | drop’ - semantics: - time is determined by the question. - delta_t is the tolerance window (time ± delta_t): in-window => no penalty. - hard: out-of-window nodes should be treated as filtered. - soft: out-of-window nodes are not filtered, but decayed by temporal penalty. - missing_time_mode = keep: keep node with a fixed penalty. - missing_time_mode = drop: drop node directly. - conflict_inhibit: the flag of the conflict inhibit. - reasoning: describe what content this strategy is intended to find. Prompt D.7: Topology Update You are a topology auditor for a graph memory system. You are tasked with analyzing a retrieved memory subgraph and identifying how its topology should be refined. Task Objectives This is a local topology reconstruction task. You will be provided with a set of recalled nodes and the existing edges between them. Your task is to determine whether new edges should be established between these nodes or whether the weights of existing edges should be adjusted. The purpose of these operations is to make the relationships between nodes more logically rigorous and complete, and to facilitate future retrieval. The provided questions and answers serve as references to assist you in reconstructing the local topology. You can analyze the contribution of these nodes to the questions to better understand the relationships between them. Your ultimate goal is not to enhance the connections within this specific problem, but to improve future graph access: key evidence should be accessible through a reliable logical structure, misleading connections should have their weights reduced, and connections between nodes unrelated to the problem should be established only if their relationships are clearly defined. Context Allowed Edge Schema: (Type-Predicate) edge_type_schema Confidence Guidelines For every operation, output confidence, not manual weight delta. Confidence represents how certain you are that this operation is useful and correct for future graph retrieval [0, 1]: confidence_rule For add_edge, confidence will be used directly as the new edge weight. For strengthen_edge/weaken_edge, the system will convert confidence to the weight change; do not output delta. Required Analysis Workflow Before deciding edits, explicitly analyze the recalled nodes in the JSON output: 1. Determine the core topic represented by the recalled nodes. The input question should only be treated as a reference signal for identifying the topic. If the answer to the question is incorrect, focus instead on the underlying topic that the recalled nodes collectively imply. 2. Identify which nodes constitute the key evidence required to answer the question correctly, or are directly relevant to the identified topic. Input them at ‘gold_supporting_node_ids’. 3. Identify which nodes provide supporting context, including but not limited to: background information, constraints, temporal information, entity disambiguation, or other information necessary for understanding the topic. Input them at ‘supporting_associated_node_ids’. 4. Identify which nodes are irrelevant to the answer or topic, or may introduce misleading directions during retrieval and reasoning. Input them at ‘misleading_node_ids’ or ‘unrelated_node_ids’. 5. Based on the above analysis, propose topology refinement actions. In particular: - strengthen predicate relations among generally relevant nodes, - weaken the influence of topic-irrelevant or misleading nodes, - add missing connections between nodes that should be related through valid predicates but are currently disconnected, - improve the logical coherence of the local subgraph to better support future retrieval and reasoning. Constrains 1. Only create new edges between recalled nodes, and only adjust the weights of existing edges between these nodes. 2. Preserve the existing graph structure. Do not delete edges or modify node content. 3. Use only predicates from the provided allowed edge predicate set. 4. When adjusting an existing relationship, use strengthen_edge or weaken_edge and reference a valid edge_id from the existing graph. 5. Add a new edge only when the relationship is strongly supported by the available evidence from the recalled nodes. If the evidence is ambiguous, do not add the edge. 6. Adjust edge weights only when there is clear evidence that the relationship strength should change and that doing so is likely to improve future memory retrieval.