基於 LLMAgent 之相依套件自動更新與開發流程整合系統
An LLM Agent-Based System for Automated Dependency Upgrades with Development Workflow Integration
摘要
現代軟體開發高度依賴第三方套件,然而工程團隊往往因人力有限,使套件版本更新長期積壓,造成安全漏洞暴露與技術債累積。現有自動化工具(如 Dependabot、Renovate)僅能機械式提升版本號,無法處理跨主要版本的破壞性變更,使得大版本升級仍須大量人工介入。
本研究設計並實作一套基於大型語言模型(LLM)Agent 的相依套件自動升級系統,透過結構化工作流程驅動 Agent 完成套件分析、changelog 解讀、程式碼修補與本地驗證等完整流程,並與 GitLab CI/CD 平台深度整合,自動建立包含 AI 生成摘要的 Merge Request,使升級結果直接納入既有程式碼審查流程。系統同時實踐 Human-in-the-loop 設計,開發者可透過 MR 留言觸發後續迭代,在保留最終決策權的前提下將認知負擔降至最低。
實驗以 NYCU CS IT Center 正式環境中 16 個服務的 50 筆升級任務為基礎進行評估,涵蓋 patch、minor、major 三個版本層級。結果顯示,系統於所有版本層級均達到 100% 的 L1(套件安裝相容性)成功率,整體 L2(CI 全數通過)成功率為 86%,其中 major 版本升級達 85.7%。在開發效率方面,系統導入後各版本層級的 Developer Active Time 壓縮比分別為 patch 88.3%、minor 89.1%、major 90.4%,顯示 LLM Agent 在任務複雜度越高的情境下所帶來的效益越為顯著。
本研究設計並實作一套基於大型語言模型(LLM)Agent 的相依套件自動升級系統,透過結構化工作流程驅動 Agent 完成套件分析、changelog 解讀、程式碼修補與本地驗證等完整流程,並與 GitLab CI/CD 平台深度整合,自動建立包含 AI 生成摘要的 Merge Request,使升級結果直接納入既有程式碼審查流程。系統同時實踐 Human-in-the-loop 設計,開發者可透過 MR 留言觸發後續迭代,在保留最終決策權的前提下將認知負擔降至最低。
實驗以 NYCU CS IT Center 正式環境中 16 個服務的 50 筆升級任務為基礎進行評估,涵蓋 patch、minor、major 三個版本層級。結果顯示,系統於所有版本層級均達到 100% 的 L1(套件安裝相容性)成功率,整體 L2(CI 全數通過)成功率為 86%,其中 major 版本升級達 85.7%。在開發效率方面,系統導入後各版本層級的 Developer Active Time 壓縮比分別為 patch 88.3%、minor 89.1%、major 90.4%,顯示 LLM Agent 在任務複雜度越高的情境下所帶來的效益越為顯著。
Modern software development relies heavily on third-party packages, yet engineering teams frequently defer dependency updates due to limited bandwidth, leading to accumulated security vulnerabilities and technical debt. Existing tools such as Dependabot and Renovate can only mechanically bump version numbers and cannot handle breaking changes in major-version upgrades, leaving substantial manual effort unavoidable.
This thesis presents an LLM Agent-based automated dependency upgrade system. The agent follows a structured workflow covering package analysis, changelog interpretation, code patching, and local verification, then automatically creates a Merge Request with an AI-generated summary for integration into the existing code-review process. A Human-in-the-loop design allows developers to trigger iterative refinement via MR comments, retaining final decision authority while minimizing cognitive overhead.
The system is evaluated on 50 upgrade tasks across 16 production services at the NYCU CS IT Center, spanning patch, minor, and major version levels. L1 success (package installation compatibility) reaches 100% across all levels; the overall L2 success rate (all CI checks passing) is 86%, with major-version upgrades at 85.7%. Developer Active Time is reduced by 88.3% (patch), 89.1% (minor), and 90.4% (major), with the largest gains on the most complex upgrades.
This thesis presents an LLM Agent-based automated dependency upgrade system. The agent follows a structured workflow covering package analysis, changelog interpretation, code patching, and local verification, then automatically creates a Merge Request with an AI-generated summary for integration into the existing code-review process. A Human-in-the-loop design allows developers to trigger iterative refinement via MR comments, retaining final decision authority while minimizing cognitive overhead.
The system is evaluated on 50 upgrade tasks across 16 production services at the NYCU CS IT Center, spanning patch, minor, and major version levels. L1 success (package installation compatibility) reaches 100% across all levels; the overall L2 success rate (all CI checks passing) is 86%, with major-version upgrades at 85.7%. Developer Active Time is reduced by 88.3% (patch), 89.1% (minor), and 90.4% (major), with the largest gains on the most complex upgrades.