RepoMaster: Autonomous Exploration and Understanding of GitHub Repositories for Complex Task Solving

📅 2025-05-27
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Large language models (LLMs) face severe limitations in context window capacity, hindering effective reuse of vast GitHub open-source code repositories for complex programming tasks. Method: This paper proposes an autonomous intelligent agent framework for repository-level code reuse. It integrates static analysis, graph neural network–inspired dependency reasoning, and dynamic exploration tooling. Key technical components include: (1) a novel hierarchical graph-based representation—comprising function call graphs, module dependency graphs, and layered code trees—for lightweight repository understanding; and (2) a progressive exploration mechanism with context-aware pruning to dynamically compress salient information and overcome context-length constraints. Contribution/Results: Experiments demonstrate significant improvements: a 110% increase in valid submissions on MLE-bench; and on the newly constructed GitTaskBench benchmark, task pass rate rises sharply from 24.1% to 62.9%, while token consumption drops by 95%.

Technology Category

Application Category

📝 Abstract
The ultimate goal of code agents is to solve complex tasks autonomously. Although large language models (LLMs) have made substantial progress in code generation, real-world tasks typically demand full-fledged code repositories rather than simple scripts. Building such repositories from scratch remains a major challenge. Fortunately, GitHub hosts a vast, evolving collection of open-source repositories, which developers frequently reuse as modular components for complex tasks. Yet, existing frameworks like OpenHands and SWE-Agent still struggle to effectively leverage these valuable resources. Relying solely on README files provides insufficient guidance, and deeper exploration reveals two core obstacles: overwhelming information and tangled dependencies of repositories, both constrained by the limited context windows of current LLMs. To tackle these issues, we propose RepoMaster, an autonomous agent framework designed to explore and reuse GitHub repositories for solving complex tasks. For efficient understanding, RepoMaster constructs function-call graphs, module-dependency graphs, and hierarchical code trees to identify essential components, providing only identified core elements to the LLMs rather than the entire repository. During autonomous execution, it progressively explores related components using our exploration tools and prunes information to optimize context usage. Evaluated on the adjusted MLE-bench, RepoMaster achieves a 110% relative boost in valid submissions over the strongest baseline OpenHands. On our newly released GitTaskBench, RepoMaster lifts the task-pass rate from 24.1% to 62.9% while reducing token usage by 95%. Our code and demonstration materials are publicly available at https://github.com/wanghuacan/RepoMaster.
Problem

Research questions and friction points this paper is trying to address.

Autonomous exploration of GitHub repositories for complex tasks
Overcoming information overload and dependency tangles in repositories
Optimizing context usage for LLMs in code generation
Innovation

Methods, ideas, or system contributions that make the work stand out.

Constructs function-call graphs for efficient understanding
Progressively explores related components autonomously
Optimizes context usage by pruning information
🔎 Similar Papers
No similar papers found.
H
Huacan Wang
The Key Laboratory of Cognition and Decision Intelligence for Complex Systems, Institute of Automation, Chinese Academy of Sciences, Beijing, China
Ziyi Ni
Ziyi Ni
Institute of Automation,Chinese Academy of Sciences
LLM agentcode agentlarge language modelmultimodal LLMtemporal modeling
S
Shuo Zhang
School of Artificial Intelligence, Beijing University of Posts and Telecommunications, China
S
Shuo Lu
NLPR & MAIS, Institute of Automation, Chinese Academy of Sciences, Beijing, China
S
Sen Hu
Peking University, Beijing, China
Ziyang He
Ziyang He
National University of Singapore, Singapore
Chen Hu
Chen Hu
School of Artificial Intelligence and Computer Science, Jiangnan University
Geometric Deep LearningMachine Learning
J
Jiaye Lin
Tsinghua University, Beijing, China
Y
Yifu Guo
South China Normal University, Guangzhou, China
Yuntao Du
Yuntao Du
Purdue University
Privacy
P
Pin Lyu
The Key Laboratory of Cognition and Decision Intelligence for Complex Systems, Institute of Automation, Chinese Academy of Sciences, Beijing, China