Codebook Agent Optimizes LLM Multi-Agent Communication Topology

Jinxi Yu, Yubei Li, Eric Hanchen Jiang, Zhi Zhang, Dong Liu, Wenxiao Zhao, Levina Li, Kai-Wei Chang, Ying Nian Wu· September 3, 2026 View original

Key takeaways

  • Codebook Agent optimizes LLM multi-agent communication topology.
  • It uses a vector-quantized autoencoder for compact topology compression.
  • The system maps queries to pre-defined codes, eliminating iterative search.
  • Codebook Agent achieves higher accuracy and uses fewer LLM tokens than prior methods.

Who benefits

AI/ML EngineeringSoftware DevelopmentRoboticsAutonomous SystemsData Science

Summary

Codebook Agent is a novel framework that optimizes the communication topology of LLM multi-agent systems, improving accuracy and efficiency. It uses a vector-quantized autoencoder to compress successful topologies into a codebook, mapping queries to codes and reranking candidates without iterative search, resulting in faster and more accurate topology design.

Optimizing the communication topology within a multi-agent system composed of Large Language Models (LLMs) is crucial for enhancing both accuracy and efficiency for specific queries. Current methods often treat this as a conditional graph generation problem, involving complex variational, autoregressive, or diffusion decoders to search a vast adjacency space, with graph-network proxies ranking sampled candidates based on utility and structural costs like edge count.This research argues that this traditional formulation is misaligned with the actual problem. Empirical observations show that effective topologies often collapse into a small number of distinct graphs, even with increased codebook capacity. Counter-intuitively, sparsifying the graph (reducing edge count) can actually increase token consumption, making inference more expensive. Furthermore, message-passing scorers often become adjacency-invariant when agents share profiles, which is common in benchmarks, rendering them ineffective for ranking.To address these issues, the paper introduces Codebook Agent. This framework employs a vector-quantized autoencoder to compress successful communication topologies into a compact, query-independent 16-entry codebook. A reward-weighted Multi-Layer Perceptron (MLP) then maps the query embedding to a distribution over these codes. Finally, another MLP proxy, trained on measured utility and per-task normalized token cost, reranks the top decoded candidates in a single batched forward pass. This approach eliminates iterative search and message passing at test time, making Codebook Agent the most accurate method across six benchmarks (84.6% average vs. 83.0% for prior designers), while generating a topology in just 2.4 ms and using 21.9-33.2% fewer LLM tokens.

Why it matters

This innovation significantly boosts the performance and efficiency of multi-agent LLM systems, enabling faster, more accurate, and cost-effective deployment of complex AI solutions.

How to implement this in your domain

  1. 1Assess multi-agent system communication: Evaluate current LLM multi-agent systems for communication bottlenecks or suboptimal topology design.
  2. 2Explore Codebook Agent architecture: Investigate integrating a vector-quantized autoencoder for compressing effective communication topologies.
  3. 3Develop a query-to-code mapping: Implement a reward-weighted MLP to efficiently map incoming queries to the most suitable pre-defined communication patterns.
  4. 4Integrate an MLP proxy for reranking: Utilize a lightweight MLP to quickly rerank decoded topology candidates based on measured utility and token cost.
  5. 5Benchmark efficiency and accuracy: Compare the performance of Codebook Agent against existing dynamic topology design methods in terms of inference speed and task accuracy.

Original post by Jinxi Yu, Yubei Li, Eric Hanchen Jiang, Zhi Zhang, Dong Liu, Wenxiao Zhao, Levina Li, Kai-Wei Chang, Ying Nian Wu

"arXiv:2609.02264v1 Announce Type: new Abstract: Adapting the communication topology of an LLM multi-agent system to each query improves both accuracy and efficiency, yet current designers treat this as conditional graph generation: a variational, autoregressive, or diffusion deco…"

View on X

Originally posted by Jinxi Yu, Yubei Li, Eric Hanchen Jiang, Zhi Zhang, Dong Liu, Wenxiao Zhao, Levina Li, Kai-Wei Chang, Ying Nian Wu on X · view source

Want to go deeper?

Turn these trends into skills with Learnijoy's hands-on AI & tech courses.

Explore courses