Salesforce's MAS-ZERO Builds and Rewires Multi-Agent AI Systems on the Fly
MAS-ZERO lets a meta-agent design, critique, and refine its own multi-agent system at inference time, with zero labeled data and up to 16.7% accuracy gains over prior methods.
ProTakeaways
- MAS-ZERO automatically designs multi-agent systems at inference time, per problem, with zero labeled validation data required.
- A meta-agent iteratively decomposes problems, assigns sub-agents, critiques intermediate outputs, and refines the system over 5 rounds.
- Beats all manual and automatic MAS baselines: up to +16.7% on reasoning, +16.7% on coding, +5.45% on agentic tasks.
- Uniquely able to fall back to simpler strategies (CoT, Debate) when complex MAS designs don't help -- a capability no prior automatic MAS has.
- Requires a capable backbone (GPT-4o / 32B+ scale); smaller models fail to generate valid MAS code reliably.
- Code is open-source at github.com/SalesforceAIResearch/MAS-Zero.
Building a multi-agent system (MAS) today is a manual, brittle process. You pick agent roles, wire up communication protocols, and hope the whole thing generalizes. Most current MAS depend on manually designed agent roles and communication protocols, and these manual designs often fail to align with the underlying LLMs' strengths and struggle to adapt to novel tasks. Researchers from Salesforce AI Research and MIT think there is a better way, and they have the benchmarks to back it up.
Their paper introduces MAS-ZERO, a framework that designs, runs, critiques, and rewires a multi-agent system on the fly -- for every single problem it encounters, with no labeled validation data required. It is the first system to do all of this entirely at inference time.
Why hand-crafted MAS keeps failing
Multi-agent LLM systems are AI architectures where multiple specialized agents work together to complete complex tasks, dividing responsibilities among specialized agents each optimized for a specific role. The appeal is clear: hard problems that stump a single model can often be cracked by a team of models with complementary strengths. But the design of that team is where things fall apart.
Existing automatic MAS approaches tried to fix this, but introduced their own problems. They fall into two camps:
- Val-pruning: Start with a large pre-defined graph of agents and prune it based on validation performance. Methods like MaAS and MASS fall here. The core structure is fixed, limiting adaptability.
- Val-generation: Use a meta-agent to generate MAS from scratch, guided by validation scores. ADAS and AFlow (which uses Monte Carlo Tree Search) are the main examples.
Recent automatic MAS approaches typically necessitate a validation set for tuning and yield static MAS designs lacking adaptability during inference, while also removing the flexibility to reduce to simpler systems. This last point is particularly damaging: on hard benchmarks like AIME24 (competition math), many automatic MAS baselines score no better than a single chain-of-thought prompt -- because they cannot fall back to simpler strategies when the complex system is not helping.

The meta-agent that designs itself
MAS-ZERO is built around a central meta-agent -- an LLM that operates one level above the individual task-solving agents. Its job is not to solve the problem directly, but to design, execute, critique, and refine the system that will. The whole process runs in three stages per problem.
Stage 1 -- MAS-Init. Before any fancy design happens, MAS-ZERO runs four baseline strategies on the input question: CoT (chain-of-thought), CoT-SC (self-consistency voting), Debate, and Self-Refine. These outputs seed the process and serve as fallback candidates. This is a key design choice: it means the system can always revert to a simple but strong baseline if the evolved MAS underperforms.
Stage 2 -- MAS-Evolve. This is the core loop. The meta-agent decomposes the question into sub-tasks and assigns a sub-MAS (a combination of building blocks) to each one. It then runs the system, inspects intermediate outputs at both the sub-task and individual agent level, and evaluates two criteria:
- Solvability: Can each sub-task actually be solved by its assigned sub-MAS? Agents can even output a special
[TOO_HARD]token to signal they are overwhelmed. - Completeness: Do the sub-tasks collectively cover all the information needed to answer the original question?
Based on this feedback, the meta-agent rewrites the decomposition and sub-MAS assignments. Each iteration -- the design, the execution, the feedback, and the revised plan -- is stored in an experience library that informs the next round. MAS-ZERO runs 5 of these iterations per problem, producing 5 evolved candidate answers on top of the 4 from MAS-Init.
Stage 3 -- MAS-Verify. With 9 candidate answers in hand, the meta-agent picks the best one. It first ranks candidates by majority vote (answers that appear more often are preferred), filters out invalid responses, then selects the final answer by comparing reasoning chains. Ablations show this step is the single most important component: removing it and just taking the last iteration's answer drops accuracy by over 21 percentage points.

What the numbers say
The team tested MAS-ZERO against a broad set of baselines -- 2 single-agent methods, 6 manual MAS designs, and 3 automatic MAS methods -- across GPT-4o, Llama3.3-70B, and Qwen2.5-32B backbones. The benchmarks were deliberately hard:
- AIME24: American Invitational Mathematics Examination problems
- GPQA-Diamond: Graduate-level science questions designed to be "Google-proof"
- SWE-Bench-Lite: Real GitHub issue resolution (coding)
- BrowseComp and Frames: Web search-based agentic tasks
MAS-ZERO achieves substantial average accuracy improvements of up to 16.69% on reasoning, 16.66% on coding, and 5.45% on agentic tasks. On the coding benchmark specifically, it comes with 58% relative gains over the strongest baseline AFlow with GPT-4o, and 149% relative gains with Llama.
One of the more striking findings is what happens to competing automatic MAS methods on hard tasks. ADAS -- which requires a labeled validation set -- scores 0% on AIME24 despite having that advantage. Several automatic MAS methods are consistently beaten by plain CoT. MAS-ZERO is the only system that avoids this trap, because it can always fall back to the building block outputs from MAS-Init.

Cost and practical limits
The inference-time design loop is not free. MAS-ZERO uses more tokens per query than a single-agent call. But the paper shows it sits on the Pareto frontier of accuracy versus cost across all three main benchmarks -- meaning no other method achieves the same accuracy at lower cost. Compared to AFlow and ADAS, which require expensive validation-time optimization, MAS-ZERO shifts all computation to test time and avoids the validation overhead entirely.
There are real limits to watch for:
- Weak meta-agents break the system. Models below roughly GPT-4o / 32B scale (tested: Qwen2.5-7B, Qwen2.5-Coder-3B, GPT-4.1-nano) cannot reliably follow the meta-design instructions or generate syntactically valid Python code for the MAS.
- Agentic tasks with search are harder to verify. On the Frames benchmark, MAS-ZERO underperforms Debate and Self-Refine. When agents make mistakes grounded in retrieved web content, those errors are harder for the verifier to catch.
- The verifier is the bottleneck. Oracle experiments show that with a perfect verifier, GPQA accuracy jumps close to 95%. The current self-verification step leaves significant headroom on the table.
The real unlock
The deeper insight here is not just that MAS-ZERO outperforms baselines. It is that the paper demonstrates a clean separation between the design of a multi-agent system and its execution -- and that the design step can itself be automated and improved iteratively using only the system's own intermediate outputs as signal, with no ground-truth labels. MAS-ZERO is the first inference-time-only automatic MAS design framework, working in a fully self-evolved way by learning from the behavior of the underlying LLM agents at inference-time, enabling per-instance adaptivity with zero supervision.
The code is available on GitHub and the project page includes a leaderboard. The system works with any LLM accessible via API, requires no fine-tuning, and uses only black-box prompting -- making it straightforward to drop into existing pipelines wherever you are already calling GPT-4o or an open-source equivalent for complex reasoning tasks.