# ArchAgent: Scalable Legacy Software Architecture Recovery with LLMs

arXiv: https://arxiv.org/abs/2601.13007 · HTML: https://mlsanity.com/paper/2601.13007/

## Key facts

- Cited by 2 papers in the map (data through 14 Oct 2026).
- Builds on 11 of its 19 references that are in the map.
- First posted on arXiv 19 Jan 2026.

## Builds on (most cited first, 11 of 11)

- [Evaluating Large Language Models Trained on Code](https://mlsanity.com/paper/2107.03374/) (2021)
- [Competition-Level Code Generation with AlphaCode](https://mlsanity.com/paper/2203.07814/) (2022)
- [Retrieval Augmented Generation or Long-Context LLMs? A Comprehensive Study and Hybrid Approach](https://mlsanity.com/paper/2407.16833/) (2024)
- [Source Code Summarization in the Era of Large Language Models](https://mlsanity.com/paper/2407.07959/) (2024)
- [Generative AI for Software Architecture. Applications, Challenges, and Future Directions](https://mlsanity.com/paper/2503.13310/) (2025)
- [When Large Language Models Confront Repository-Level Automatic Program Repair: How Well They Done?](https://mlsanity.com/paper/2403.00448/) (2024)
- [Do Code LLMs Understand Design Patterns?](https://mlsanity.com/paper/2501.04835/) (2025)
- [An Empirical Study on Capability of Large Language Models in Understanding Code Semantics](https://mlsanity.com/paper/2407.03611/) (2024)
- [Using LLMs in Generating Design Rationale for Software Architecture Decisions](https://mlsanity.com/paper/2504.20781/) (2025)
- [An automatic architecture reconstruction and refactoring framework](https://mlsanity.com/paper/1407.6103/) (2014)
- [Comparison of Static Analysis Architecture Recovery Tools for Microservice Applications](https://mlsanity.com/paper/2412.08352/) (2024)

## Built on by (most cited first, 2 of 2)

- [DeepDiscovery: A Location-Inference Framework for Task-Level Repository Understanding](https://mlsanity.com/paper/2606.22906/) (2026)
- [When Does the Dependency Graph Help Code-to-Architecture Mapping?](https://mlsanity.com/paper/2610.19769/) (2026)

## Abstract (arXiv)

Recovering accurate architecture from large-scale legacy software is hindered by architectural drift, missing relations, and the limited context of Large Language Models (LLMs). We present ArchAgent, a scalable agent-based framework that combines static analysis, adaptive code segmentation, and LLM-powered synthesis to reconstruct multiview, business-aligned architectures from cross-repository codebases. ArchAgent introduces scalable diagram generation with contextual pruning and integrates cross-repository data to identify business-critical modules. Evaluations of typical large-scale GitHub projects show significant improvements over existing benchmarks. An ablation study confirms that dependency context improves the accuracy of generated architectures of production-level repositories, and a real-world case study demonstrates effective recovery of critical business logics from legacy projects. The dataset is available at https://github.com/panrusheng/arch-eval-benchmark.
