MAS-GPT: Training LLMs to Build LLM-based Multi-Agent Systems
Rui Ye, Shuo Tang, Rui Ge, Yaxin Du, Zhenfei Yin, Siheng Chen, Jing Shao
Abstract
LLM-based multi-agent systems (MAS) have shown significant potential in tackling diverse tasks. However, to design effective MAS, existing approaches heavily rely on manual configurations or multiple calls of advanced LLMs, resulting in inadaptability and high inference costs. In this paper, we simplify the process of building an MAS by reframing it as a generative language task, where the input is a user query and the output is a corresponding MAS. To address this novel task, we unify the representation of MAS as executable code and propose a consistency-oriented data construction pipeline to create a high-quality dataset comprising coherent and consistent query-MAS pairs. Using this dataset, we train MAS-GPT, an open-source medium-sized LLM that is capable of generating query-adaptive MAS within a single LLM inference. The generated MAS can be seamlessly applied to process user queries and deliver high-quality responses. Extensive experiments on 9 benchmarks and 5 LLMs show that the proposed MAS-GPT consistently outperforms 10+ baseline MAS methods on diverse settings, indicating MAS-GPT's high effectiveness, efficiency and strong generalization ability. Code will be available at https://github.com/rui-ye/MAS-GPT .
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
16 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Darwin Gödel Machine: Open-Ended Evolution of Self-Improving Agents cites Self-Refine: Iterative Refinement with Self-Feedback
- Darwin Gödel Machine: Open-Ended Evolution of Self-Improving Agents cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Darwin Gödel Machine: Open-Ended Evolution of Self-Improving Agents cites Training language models to follow instructions with human feedback
- Self-Refine: Iterative Refinement with Self-Feedback cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Self-Refine: Iterative Refinement with Self-Feedback cites Training language models to follow instructions with human feedback
- MAS-Orchestra: Understanding and Improving Multi-Agent Reasoning Through Holistic Orchestration and Controlled Benchmarks cites Self-Refine: Iterative Refinement with Self-Feedback
- MAS-Orchestra: Understanding and Improving Multi-Agent Reasoning Through Holistic Orchestration and Controlled Benchmarks cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- AgentNet: Decentralized Evolutionary Coordination for LLM-based Multi-Agent Systems cites Self-Refine: Iterative Refinement with Self-Feedback
- AgentNet: Decentralized Evolutionary Coordination for LLM-based Multi-Agent Systems cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Chain-of-Thought Prompting Elicits Reasoning in Large Language Models cites Training language models to follow instructions with human feedback
Cited by top-tier papers16
- AgentNet: Decentralized Evolutionary Coordination for LLM-based Multi-Agent SystemsYingxuan Yang, Huacan Chai, Shuai Shao, Yuanyi Song et al.NeurIPS 2025 · 104 citations
- Darwin Gödel Machine: Open-Ended Evolution of Self-Improving AgentsJenny Zhang, Shengran Hu, Cong Lu, Robert Tjarko Lange et al.ICLR 2026 · 101 citations
- AgentFold: Long-Horizon Web Agents with Proactive Context FoldingRui Ye, Zhongwang Zhang, Kuan Li, Huifeng Yin et al.ICLR 2026 · 45 citations
- Stop Wasting Your Tokens: Towards Efficient Runtime Multi-Agent SystemsFulin Lin, Shaowen Chen, Ruishan Fang, Hongwei Wang et al.ICLR 2026 · 15 citations
- MAS-Orchestra: Understanding and Improving Multi-Agent Reasoning Through Holistic Orchestration and Controlled BenchmarksZixuan Ke, Yifei Ming, Austin Xu, Ryan Chin et al.ICML 2026 · 15 citations
Builds on17
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
- Measuring Massive Multitask Language UnderstandingDan Hendrycks, Collin Burns, Steven Basart, Andy Zou et al.ICLR 2021 · 7,905 citations
- Self-Refine: Iterative Refinement with Self-FeedbackAman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan et al.NeurIPS 2023 · 4,972 citations
- Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code GenerationJiawei Liu, Chunqiu Steven Xia, Yuyao Wang, Lingming ZhangNeurIPS 2023 · 2,317 citations
Related papers
- MAS: Self-Generative, Self-Configuring, Self-Rectifying Multi-Agent SystemsKun Wang, Guibin Zhang, ManKit Ye, Xinyu Deng et al.ICLR 2026 · 2 citations
- Multi-agent Architecture Search via Agentic SupernetGuibin Zhang, Luyang Niu, Junfeng Fang, Kun Wang et al.ICML 2025
- Executable Code Actions Elicit Better LLM AgentsXingyao Wang, Yangyi Chen, Lifan Yuan, Yizhe Zhang et al.ICML 2024 · 436 citations
- Memory-Augmented LLM-based Multi-Agent System for Automated Feature Generation on Tabular DataFengxian Dong, Zhi Zheng, Xiao Han, Wei Chen et al.ACL 2026
- MegaAgent: A Large-Scale Autonomous LLM-based Multi-Agent System Without Predefined SOPsQian Wang, Tianyu Wang, Zhenheng Tang, Qinbin Li et al.ACL Findings 2025 · 29 citations
