MAS-Architect: Declarative Multi-Agent System Design via Separation of Concerns
Abstract
The Automated Design of Multi-Agent Systems (Auto-MAS) has emerged as a promising framework for addressing complex reasoning tasks. However, existing approaches often suffer from structural rigidity and entangle the design of system topology with the implementation of individual agents. To overcome these limitations, we propose MAS-Architect, a framework that automates MAS design through a novel code-based declarative MAS paradigm rooted in the \textit{Separation of Concerns} principle. By decoupling topology planning from node implementation via a unified interface, our approach enables the from-scratch generation of task-adaptive architectures. We further employ a \textit{Distill-then-Explore} training strategy to optimize these designs. Comprehensive experiments on five benchmarks show that MAS-Architect sets a new Pareto frontier in the efficiency–performance trade-off: it surpasses state-of-the-art methods while substantially lowering token usage. Notably, the framework achieves a strong average accuracy of 78.7\% across benchmarks with an inference cost of only 2,533 tokens per query. Qualitative analysis reveals the autonomous emergence of advanced collaboration patterns, validating the generative flexibility of the declarative paradigm. Code will be available at https://github.com/ZJUHJ/mas_architect.
Lay Summary
Many useful AI tasks are too complex for a single chatbot-like model to handle well. A common solution is to ask several AI assistants to work together, but designing such a team usually takes human experts a lot of trial and error: they must decide who should do what, how the assistants should pass information, and when they should check or revise each other’s answers. In this work, we build a system called MAS-Architect that can automatically design these AI teams for each new question. Instead of relying on a fixed team layout, it first decides what kind of collaboration is needed, then creates the roles and instructions for the individual assistants. We train the system by first learning from strong examples and then improving through practice, keeping designs that solve tasks correctly. In tests on math, general knowledge, and reasoning problems, the automatically designed teams answered more accurately than prior approaches while using less computation. These results suggest that AI systems can become easier to build, cheaper to run, and more adaptable when the design of the team itself is automated.