Research Article

MAS4SysML: A Multi-Agent Framework for SysML v2 Model Generation from Natural Language

DOI:

10.3791/70395

May 19th, 2026

In This Article

Summary

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

This protocol presents MAS4SysML, a multi-agent approach that automatically generates SysML v2 code through coordinated task division, requiring few repair iterations and significantly reducing manual modeling time while improving system modeling efficiency.

Abstract

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

Automatically generating accurate SysML models from natural-language requirements can substantially accelerate the adoption of Model-Based Systems Engineering (MBSE) in complex system development. However, using large language models (LLMs) to generate model code often fails to meet the strict syntactic constraints of formal modeling languages, and consistently ensuring semantic alignment between generated models and requirements remains challenging. To address these challenges, this paper presents MAS4SysML, a multi-agent collaborative framework for SysML v2 code generation that improves syntactic correctness and semantic consistency under a constrained repair budget. The framework decomposes a modeling task into hierarchical subtasks, formalizes them as structured task cards, and generates model code in a bottom-up manner. During generation, an official validation environment is used for syntax diagnostics; after completion, the framework verifies semantic consistency between the code and the task cards. If syntax or semantic validation fails, the framework iteratively repairs and revalidates the code within a predefined repair budget, guided by diagnostic feedback, until the validation criteria are satisfied or the budget is exhausted. To evaluate the proposed method, we construct a SysML v2 dataset spanning five core task types—requirements, use cases, structure, parametrics, and state machines—and conduct comparative experiments. Results show that MAS4SysML reduces the average syntax error rate to 2.63, increases semantic similarity to 0.91, and outperforms existing code-generation methods overall.

Introduction

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

MBSE has become a key methodology for requirements analysis, system architecture design, and verification planning in the development of complex equipment in domains such as aviation and aerospace1. Using unified modeling languages such as SysML as the modeling backbone, information—including requirements, structure, behavior, and constraints—can be organized into a coherent model framework, improving process structure and the efficiency of cross-disciplinary collaboration2. However, as system scale continues to grow, the number of models that must be developed increases accordingly, leading to a sustained ri....

Access restricted. Please log in or start a trial to view this content.

Protocol

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

The code generation process of the MAS4SysML framework is summarized in Supplementary File 1. It should be noted that this study does not aim to achieve the one-shot generation of a complete system model from natural language with strict cross-view consistency, including requirements, structure, parametrics, and behavior. Instead, the protocol focuses on generating several representative types of SysML v2 view code.

Phase I: Task analysis
The workflow begins with task parsing. The system provides the natural-language modeling intent to the Task Structure Generation Agent, which outputs a task-card set. ....

Access restricted. Please log in or start a trial to view this content.

Results

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

Baseline model evaluation
We first selected several mainstream LLMs and conducted preliminary performance tests using direct model-to-code generation, including CodeX(175B)19, CodeGen-Mono(16.1B)20, PaLM Coder(62B)21, Alphacode(1.1B)22, Incoder(6.7B)23, and code-davinci-002(175B)24. As shown in Table 2, code-davinci-002(175B)

Access restricted. Please log in or start a trial to view this content.

Discussion

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

We propose MAS4SysML, a multi-agent collaborative framework for semi-automated SysML v2 model code generation. The framework consists of four functionally complementary agents. During generation, it (i) hierarchically decomposes natural-language modeling requirements using a task-tree–based structure and formalizes them into structured task cards, and (ii) generates SysML v2 model code in a bottom-up manner guided by the constraints and dependency relations specified in these cards. Throughout generation, a syntax .......

Access restricted. Please log in or start a trial to view this content.

Disclosures

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

The authors have no conflicts of interest. AI/LLM tools were used only during dataset construction. Specifically, to build an evaluation dataset, we used an AI tool to generate natural-language modeling problem statements corresponding to manually created SysML v2 models (i.e., generating the "task description" given an author-built SysML v2 model), forming input–output pairs for benchmarking. Beyond this limited purpose, AI was not used to generate the proposed method, experimental results, data analyses, figures/tables, or any manuscript text.

Acknowledgements

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

This research is supported by the Civil Aerospace Project (D020101) of the China State Administration of Science, Technology, and Industry for National Defense.

....

Access restricted. Please log in or start a trial to view this content.

Materials

List of materials used in this article
NameCompanyCatalog NumberComments
LangChainLangChain (open-source project)v1.0.8; https://github.com/langchain-ai/langchainFramework for LLM interaction and agent orchestration
LangGraphLangChain (open-source project)v1.0.3; https://github.com/langchain-ai/langgraphMulti-agent workflow execution framework
PythonPython Software Foundation3.10.x; https://www.python.org/downloads/release/python-3100/Main programming language for MAS4SysML implementation
SysML v2 Pilot ImplementationObject Management Group (OMG)(provide release/tag version); https://github.com/Systems-Modeling/SysML-v2-Pilot-ImplementationUsed for syntax validation and model parsing

References

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,
  1. Miller, W. D. The Future of Systems Engineering: Realizing the Systems Engineering Vision 2035. Transdisciplinarity and the Future of Engineering. , IOS Press. (2022).
  2. Kirshner, M. J. A. Model-based systems engineering cybersecurity for space systems. Aerospace. 10 (2), 116(2023).
  3. Bajaj, M., Fried....

Access restricted. Please log in or start a trial to view this content.

Reprints and Permissions

Request permission to reuse the text or figures of this JoVE article

Request Permission

Tags

SysML Model GenerationMulti Agent FrameworkNatural Language RequirementsModel Based Systems EngineeringSemantic ConsistencySyntactic CorrectnessLarge Language ModelsCode ValidationTask DecompositionSemantic Alignment

Related Articles