MicroAgent: Context-Augmented Multi-Agent Framework for Automatic Microservice Decomposition

2026-06-29Software Engineering

Software Engineering
AI summary

The authors address the hard problem of breaking large software programs into smaller, manageable pieces called microservices. They created MicroAgent, a system that splits this task into smaller steps handled by specialized helper programs, each guided by detailed context and design rules. This approach helps MicroAgent make better decisions and produces more accurate results than existing methods. Tests on real applications showed that MicroAgent works much better at organizing software into microservices. The authors also show how their system can be useful in real-world software projects.

Microservice Architecture (MSA)Microservice decompositionMonolithic applicationsLarge Language ModelsContext augmentationMulti-agent systemsSoftware modularizationDesign principlesJava Web applications
Authors
Zishan Su, Junjie Huang, Shiwen Shan, Xingyan Chen, Hui Zeng, Yuxin Su, Yanlin Wang, Michael R. Lyu
Abstract
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.