Collaborative LLM Agents for C4 Software Architecture Design Automation

Kamil Szczepanik, Jarosław A. Chudziak · 2025

Read Collaborative LLM Agents for C4 Software Architecture Design Automation by Kamil Szczepanik, Jarosław A. Chudziak (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2510-22787.txt.

Introduction

Drawing software architecture by hand is slow and manual. The C4 model is a common way to show such structure. Kamil Szczepanik and Jaroslaw A Chudziak automate that task in 2025. They use several language model agents. Each agent plays a role specific expert.

The agents debate requirements in dialogue form. They then build Context, Container, and Component views. Quality checks mix two styles. Fixed checks test structure, syntax, and C4 rules. A model judge scores meaning and quality. Five classic system briefs were tested. Model creation was fast with high compile success. Four leading models showed distinct design strengths.

Catalog record

CREATORKamil Szczepanik, Jarosław A. Chudziak
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE38 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2510-22787

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Collaborative LLM Agents for C4 Software Architecture Design Automation Kamil Szczepanik, Jarosław A. Chudziak Abstract Software architecture design is a fundamental part of creating every software system. Despite its importance, producing a C4 software architecture model — the preferred notation for such architecture — remains manual and time-consuming. We introduce an LLM-based multi-agent system that automates this task by simulating a dialogue between role-specific experts who analyze requirements and generate the Context, Container, and Component views of the C4 model. Quality is assessed with a hybrid evaluation framework: deterministic checks for structural and syntactic integrity and C4 rule consistency, plus semantic and qualitative scoring via an LLM-as-a-Judge approach. Tested on five canonical system briefs, the workflow demonstrates fast C4 model creation, sustains high compilation success, and delivers semantic fidelity. A comparison of four state-of-the-art LLMs shows different strengths relevant to architectural design. This study contributes to automated software architecture design and its evaluation methods. Keywords: LLM agents, Multi-Agent Systems, Software Architecture Design, C4 Model 1 Introduction Designing software architecture is a fundamental process at the start of every software system. Software Architecture Design (SAD) is a stage of software creation when all the main components, stakeholders, and all the elements for fulfilling functional and non-functional requirements are addressed ( Bass et al. 2021a ). This is when engineers define interactions between components, the technology stack, and how it could achieve scalability, maintainability, and security. Methodologies and frameworks have been developed to make this process more structured and controlled, e.g., the C4 model ( Brown 2018a ), TOGAF ( Josey 2016a ), and the 4+1 view model ( Kruchten 2002a ). The C4 model is a framework for visualizing and communicating the architecture at different levels of abstraction — Context, Container, Component, Code. By well-made decomposition of the system into abstraction levels, it is possible to parallelize work and narrow its scope. The C4 model has been and still is one of the most important tools in architecting software. For experienced engineers, this task may not be particularly hard, but it is still effortful when designing complex systems. Usually, it requires professionals with different expertise. Moreover, different levels of abstraction often demand different areas of expertise ( Pargaonkar 2023a ); e.g., at the Context level, a business perspective is required to correctly define all stakeholders of the system. Although the C4 model was made to control the design process, the complexity of systems can still lead to inconsistencies and errors in definition. The development of C4 levels is relatively slow, especially when drafting the first version of a complex system. Automation of the process could significantly help engineers and accelerate the work. These challenges motivate this research. By providing a first draft of a C4 model at an early stage, developers could simply validate or correct the diagrams according to their knowledge. An evaluation of the draft would be valuable as well, because it could tell the users about the flaws and quality of the model they received. This could allow skilled engineers to focus on higher-level critique and refinement rather than routine diagramming. The recent advances in Large Language Models (LLMs) show their substantial potential in analytical, creative, and routine tasks. To tackle more complex tasks, researchers study LLM-based multi-agent systems (MAS) in various domains such as problem solving and world or environment simulation. This includes studies on LLM agents following software engineering workflows ( Cinkusz et al. 2024a ), performing creative and analytical tasks ( Wang et al. 2024a ; Szczepanik & Chudziak 2025a ), and, on the other hand, simulating realistic scenarios in social sciences or human economic behavior ( Park et al. 2023a ; Junqué 2025a ). It is crucial to understand that with the improving capabilities of LLMs, the tasks of future software developers and engineers will change. The human-AI collaboration tools will work as a productivity enhancement rather than a full replacement for human experts. In AI-assisted development, a programmer working with an AI collaborator can finish tasks in half the time of someone working alone ( Peng et al. 2023a ). In this research, we propose a C4 model generation and evaluation method. Our LLM-powered multi-agent system simulates the requirement analysis and diagram creation. A system brief, with a description and functional and non-functional requirements, is the input to the system. For three out of four C4 abstraction levels, we simulate a conversational analysis of the element at stake, with a number of specialized agents. Agents simulate realistic personas, which gives multiple perspectives for analysis. The output of the system is a set of artifacts for each abstraction level — textual analysis, YAML structure, and PlantUML diagram describing the element at stake. As the second contribution, our research provides an evaluation method, including deterministic checks for structural and syntactic integrity and C4 rule consistency, and semantic and qualitative scoring via an LLM-as-a-Judge approach ( Zheng et al. 2023a ). Automated evaluation of such data is problematic because it requires assessing more than just structural or syntactic correctness. It must also judge semantic meaning, conceptual plausibility, and qualitative clarity, which are not easily measured by traditional deterministic checks. Our research questions (RQs) are as follows. RQ1: To what extent can a multi-agent system generate a C4 model, and how do LLM models influence the quality? RQ2 : Can a multi-agent LLM approach outperform a single-agent baseline in C4 model generation? Our work also contributes by providing prompt engineering guidelines and a comparative study of several LLMs, identifying the models’ advantages and disadvantages. The remainder of the paper is organized as follows. Section 2 reviews background and related work. Section 3 details the proposed C4 generation workflow and evaluation method. Section 4 describes the experimental setup. Section 5 presents the results, and Section 6 discusses the outcomes and future work. Finally, Section 7 concludes our research. 2 Related Work In this section, we introduce the background of the C4 model and software architecture design, and survey prior literature on applications of LLMs and LLM-based multi-agent systems in software engineering. Figure 1: The proposed system workflow, illustrating the multi-agent C4 model generation pipeline and the subsequent evaluation framework. The generation stage (left) shows expert agents collaboratively processing a system brief, with specialized agents producing C4 artifacts and diagrams, while the evaluation stage (right) assesses these artifacts using structural, rule-based, and semantic criteria. The C4 model makes software architecture design more structured by abstracting a system into four hierarchical levels — Context, Containers, Components, and Code. The C4 model also improves communication among stakeholders and has become a standard approach for managing the complexity of modern software systems ( Brown 2018a ). On the Context level (L1), designers identify the system’s external actors — people and software systems that interact with it — and articulate the core goals and usage scenarios that frame those interactions. On the Container level (L2), they map the major runtime executables and data stores — web services, databases, background workers, message brokers — annotating each container’s responsibilities, chosen technology, and communication paths. The Component level (L3) breaks each container into cohesive components, detailing their responsibilities, interfaces, and interaction patterns to ensure modularity and separation of concerns. Lastly, the Code level (L4) zooms into

Read the complete text