Search papers, labs, and topics across Lattice.
This paper investigates the capability of AI agents, specifically LLMs, to generate functional microservices with explicit dependencies and API contracts. The study evaluates the performance of three agents across four projects, using two prompting strategies (minimal vs. detailed) and two scenarios (incremental vs. clean state generation). Key findings indicate that minimal prompts are more effective for incremental generation, while clean state generation yields higher integration test pass rates, demonstrating strong API contract adherence, though human oversight remains crucial.
LLMs can generate microservices with surprisingly maintainable code and strong API adherence, but don't ditch your DevOps team just yet: correctness is still inconsistent and human oversight is essential.
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 lower complexity than human baselines. Generation times varied widely across agents, averaging 6-16 minutes per service. AI agents can produce microservices with maintainable code, yet inconsistent correctness and reliance on human oversight show that fully autonomous microservice generation is not yet achievable.