arXiv:2610.36848cs.AIOct 2026

Manuscript Offprint

arXiv:2610.36848

Evolving Agent Teams

Shiyi Cao, Ziming Mao, Dacheng Li, Joseph E. Gonzalez, Ion Stoica

Abstract

The rapid progress of software engineering agents drives interest in applying them to open-ended problems such as GPU kernel optimization. However, we find that existing coding agents converge to local optima on real-world, expert-written kernels (e.g., FLASHINFER). We introduce EVOLVING AGENT TEAMS, a multi-agent framework that escapes such local optima. It features (1) a central supervisor that diagnoses each local optimum and restructures a team of agents; and (2) a persistent file system that comprises a learning document, an evolution history, and per-team artifacts, grounding restructuring with accumulated experience. Under a matched token budget, EVOLVING AGENT TEAMS consistently outperforms strong coding-agent baselines. With an extended token budget, EVOLVING AGENT TEAMS generates a CUDA kernel that reaches 1.2×1.2 \times mean speedup over the production FLASHINFER MLA paged decode kernel from scratch and wins on 36 of 47 production workloads from FLASHINFER-BENCH ( 0.86–0.99×0.86–0.99 \times on the remaining 11). It also demonstrates superior performance on tasks such as KDA prefill on AMD MI350X ( 3.01×3.01 \times over vLLM) and NVIDIA B200 ( 3.44×3.44 \times over FlashKDA), MoE expert-offload serving on Apple silicon (30.3 tokens/s decode for Qwen3.8-Flash-Next in MLX 4-bit on a 48 GB M4 Pro), and RoboDojo robot manipulation (62.1 on held-out seeds vs. 55.3 for the best leaderboard entry). Code is available at https://github.com/caoshiyi/EAT.

Figure

Figure 1: MLA decode kernel long-running optimization trajectory with Claude Opus 4.6. Diamond markers indicate supervisor interventions that restructure the team. Scores are measured against FLASHINFER's run() stage directly, excluding plan() overhead (1.0×); production FLASHINFER solutions cache plan() and only re-execute it when workload metadata changes [11] (solid baseline, 0.77×). The kernel ultimately reaches 0.96× the plan-excluding baseline, corresponding to 1.2× the production baseline.

Preprint.

1 Introduction

The rapid progress of coding agents on software engineering tasks [15, 42, 38] has driven interest in applying them to open-ended discovery tasks such as GPU kernel optimization. Here, the goal is not just to produce a correct kernel but to search a large, hardware-dependent design space for high performance. Expert-written kernels such as FLASHINFER [46] and FLASHATTENTION [31] navigate this space across two levels: low-level primitive use (e.g., WGMMA tensor cores, swizzled shared-memory layouts) and high-level architectural design (e.g., dispatch strategies, warp specialization, dataflow). While low-level primitive use can substantially improve performance within a chosen design, high-level architectural choices often determine which hardware bottlenecks remain and thus largely shape the attainable performance ceiling.

Unfortunately, even strong coding agents struggle to write challenging GPU kernels. They often make rapid initial progress, but then converge to local optima far below expert-written baselines. A common failure mode is that agents select design directions that are initially easier to implement but architecturally limited, spend most of their budget tuning within those directions, and fail to revisit harder alternatives that require substantial debugging or architectural rethinking.

For example, when writing the MLA decode kernel used in DeepSeek-V3 inference [10], single-agent runs often abandoned difficult WGMMA-based implementations after repeated correctness failures, and instead optimized simpler but less efficient WMMA-based designs. These designs plateaued far below expert-written baselines: Codex 5.5 xHigh reaches only 28% of expert performance despite a $1K budget and multiple days of effort. Static agent teams show the same limitation (Section 4): a fixed 4-role team built with Claude Code [2] Opus 4.7 1M reaches only 55%. These results suggest that neither stronger single agents nor fixed teams are sufficient for challenging GPU kernel optimization. The process moves through distinct phases, from establishing correctness to debugging hardware primitives, profiling bottlenecks, and redesigning the kernel architecture. Each phase requires different expertise, tools, and coordination patterns, causing fixed agent organizations to become mismatched to the current stage.

We introduce EVOLVING AGENT TEAMS, a multi-agent framework that escapes such local optima by evolving the agent team's organization alongside the optimization process. This evolution is driven by a central supervisor agent, grounded in a persistent file system with accumulated experience. Concretely, the supervisor monitors team progress, reflects on the agent behavior, diagnoses the cause of plateau (e.g., a knowledge gap or an exhausted search), and adapts the team accordingly: spawning specialists for high-effort tasks, introducing profiling roles to get more insights, or running parallel roles for different directions (Section 3.2). The file system contains a learning document of empirical observations, per-team artifacts, and an evolution history.

On the MLA decode kernel, EVOLVING AGENT TEAMS explores over 100 team configurations. The supervisor repeatedly reconfigures the team around the current failure mode, which improves token efficiency and enables successive architectural advances, including performant WGMMA-based matrix multiplication, a PV accumulation strategy, and L2 prefetching. Together, these improvements allow EVOLVING AGENT TEAMS to substantially outperform prior single-agent and static-team approaches (Figure 1).

We evaluate on four challenging CUDA kernel optimization tasks spanning two GPU architectures (Section4): Flash Attention 4 [49] and Gated Delta Net [43] prefill on Blackwell B200, and MLA paged decode [10, 46] and fused GEMM+AllReduce (G+AR) [35] on Hopper H100. EVOLVING AGENT TEAMS outperforms strong coding agent baselines on every task. Notably, on the MLA paged decode task, evaluated on 47 production DeepSeek-V3 workloads from FLASHINFER-BENCH [11], CLAUDE CODE agent plateaus at 0.51×0.51\times the expert-written FLASHINFER kernel, while our system reaches 0.74×0.74\times under a matched token budget. With additional budget, the system surpasses the production FLASHINFER baseline, achieving 1.21×1.21\times mean speedup, faster on 36 of 47 workloads, while the previous best result is 0.61×0.61\times from K-SEARCH [5].

References (44)