AgentConductor: Topology Evolution for Multi-Agent Competition-Level Code Generation
Organizations: Shanghai Jiao Tong University · Meituan
Abstract
Large language model(LLM)-driven multi-agent systems(MAS) coordinate specialized agents through predefined interaction topologies and have shown promise for complex tasks such as competition-level code generation. Recent studies demonstrate that carefully designed multi-agent workflows and communication graphs can significantly improve code generation performance by leveraging collaborative reasoning. However, existing methods neither adapt topology density to task difficulty nor iteratively refine the topology within an instance using execution feedback, which leads to redundant communication and performance bottlenecks. To address these issues, we propose AgentConductor: a reinforcement learning-optimized MAS with an LLM-based orchestrator agent as its core, which enables end-to-end feedback-driven dynamic generation of interaction topologies. For each query, AgentConductor infers agent roles and task difficulty, then constructs a task-adapted, density-aware layered directed acyclic graph (DAG) topology, underpinned by two key innovations. First, we design a novel topological density function that captures communication-aware mathematical characterizations of multi-agent interactions. Second, we adopt difficulty interval partitioning to avoid excessive pruning for precise topological density upper bound measurement per difficulty level and finer-grained control. Empirically, across three competition-level and two foundational code datasets, AgentConductor achieves state-of-the-art accuracy, outperforming the strongest baseline by up to 14.6% in pass@1 accuracy, 13% in density reduction, and 68% in token cost reduction.
Figures & tables
| Method | Contest-level Code Generation | Basic Code Generation | Avg. | |||||
| APPs | LiveCodeBench | CodeContests | Avg. | HumanEval | MBPP | Avg. | ||
| Vanilla | ||||||||
| GPT-4o-mini | ||||||||
| Classical Multi-Agent Systems (No Workflow/Topology Optimization) | ||||||||
| AutoGen | ||||||||
| MetaGPT | ||||||||
| Dataset | Method | Perf. | Prompt | Comp. | (↑) |
| APPS | AFlow | 35.4 | 531450 | 184800 | 3.7 |
| FlowReasoner | 39.1 | 437250 | 148050 | 2.4 | |
| Chain-of-Agents (32B) | 41.6 | 334650 | 134250 | 4.1 | |
| GPTSwarm | 36.5 | 381450 | 155400 | 3.5 | |
| AgentPrune (Layered) | 39.3 | 364950 | 141150 | 3.8 | |
| MacNet (Layered) | 36.9 | 472950 | 200100 | 2.9 |
| Group | Method | APPS | HumanEval | ||||
| Perf. | (↑) | Valid (%) | Perf. | (↑) | Valid (%) | ||
| Full Model | 58.8 | 5.2 | 100 | 97.5 | 5.8 | 100 | |
| Training Strategies | w/o SFT | – | – | 15 | – | – | 13 |
| w/o RL | 29.8 | 2.7 | 56.5 | 90.2 | 3.2 | 57.2 | |
| Reward | w/o | 30.3 | 2.9 | 56.8 | 91.4 | 3.0 | 58.1 |
| w/o | 35.5 | 5.0 | 96.4 | 93.1 | 5.6 | 99.2 | |
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
| Method | Backbone | GAIA L1 | GAIA L2 | GAIA L3 | GAIA Avg. | HLE Avg. | PopQA |
| Chain-of-Agents | 7B | ||||||
| AgentConductor (ours) | 3B |
LLM Agent Workflow Optimization
LLM agent workflow optimization studies how to design and run multi-step agents for better task success, reliability, latency, and cost.
See all 243 papers