Abstract
dc:descriptionThis thesis investigates whether a multiagent LLM architecture produces higher-quality code than a single-agent architecture when solving complex, well-specified programming tasks, and whether this difference scales with task difficulty. For the investigation, a custom system was implemented using the ”LangGraph” framework, supporting both architectures under identical conditions, using the same model, the same tools, and the same ”Docker” execution environment. The multiagent system is composed of four specialized agents, a planner, a coder, a tester, and a reviewer, operating in an iterative loop. The single-agent system performs all of the aforementioned roles in one agent within a continuous loop. A set of 19 programming tasks with differing difficulty levels, ranging from simple command-line tools to comp lex distributed systems, was designed and given to both architectures. Each task was executed threetimes per architecture, resulting in a total of 114 runs. Results were evaluated using two independent methods: manual binary functional requirement scoring against the predefined requirements and automated static code analysis using ”pylint”, ”flake8”, and ”radon”. The results are mixed, as the single-agent system achieved a higher average in functional requirement completion compared to the multiagent system, with the gap being the widest at the complex difficulty, but it did lessen with the very complex difficulty. However, the multiagent system consistently produced cleaner, less complex, and more maintainable code across all four static analysis metrics. Token usage was comparable between architectures, although the multiagent system did use marginally more tokens and more frequently reached the iteration limits, which partially explains its lower functional requirement scores. Overall, the hypothesis was partially confirmed: the multiagent architecture did not outperform the single-agent system in the completion of requirements, but it did produce measurably higher code quality. These findings suggest that the choice between the two architectures should depend on the priorities of the use case: if the token budget and iteration counts are not limited and maintainability is a priority, then the multiagent system is preferable. Whereas if token and iteration counts are limited or maintainability is not a deciding factor, then the single-agent architecture may be preferable.
Degree
thesis:*- Grantor dc:publisher
- Institutional Repository of Vilnius University
- Year dc:date
- 2026
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Rudnickas, Jonas,
Rights
dc:rights- Statement dc:rights
-
- info:eu-repo/semantics/openAccess
- Language dc:language
- lit
Identifiers
dc:identifier.*- Repository record dc:identifier
- https://repository.vu.lt/VU:ELABAETD308338001&prefLang=en_US