UnityMAS-O: A General RL Optimization Framework for LLM-Based Multi-Agent Systems

Yiqun Chen, Wei Yang, Erhan Zhang, Shijie Wang, Qi Liu, Zechun Niu, Bin Zhang, Haitao Li, Rui Li, Lingyong Yan, Jinyuan Feng, Biqing Qi, Xiaochi Wei, Yan Gao, Yi Wu, Yao Hu, Jiaxin MaoarXiv 2026

TL;DR

UnityMAS-O is a general-purpose reinforcement learning (RL) framework designed to optimize entire LLM-based multi-agent workflows as a single unit, rather than just tuning isolated responses. By decoupling logical agent roles from physical model parameters, it enables flexible parameter sharing and hierarchical credit assignment across complex agent interaction graphs.

What Problem Does This Paper Address?

While large language model (LLM) multi-agent systems excel at breaking down complex tasks into specialized roles (e.g., planners, coders, verifiers), they are typically orchestrated manually using static prompts and hardcoded control rules.

When developers try to optimize these systems using reinforcement learning, they run into a wall: existing post-training RL frameworks (like TRL or OpenRLHF) are built for single-policy optimization. They lack the abstractions needed to handle a graph of interacting agents. This makes it incredibly difficult to answer critical design questions: How do we assign credit to an upstream agent whose intermediate output caused a downstream failure? How do we efficiently share model parameters across different roles without rewriting the entire training pipeline? UnityMAS-O was built to solve these exact structural challenges.

Conceptual comparison between standard single-policy RL and the workflow-centric UnityMAS-O framework.

Methods

UnityMAS-O introduces a graph-first architecture that treats the complete multi-agent workflow as the fundamental unit of optimization. It achieves this through four core abstractions:

  1. Logical Agent Roles: Defines the semantic behavior, prompts, and tool access for a node in the workflow graph.
  2. Graph-Structured Trajectories: Records the full history of multi-agent interactions, state transitions, and tool outputs.
  3. Agent-Model Mapping ($\phi$): Explicitly maps logical roles to physical model instances. This allows developers to easily toggle between full parameter sharing (one model handles all roles), full separation (each role gets its own model), or partial sharing.
  4. Hierarchical Reward Interface: Supports assigning rewards at the node level (local format penalties), turn level (step-wise progress), or trajectory level (final task success).

At the systems level, UnityMAS-O extends the verl framework into a Ray-based star-topology runtime. A central controller manages the high-level workflow execution and reward assembly, while distributed, model-local worker groups handle the heavy lifting: generating rollouts, managing token-level buffers, computing advantages, and executing PPO-style policy updates.

Figure 1: Agent-level abstractions in UnityMAS-O. Users define logical roles, map them to physical LLM instances, connect them with a workflow graph, and attach role-, turn-, or trajectory-level rewards for multi-agent RL optimization.

Datasets

The authors evaluated the framework across two distinct task families:

  • Retrieval-Augmented QA / Agentic Search: Evaluated on Natural Questions (NQ) (focusing on single-hop retrieval) and HotpotQA (challenging multi-hop reasoning).
  • Reflective Code Generation: Evaluated on a DeepCoder synthesis dataset containing ~24K unique programming problem-test pairs compiled from TACO-Verified, PrimeIntellect SYNTHETIC-1, and LiveCodeBench v5.

Key Insights and Ideas

  • Workflow-Level Optimization is a Game-Changer for Small Models: Smaller models (e.g., 0.5B parameters) initially fail completely in complex multi-agent setups because they struggle to follow interaction protocols. UnityMAS-O successfully trains these tiny models to adhere to workflow constraints, yielding massive performance leaps.
  • Parameter Sharing vs. Separation Trade-offs: The framework allows a direct comparison between sharing a single backbone across all roles versus using independent models. Interestingly, sharing parameters converges slightly slower but ultimately achieves comparable final performance to fully separated models, offering a massive win for memory efficiency.
  • RL Optimizes for Execution Efficiency, Not Just Accuracy: In the code generation tasks, the trained multi-agent system didn't just write better code—it also learned to stop early. The average number of verification rounds dropped by roughly 40%, proving that MARL can optimize the internal stopping behavior of agentic loops.

Key Results

  • QA Gains: On Natural Questions, a 0.5B multi-agent setup optimized by UnityMAS-O improved its validation F1 score from a near-failing 0.022 to 0.445. On HotpotQA, the iterative search workflow (M-ASK) achieved a peak F1 of 0.573 using 7B models.
  • Code Generation Success: For the reflective code verification loop, multi-agent RL boosted the strict "all-tests-passed" rate of a 3xQwen3-4B setup from 0.255 to 0.686 (a 169% relative gain). The larger 3xQwen3-8B setup reached an impressive 0.738 pass rate.
  • Efficiency Improvements: The average number of verification turns for the 8B coding workflow dropped from ~2.5 turns down to 1.68 turns, demonstrating significantly leaner inference costs post-optimization.

Limitations and Future Work

While the framework is designed to be task-agnostic, the quantitative results in this report focus primarily on QA and code generation. The authors note that experiments in other complex domains—such as embodied agents (ALFWorld), web interaction (WebShop), and software engineering (SWE-bench)—are currently ongoing and not yet fully detailed in the text. Additionally, the current implementation is tightly coupled with PPO-style updates; exploring how other multi-agent RL algorithms perform within this architecture remains an open avenue for future research.

Summary updated

BibTeX
@misc{chen2026unitymas,
  author = {Yiqun Chen and Wei Yang and Erhan Zhang and Shijie Wang and Qi Liu and Zechun Niu and Bin Zhang and Haitao Li and Rui Li and Lingyong Yan and Jinyuan Feng and Biqing Qi and Xiaochi Wei and Yan Gao and Yi Wu and Yao Hu and Jiaxin Mao},
  title = {{UnityMAS-O: A General RL Optimization Framework for LLM-Based Multi-Agent Systems}},
  year = {2026},
  eprint = {2605.26646},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.26646},
}
Figure