Choosing a communication graph before the agents speak
A multi-agent language-model system needs more than a collection of prompts. It also needs a communication structure that determines which agents receive another agent's output and in what order. A dense graph can expose each participant to more intermediate reasoning, while a sparse graph can restrict redundant exchanges. Neither shape is automatically best. The useful topology can depend on the question, the assigned roles and the cost of the responses that the graph induces.
A September 2 preprint introduces Codebook Agent, a method intended to avoid constructing a new topology through an iterative optimization process for every query. The authors move most of that search into an offline training stage. Their system learns a small collection of reusable topology representations and predicts which entries are promising for a new question. It then evaluates several decoded candidates with a lightweight proxy before any selected team begins its language-model exchange.
This is an amortization strategy. Work performed across earlier executions is compressed into a selector that can be reused for later queries. The potential benefit is narrower than making the language models themselves faster. Codebook Agent can shorten the topology-design step and choose graphs that consumed fewer tokens in the authors' experiments. It does not remove model inference, guarantee a shorter final answer or reduce the latency of each call to an external model provider.
A codebook replaces iterative per-query construction
The method has three principal learned components. A vector-quantized autoencoder compresses successful adjacency matrices into discrete entries in a shared codebook. The reported configuration contains 16 entries. A reward-weighted multilayer perceptron maps an embedding of the new query to a distribution over those entries. At inference time, the five highest-ranked codes are decoded into graph candidates, duplicates are removed and a separate proxy scores the remaining structures in one batch.
That proxy is trained on observed task utility and normalized token consumption. It reads a flattened representation of the adjacency matrix instead of estimating cost from the number of edges or passing identical features through a conventional graph scorer. This choice responds to two findings in the paper. First, edge count was an unreliable stand-in for token cost. Across the authors' collected executions, the correlation was approximately negative 0.4: some sparse arrangements elicited longer messages and therefore used more tokens than denser ones. Measuring executions captured behavior that a structural count missed.
Second, the authors analyze how a message-passing scorer can become insensitive to topology when every node represents the same type of agent and begins with the same features. Symmetric aggregation may produce equivalent representations for graphs that should lead to different communication patterns. The flattened adjacency input preserves the identity of individual connections. The principal HumanEval code team uses four Programming Experts with homogeneous profiles, while the paper also evaluates a separate heterogeneous four-role HumanEval variant. Heterogeneous roles can weaken the invariance problem. The result is a warning about a particular proxy design, not proof that every graph neural network is unable to evaluate agent topologies.
The speed result covers selection, not completion
The authors evaluated the method on GSM8K, MATH, MultiArith, SVAMP, MBPP and HumanEval using GPT-4o mini for the principal comparison. They report an average task score of 84.62 across the six benchmarks, compared with 83.02 for the strongest listed prior topology-design baseline. They also report reductions of 21.9 to 33.2 percent in token use relative to the incumbent pipeline and topology-generation times of about 2.4 to 2.5 milliseconds, versus roughly 301 to 396 milliseconds for iterative generators in the reported setup.
Those figures describe different parts of the system and should not be combined into a general speed claim. The millisecond measurement covers generation of a communication topology on the authors' hardware. Once a graph is selected, its agents still make language-model requests, exchange text and assemble an answer. Network delay, provider scheduling, output length and the number of sequential communication rounds can make those calls far more expensive than topology selection. The study does not establish that a complete response arrives hundreds of times faster.
The quality comparison is also a controlled benchmark result rather than evidence of universal superiority. Each configuration received one evaluation run, leaving uncertainty about variability from model sampling and provider behavior. In the Qwen3-8B backbone comparison, the authors repeated the same team arrangements and 300-record protocol with Qwen replacing GPT-4o mini. Codebook Agent produced a reported three-benchmark mean of 74.0 across GSM8K, MATH and MMLU, compared with 72.7 for GTD and 72.1 for G-Designer. This is a separately executed protocol under another backbone, not evidence that weights trained from GPT-based execution records transferred unchanged to Qwen. The preserved ordering suggests that the design can be retrained under another model, but it remains an author-run experiment rather than an independent replication.
The offline bill is part of the tradeoff
Codebook Agent needs execution data before it can offer cheap selection. For each benchmark, the authors ran 50 training tasks across six fixed topologies, creating 300 records with observed utility and token cost. Those records train the topology autoencoder, query predictor and proxy. Collecting them requires actual language-model executions. An organization considering this design would therefore need enough repeated workload to amortize data collection, training and maintenance over later requests.
The codebook also compresses the available design space. That is useful because inference becomes predictable and inexpensive, but it can exclude a novel graph that would suit an unusual query. In ablations, the number of actively used codes reportedly saturated near six once the configured codebook contained at least eight entries. This may indicate that the tested workloads need only a small vocabulary of communication patterns. It could also reflect training dynamics, limited roles or the six seed topologies used to collect records. The experiment does not show that six patterns are sufficient for broader agent systems.
Changes in prompts, model versions, provider pricing or agent responsibilities could also make old cost labels less representative. A topology that was economical with one model might induce longer answers from another. The framework can in principle be retrained with new measurements, but that creates an operational responsibility: the selector and its proxy become learned infrastructure whose assumptions may drift with the system they manage.
A useful systems boundary, with evidence still preliminary
The practical advance is a separation of concerns. Expensive exploration happens before deployment, while a small feed-forward path handles query-time selection. This can be valuable for repeated workloads such as benchmark solving, code review or structured analysis, where teams and task distributions are stable enough to learn from prior executions. The execution-grounded cost target is especially useful because it recognizes that graph structure alone does not determine how much text agents produce.
The evidence does not yet establish production reliability. The paper is a public preprint without independent replication, and the experiments cover six reasoning and coding benchmarks, two model backends and specific small-team configurations. One run per configuration cannot characterize the full variance of nondeterministic model responses. The authors do report benchmark-level wall-clock reductions for the complete evaluated pipelines, including MATH falling from 43.7 to 27.4 minutes and MMLU from 12.7 to 7.9 minutes. These are aggregate benchmark-run durations, not per-answer latency measurements, and their applicability still depends on model prices, caching, batching, failure handling and the cost of refreshing offline records.
Codebook Agent therefore supports a measured conclusion: reusable topology codes can move one orchestration decision out of the request's expensive path while preserving competitive task scores in the reported tests. It does not show that topology selection is the main bottleneck in every multi-agent application or that its learned graphs will transfer unchanged to production workloads. The next useful evidence would include repeated trials and independently reproduced, deployment-representative end-to-end tests under changing models, roles and traffic distributions.
