NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

AgentConductor: Topology Evolution for Multi-Agent Competition-Level Code Generation

Siyu Wang, Ruotian Lu, Zhihao Yang, Yuchao Wang, Yanzhou Zhang, Lei Xu, Qimin Xu, Guojun Yin, Cailian Chen, Xinping Guan

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.

Introduction

Large language model (LLM)-driven multi-agent systems (MAS) have emerged as a powerful paradigm for solving complex reasoning tasks, particularly in the domain of competition-level code generation. By coordinating specialized agents—such as planners, coders, and debuggers—these systems can outperform single-agent approaches. However, most existing MAS rely on static interaction topologies, such as chains, trees, or fully connected meshes.

Comparison of AgentConductor with traditional fixed topologies.

As shown in Figure 5, traditional topologies suffer from significant drawbacks. Chain topologies are limited by error accumulation and low communication efficiency, while mesh graphs often lead to redundant communication and high token costs. Crucially, these fixed structures lack task adaptivity; they apply the same complexity to a simple script as they do to a complex algorithmic challenge. AgentConductor addresses these limitations by introducing a dynamic, feedback-driven approach to topology generation.

The AgentConductor Framework

At the heart of AgentConductor is an LLM-based orchestrator agent trained to generate task-specific interaction topologies. Unlike previous methods that hardcode Python-based workflows, AgentConductor utilizes a structured YAML language to define a Layered Directed Acyclic Graph (DAG). This approach bridges the gap between natural language reasoning and strict, executable graph structures.

YAML-to-Graph Decoding

The orchestrator first analyzes the input query to infer agent roles and task difficulty. It then outputs a YAML file specifying the sequence of steps, the agents involved in each step, and the references between them.

The iterative process of decoding YAML into executable topologies.

As illustrated in Figure 1, this process is iterative. In "Turn 1," the orchestrator generates an initial topology. If the resulting code fails execution tests in a sandbox environment, the orchestrator receives the error logs and generates a refined "Turn 2" topology. This multi-turn evolution allows the system to adapt its strategy based on real-time feedback, a feature missing in static workflow optimization methods.

Optimization and Density Control

To ensure efficiency, the authors implemented two key innovations:

  1. Topological Density Function: A mathematical characterization of communication complexity that penalizes the model for generating overly dense graphs for simple tasks.
  2. Difficulty Interval Partitioning: By categorizing problems into difficulty levels (Easy, Medium, Hard), the system applies precise density upper bounds, preventing excessive pruning on difficult tasks while maintaining high efficiency on easier ones.

The orchestrator (a Qwen-2.5-3B model) is optimized using Group Relative Policy Optimization (GRPO), balancing syntactic validity, code correctness, and topological density.

Experimental Results

AgentConductor was evaluated against state-of-the-art baselines on five coding datasets, including APPS, LiveCodeBench, and HumanEval.

Performance and Efficiency

The system achieved significant performance gains, particularly on complex benchmarks. On the APPS dataset, AgentConductor reached a 58.8% pass@1 accuracy, outperforming the strongest baseline, Chain-of-Agents, by 14.6%.

Beyond accuracy, the system demonstrated remarkable cost-efficiency. By tailoring the topology to the task difficulty, AgentConductor reduced prompt token consumption by up to 68% compared to fixed-topology baselines. This proves that "more agents" is not always better; rather, "smarter coordination" is the key to scalable MAS.

Generalization

In zero-shot experiments on the GAIA reasoning benchmark, the orchestrator successfully integrated new agent roles (e.g., web searchers and visual checkers) into its generated topologies without additional training. This suggests that the orchestrator's ability to "conduct" agents generalizes beyond the coding domain to general-purpose AI assistance.

Conclusion

AgentConductor represents a shift from static multi-agent workflows to dynamic, task-adaptive orchestration. By leveraging RL-optimized topology generation and execution feedback, the system achieves superior performance in competitive programming while drastically reducing computational overhead. Future work will explore extending the turn limits for more complex software engineering tasks and reducing the reliance on synthetic SFT data for initial training.

Summary updated

BibTeX
@inproceedings{wang2026agentconductor,
  author = {Siyu Wang and Ruotian Lu and Zhihao Yang and Yuchao Wang and Yanzhou Zhang and Lei Xu and Qimin Xu and Guojun Yin and Cailian Chen and Xinping Guan},
  title = {{AgentConductor: Topology Evolution for Multi-Agent Competition-Level Code Generation}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=4bLahBrVBs},
}
Figure