RoleFlow improves multi-agent collaboration by adapting roles dynamically
RoleFlow: Self-Evolving Multi-Role Agentic Collaboration via Structural Adaptation
Artificial Intelligence
Summary
Many AI systems with multiple agents work using fixed plans on how the agents collaborate, which can limit their success when tasks change. The authors developed RoleFlow, a system where agents can automatically adjust their roles and how they work together during a task. RoleFlow uses a new method to give clear feedback on small changes, helping it learn which adjustments improve performance. Tests on various complex tasks show RoleFlow outperforms existing methods, and it can transfer learning across different task types.
What this means in practice
- •For software engineering teams: Improve code generation workflows by using adaptive multi-agent collaboration to enhance reasoning and problem-solving capabilities.
- •For web automation developers: Develop web interaction systems that self-optimize agent roles for more effective and flexible task execution.
- •For customer support platform builders: Create smarter chatbot teams that automatically adjust collaborative roles to handle complex multi-step queries efficiently.$Commercial implications: Enables selling advanced customer support chatbots with dynamic role management for improved automatic response quality and flexibility.
Authors
Yi Ge, Pan Wang, Xuehao Cui, Zian Zeng, Xu Hu, Heng Huang, Furong Huang
Abstract
Large language model (LLM) based multi-agent systems often rely on predefined collaboration structures, limiting their adaptability to evolving task requirements. Although recent approaches enable dynamic orchestration, trajectory-level rewards they apply assign one outcome to each decision, ofen struggling to identify the contributions of individual structural changes. We propose RoleFlow, a self-evolving multi-role agentic system that refines collaboration structures through feedback-driven atomic edits and on-demand role synthesis. To make structural adaptation learnable, we introduce Single-Edit Counterfactual Policy Optimization (SECPO), which evaluates each edit against its no-edit counterpart at the same chain state and assigns targeted credit to edit-specific tokens. Across seven benchmarks spanning four domains, RoleFlow achieves the optimal average performance, surpassing the strongest competitor by 4.7 points. It leads on all three multi-hop QA benchmarks by 3.2-7.5 F1 points and also shows supremacy on mathematical reasoning, web interaction, and code generation. Further analyses demonstrate cross-benchmark transferability, training-data efficiency, and cross-executor generalization.