Source-linked AI summary
General Agentic Memory Via Deep Research
B. Y. Yan, Chaofan Li, Hongjin Qian, Shuqi Lu, Zheng Liu
TL;DR
Static memory compresses agent histories and can lose information needed for fine-grained requests. GAM preserves complete histories in a page-store, uses lightweight offline memory to guide online deep research, and consistently improves performance across memory and long-context benchmarks.
Problem
Static precomputed memory compresses raw histories and inevitably loses information needed to satisfy fine-grained client requests.
Method
GAM uses a Memorizer to create lightweight memory while preserving complete histories in a page-store, then uses a Researcher to retrieve and integrate information at runtime.
Results
GAM consistently and significantly outperforms existing methods across LoCoMo, HotpotQA, RULER, and NarrativeQA.
Takeaways & Limitations
GAM supports high-fidelity, task-adaptable memory while leveraging test-time computation and advanced LLM capabilities for downstream task completion.
Abstract
from arXiv · showhide
Memory is critical for AI agents, yet the widely-adopted static memory, aiming to create readily available memory in advance, is inevitably subject to severe information loss. To address this limitation, we propose a novel framework called \textbf{general agentic memory (GAM)}. GAM follows the principle of "\textbf{just-in time (JIT) compilation}" where it focuses on creating optimized contexts for its client at runtime while keeping only simple but useful memory during the offline stage. To this end, GAM employs a duo-design with the following components. 1) \textbf{Memorizer}, which highlights key historical information using a lightweight memory, while maintaining complete historical information within a universal page-store. 2) \textbf{Researcher}, which retrieves and integrates useful information from the page-store for its online request guided by the pre-constructed memory. This design allows GAM to effectively leverage the agentic capabilities and test-time scalability of frontier large language models (LLMs), while also facilitating end-to-end performance optimization through reinforcement learning. In our experimental study, we demonstrate that GAM achieves substantial improvement on various memory-grounded task completion scenarios against existing memory systems.
1 Introduction
GAM addresses information loss and rigidity in static memory by retaining complete histories while compiling task-specific contexts at runtime. Its Memorizer–Researcher design supports broad, consistently improved performance across memory and long-context benchmarks.
- Static precomputed memory loses information because memorization compresses raw data, making fine-grained client requests difficult to satisfy.
- Existing memory systems also struggle with ad-hoc requests and cross-domain generalization because they assume static structures and rely on handcrafted expertise.
- GAM retains complete historical information in a page-store while using lightweight memory to support runtime search and context construction.The framework follows a just-in-time compilation principle: offline memorization is lightweight, while online research performs intensive retrieval and integration.
- The Memorizer dynamically compresses sessions into lightweight memory and stores each session with its memory as an inclusive page.
- The Researcher iteratively plans searches, retrieves relevant pages, and reflects until the gathered information satisfies the client’s request.
- GAM consistently and significantly outperforms existing methods across LoCoMo, HotpotQA, RULER, and NarrativeQA.
2 Methodology
GAM implements optimized memory through two LLM-based agents: an offline Memorizer that creates concise snapshots and preserves pages, and an online Researcher that iteratively retrieves and integrates evidence. The framework also optimizes both modules with reinforcement learning using downstream answer rewards.
- Architecture: GAM’s two LLM-based modules work together to generate optimized memory for the client agent’s request.
- Memorizer: The Memorizer creates a concise session snapshot from new and existing memory, then pages the session with contextual headers into the page-store.Paging preserves complete trajectory information for later retrieval.
- Researcher: GAM’s researcher plans, searches, integrates, and reflects over page-store contents until it returns optimized context for downstream task completion.It can use vector, BM25, and ID-based retrieval tools to explore stored pages.
- Researcher: The researcher repeats search rounds when reflection identifies missing information and returns the integrated result when the request is satisfied.
- Optimization: GAM’s expected reward is based on the client’s sampled answer quality, while reinforcement learning updates the Memorizer and Researcher and excludes the client from training.The policy-gradient formulation uses answer-reward baselines for the two modules.
3 Experiment
GAM is evaluated against memory-free and memory-based baselines across four benchmarks, with results showing strong effectiveness, robustness, scalability, and competitive efficiency.
- 3.2 Main Results: Overall Effectiveness: GAM consistently outperforms all baselines across LoCoMo, HotpotQA, RULER, and NarrativeQA, with especially strong results on multi-step retrieval and reasoning tasks.On RULER multi-hop tracing, GAM exceeds 90% accuracy, while most baselines perform unsatisfactorily.
- 3.2 Main Results: Overall Effectiveness: GAM maintains stable and competitive performance as input-context length grows, demonstrating robustness to increasing context size.The HotpotQA results specifically reflect performance under varying input-context lengths.
- 3.3 Model’s Impact: Larger backbones improve GAM’s performance, while the researcher is more scale-sensitive than the memorizer and requires greater capacity for iterative planning and search.Performance deteriorates substantially when the researcher uses a 7B-or-smaller backbone, whereas GAM remains competitive with a 0.5B memorizer.
- 3.4 Increasing Test-Time Computation: Increasing reflection depth or retrieved-page count produces steady performance gains, although deeper reflection has diminishing marginal benefits.GAM autonomously chooses how many reflections to perform rather than always reaching the configured maximum.
- 3.5 Detailed Factors’ Analysis: Combining multiple search tools improves performance by broadening page-store exploration, while using research or memory alone performs substantially worse than the complete system.The default combination of all three search tools achieves the best performance among the tested tool configurations.
- 3.5 Detailed Factors’ Analysis: Adding source pages or extracted snippets to the researcher’s integration output improves fine-grained information preservation, while GAM’s efficiency remains competitive with comparable memory systems.Offline construction time grows approximately linearly with context length, while online serving time remains relatively stable.
4 Conclusion
GAM is a just-in-time memory system that combines lightweight memorization with deep research over preserved historical information. Across memory and long-context benchmarks, it reports significant and consistent improvements over existing methods.
- 4 Conclusion: GAM combines a memorizer and researcher under a just-in-time compilation principle.The memorizer extracts key information into lightweight memory while preserving complete information in a page-store; the researcher performs deep research over that store for each online request.
- 4 Conclusion: The memorizer processes incoming context with lightweight memory while preserving complete information in a page-store.
- 4 Conclusion: The researcher uses the pre-constructed memory to perform deep research and generate concise, informative memory for downstream tasks.
- 4 Conclusion: Experiments across popular memory and long-context benchmarks show significant and consistent improvements over existing methods.
Baseline Reproduction Details
The authors corrected mislabeled category mappings when reproducing several baseline methods on the LoCoMo dataset.
- Baseline Reproduction Details: The reproduced A-mem, Mem0, and MemoryOS baselines had incorrect category labels on LoCoMo.
- Baseline Reproduction Details: The category–label mappings were corrected using the official LoCoMo annotations.
- Baseline Reproduction Details: The correction specifically affected the A-mem, Mem0, and MemoryOS baseline reproductions.
Prompts
The prompts define a multi-agent retrieval and integration workflow that plans information needs, searches memory, consolidates evidence, and checks whether the result is sufficient. They require concise, factual, question-relevant outputs in specified JSON or paragraph formats.
- Prompts: The PlanningAgent interprets a question and memory, decomposes the task into concrete information needs, and selects retrieval tools.The available tools are keyword, vector, and page_index retrieval.
- Prompts: Retrieval instructions support keyword, vector, and page-index searches, with page indices limited to known relevant pages and a maximum of five.
- Prompts: The workflow specifies JSON output fields for planning and integration, including information needs, tools, queries, page indices, content, and sources.
- Prompts: The IntegrateAgent merges relevant facts from the current result and newly retrieved evidence into an updated factual summary.It must retain relevant information, add supported facts, and remove off-topic content without inventing or recommending.
- Prompts: The prompts require outputs to be concise, factual, relevant, and free of meta-language, advice, unsupported inference, or process commentary.
- Prompts: The InfoCheckAgent judges whether the current result contains enough specific information to answer the request completely.It evaluates completeness rather than answering the request itself.