Can AI Agents Generate Microservices? How Far are We?
Bassam Adnan, Matteo Esposito, Davide Taibi, Karthik Vaidhyanathan

TL;DR
This study evaluates the capability of AI agents, especially LLMs, to generate functional microservices with explicit dependencies and API contracts, analyzing their correctness, quality, and efficiency across different scenarios and prompting strategies.
Contribution
It provides the first comprehensive assessment of AI-generated microservices, comparing various agents, prompts, and testing methods to understand their strengths and limitations.
Findings
Incremental generation achieves 50-76% unit test pass rates.
Clean state generation achieves 81-98% integration test pass rates.
Generated code is less complex than human-written baselines.
Abstract
LLMs have advanced code generation, but their use for generating microservices with explicit dependencies and API contracts remains understudied. We examine whether AI agents can generate functional microservices and how different forms of contextual information influence their performance. We assess 144 generated microservices across 3 agents, 4 projects, 2 prompting strategies, and 2 scenarios. Incremental generation operates within existing systems and is evaluated with unit tests. Clean state generation starts from requirements alone and is evaluated with integration tests. We analyze functional correctness, code quality, and efficiency. Minimal prompts outperformed detailed ones in incremental generation, with 50-76% unit test pass rates. Clean state generation produced higher integration test pass rates (81-98%), indicating strong API contract adherence. Generated code showed…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware System Performance and Reliability · Advanced Software Engineering Methodologies · Software Engineering Techniques and Practices
