LLM Agents for Automated Dependency Upgrades
Vali Tawosi, Salwa Alamir, Xiaomo Liu, Manuela Veloso
TL;DR
The paper tackles automatic Java dependency upgrades by framing the task as sequential bug-fixing guided by migration documentation. It introduces a multi-agent LLM framework (Summary Agent, Control Agent, Code Agent) built on Meta-RAG change localization within the ALMAS architecture, enabling scalable code localization and editing. Evaluated on three synthetic, industry-inspired repositories, the approach achieves high precision (notably $71.4\%$ in one upgrade) and substantially fewer tokens and steps than state-of-the-art baselines, demonstrating efficient automated maintenance. The results support the framework’s potential to reduce manual effort in library upgrades and encourage broader adoption, with future work spanning real-world datasets and enhanced hybrid methods for even stronger performance.
Abstract
As a codebase expands over time, its library dependencies can become outdated and require updates to maintain innovation and security. However, updating a library can introduce breaking changes in the code, necessitating significant developer time for maintenance. To address this, we introduce a framework of LLM agents to be used in combination with migration documentation to automatically recommend and apply code updates and ensure compatibility with new versions. Our solution can automatically localize updated library usages in live Java codebases and implement recommended fixes in a user-friendly manner. The system architecture consists of multiple key components: a Summary Agent, Control Agent, and Code Agent. To validate our approach, we apply the framework on an industrial use case by which we create three synthetic code repositories with major Upgrade changes and benchmark our approach against state-of-the-art methods. Results show that our approach not only performs upgrades using fewer tokens across all cases but also achieves a precision of 71.4%, highlighting its efficiency and effectiveness compared to state-of-the-art methods.
