Automated Refactoring of Monolithic Applications to Cloud-Native Containers: Application Modernization using GenAI and Agentic Frameworks
Keywords:
Monolith-to-Microservices, Generative AI (GenAI), Multi-Agent Systems, Cloud-Native Containers, Automated Refactoring, CI/CD Automation, Kubernetes, Application Modernization.Abstract
Modernizing monolithic applications into microservices is critical for scalability and maintainability, but manual refactoring is complex and resource intensive. This paper presents a fully automated AI-driven approach using Generative AI (GenAI) and multi-agent frameworks to refactor monoliths into containerized microservices with minimal human intervention. Our system orchestrates multiple specialized AI agents, each performing tasks such as code analysis, service decomposition, automated code transformation, containerization, orchestration, and CI/CD integration. By leveraging LLM-powered agents, the system not only identifies microservice boundaries but also modifies code, generates infrastructure configurations, and validates functionality through iterative AI-driven testing. We implement this approach on a representative enterprise monolith and achieve a successful decomposition that preserves functionality while improving modularity and deployment readiness. The results demonstrate that our AI-driven system can accelerate application modernization, reduce engineering effort, and enhance software quality. We discuss challenges such as LLM limitations, data consistency, and security concerns, and propose future directions for improving automation, scalability, and adaptability.
Downloads
References
Y. Abgaz, A. McCarren, and P. Elger, "A Survey of Microservice Decomposition Techniques: Trends and Challenges," IEEE Transactions on Software Engineering, vol. 49, no. 8, pp. 3892–3910, August 2023.
A. Oumoussa and R. Saidi, "Automated Microservices Decomposition Using Clustering and Genetic Algorithms," in Proc. IEEE International Conference on Software Engineering (ICSE), May 2024, pp. 1123–1134.
J. Chen, S. Li, and X. Wang, "Evaluating LLM-Based Code Refactoring: Accuracy and Reliability," ACM Transactions on Software Engineering and Methodology, vol. 33, no. 5, pp. 1–25, July 2024.
M. Khaled, A. Alshayeb, and S. Mahmoud, "Hydecomp: A Hybrid Approach to Microservice Decomposition Using Machine Learning," in Proc. IEEE International Conference on Cloud Computing (CLOUD), July 2022, pp. 245–256.
T. Mathai, S. Gupta, and R. Jain, "Graph Neural Networks for Microservice Boundary Detection," in Proc. IEEE Symposium on Software Architecture (ICSA), March 2022, pp. 89–100.
Z. Liu, Y. Zhang, and H. Li, "Optimizing Microservice Decomposition with Genetic Algorithms," Journal of Systems and Software, vol. 185, pp. 111–125, March 2022.
S. Huang, J. Li, and Y. Chen, "MetaGPT: A Multi-Agent Framework for Software Development," in Proc. ACM Conference on Artificial Intelligence and Software Engineering (AISE), October 2023, pp. 34–45.
H. Zhang, X. Liu, and M. Kim, "MonoEmbed: LLM-Powered Microservice Decomposition with Contrastive Learning," in Proc. IEEE International Conference on Software Engineering (ICSE), May 2024, pp. 1456–1467.
P. Singh, R. Sharma, and A. Gupta, "Automated Containerization of Microservices Using Kubernetes and Helm," IEEE Transactions on Cloud Computing, vol. 11, no. 3, pp. 789–802, July-September 2023.
A. Vaswani, N. Shazeer, and J. Parmar, "Attention Is All You Need," in Proc. Advances in Neural Information Processing Systems (NeurIPS), December 2017, pp. 5998–6008.
M. Lewis, Y. Liu, and N. Goyal, "BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation," in Proc. Association for Computational Linguistics (ACL), July 2020, pp. 7871–7880.
J. Devlin, M.-W. Chang, and K. Lee, "BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding," in Proc. North American Chapter of the Association for Computational Linguistics (NAACL), June 2019, pp. 4171–4186.
T. Brown, B. Mann, and N. Ryder, "Language Models Are Few-Shot Learners," in Proc. Advances in Neural Information Processing Systems (NeurIPS), December 2020, pp. 1877–1901.
D. Amodei, D. Hernandez, and G. Sastry, "Scaling Laws for Neural Language Models," arXiv preprint arXiv:2001.08361, January 2020.
R. Popa, A. Wang, and S. Shenker, "Istio: A Platform for Microservices Management," in Proc. ACM Symposium on Cloud Computing (SoCC), October 2021, pp. 123–135.
L. Leite, C. Rocha, and F. Kon, "A Survey of DevOps Tools for Microservices: From Development to Deployment," IEEE Software, vol. 39, no. 4, pp. 56–65, July-August 2022.
S. Newman, "Building Microservices: Designing Fine-Grained Systems," 2nd ed. Sebastopol, CA: O’Reilly Media, 2021, pp. 45–78.
K. Velusamy, P. Raj, and R. Buyya, "AutoGPT: A Framework for Autonomous Task Execution in Software Engineering," in Proc. IEEE International Conference on Automated Software Engineering (ASE), October 2023, pp. 678–689.
A. Balalaie, A. Heydarnoori, and P. Jamshidi, "Microservices Migration Patterns: A Practical Approach to Legacy Modernization," IEEE Transactions on Services Computing, vol. 16, no. 2, pp. 345–359, March-April 2023.
M. Fowler and J. Lewis, "Continuous Integration and Deployment: Principles and Practices," in Proc. ACM Conference on Software Engineering and Architecture (SEA), June 2022, pp. 123–134.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Gokul Chandra Purnachandra Reddy, Ravi Sastry Kadali

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
All papers should be submitted electronically. All submitted manuscripts must be original work that is not under submission at another journal or under consideration for publication in another form, such as a monograph or chapter of a book. Authors of submitted papers are obligated not to submit their paper for publication elsewhere until an editorial decision is rendered on their submission. Further, authors of accepted papers are prohibited from publishing the results in other publications that appear before the paper is published in the Journal unless they receive approval for doing so from the Editor-In-Chief.
IJISAE open access articles are licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. This license lets the audience to give appropriate credit, provide a link to the license, and indicate if changes were made and if they remix, transform, or build upon the material, they must distribute contributions under the same license as the original.