mlsanityData to 14 Oct 2026

Codebase-Memory: Tree-Sitter-Based Knowledge Graphs for LLM Code Exploration via MCP

arXiv 2603.27277 ↗First posted 28 Mar 2026cs.SE cs.AI cs.PLcited by 6

On the map: LLM agents and tool use → Software engineering coding agents

Abstract (arXiv)

Large Language Model (LLM) coding agents typically explore codebases through repeated file-reading and grep-searching, consuming thousands of tokens per query without structural understanding. We present Codebase-Memory, an open-source system that constructs a persistent, Tree-Sitter-based knowledge graph via the Model Context Protocol (MCP), parsing 66 languages through a multi-phase pipeline with parallel worker pools, call-graph traversal, impact analysis, and community discovery. Evaluated across 31 real-world repositories, Codebase-Memory achieves 83% answer quality versus 92% for a file-exploration agent, at ten times fewer tokens and 2.1 times fewer tool calls. For graph-native queries such as hub detection and caller ranking, it matches or exceeds the explorer on 19 of 31 languages.

Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 23 of its 37 references that are in the map. First posted on arXiv 28 Mar 2026.

Builds on

23 of 37 references.

Closest ancestors · 7

Same direction, newest first

  1. 2026Repository Intelligence Graph: Deterministic Architectural Map for LLM Code Assistants15 Jan
  2. 2025LoCoBench-Agent: An Interactive Benchmark for LLM Agents in Long-Context Software Engineering17 Nov
  3. 2025GraphCodeAgent: Dual Graph-Guided LLM Agent for Retrieval-Augmented Repo-Level Code Generation14 Apr
  4. 2025LocAgent: Graph-Guided LLM Agents for Code Localization12 Mar
  5. 2024OpenHands: An Open Platform for AI Software Developers as Generalist Agents23 Jul
  6. 2024Agentless: Demystifying LLM-based Software Engineering Agents1 Jul
  7. 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering6 May

Other references · 16

  1. 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,455
  2. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
  3. 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 367
  4. 2024LLMLingua-2: Data Distillation for Efficient and Faithful Task-Agnostic Prompt Compressioncited by 348
  5. 2023LLMLingua: Compressing Prompts for Accelerated Inference of Large Language Modelscited by 287
  6. 2024AutoCodeRover: Autonomous Program Improvementcited by 278
  7. 2022DocPrompting: Generating Code by Retrieving the Docscited by 153
  8. 2022ReACC: A Retrieval-Augmented Code Completion Frameworkcited by 119
  9. 2024RepoGraph: Enhancing AI Software Engineering with Repository-level Code Graphcited by 91
  10. 2024CodexGraph: Bridging Large Language Models and Code Repositories via Code Graph Databasescited by 65
  11. 2025Enhancing repository-level software repair via repository-aware knowledge graphscited by 27
  12. 2025Code Graph Model (CGM): A Graph-Integrated Large Language Model for Repository-Level Software Engineering Taskscited by 27
4 more
  1. 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approachescited by 23
  2. 2025cAST: Enhancing Code Retrieval-Augmented Generation with Structural Chunking via Abstract Syntax Treecited by 17
  3. 2025RANGER -- Repository-Level Agent for Graph-Enhanced Retrievalcited by 7
  4. 2025SemanticForge: Repository-Level Code Generation through Semantic Knowledge Graphs and Constraint Satisfactioncited by 1

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 6.

6 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026ByteRover: Agent-Native Memory Through LLM-Curated Hierarchical Context
  2. 2024CodeTree: Agent-guided Tree Search for Code Generation with Large Language Models
  3. 2025Prometheus: Towards Long-Horizon Codebase Navigation for Repository-Level Problem Solving
  4. 2025Chain-in-Tree: Back to Sequential Reasoning in LLM Tree Search
  5. 2026Enabling Knowledge Graph Understanding at Scale with the EXplore Your Graphs ENgine (EXYGEN)
  6. 2026Are you Synthesizing or Recalling? Evaluating LLMs on Algorithmic Code Retrieval
  7. 2026Reliable Graph-RAG for Codebases: AST-Derived Graphs vs LLM-Extracted Knowledge Graphs
  8. 2025Optimizing the Interface Between Knowledge Graphs and LLMs for Complex Reasoning