一句话:提出上下文增强的多智能体框架 MicroAgent,将单体应用微服务拆分为五个子任务,在 10 个 Java 应用上拆分准确率达 89.2%。
微服务架构因其可扩展性与可维护性被广泛采用,如何将遗留单体应用有效拆分为高内聚的微服务成为关键问题。人工拆分耗时耗力,现有自动化方法难以从复杂应用中提取充分的语义信息,而直接套用大语言模型又往往忽略关键上下文与设计原则,导致拆分结果欠佳。本文提出 MicroAgent——一个上下文增强的多智能体框架:它将拆分流程划分为五个子任务,每个子任务交由专门的智能体负责,并为其提供定制的多粒度上下文,使分析聚焦并缓解信息过载;同时集成分析工具引导智能体决策,以保证拆分遵循既有设计原则。在 10 个 Java Web 应用上的实验表明,MicroAgent 平均拆分准确率达到 89.2%,较当前最优方法提升 24.6%,作者还通过案例研究展示了该设计的实际收益。
The adoption of Microservice Architecture (MSA) has revolutionized software engineering by enhancing scalability, agility, and maintainability over traditional monolithic applications. As more developers transition their legacy systems to microservice-based architectures, effective microservice decomposition—partitioning monolithic applications into highly cohesive services—becomes vital. However, this decomposition task presents significant challenges. Manual approaches are time-consuming and labor-intensive. Existing automated methods often fail to capture the necessary semantic insights from complex applications, while naive applications of Large Language Models tend to overlook crucial contextual information and design principles, leading to suboptimal results. To address these challenges, we propose MicroAgent, a Context-Augmented Multi-Agent Framework for Microservice Decomposition. Our framework divides the decomposition process into five distinct subtasks and assigns each to a specialized agent. To enhance the effectiveness of each agent, we provide tailored, multi-granularity context that keeps its analysis focused and mitigates information overload. Furthermore, to ensure the decomposition adheres to established design principles, we integrate analytical tools that guide the agents’ decision-making. Experimental evaluations on 10 Java Web applications demonstrate that MicroAgent achieves an average decomposition accuracy of 89.2%, outperforming the state-of-the-art method by 24.6%. We also conduct a case study to highlight the practical benefits of our design.
@inproceedings{abs-2606-29742,
title = {MicroAgent: Context-Augmented Multi-agent Framework for Automatic Microservice Decomposition},
author = {Zishan Su and Junjie Huang and Shiwen Shan and Xingyan Chen and Hui Zeng and Yuxin Su and Yanlin Wang and Michael R. Lyu},
booktitle = {ASE},
year = {2026},
doi = {10.1145/3832783.3834441}
}