Remember Your Trace: Memory-Guided Long-Horizon Agentic Framework for Consistent and Hierarchical Repository-Level Code Documentation
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
Automated code documentation is essential for modern software development, providing the contextual grounding that both human developers and coding agents rely on to navigate large codebases. Existing repository-level approaches process components independently, causing redundant retrieval and conflicting descriptions across documents while producing outputs that lack hierarchical structure. Therefore, we propose MemDocAgent, a long-horizon agentic framework that generates documentation within a single, integrated context spanning the entire repository. It combines two components: (i) Dependency-Aware Traversal Guiding that predetermines a traversal order respecting dependency and granularity hierarchies; (ii) Memory-Guided Agentic Interaction, in which the agent interacts with RepoMemory, a shared memory accumulating prior work traces through read, write, and verify operations. Through an in-depth multi-criteria evaluation, MemDocAgent achieves the best performance over both open- and closed-source baselines and demonstrates practical applicability in real software development workflows.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 46 of its 80 references that are in the map. First posted on arXiv 14 May 2026.
Builds on
46 of 80 references.
Closest ancestors · 9
Same direction, newest first
- 2025Context as a Tool: Context Management for Long-Horizon SWE-Agents26 Dec
- 2025DocAgent: A Multi-Agent System for Automated Code Documentation Generation11 Apr
- 2024HyperAgent: Generalist Software Engineering Agents to Solve Coding Tasks at Scale9 Sep
- 2024OpenHands: An Open Platform for AI Software Developers as Generalist Agents23 Jul
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering6 May
- 2024RepairAgent: An Autonomous, LLM-Based Agent for Program Repair25 Mar
- 2024CodeAgent: Enhancing Code Generation with Tool-Integrated Agent Systems for Real-World Repo-level Coding Challenges14 Jan
- 2023AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation16 Aug
- 2023ChatDev: Communicative Agents for Software Development16 Jul
Other references · 37
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,064
- 2023Generative Agents: Interactive Simulacra of Human Behaviorcited by 3,500
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
- 2023Voyager: An Open-Ended Embodied Agent with Large Language Modelscited by 2,081
- 2023MetaGPT: Meta Programming for A Multi-Agent Collaborative Frameworkcited by 1,761
- 2023MemGPT: Towards LLMs as Operating Systemscited by 1,295
- 2023FActScore: Fine-grained Atomic Evaluation of Factual Precision in Long Form Text Generationcited by 1,259
- 2025A-MEM: Agentic Memory for LLM Agentscited by 1,000
- 2023MemoryBank: Enhancing Large Language Models with Long-Term Memorycited by 539
- 2021SummaC: Re-Visiting NLI-based Models for Inconsistency Detection in Summarizationcited by 402
- 2025SWE-Bench Pro: Can AI Agents Solve Long-Horizon Software Engineering Tasks?cited by 254
25 more
- 2025Plan-and-Act: Improving Planning of Agents for Long-Horizon Taskscited by 190
- 2025ReSum: Unlocking Long-Horizon Search Intelligence via Context Summarizationcited by 132
- 2025ACON: Optimizing Context Compression for Long-horizon LLM Agentscited by 126
- 2024HiAgent: Hierarchical Working Memory Management for Solving Long-Horizon Agent Tasks with Large Language Modelcited by 101
- 2025AgentFold: Long-Horizon Web Agents with Proactive Context Managementcited by 95
- 2023Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization)cited by 72
- 2023Large Language Models are Few-Shot Summarizers: Multi-Intent Comment Generation via In-Context Learningcited by 71
- 2024DevEval: A Manually-Annotated Code Generation Benchmark Aligned with Real-World Code Repositoriescited by 71
- 2024RepoAgent: An LLM-Powered Open-Source Framework for Repository-level Code Documentation Generationcited by 69
- 2025SWE-Exp: Experience-Driven Software Issue Resolutioncited by 64
- 2025The Illusion of Diminishing Returns: Measuring Long Horizon Execution in LLMscited by 62
- 2019Recommendations for Datasets for Source Code Summarizationcited by 46
- 2022Automatic Code Documentation Generation Using GPT-3cited by 37
- 2025EXPEREPAIR: Dual-Memory Enhanced LLM-based Repository-Level Program Repaircited by 34
- 2024FENICE: Factuality Evaluation of summarization based on Natural language Inference and Claim Extractioncited by 28
- 2025UltraHorizon: Benchmarking Agent Capabilities in Ultra Long-Horizon Scenarioscited by 22
- 2025Improving Code Localization with Repository Memorycited by 19
- 2025COMPASS: Enhancing Agent Long-Horizon Reasoning with Evolving Contextcited by 19
- 2025Sculptor: Empowering LLMs with Cognitive Agency via Active Context Managementcited by 17
- 2024Code Needs Comments: Enhancing Code LLMs with Comment Augmentationcited by 16
- 2024FIZZ: Factual Inconsistency Detection by Zoom-in Summary and Zoom-out Documentcited by 15
- 2025Code Summarization Beyond Function Levelcited by 8
- 2025CodeWiki: Evaluating AI's Ability to Generate Holistic Documentation for Large-Scale Codebasescited by 4
- 2024DocuMint: Docstring Generation for Python using Small Language Modelscited by 2
- 2026ReFEree: Reference-Free and Fine-Grained Method for Evaluating Factual Consistency in Real-World Code Summarizationcited by 1
Built on by
Citing papers per year: 2026: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2025Prometheus: Towards Long-Horizon Codebase Navigation for Repository-Level Problem Solving
- 2026Compact Documentation for Coding Agents: A Benchmark, an Optimizer, and Why It Does Not Transfer
- 2026DocSync: Agentic Documentation Maintenance via Critic-Guided Reflexion
- 2026Learning to Commit: Generating Organic Pull Requests via Online Repository Memory
- 2025NL2Repo-Bench: Towards Long-Horizon Repository Generation Evaluation of Coding Agents
- 2025VisDocSketcher: Towards Scalable Visual Documentation with Agentic Systems
- 2026MemTrace: State-Consistent Memory for Long-Horizon Coding Agents
- 2025TENET: One Step Toward Test-Driven Development for Repository-Level Code Generation