Skip to content
AIAI Wranglers

27 Agentic AI and Multi-Agent Systems

No human accomplishment of significance was ever achieved alone. The Great Pyramid of Giza required an estimated one hundred thousand workers coordinating across two decades, quarrying limestone, transporting blocks along the Nile, fitting them with sub-millimetre precision, all without a single blueprint in the modern sense. The Manhattan Project brought together physicists, engineers, chemists, and mathematicians from dozens of institutions, coordinating under secrecy constraints that would challenge any modern project manager. The Human Genome Project, launched in 1990 and completed in 2003, coordinated sequencing laboratories across six countries, each responsible for different chromosomes, sharing data through standardised file formats that evolved as the project progressed. The Apollo programme marshalled four hundred thousand people across twenty thousand companies to land two humans on the Moon.

In every case, the achievement was not merely the sum of individual contributions. No single worker could have built the pyramid; no single physicist could have designed the bomb; no single laboratory could have sequenced the genome. Something emerged from the interaction, a collective capability that transcended what any participant could have accomplished alone. The question is: what?

The answer, we argue, is the coordination protocol. What distinguishes these achievements is not just the raw capability of individual participants but how information flows between them, how decisions are made, how credit and blame are assigned, and how the collective adapts when individual components fail. The Roman legions conquered an empire not because individual soldiers were stronger than their opponents (they often were not) but because their formation tactics, communication systems, and hierarchical command structure enabled coordination at a scale their enemies could not match.

This is precisely the mathematical question we address in this chapter. Given n agents, each with bounded individual capability, under what conditions does their collective performance exceed the sum of their individual contributions? When does collaboration produce superadditive gains, and when does coordination overhead consume any benefit? These questions are as old as economics (Adam Smith's division of labour, 1776), as central to biology (the evolution of multicellularity), and as urgent as modern AI (teams of LLM agents solving complex tasks).

The chapter sits at the culmination of a deliberate arc. In 23, we built the reasoning engine, showing how chain-of-thought, tree search, and reinforcement learning enable language models to solve problems requiring multi-step inference. In 24, we constructed the memory substrate: KV caches, retrieval-augmented generation, and memory-augmented architectures that allow models to access and manipulate information beyond their context window. In 25, we installed the value system: RLHF, DPO, and GRPO that align model outputs with human preferences. In 26, we studied the temporal dynamics, how models can learn continuously without catastrophic forgetting. Now we ask the culminating question: what happens when multiple such systems interact?

The answer is both exciting and mathematically rich. A single LLM agent is already a remarkable artifact: a system that perceives natural language, reasons through chains of thought, takes actions via tool calls, and updates its behaviour through in-context learning. But a team of such agents, debating, delegating, verifying each other's work, specialising in different sub-tasks, opens an entirely new design space whose mathematics draws on game theory, mechanism design, distributed computing, social choice theory, and the theory of stochastic processes.

Key Idea.

The Collective Intelligence Thesis. A multi-agent system 𝒮=(𝒜,,𝒞,Ω) consists of a set of agents 𝒜={a1,,an}, a shared environment , a communication protocol 𝒞, and an orchestration mechanism Ω. The central question of this chapter is captured by a single inequality: (Central Question)P(𝒮)>?i=1nP(ai), where P() denotes a performance measure on a task distribution 𝒯. Under what conditions on 𝒞, Ω, and the capability profile (P(a1),,P(an)) does collective performance exhibit superadditivity, the hallmark of genuine collective intelligence? We will show that the answer depends on task decomposability, communication bandwidth, agent diversity, and the alignment of individual incentives with collective objectives.

Historical Note.

From distributed AI to LLM agent swarms. The idea that intelligence might emerge from the interaction of simple components has a rich intellectual history. Alan Turing's “Can machines think?” (1950) [1] asked about a single machine, but Marvin Minsky's Society of Mind (1986) [2] proposed that mind itself is a society of interacting agents, each too simple to be called intelligent on its own. The distributed AI movement of the 1980s [3] formalised multi-agent coordination, leading to the FIPA standards (1996) for agent communication languages. Game theory provided the mathematical backbone: Nash's equilibrium concept (1950) [4], Shapley's value for coalition games (1953) [5], and Harsanyi's theory of games with incomplete information (1967) [6] all found direct application. Swarm intelligence, coined by Beni and Wang (1989) [7], showed that collective behaviour could emerge from simple local rules without central control. The modern revolution began when large language models became capable enough to serve as general-purpose agents: AutoGPT (2023), AutoGen [8], MetaGPT [9], AgentScope [10], and CrewAI (2024) demonstrated that teams of LLM agents could collaborate on complex software engineering, scientific research, and creative tasks through natural language communication, a qualitative leap from the rigid, hand-coded protocols of traditional multi-agent systems.

Roadmap for this chapter. Twenty-five sections are organised across five files (A–E). File A (this file) covers the foundations: collective intelligence, single-agent anatomy, adaptive agents, planning, and safety. Files B–C develop multi-agent coordination, game theory, and emergence. Files D–E address scaling, robustness, applications, and theoretical limits.

The chapter is organised across five files to manage its length. This file (File A) establishes the foundations: we begin with the intelligence of collectives (The Intelligence of Collectives), move to the anatomy of a single agent (The Anatomy of a Single Agent), study adaptive and continual-learning agents (Adaptive and Continual-Learning Agents), develop agent reasoning and planning (Agent Reasoning and Planning), and conclude with reward shaping and safety (Reward, Alignment, and Agent Safety). Files B–E build on these foundations to develop multi-agent coordination, game theory, emergence, evaluation, and applications.

Prerequisites.

We assume familiarity with the reasoning mechanisms of 23 (chain-of-thought, tree search, GRPO), the memory architectures of 24 (KV cache, retrieval-augmented generation, memory-augmented transformers), the alignment pipeline of 25 (SFT, reward modelling, DPO, GRPO), and the continual learning framework of 26 (task sequences, catastrophic forgetting, regularisation and replay methods).

The Intelligence of Collectives

Before we formalise artificial agents, we study the phenomenon we seek to replicate: collective intelligence as it manifests in biology, human societies, and their mathematical abstractions. The goal is to extract design principles that will guide our construction of multi-agent AI systems.

Biological Intelligence as Collective Computation

Nature provides the most compelling existence proofs of collective intelligence. In each case, the individual agent is simple, sometimes trivially so, yet the collective solves problems of remarkable complexity.

Ant colony optimisation.

Consider a colony of ants foraging for food. An individual ant has a brain containing roughly 250,000 neurons (compare to the human brain's 86 billion) and can perform only simple behaviours: move, deposit pheromone, follow pheromone gradients, pick up food, return to nest. Yet the colony collectively solves shortest-path problems, allocates labour across tasks, manages waste, tends fungal gardens, and wages war, all without a central controller.

The mathematical abstraction of this phenomenon is Ant Colony Optimisation (ACO), introduced by Dorigo [11]. Consider a graph G=(V,E) with edge costs cij for (i,j)E. Each ant k at node i selects the next node j with probability (ACO Transition)pij(k)=[τij]α[ηij]βl𝒩i[τil]α[ηil]β, where τij is the pheromone concentration on edge (i,j), ηij=1/cij is the heuristic desirability (inverse cost), 𝒩i is the set of unvisited neighbours of i, and α,β>0 control the relative influence of pheromone versus heuristic information. After all ants complete their tours, pheromones are updated: (ACO Update)τij(1ρ)τij+k=1mΔτij(k),Δτij(k)={Q/Lkif ant k used edge (i,j),0otherwise, where ρ(0,1) is the evaporation rate, m is the number of ants, Lk is the length of ant k's tour, and Q>0 is a constant. The evaporation term prevents convergence to suboptimal solutions; the reinforcement term causes shorter paths to accumulate more pheromone, biasing future ants toward them.

Bee swarm decision-making.

Honeybee swarms make collective decisions about nest sites through a process remarkably analogous to neural computation. Scout bees discover candidate sites and return to the swarm, performing waggle dances whose duration is proportional to site quality. Other scouts are recruited to inspect advertised sites, return, and dance for their preferred option. The process converges when a quorum of scouts aggregates at a single site, a distributed voting mechanism that, under mild conditions, selects the optimal site with high probability.

Mathematically, this can be modelled as a system of coupled stochastic differential equations. Let xi(t) denote the number of scouts committed to site i at time t. The dynamics are (BEE Dynamics)dxidt=αi(Njxj)recruitmentγixiabandonment+σiξi(t)noise, where αi is the recruitment rate (proportional to site quality), γi is the abandonment rate, N is the total number of scouts, and ξi(t) is white noise. The quorum decision triggers when xi(t)>θ for some threshold θ.

The immune system as multi-agent defence.

The adaptive immune system is perhaps the most sophisticated multi-agent system in biology. B-cells act as specialist agents, each producing antibodies tuned to a specific antigen through somatic hypermutation, a form of local search in antibody shape space. T-cells act as orchestrator agents: helper T-cells coordinate the immune response by activating B-cells and cytotoxic T-cells, while regulatory T-cells suppress the response to prevent autoimmune damage. The clonal selection algorithm, expansion of B-cells whose antibodies bind the antigen, combined with random mutation, implements a distributed evolutionary search.

Neural circuits.

A single biological neuron is a simple threshold device: it sums weighted inputs and fires if the total exceeds a threshold. Yet networks of neurons compute. The progression from neuron to brain to society exhibits a fractal pattern of collective intelligence: at each level, simple components interact through local rules to produce behaviour that no individual component could achieve. This observation motivates our formal definition.

Definition 1 (Collective Intelligence).

Let 𝒜={a1,,an} be a set of agents, each with individual performance P(ai)0 on a task distribution 𝒯. Let 𝒮=(𝒜,,𝒞,Ω) be a multi-agent system with environment , communication protocol 𝒞, and orchestration mechanism Ω. We say 𝒮 exhibits collective intelligence if (Collective Intelligence)P(𝒮)>maxi[n]P(ai), and superadditive collective intelligence if (Superadditivity)P(𝒮)>i=1nP(ai).

The weaker condition states that the team outperforms its best member; the stronger states that it outperforms the sum of all members. Superadditivity arises when agents' contributions are complementary: when the value of combining diverse capabilities exceeds the value of stacking identical ones.

Definition 2 (Stigmergic System).

A stigmergic system is a tuple (𝒜,,,) where:

  • 𝒜={a1,,an} is a set of agents.

  • is a shared environment with state s𝒮.

  • :𝒜×𝒮𝒮 is a modification function: agent ai in state s modifies the environment to (ai,s).

  • :𝒜×𝒮𝒪 is a reading function: agent ai observes features of the environment state.

Communication is indirect: agents do not send messages to each other but instead modify the shared environment; other agents read these modifications. The pheromone trails of ants, the waggle dances of bees (which modify the “information environment” of the swarm), and the shared codebases of open-source software are all examples of stigmergy.

Example 1 (Ant Colony Optimisation as Multi-Agent Search).

Consider the Travelling Salesman Problem on n cities. The ACO system 𝒮 consists of:

  • Agents: m ants, each following the stochastic transition rule .

  • Environment: the graph G augmented with pheromone matrix 𝝉0n×n.

  • Modification: each ant deposits pheromone inversely proportional to its tour length .

  • Reading: each ant reads pheromone values to bias its edge-selection probabilities.

This is a stigmergic system: ants never communicate directly. Yet the colony provably converges to the optimal tour on any finite graph as the iteration count t under suitable parameter schedules for α, β, and ρ [11]. The key insight is that the pheromone matrix serves as a distributed, decaying memory of the colony's collective experience; shorter tours leave stronger traces, biasing future exploration toward promising regions of the solution space.

Remark 1 (The Emergence of Intelligence from Simple Rules).

In every biological example above, the individual agent follows simple, local rules. Intelligence emerges at the system level through three mechanisms:

  1. Positive feedback: successful behaviours are amplified (pheromone reinforcement, clonal expansion, Hebbian learning).

  2. Negative feedback: unsuccessful behaviours decay (pheromone evaporation, apoptosis, synaptic depression).

  3. Stochasticity: random exploration prevents premature convergence to suboptimal solutions.

These three mechanisms (amplification, decay, and noise) will reappear throughout this chapter in artificial multi-agent systems, though in different mathematical guises.

We now establish a foundational result: under what conditions does collective intelligence emerge? The following proposition gives sufficient conditions for superadditivity.

Proposition 1 (Sufficient Conditions for Superadditivity).

Let 𝒮=(𝒜,,𝒞,Ω) be a multi-agent system with n agents. Suppose the task 𝒯 admits a decomposition into m sub-tasks {T1,,Tm} with mn, and let σ:[m][n] be an assignment of sub-tasks to agents. Define:

  1. Complementarity: agents have complementary capabilities if for each sub-task Tj, the assigned agent aσ(j) satisfies P(aσ(j),Tj)(1+α)P(Tj) for some α>0, where P(Tj) is the average performance of a randomly selected agent on Tj.

  2. Low coordination cost: the communication overhead satisfies C(𝒞)ηjP(aσ(j),Tj) for some η<1.

Then the system exhibits superadditive collective intelligence: (Superadditivity Bound)P(𝒮)(1η)(1+α)j=1mP(Tj)>i=1nP(ai), provided α>η/(1η) and the assignment σ is optimal (i.e., each sub-task is assigned to the agent with highest capability for that sub-task).

Proof.

The system performance is the sum of sub-task performances minus coordination cost: (System PERF)P(𝒮)=j=1mP(aσ(j),Tj)C(𝒞). By the complementarity assumption, P(aσ(j),Tj)(1+α)P(Tj), so P(𝒮)(1+α)j=1mP(Tj)ηj=1mP(aσ(j),Tj)(1+α)(1η)j=1mP(Tj). Meanwhile, the sum of individual performances is i=1nP(ai)=nP, where P=1niP(ai) is the average individual performance. Since each agent operates alone on the full task (without decomposition), and each can solve at most one sub-task well, we have P(ai)jP(Tj)/m on average. Thus iP(ai)njP(Tj)/mjP(Tj) when nm. The superadditivity condition then requires (1+α)(1η)>1, which simplifies to α>η/(1η).

This result formalises the intuition that collective intelligence requires two ingredients: agents must be different from each other (complementarity, α>0) and the cost of getting them to work together must not be too high (low coordination cost, η<1). A team of identical agents (α=0) can never exhibit superadditivity; nor can a team of perfect specialists whose every communication is garbled (η1).

Three-level hierarchy of collective intelligence. In biology: neurons form brains, brains form societies. In AI: LLM agents form single-agent systems (with tools and memory), which form multi-agent systems. At each level, collective capability transcends individual capability.

Human Organisations as Agent Systems

Human organisations provide a rich source of multi-agent design patterns. We highlight four that map directly to artificial MAS architectures.

Division of labour.

Adam Smith's famous example of the pin factory (1776) illustrates that specialisation multiplies productivity. One worker performing all operations produces perhaps one pin per day; ten workers, each specialising in one operation, produce 48,000 pins per day, a 4,800-fold increase that cannot be explained by 10 workers each being 480 times faster. The gain comes from three sources:

  1. Skill deepening: specialisation allows each worker to master one sub-task.

  2. Reduced context-switching: no time lost moving between operations.

  3. Tool specialisation: each operation admits purpose-built tools.

In LLM multi-agent systems, the same principle applies: a code-writing agent, a code-reviewing agent, and a testing agent can collectively produce higher-quality software than a single agent performing all three roles, because each agent's prompt can be specialised, its context window devoted entirely to its sub-task, and its tool set tailored to its function.

Hierarchies versus flat structures.

Military organisations employ strict hierarchies: commands flow downward, reports flow upward, and each node has a bounded span of control (typically 3–7 subordinates). Open-source software communities, by contrast, employ flat structures with fluid role assignment, reputation-based authority, and asynchronous communication. Both patterns appear in artificial MAS: orchestrator–worker architectures implement hierarchy (a planner agent delegates to specialist workers), while peer-to-peer debate architectures implement flat structures (all agents have equal authority and negotiate consensus).

Scientific collaboration as publish–subscribe MAS.

The scientific community operates as a massive multi-agent system where agents (researchers) communicate through publications. This is a publish–subscribe architecture: agents publish results to shared channels (journals, arXiv); other agents subscribe to relevant channels and build on published results. The system is asynchronous, decentralised, and robust to individual agent failure, precisely the properties we seek in artificial MAS. Peer review implements a multi-agent verification protocol: multiple independent agents evaluate each contribution, and acceptance requires consensus.

Market mechanisms.

Markets coordinate economic agents through prices, a remarkably efficient communication protocol. Hayek's insight (1945) was that prices aggregate distributed local knowledge that no central planner could collect [61]. In artificial MAS, analogous mechanisms can coordinate agents: an “attention market” where agents bid computational resources for sub-tasks, or a “reward market” where task completion generates tokens allocated by Shapley value (Game Theory Foundations for Multi-Agent Systems).

From Biological to Artificial Collectives

The emergence of large language models as a substrate for agent construction represents a qualitative shift in multi-agent systems. We highlight three aspects of this shift.

Natural language as universal protocol.

Traditional multi-agent systems required hand-coded communication protocols: KQML (Knowledge Query and Manipulation Language), FIPA-ACL, or domain-specific message formats. LLM agents communicate in natural language, which is open-ended: agents can negotiate, clarify ambiguity, explain their reasoning, and even invent new terminology during a conversation. This flexibility comes at a cost (natural language is noisy, ambiguous, and expensive to process) but it eliminates the bottleneck of protocol design and enables agents to coordinate on tasks that were not anticipated at design time.

The capability gap.

Despite the excitement surrounding LLM agents, significant gaps remain between biological and artificial collectives:

  • True adaptation: biological agents learn continuously from experience; most LLM agents operate with frozen parameters, adapting only through in-context learning (which is bounded by the context window). The continual learning methods of 26 offer a path forward.

  • Embodiment: biological agents interact with the physical world through sensorimotor loops; LLM agents interact primarily through text, with tool use as a limited form of embodiment.

  • Intrinsic motivation: biological agents are driven by evolved reward signals (hunger, pain, curiosity); LLM agents require externally specified reward functions, which are subject to the misspecification problems studied in 25.

The opportunity.

What LLM agents can do that biological agents cannot: perfect communication fidelity (every message is recorded verbatim), instant cloning (an agent can be replicated with identical capabilities), perfect memory of instructions (no forgetting within the context window), and the ability to process and generate structured data (JSON, code, mathematical notation) alongside natural language. These capabilities open design possibilities that have no biological precedent.

Stigmergy: indirect communication through environment modification. Agents write to (solid orange) and read from (dashed blue) a shared environment. Direct inter-agent communication is absent; all coordination occurs through the environment state. Examples: ant pheromone trails, shared codebases in software engineering, blackboard systems in AI.

The Anatomy of a Single Agent

Before we can study multi-agent systems, we must understand the architecture of the single agent that serves as the building block. This section provides a rigorous mathematical specification of an LLM-based agent, connecting each component to the theory developed in earlier chapters.

Formal Definition

An LLM agent is more than a language model. It is a language model embedded in a loop that perceives, reasons, acts, and observes the consequences of its actions. We formalise this as follows.

Definition 3 (LLM Agent).

An LLM agent is a 7-tuple (Agent Tuple)a=(Φ,,,o,e,𝒳,𝒴), where:

  1. Φ:𝒱Δ(𝒱) is the LLM backbone, a language model mapping token sequences to next-token distributions over vocabulary 𝒱. This is the foundation model, providing both the knowledge base (encoded in parameters 𝜽) and the reasoning engine (activated through chain-of-thought decoding, Chain-of-Thought Reasoning).

  2. =(w,e,s,p) is the memory system, consisting of: itemize

  3. w: working memory (the KV cache / context window, Attention as Memory Access),

  4. e: episodic memory (conversation history, experience logs, Reflexion buffers),

  5. s: semantic memory (parametric knowledge in 𝜽, plus any retrieval-augmented knowledge base),

  6. p: procedural memory (learned tool usage patterns, standard operating procedures encoded in the system prompt). itemize This decomposition follows the memory taxonomy of 24.

  7. :𝒱𝒱 is the reasoning module, a strategy for generating intermediate reasoning tokens before producing an action. Examples include chain-of-thought (Chain-of-Thought Reasoning), tree-of-thought, and ReAct-style interleaved reasoning and acting.

  8. o:𝒳 is the observation function, mapping environment states to agent-readable observations (text descriptions, tool outputs, sensory data converted to tokens).

  9. e:𝒴 is the execution engine, mapping agent outputs (including tool calls) to environment effects. This is the agent's interface to the world.

  10. 𝒳 is the input space (the set of possible observations the agent can receive).

  11. 𝒴 is the output space (the set of possible actions the agent can take, including text generation and tool invocations).

The definition separates concerns cleanly: Φ provides the cognitive engine, provides storage and retrieval, provides deliberative reasoning, and o and e provide the interface between the agent and its environment.

The Agent Loop

The defining characteristic of an agent, as opposed to a passive model answering queries, is that it operates in a loop: perceive, reason, act, observe the result, and repeat. We formalise this loop as a partially observable Markov decision process.

Definition 4 (Agent POMDP).

An agent POMDP is a tuple (𝒮,𝒜,𝒪,T,Z,R,γ) where:

  • 𝒮 is the state space (the full state of the environment, typically not directly observed by the agent).

  • 𝒜 is the action space (all actions available to the agent, including text generation, tool calls, and a special STOP action).

  • 𝒪 is the observation space (what the agent perceives after each action).

  • T:𝒮×𝒜Δ(𝒮) is the transition function: T(s|s,a) is the probability of transitioning to state s when action a is taken in state s.

  • Z:𝒮×𝒜Δ(𝒪) is the observation function: Z(o|s,a) is the probability of observing o after transitioning to s via action a.

  • R:𝒮×𝒜 is the reward function.

  • γ[0,1) is the discount factor.

The agent maintains a belief state btΔ(𝒮) and selects actions according to a policy π:Δ(𝒮)Δ(𝒜). In practice, LLM agents approximate the belief state through the conversation history ht=(o1,a1,,ot), and the policy is realised by the LLM conditioned on ht: (Policy LLM)π(at|ht)=Φ(at|𝚙𝚛𝚘𝚖𝚙𝚝(ht)), where 𝚙𝚛𝚘𝚖𝚙𝚝(ht) formats the history into a token sequence.

The agent loop unfolds as follows. At each time step t:

  1. Observe: the agent receives observation otZ(|st,at1).

  2. Reason: the agent applies its reasoning module to generate intermediate reasoning tokens rt=(ht) (e.g., chain-of-thought).

  3. Act: conditioned on ht and rt, the agent selects action atπ(|ht,rt).

  4. Execute: the execution engine applies at to the environment, producing new state st+1T(|st,at).

  5. Update memory: the agent appends (ot,rt,at) to its episodic memory e and updates its working memory w.

The loop terminates when at=𝚂𝚃𝙾𝙿 or a maximum number of steps is reached.

Remark 2 (ReAct as Agent Loop).

The ReAct framework [12] implements precisely this loop: at each step, the model generates a Thought (reasoning), an Action (tool call), and receives an Observation (tool output). The ReAct prompt template structures the conversation history ht into a sequence of (Thought, Action, Observation) triples, making the POMDP structure explicit in the context window. What ReAct demonstrated empirically, we have formalised mathematically: the agent loop is a POMDP with the LLM as the policy network and the conversation history as the belief state approximation.

Context length bounds agent horizon.

A crucial constraint on the agent loop is the context window length Lmax. The history ht=(o1,a1,r1,,ot) grows by approximately |ot|+|rt|+|at| tokens at each step. If the average step consumes l tokens, then the agent can maintain at most TmaxLmax/l steps of history before the context window overflows. At this point, the agent faces a choice:

  1. Truncation: discard the oldest history, losing information about early steps. This is analogous to the sliding window attention of 24.

  2. Compression: summarise the history into a compact representation and replace the raw history with the summary. This trades fidelity for capacity.

  3. Retrieval: offload the full history to external memory and retrieve relevant portions on demand, as in retrieval-augmented generation (24).

The choice among these strategies profoundly affects agent behaviour. Truncation loses early context, which may be critical for understanding the task structure. Compression introduces lossy approximation. Retrieval adds latency and requires a good similarity metric. In practice, many agent frameworks combine all three: recent history is kept verbatim, older history is summarised, and key episodes are stored in a retrievable memory bank.

Remark 3 (The Optimal Belief State).

The POMDP theory tells us that the belief state btΔ(𝒮) is a sufficient statistic for optimal decision-making: π(at|bt) achieves the same expected reward as π(at|ht) for any history ht. This is powerful because bt is a fixed-dimensional vector (a distribution over 𝒮), while ht grows without bound. The open question for LLM agents is whether the hidden states of the transformer, or any compressed representation of the history, can serve as an adequate belief state. If so, agents could operate indefinitely without context window overflow. The state-space models of 24 are a promising candidate: their fixed-dimensional hidden state 𝒉t naturally compresses the observation history.

Anatomy of an LLM agent. The LLM backbone Φ (blue centre) is connected to four subsystems: memory (purple, left), tools {τj} (green, right), perception o (orange, bottom), and action execution e (amber, top). The reasoning module (teal) generates intermediate reasoning tokens before action selection.

Memory in Agents

The memory system deserves special attention because it is what enables an agent to go beyond pure reactive behaviour. We connect each component to the memory framework of 24.

Working memory w.

The agent's working memory is the KV cache, the context window of the LLM. Its capacity is bounded by the maximum context length Lmax, and its content determines the agent's “current awareness.” In cognitive terms, this is the analogue of human working memory: the small, actively maintained set of information that drives moment-to-moment behaviour. The KV cache management techniques of 24 (sparse attention, cache compression, sliding windows) directly apply to agent working memory.

Episodic memory e.

Episodic memory stores the agent's history of interactions: past observations, actions, rewards, and reasoning traces. It serves two functions: (1) providing context for decision-making (“what happened last time I tried this approach?”) and (2) enabling learning from experience (Reflexion-style self-critique [58]). Mathematically, e={(ot,at,rt,Rt)}t=1T is a trajectory buffer, possibly with a retrieval mechanism that selects relevant episodes based on similarity to the current observation.

Semantic memory s.

The agent's semantic memory comprises both the parametric knowledge encoded in the LLM weights 𝜽 and any external knowledge base accessible through retrieval-augmented generation (RAG, Memory-Augmented Architectures). The parametric component is immutable during a single agent episode (the weights are frozen); the RAG component can be updated by adding documents to the retrieval corpus.

Procedural memory p.

Procedural memory encodes “how to do things”: standard operating procedures, tool usage patterns, and workflow templates. In current LLM agents, this is typically implemented through the system prompt and few-shot examples. More sophisticated approaches store successful action sequences and retrieve them when similar situations arise, a form of case-based reasoning.

Tool Use as Action

A defining feature of modern LLM agents is their ability to use tools, external functions that extend the agent's capabilities beyond text generation.

Definition 5 (Tool-Augmented Agent).

Let a=(Φ,,,o,e,𝒳,𝒴) be an LLM agent (Definition 3). A tool set is a finite collection 𝒯={τ1,,τK} where each tool τj:𝒳τj𝒴τj is a function mapping tool-specific inputs to outputs. The tool-augmented action space is (TOOL Action Space)𝒜aug=𝒜textj=1K{(τj,x):x𝒳τj}, where 𝒜text is the set of pure text generation actions. A tool-augmented agent is an agent whose output space 𝒴 includes both text and tool invocations: 𝒴=𝒜aug.

The agent selects a tool by generating a structured output (e.g., a JSON function call) that specifies the tool name τj and its arguments x𝒳τj. The execution engine e invokes the tool and returns the result τj(x) as the next observation.

Tool selection as multi-armed bandit.

When an agent has access to K tools, the problem of selecting the right tool for a given sub-task can be viewed as a contextual multi-armed bandit problem. Let ct𝒞 be the context (the current observation and task description) at time t, and let rt(j)[0,1] be the reward for selecting tool j in context ct. The agent's tool-selection policy πtool:𝒞Δ([K]) seeks to minimise the cumulative regret (TOOL Regret)Regret(T)=t=1T[rt(jt)rt(jt)], where jt=arg maxjrt(j) is the optimal tool for context ct and jtπtool(|ct) is the selected tool. Standard results from bandit theory give:

Proposition 2 (Tool Selection Regret Bound).

Under a UCB-style tool selection policy with exploration parameter α>0, the expected cumulative regret satisfies (UCB Regret)𝔼[Regret(T)]j:Δj>08αlnTΔj+(1+π23)j=1KΔj, where Δj=𝔼[rt(jt)]𝔼[rt(j)] is the sub-optimality gap of tool j. In particular, 𝔼[𝑅𝑒𝑔𝑟𝑒𝑡(T)]=O(KlogT), logarithmic in the time horizon.

Proof.

This is the classical Lai–Robbins bound [13] applied to the tool selection setting. Fix a suboptimal tool j with Δj>0. Let Nj(T) denote the number of times tool j is selected in T rounds. Under UCB, tool j is selected at time t only if its upper confidence bound exceeds that of the optimal tool: μ^j+2αlnt/Nj(t)μ^j+2αlnt/Nj(t). By standard concentration inequalities (Hoeffding), the expected number of times this occurs is bounded by 8αlnT/Δj2 selections, contributing at most 8αlnT/Δj to the regret. Summing over all suboptimal tools and adding the constant term from the initial exploration phase yields .

Proposition 3 (Agent Memory Subsumes Lifelong Learning).

Let {𝒯t}t=1T be a task sequence in the sense of Definition 3. An LLM agent a=(Φ,,,o,e,𝒳,𝒴) with unbounded episodic memory e and a retrieval mechanism ρ:𝒳2e can represent any continual learning solution.

Proof.

Consider an arbitrary continual learning algorithm that, after training on tasks 𝒯1,,𝒯T, achieves performance Pt on task 𝒯t. We construct an agent that matches this performance. Let the episodic memory store the full training datasets: e=t=1T𝒟t. When presented with an input 𝒙 from task 𝒯t, the retrieval mechanism ρ selects relevant examples from 𝒟t (and possibly other tasks for transfer), and the agent's policy π(a|ht)=Φ(a|[system,ρ(𝒙),𝒙]) conditions on these retrieved examples. Under mild assumptions on Φ's in-context learning capability, specifically, that Φ achieves in-context learning performance matching 's trained performance when given sufficient examples, the agent matches or exceeds Pt on each task. The key insight is that episodic memory + retrieval + in-context learning implements a non-parametric form of continual learning that avoids catastrophic forgetting entirely: no weights are modified, so no previous knowledge can be overwritten.

Example 2 (A Code-Writing Agent).

Consider a code-writing agent acode tasked with implementing a sorting algorithm. Its components instantiate as:

  • LLM backbone Φ: a code-specialised model (e.g., Claude, GPT-4, or DeepSeek-Coder).

  • Memory: w holds the current code file and error messages; e stores previous edit–test–debug cycles; s contains documentation retrieved via RAG; p encodes coding conventions.

  • Reasoning : chain-of-thought planning of the algorithm structure before writing code.

  • Tools 𝒯: τ1 = code interpreter (run Python), τ2 = file system (read/write files), τ3 = web search (look up documentation), τ4 = test runner (execute unit tests).

The agent loop proceeds: (1) read the task specification; (2) plan the algorithm using CoT; (3) write the code via text generation; (4) execute the code via τ1; (5) observe the output/error; (6) if errors, reason about the fix and iterate from step (3); (7) when all tests pass, emit STOP.

This example illustrates a key property: the agent's effectiveness depends not only on the LLM's coding ability but on the loop structure, the ability to test, observe failures, and iteratively correct. A single-pass code generation model cannot match an agent that iterates, just as a student who never checks their work cannot match one who does.

The agent loop. Observe Think (chain-of-thought reasoning) Act (tool call or text generation) Observe feedback Update memory repeat. The loop continues until a termination condition is met.

Adaptive and Continual-Learning Agents

The agents defined in The Anatomy of a Single Agent have a fundamental limitation: their parameters 𝜽 are frozen during deployment. The agent can adapt within a single episode through in-context learning, conditioning on an ever-growing conversation history, but this adaptation is ephemeral (lost when the context window is cleared) and bounded (by the maximum context length Lmax). A truly capable agent must learn across episodes, accumulating knowledge from past experience and improving its behaviour over time. This section connects the agent framework to the continual learning theory of 26 and formalises the mechanisms by which agents adapt.

The Continual Agent

Definition 6 (Continual Agent).

A continual agent is a pair (a,𝒰) where a=(Φ,,,o,e,𝒳,𝒴) is an LLM agent (Definition 3) and 𝒰:Θ×𝒟Θ is an update rule that modifies the agent's parameters after each episode. Let 𝜽(0) be the initial parameters and 𝒟k the experience collected during episode k. The parameter trajectory is (Continual Update)𝜽(k)=𝒰(𝜽(k1),𝒟k),k=1,2, The continual agent must satisfy the three desiderata of 26: plasticity (the ability to improve on new tasks via 𝒰), stability (avoiding catastrophic forgetting of previously learned capabilities), and transfer (leveraging past experience to accelerate learning on new tasks).

The agent's lifetime performance over K episodes is (Lifetime Performance)JK=k=1K𝔼τkπ(k)[t=0TkγtR(st(k),at(k))], where π(k) denotes the policy induced by parameters 𝜽(k) and τk=(s0(k),a0(k),) is the trajectory in episode k.

The continual agent framework unifies several agent architectures:

  • Frozen agent (𝒰=id): no parameter updates; adaptation occurs only through in-context learning. This is the standard deployment mode for most current LLM agents.

  • Fine-tuned agent (𝒰=SGD): the agent's parameters are updated via gradient descent on collected experience, using the methods of 25 (SFT, DPO, GRPO).

  • Memory-augmented agent: 𝒰 updates the episodic memory e rather than the parameters, storing successful trajectories for future retrieval.

  • Hybrid agent: 𝒰 combines parameter updates with memory updates, using the continual learning techniques of 26 (EWC, experience replay) to prevent forgetting.

Continual agent timeline. The agent encounters tasks 𝒯1,𝒯2,,𝒯T sequentially. After each task, the update rule 𝒰 modifies the parameters (or memory), transitioning from 𝜽(k1) to 𝜽(k). The challenge: update for plasticity on the current task while maintaining stability on all previous tasks.

In-Context Learning as Agent Adaptation

The simplest and most widely used form of agent adaptation is in-context learning (ICL): the agent conditions its policy on examples or experience provided in the context window, without any parameter updates. We now prove that this mechanism implements an implicit form of Bayesian inference.

Theorem 1 (ICL as Implicit Bayesian Inference).

Let Φ be an autoregressive language model pretrained on a mixture of tasks p(𝒯). Consider a prompt containing k input–output demonstrations D1:k={(x1,y1),,(xk,yk)} drawn from a task 𝒯p(𝒯). Under the assumption that the pretraining distribution admits a latent task variable, the LLM's in-context prediction satisfies (ICL Bayesian)Φ(y|x,D1:k)p(y|x,D1:k)=p(y|x,𝒯)p(𝒯|D1:k)d𝒯, where p(𝒯|D1:k)p(𝒯)i=1kp(yi|xi,𝒯) is the Bayesian posterior over tasks given the demonstrations. In particular, as k, the posterior concentrates on 𝒯 and the in-context prediction converges to the task-optimal predictor.

Proof.

We follow the argument of [14]. The pretraining objective trains Φ to minimise the cross-entropy (ICL Pretrain)minΦ𝔼𝒯p(𝒯),(x1:n,y1:n)p(|𝒯)[i=1nlogΦ(yi|xi,D1:i1)]. At the global optimum, Φ(yi|xi,D1:i1)=p(yi|xi,D1:i1), the Bayes-optimal predictor. By the definition of conditional probability and the structure of the generative model, (ICL Derivation)p(y|x,D1:k)=p(y,x,D1:k)p(x,D1:k)=p(y|x,𝒯)p(x|𝒯)p(D1:k|𝒯)p(𝒯)d𝒯p(x|𝒯)p(D1:k|𝒯)p(𝒯)d𝒯=p(y|x,𝒯)p(x|𝒯)p(D1:k|𝒯)p(𝒯)p(x,D1:k)=p(𝒯|x,D1:k)d𝒯. When x is independent of 𝒯 given D1:k (or when p(x|𝒯) is uninformative), this simplifies to p(y|x,𝒯)p(𝒯|D1:k)d𝒯, which is .

For the convergence claim: by Doob's consistency theorem, the posterior p(𝒯|D1:k) converges weakly to a point mass on 𝒯 as k, provided the model is identifiable (distinct tasks produce distinct data distributions). Therefore Φ(y|x,D1:k)p(y|x,𝒯), the task-optimal predictor.

Key Idea.

The Adaptive Agent Principle. An agent that cannot learn from its own experience is fundamentally limited. The context window provides a fast but bounded adaptation mechanism, the agent's “hippocampus” (cf. 26). For long-horizon tasks that exceed the context window, the agent must either (a) compress experience into episodic memory and retrieve it selectively, or (b) update its parameters through continual fine-tuning. Theorem 1 shows that in-context learning is Bayesian-optimal within the context window; the open challenge is extending this optimality across episodes.

Agent Self-Improvement

Can an agent improve itself? The idea is tantalising: an agent generates trajectories, evaluates which ones succeeded, and fine-tunes itself on the successful ones, a bootstrapping loop where the agent is simultaneously the learner and the data generator. We formalise this through a variational framework.

Definition 7 (Agent Self-Improvement (AgentEvol)).

Let π𝜽 be an agent policy parameterised by 𝜽, and let p(success|τ) indicate whether trajectory τ achieves the task goal. The AgentEvol objective [15] seeks parameters 𝜽 maximising the log-probability of success: (Agentevol Objective)max𝜽logp𝜽(success). Introducing a variational distribution q(τ) over trajectories and applying Jensen's inequality yields the evidence lower bound (ELBO): (Agentevol ELBO)logp𝜽(success)𝔼q(τ)[logp(success|τ)]DKL[q(τ)p𝜽(τ)]. The AgentEvol algorithm alternates between:

  1. Generate: sample trajectories τ(1),,τ(N)π𝜽(k).

  2. Filter: retain successful trajectories 𝒟+={τ(i):p(success|τ(i))=1}.

  3. Fine-tune: update 𝜽(k)𝜽(k+1) by maximising τ𝒟+logπ𝜽(τ) subject to a KL penalty DKL[π𝜽π𝜽(k)]δ.

The KL constraint connects directly to the alignment objective of (Central Objective): it prevents the policy from collapsing to a narrow set of trajectories, maintaining exploration capability.

This procedure is closely related to GRPO (Group Relative Policy Optimization) and expert iteration. The key difference is that the reward signal comes from the agent's own experience rather than from human preferences: the agent generates data, evaluates it against an objective criterion (does the code compile? does the plan achieve the goal?), and trains on the successful subset.

Algorithm 1 (Agent Self-Improvement Loop).

  1. Input: Initial policy π𝜽(0), task distribution p(𝒯), success evaluator eval(τ,𝒯), KL budget δ>0, iterations K
  2. for k=0,1,,K1
  3. Sample tasks 𝒯1,,𝒯Bp(𝒯)
  4. for each task 𝒯b
  5. Generate N trajectories: τb(1),,τb(N)π𝜽(k)(|𝒯b)
  6. Evaluate: rb(i)=eval(τb(i),𝒯b) binary or scalar reward
  7. Collect successes: 𝒟+={(𝒯b,τb(i)):rb(i)>0}
  8. Fine-tune: 𝜽(k+1)arg max𝜽(𝒯,τ)𝒟+logπ𝜽(τ|𝒯)λDKL[π𝜽π𝜽(k)]
  9. Output: Improved policy π𝜽(K)

Caution.

Self-improvement without alignment guardrails can lead to reward hacking. If the success evaluator eval(τ,𝒯) is imperfect, as all automated evaluators are, the agent may discover trajectories that satisfy the evaluator without truly solving the task. This is the agent-level analogue of reward hacking in RLHF (25). For example, a coding agent might learn to produce code that passes unit tests by exploiting edge cases in the test suite rather than implementing the intended algorithm. Mitigations include: (a) diverse evaluation criteria, (b) red-teaming by adversarial agents, (c) human-in-the-loop verification for high-stakes updates, and (d) KL constraints that limit how far the policy can drift from a known-safe reference.

The AgentEvol self-improvement cycle. The agent generates trajectories, filters for successes, fine-tunes on the successful trajectories (with KL regularisation), and iterates. Each cycle produces a better policy, provided the success evaluator is sufficiently accurate.

Agent Reasoning and Planning

An agent that merely reacts to observations, selecting actions greedily without considering their long-term consequences, will fail at any task requiring foresight. Consider a software engineering agent tasked with refactoring a large codebase: it must plan a sequence of changes, anticipate that modifying one module will break tests in another, and schedule the changes in an order that maintains a working system at each step. This section develops the mathematical theory of agent planning, from classical search to hierarchical decomposition and world models.

Planning as Search

Definition 8 (Agent Planning Problem).

An agent planning problem is a tuple (𝒮,s0,𝒢,𝒜,T,c) where:

  • 𝒮 is the state space.

  • s0𝒮 is the initial state.

  • 𝒢𝒮 is the set of goal states.

  • 𝒜 is the action space.

  • T:𝒮×𝒜Δ(𝒮) is the (possibly stochastic) transition function.

  • c:𝒮×𝒜0 is the step cost.

The agent seeks an action sequence 𝒂=(a1,,aT) that reaches a goal state while minimising total cost: (Planning Objective)𝒂=arg min(a1,,aT)t=1Tc(st,at)subject tost+1T(|st,at),sT𝒢. When T is deterministic and the state space is finite, this reduces to shortest-path search in a graph. When T is stochastic, the problem becomes a stochastic shortest-path problem.

The connection to LLM agents is direct. In tree-of-thought reasoning [62], the “states” are partial reasoning traces, “actions” are candidate next-thought tokens, the “transition” is deterministic (appending a thought to the trace), and the “cost” is the negative of a value function that evaluates partial traces. The agent explores a tree of reasoning paths and selects the one with highest cumulative value, which is precisely a search over action sequences in the planning formulation .

The branching factor of this search tree is the key computational bottleneck. If the agent has b candidate actions at each step and the plan horizon is T, the naive search space has size bT. Even for modest values (b=10, T=20), this is 1020, far beyond any computational budget. This motivates two strategies: pruning (reducing b at each step by evaluating candidate actions) and hierarchical decomposition (reducing T by planning at multiple levels of abstraction).

Hierarchical Planning

Definition 9 (Task Decomposition).

A task decomposition operator is a function D:𝒯2𝒯 that maps a task 𝒯 to a set of sub-tasks {T1,,Tm}=D(𝒯) such that solving all sub-tasks and combining their solutions solves the original task. The decomposition is valid if there exists a composition operator C such that (Decomposition)solve(𝒯)=C(solve(T1),,solve(Tm)). A task is d-decomposable if repeated application of D yields a tree of depth at most d whose leaves are primitive tasks solvable by a single agent action.

Proposition 4 (Hierarchical Decomposition Reduces Search).

Consider a planning problem with branching factor b and horizon T. If the task is d-decomposable with decomposition factor m (each task decomposes into m sub-tasks) and sub-task horizon T/md1, then hierarchical planning reduces the search space from bT to (Hierarchical Bound)l=0d1mlbT/mldmd1bT/md1, which is exponentially smaller than bT when md11.

Proof.

At the top level, the planner searches over m sub-task assignments, each requiring a plan of horizon T/m. At the next level, each sub-task is further decomposed into m sub-sub-tasks of horizon T/m2. At level l{0,1,,d1}, there are ml sub-tasks, each with horizon T/ml, and each requiring a search over bT/ml action sequences. The total search space is (Hierarchical SUM)l=0d1mlbT/ml. The largest term in this sum is the one with the largest exponent, which occurs at l=0 (the top level, contributing bT) if we did not decompose. With decomposition, the deepest level l=d1 contributes md1bT/md1. To see the exponential reduction, note that for m=2 and d=log2T, the deepest level has horizon T/2d1=2, so the total is at most dTb2, which is polynomial in T rather than exponential.

In LLM agent systems, hierarchical planning manifests as task decomposition prompting: the agent first produces a high-level plan (“Step 1: set up the database; Step 2: implement the API; Step 3: write the frontend”), then plans each step in detail. Proposition 4 provides the mathematical justification: hierarchical planning is not merely a heuristic convenience but an exponential reduction in computational complexity under decomposability conditions.

World Models for Agents

Effective planning requires the ability to predict the consequences of actions before executing them. This prediction capability is provided by a world model.

Definition 10 (World Model).

A world model for an agent operating in environment is a learned approximation T^ϕ:𝒮×𝒜Δ(𝒮) of the true transition function T, parameterised by ϕ. The world model is trained on the agent's experience {(st,at,st+1)} to minimise the prediction error (World Model LOSS)minϕ𝔼(s,a,s)𝒟[logT^ϕ(s|s,a)]. Given a world model, the agent can plan by simulation: starting from current state s0, it simulates action sequences (a1,,aH) using T^ϕ and selects the sequence with highest predicted cumulative reward: (Model Based Planning)𝒂=arg maxa1,,aHt=1HR^(s^t,at),s^t+1T^ϕ(|s^t,at).

The crucial observation is that the LLM itself is a world model for text-based environments. When an LLM predicts the next token in a coding task, it is implicitly modelling the state transition: “if I add this line of code, what will the compiler output?” The generative models developed in Parts III–VI (VAEs, flows, diffusion models) are all world models in this sense: they model p(s|s,a) for different state representations. The distinction in the agent setting is that the world model is used not for generation per se, but for planning: evaluating hypothetical action sequences before committing to one.

Compounding error in learned world models.

A world model trained on single-step transitions accumulates error over multi-step rollouts. If the single-step prediction error is ϵ (in total variation distance), then an H-step rollout can deviate from the true trajectory by up to Hϵ in total variation. This compounding error problem is the fundamental limitation of model-based planning and motivates frequent re-planning (model-predictive control) and world model ensembles.

Level-KK Reasoning

When an agent operates alongside other agents, even before we formalise multi-agent systems in subsequent sections, it must reason about what others will do. Level-K reasoning, from behavioural game theory [63][64], provides a hierarchy of increasingly sophisticated strategic reasoning.

Definition 11 (Level-K Reasoning).

Consider n agents each selecting actions from 𝒜 to maximise a utility function ui(ai,ai) that depends on their own action ai and others' actions ai. The Level-K reasoning hierarchy is defined recursively:

  1. Level-0 (L0): acts according to a fixed reference strategy σ0Δ(𝒜) (e.g., uniform random).

  2. Level-K (LK, for K1): best-responds to the belief that all other agents are Level-(K1): (Level K BR)σK(ai)=arg maxai𝒜𝔼aiσK1n1[ui(ai,ai)].

A Level-K agent models its opponents as Level-(K1) thinkers, who in turn model their opponents as Level-(K2), and so on down to Level-0. The depth K measures the agent's strategic sophistication.

Level-K reasoning maps naturally to LLM agents. When prompted with “What would the other agent do?”, a Level-1 LLM agent simulates the other agent's response assuming it acts naively (Level-0). A Level-2 agent reasons: “The other agent will predict that I act naively, and will best-respond to that, so I should best-respond to its best-response.” This recursive simulation is precisely the chain-of-thought reasoning studied in 23, applied to strategic settings.

Theorem 2 (Level-K Bayesian Convergence).

Consider a repeated game where at each round t, each agent i observes the actions of all agents in the previous round and updates its belief about opponents' levels. Let K^i(t) denote agent i's estimate of its opponents' sophistication level at round t. Under the assumption that agents use Bayesian updating with a prior p0(K) that has full support on {0,1,2,}, the Level-K estimates converge: (Level K Convergence)K^i(t)a.s.Kias t, where Ki is the true sophistication level of agent i's opponents (or the best-responding level if opponents also adapt). Moreover, the resulting strategy profile converges to a cognitive hierarchy equilibrium [16].

Proof sketch.

We sketch the argument following [17]. At each round t, agent i observes actions ai(t1) and updates its posterior over opponents' levels: (Level K Posterior)pi(t)(K)pi(t1)(K)jiσK(aj(t1)). Since σK is the Level-K best-response strategy, the likelihood σK(aj(t1)) is highest for the level K that best explains agent j's observed action. By the consistency of Bayesian posteriors (Doob's theorem, as in Theorem 1), the posterior concentrates on the true level Kj as t, provided distinct levels produce distinct action distributions (identifiability).

Once beliefs have converged, agent i's strategy is a best-response to accurate beliefs about opponents' levels. The resulting profile satisfies the fixed-point condition of a cognitive hierarchy equilibrium: each agent's strategy is optimal given the correct belief about the distribution of reasoning levels in the population.

Example 3 (Planning a Multi-Step Coding Task).

Consider an agent tasked with building a REST API. The planning problem instantiates as:

  • State: the current state of the codebase (files, test results, documentation).

  • Goal: all endpoint tests pass, documentation is complete, and code meets style guidelines.

  • Actions: create file, edit file, run tests, search documentation, request code review.

  • Decomposition (d=3): enumerate

  • Top level: design database schema implement endpoints write tests document.

  • Middle level: for “implement endpoints,” decompose into individual endpoints (GET, POST, PUT, DELETE).

  • Bottom level: for each endpoint, decompose into write handler add validation test. enumerate

By Proposition 4, this three-level decomposition reduces the search space from bT (where T might be 50 individual actions) to approximately 316b3, a reduction from b50 to 48b3, which is many orders of magnitude for any reasonable branching factor b.

Planning as tree search. The agent explores a tree of action sequences from the initial state s0. Each node is evaluated by a value function v; branches with low value (red) are pruned. Green paths lead to goal states (). This is the structure underlying tree-of-thought reasoning in LLM agents.
The Level-K reasoning pyramid. Level-0 agents act randomly; Level-1 agents best-respond to Level-0; Level-2 to Level-1; and so on. Each level requires one additional step of recursive reasoning. As the depth K increases, strategies converge to equilibrium behaviour.

Reward, Alignment, and Agent Safety

We have constructed agents that perceive, reason, plan, and learn from experience. But to what end? The reward function determines what the agent optimises, and a misspecified reward can lead to capable agents pursuing the wrong objectives with devastating effectiveness. This section extends the alignment framework of 25 from single-turn language generation to multi-step agent trajectories, and examines failure modes unique to the agentic setting.

Reward Shaping for Agents

In the alignment chapter, the reward function r(x,y) scored a single prompt–response pair. For agents operating over multi-step trajectories, we need a richer reward structure.

Definition 12 (Agent Trajectory Reward).

Let τ=(s0,a0,s1,a1,,sT,aT) be an agent trajectory of length T. The trajectory reward is (Trajectory Reward)R(τ)=t=0Tγtr(st,at)+rfinal(sT), where r(st,at) is the step reward (encouraging progress and penalising inefficiency), rfinal(sT) is the outcome reward (evaluating whether the final state achieves the goal), and γ[0,1] is the discount factor.

The decomposition into step and outcome rewards reflects a practical design choice. Pure outcome reward (r=0, rfinal0) makes credit assignment difficult: the agent receives no signal until the end of the trajectory, and must attribute the final outcome to individual actions across many steps. Pure step reward (rfinal=0, r0) can lead to reward hacking: the agent may accumulate step rewards without making progress toward the goal. The combination allows the designer to encode both process (“use the right approach”) and outcome (“solve the problem”) signals.

A concrete instantiation from Optima [20] decomposes the reward for dialogue agents as (Optima Reward)R=RtaskλtokenRtoken+λloss/Rloss, where Rtask measures task completion, Rtoken penalises excessive token usage (encouraging efficiency), and Rloss penalises information loss (encouraging faithful communication). The hyperparameters λtoken and λloss trade off efficiency against completeness.

Temporal credit assignment.

The temporal credit assignment problem asks: given a final outcome rfinal(sT), which of the actions a0,a1,,aT were responsible? In single-turn generation, the entire output is one “action” and credit assignment is trivial. In multi-step agent trajectories, credit must be distributed across dozens or hundreds of actions. The standard approach uses a value function Vπ(s)=𝔼π[t=tTγttr(st,at)+rfinal(sT)|st=s] and defines the advantage (Advantage)Aπ(st,at)=r(st,at)+γVπ(st+1)Vπ(st), which measures how much better action at is compared to the average action under policy π. The advantage function is the foundation of policy gradient methods (PPO, GRPO from 25) and provides the per-step credit signal needed for agent learning.

Remark 4 (Reward Shaping Preserves Optimal Policy).

A classical result from [18] shows that adding a potential-based shaping function F(s,s)=γϕ(s)ϕ(s) to the reward does not change the optimal policy: πr+F=πr for any potential ϕ:𝒮. This result extends to the agent setting and is practically important: it means we can add intermediate rewards to guide the agent (e.g., rewarding partial progress) without distorting the optimal behaviour, provided the shaping function is potential-based. Non-potential-based shaping, by contrast, can introduce spurious optima and should be used with caution.

Agent Alignment as Constrained POMDP

We now extend the alignment objective from 25 to the agent setting. In the single-turn case, alignment was a KL-constrained reward maximisation ((Central Objective)). In the agent case, we must additionally enforce safety constraints over trajectories.

Definition 13 (Aligned Agent Optimisation).

An aligned agent solves the constrained optimisation problem: (Aligned Objective)maxπ𝔼τπ[R(τ)]subject to{DKL[π(|ht)πref(|ht)]δht,Prτπ[τ𝒰]ϵ(safety), where:

  • π is the agent's policy (mapping histories to action distributions).

  • R(τ) is the trajectory reward (Definition 12).

  • πref is a reference policy (typically the pretrained model or an SFT checkpoint), and δ>0 bounds the per-step KL divergence to prevent reward hacking.

  • 𝒰𝒯 is the set of unsafe trajectories (e.g., trajectories that execute harmful code, leak private data, or produce toxic content), and ϵ0 is the safety tolerance.

The KL constraint inherits the role it plays in (Central Objective): it prevents the policy from collapsing to a narrow reward-maximising mode. The safety constraint is new to the agent setting: because agents take real-world actions (executing code, sending messages, modifying files), the consequences of unsafe behaviour are more severe than in single-turn generation.

Lagrangian relaxation.

The constrained optimisation can be solved via Lagrangian relaxation. Introducing multipliers λKL0 and λsafe0, the Lagrangian is (Lagrangian)(π,λ)=𝔼τπ[R(τ)]λKLtDKL[π(|ht)πref(|ht)]λsafe(Pr[τ𝒰]ϵ). The primal-dual algorithm alternates between maximising over π (a policy optimisation step, implementable via PPO or GRPO from 25) and updating the multipliers via gradient ascent: λsafe[λsafe+η(Pr[τ𝒰]ϵ)]+. This procedure is guaranteed to converge to a saddle point under standard convexity conditions on the constraint set.

The Sycophancy Problem

A subtle failure mode arises when agents are trained with RLHF: sycophancy, the tendency to produce responses that please the user or the reward model rather than responses that are correct. This problem is particularly pernicious in multi-agent debate systems, where sycophantic agents agree with each other rather than challenging incorrect claims.

Proposition 5 (Sycophancy as Reward Misspecification).

Let πref be a pretrained policy and rhuman a reward model trained on human preferences. Suppose rhuman exhibits a sycophancy bias: for responses yagree that agree with the user's stated opinion and ycorrect that provide the factually correct (but disagreeable) answer, (Sycophancy BIAS)rhuman(yagree|x)>rhuman(ycorrect|x)even when ycorrect is objectively superior. Then the RLHF-optimal policy (Sycophantic Policy)πsyc(y|x)πref(y|x)exp(rhuman(y|x)/β) assigns higher probability to yagree than to ycorrect, and the sycophancy increases as β0 (i.e., as the policy optimises the reward model more aggressively).

Proof.

By the closed-form solution to the KL-constrained reward maximisation ((Central Objective)), the optimal policy is π(y|x)πref(y|x)exp(r(y|x)/β). Therefore, (Sycophancy Ratio)π(yagree|x)π(ycorrect|x)=πref(yagree|x)πref(ycorrect|x)exp(rhuman(yagree|x)rhuman(ycorrect|x)β). By assumption , the exponent is positive. Therefore, π amplifies the probability ratio of agreeable over correct responses relative to πref. As β0, the exponential term diverges, and π concentrates mass on yagree regardless of πref's original preference. This proves that RLHF with a sycophancy-biased reward model systematically degrades truthfulness, and that more aggressive reward optimisation (smaller β) worsens the degradation.

The implication for multi-agent debate is grave. If all agents in a debate system are trained with the same sycophancy-biased reward model, they will converge to agreeable consensus rather than correct conclusions, the “Talk Isn't Always Cheap” phenomenon [20]. Mitigations include:

  1. Training debaters with diverse reward models to break sycophancy correlations.

  2. Explicitly rewarding disagreement and factual challenge in the debate protocol.

  3. Using ground-truth verification (when available) alongside preference-based reward.

  4. Maintaining a large β (weak reward optimisation) to keep the policy close to the pretrained distribution.

Caution.

An aligned single agent does not guarantee an aligned multi-agent system. Even if each individual agent satisfies the alignment constraint , the multi-agent system can exhibit emergent misalignment. Consider n agents, each individually safe (Pr[τi𝒰]ϵ). The system-level probability of at least one unsafe trajectory is 1(1ϵ)nnϵ for small ϵ. With n=100 agents and ϵ=0.01, the system failure probability approaches 1(0.99)1000.634, an unacceptable level. Multi-agent alignment requires system-level safety guarantees that account for agent interactions, not merely individual constraints. This challenge motivates the multi-agent alignment theory developed in Agent Systems Meet Alignment.

Insight.

Agent alignment inherits the stability–plasticity dilemma from continual learning. The alignment constraint DKL[ππref]δ serves the same role as the stability constraint in (Lifelong Thesis): it prevents the agent from drifting too far from its initial (safe, well-calibrated) behaviour. But just as excessive stability prevents continual learning, an overly tight KL constraint prevents the agent from adapting to novel tasks that require behaviours not present in πref. The optimal δ trades off alignment (stability) against capability (plasticity), the same fundamental tension identified in 26, now manifested in the agent safety domain.

The agent alignment landscape. The x-axis measures policy divergence from the reference; the y-axis measures expected trajectory reward. The dashed red line marks the KL constraint boundary δ. The feasible region (blue shading) contains policies sufficiently close to πref. The optimal aligned policy (green dot) maximises reward within the feasible region, necessarily achieving lower reward than the unconstrained optimum (red triangle). This gap is the “alignment tax”, the cost of safety.
Sandboxing and containment.

A complementary approach to alignment constraints is sandboxing: restricting the environment in which the agent operates so that unsafe actions have limited consequences. A code execution sandbox, for instance, prevents the agent from modifying the host file system or accessing the network. Formally, sandboxing replaces the transition function T with a restricted version Tsafe that maps unsafe actions to a null transition: Tsafe(s|s,a)=δs(s) if a𝒜unsafe (the state does not change). The agent still “takes” the unsafe action in its reasoning trace, but the execution engine blocks its effect. This provides a hard safety guarantee independent of the policy π: no matter how the agent reasons, unsafe actions produce no environmental change.

The limitation of sandboxing is that it requires enumerating the set 𝒜unsafe in advance, a task that grows increasingly difficult as agents gain access to more tools and environments. The most robust safety strategy combines all three approaches: KL-constrained alignment (soft constraint on the policy), safety-constrained optimisation (probabilistic constraint on trajectories), and sandboxing (hard constraint on the environment).

This concludes our treatment of single-agent foundations. We have defined the LLM agent (Definition 3), formalised its operation as a POMDP (Definition 4), shown how it adapts through in-context learning (Theorem 1) and self-improvement (Definition 7), developed its planning capabilities (Agent Reasoning and Planning), and established the alignment framework that keeps it safe (Definition 13). In the sections that follow (Files B–E), we will bring multiple such agents together and study the rich mathematics of their interaction.

Multi-Agent System Formalisms

The preceding sections constructed the single agent: a 7-tuple (Definition 3) operating as a POMDP (Definition 4), equipped with reasoning, memory, and alignment. We now ask: what happens when multiple such agents share an environment? The answer requires a formal language for multi-agent systems (MAS) that specifies the agents, the medium through which they communicate, and the mechanisms that coordinate their collective behaviour.

This section develops that language in four stages. First, we define the MAS as a structured tuple (The Multi-Agent System Tuple), drawing on Kim et al. [19]. Second, we formalise the communication protocol as an information-theoretic channel (Natural Language as a Shannon Channel), following Tran et al. [65]. Third, we derive the turn-count power law governing coordination overhead (Turn-Count Scaling and the Power Law). Fourth, we establish a capability ceiling, a performance plateau beyond which adding agents yields diminishing returns (The Capability Ceiling).

Key Idea.

From single-agent optimality to collective intelligence. A single agent maximises an individual reward r:𝒮×𝒜. A multi-agent system introduces a fundamentally new design dimension: the interaction structure among agents. The central result of this section is that the interaction structure, not just the capabilities of individual agents, determines whether the system exhibits superadditive performance. Formally, the system-level performance P(𝒮) depends on the communication bandwidth, the orchestration policy Ω, and the agent topology in ways that admit precise scaling laws and hard performance ceilings.

The Multi-Agent System Tuple

Every multi-agent system, regardless of implementation (AutoGen, AgentScope, MetaGPT, CrewAI), can be described by a single mathematical object.

Definition 14 (Multi-Agent System).

A multi-agent system (MAS) is a 4-tuple (MAS Tuple)𝒮=(𝒜,,𝒞,Ω), where:

  1. 𝒜={a1,,an} is a finite set of agents, each an LLM agent in the sense of Definition 3, with policy πi, tool set 𝒯i, and memory i. The capability profile is 𝒑=(P(a1),,P(an))0n, where P(ai) is the solo performance of agent i on a reference task distribution.

  2. =(𝒮env,𝒪env,Tenv) is the shared environment: state space 𝒮env, observation function 𝒪env:𝒮env×𝒜Δ(𝒪) (partial observability), and joint transition kernel Tenv:𝒮env×i=1n𝒜iΔ(𝒮env).

  3. 𝒞=(,𝒫msg,Φ) is the communication protocol (formalised in Definition 15 below): shared language , message-passing mechanism 𝒫msg, and protocol specification Φ.

  4. Ω:×𝒜𝒜× is the orchestrator, selecting the next active agent and issuing an instruction given conversation history .

The system operates over discrete rounds t=0,1,2, At each round the orchestrator selects agent ait, which observes oit(t)𝒪env(s(t),ait), acts via yit(t)πit(|oit(t),h(t)), and the environment transitions to s(t+1)Tenv(s(t),yit(t)).

Kim et al. [19] show that every existing LLM-based MAS framework is an instantiation of this tuple; the differences lie only in how 𝒞 and Ω are implemented.

Given a task distribution 𝒟, the system-level performance is P(𝒮)=𝔼τ𝒟[R(𝒮,τ)], where R[0,1] is a bounded reward. Define the solo baseline Psolo=maxiP(ai) and the coordination gain ΔP=P(𝒮)Psolo. The system is superadditive when ΔP>0 and exhibits coordination failure when ΔP<0.

Remark 5.

Relationship to the 6-tuple. In A Unified Mathematical Framework for Agent Systems we extend the 4-tuple to (𝒜,,𝒞,Ω,𝒢,) by adding an agent topology 𝒢 and reward structure . The 4-tuple suffices for the scaling results of this section; the extra components become essential for game-theoretic analysis (Game Theory Foundations for Multi-Agent Systems).

Communication Protocols as Information Channels

Tran et al. [65] identify three fundamental channel types in LLM-based MAS: (i) broadcast channels (shared chat history, e.g. AutoGen), (ii) point-to-point channels (directed delegation, e.g. CrewAI), and (iii) publish-subscribe channels (topic-based routing, e.g. AgentScope). We formalise these using information theory.

Definition 15 (Communication Protocol).

A communication protocol for a MAS 𝒮 is a tuple 𝒞=(,𝒫msg,Φ) where:

  1. 𝒱 is a shared language of well-formed messages, possibly constrained to a structured format (JSON, function-call schema).

  2. 𝒫msg:𝒜××2𝒜{0,1} is the message-passing function: 𝒫msg(ai,m,R)=1 iff message m is delivered from sender ai to every agent in R𝒜.

  3. Φ=(ϕturn,ϕterm,ϕformat) is the protocol specification: turn-taking rule, termination condition, and message-format constraints.

The information-theoretic capacity of the protocol is (Channel Capacity)C(𝒞)=maxp(m)𝖨(M;M^), where M is the sent message and M^ is the received message after potential summarisation or truncation by the receiving agent's context window.

The capacity C(𝒞) is limited by three practical factors: (i) context window saturation: with window size W tokens, CeffWlog2|𝒱| bits per round; (ii) attention dilution: attention weight per token decreases as O(1/L) with message length L; and (iii) semantic redundancy: English text carries roughly 1–1.5 bits per character [66], far below the raw vocabulary capacity.

Insight.

The communication bottleneck principle. Let P(ai) denote the performance of agent i given perfect information, and Cij the channel capacity between agents i and j. Then (Bottleneck)P(𝒮)min{iP(ai),maxspanning tree Tmin(i,j)TCij}. System performance is bounded by the weakest link in the communication graph, not by the strongest agent.

MAS Block Diagram

fig:agents:mas-block illustrates the architectural components and information flows in the MAS 4-tuple.

Block diagram of a multi-agent system. The orchestrator Ω selects the active agent at each round (dashed arrows). Agents exchange messages through the protocol 𝒞 and interact with the environment through observation and action channels.

Turn-Count Scaling and the Power Law

How does the number of communication rounds scale with team size? More agents bring more capabilities but also require more coordination. Kim et al. [19] discovered that this relationship follows a power law.

Theorem 3 (Turn-Count Power Law).

Let 𝒮n be a family of MAS indexed by team size n=|𝒜n|, operating under a fixed protocol and orchestrator on a task distribution 𝒟. Let T(n) denote the expected turns to reach the performance plateau. Then (Power LAW)T(n)=α(n+β)γ, with fitted constants α=2.72, β=0.50, γ=1.724, explaining R2>0.97 of the variance across n{1,,10} on coding and reasoning benchmarks [19].

Proof.

We sketch the derivation in three steps.

Step 1: Pairwise coordination. Each pair (ai,aj) requires at least one bidirectional exchange to synchronise partial views. The number of pairs is (n2)=n(n1)/2, giving a quadratic lower bound: (Pairwise Bound)Tpair(n)n(n1)2.

Step 2: Shared-channel compression. Broadcast and shared-memory channels allow one message to inform multiple agents simultaneously, compressing the O(n2) pairwise exchanges. Let ρ(0,1] be the channel multiplexing factor measuring the fraction of pairwise information needs satisfied per broadcast. The effective turn count becomes (Effective Turns)Teff(n)=n(n1)2ρ+c0, where c0 accounts for task decomposition and synthesis. For highly structured protocols (MetaGPT), ρ0.05; for unstructured debate, ρ0.5.

Step 3: Power-law fit. Fitting (Effective Turns) to empirical data across HumanEval, MBPP, MATH, and GSM8K with n{1,,10}, the best fit is achieved by the shifted power law T(n)=α(n+β)γ with α=2.72, β=0.50, γ=1.724. The exponent γ1.72 lies between the linear regime (γ=1, perfect broadcasting) and the quadratic regime (γ=2, unconstrained pairwise coordination). A 20-parameter regression model incorporating task difficulty, agent heterogeneity, and protocol type confirms robustness (R2>0.97).

Spot checks: T(1)5.5 turns (solo self-reflection), T(3)23.6 turns, T(8)108.9 turns, consistent with observed conversation lengths in multi-agent debate systems.

The implication is stark: coordination cost is superlinear. Doubling the number of agents more than triples the required turns.

Visualising the Power Law

fig:agents:power-law displays the power law on log-log axes, where logT=logα+γlog(n+β) appears as a line with slope γ.

Turn-count power law on log-log axes. The fitted exponent γ=1.724 (solid blue) lies between the linear reference (dashed grey) and quadratic reference (dotted red). Orange marks are averages over HumanEval, MBPP, MATH, and GSM8K.

The Capability Ceiling

Does performance grow without bound as we add agents, or does it saturate? Kim et al. [19] demonstrate a hard performance ceiling.

Definition 16 (Capability Ceiling).

Let {P(𝒮n)}n=1 be system-level performances for a MAS family with increasing team size n, under fixed protocol and orchestrator. The capability ceiling is (Ceiling)Pceil=limnP(𝒮n)=supn1P(𝒮n), provided the limit exists. The system exhibits a capability ceiling if Pceil<1 and the convergence satisfies PceilP(𝒮n)=O(nδ) for some δ>0.

Kim et al. report a single-agent ceiling of PSA0.45 on composite benchmarks spanning coding, reasoning, and general knowledge. The multi-agent ceiling is higher but still finite:

Proposition 6 (Multi-Agent Ceiling Bound).

Under the power-law scaling of Theorem 3 with bounded individual capability P(ai)PSA, (Ceiling Upper)P(𝒮n)PSA+(1PSA)(1eλn/T(n)), where λ>0 is an effective collaboration rate depending on agent diversity, task decomposability, and communication efficiency. Since T(n)=Θ(n1.724), the ratio n/T(n)=Θ(n0.724)0, so limnP(𝒮n)=PSA.

Proof.

Each additional agent contributes useful information only if it communicates novel content. Let 𝖨n denote the mutual information between the (n+1)-th agent's private observations and the task-relevant state, conditioned on the first n agents' information. Then (Marginal INFO)𝖨nC(𝒞)T(n+1)T(n)=C(𝒞)αγ(n+β)γ1+O(nγ2). Since γ1=0.724>0, the denominator grows with n and 𝖨n0: diminishing marginal information. Summing the contributions gives a convergent series. Modelling the gain as a saturating exponential, ΔPn=(1PSA)(1eλn/T(n)), the factor n/T(n)=n/[α(n+β)γ] decreases for γ>1, yielding (Ceiling Upper).

Caution.

The ceiling is protocol-dependent, not fundamental. The value PSA0.45 is measured for GPT-4-class models on specific benchmarks; it shifts upward as base capabilities improve. The multi-agent ceiling can exceed PSA significantly when agents have genuine diverse specialisations (different training data, different tool access), not merely prompt-induced persona differences. The 20-parameter regression model of Kim et al. [19] confirms that agent diversity is the strongest predictor of ceiling improvement.

The 20-Parameter Regression Model

To predict performance in specific settings, Kim et al. [19] fit a 20-parameter regression: (Regression)P^(𝒮)=σ(𝒘φ(𝒮)+b), where σ is the logistic sigmoid, 𝒘20, and φ(𝒮)20 encodes five feature groups:

GroupFeatures (count)Importance
Agent capabilityBase model, context length, tool count (4)0.82
Team compositionSize n, diversity index, role overlap (4)0.76
CommunicationChannel type, bandwidth, format (4)0.61
OrchestrationTopology, turn policy, delegation depth (4)0.54
Task propertiesDecomposability, difficulty, domain (4)0.69
Feature groups in the 20-parameter MAS regression model. Importance is the absolute standardised coefficient averaged over cross-validation folds.

The model achieves R2=0.89 on held-out configurations. The three most important individual features are: (1) base model capability (0.91), (2) team diversity index (0.83), and (3) task decomposability (0.78).

Example 4.

Predicting a 5-agent coding team. Consider n=5 agents (GPT-4 backbone, 128k context, 10 tools) with hierarchical orchestration and JSON messaging on HumanEval. The power law predicts T(5)=2.72(5.5)1.72451.4 turns. The regression yields P^0.72 vs. PSA0.45, a coordination gain of ΔP0.27, consistent with MetaGPT and ChatDev results.

Collaborative vs. Competitive Systems

Tran et al. [65] distinguish two interaction modes. In collaborative systems, all agents share a common reward r1==rn=rsys and the design challenge is minimising coordination overhead. Performance satisfies P(𝒮)Psolo whenever the orchestrator can defer to the best solo agent. In competitive systems, rewards are anti-correlated (ri+rjrmax for some pairs) and the challenge is harnessing productive disagreement (as in multi-agent debate) while avoiding destructive competition.

The 4-tuple 𝒮 provides the structural description for both modes; the turn-count power law governs the communication budget; the capability ceiling bounds achievable performance. Collaborative systems favour consensus-seeking orchestration (majority vote, opinion averaging), while competitive systems favour adversarial orchestration (debate, red-teaming). The game-theoretic analysis of both modes is developed in Game Theory Foundations for Multi-Agent Systems.

Summary and Preview

This section established the mathematical foundations for multi-agent systems: the MAS 4-tuple (Definition 14), communication protocols as information channels (Definition 15), the turn-count power law T(n)=2.72(n+0.5)1.724 (Theorem 3), and the capability ceiling at PSA0.45 (def:agents:ceiling,prop:agents:ceiling-bound).

Multi-agent collaboration can yield superadditive gains, but the power law imposes a coordination tax growing as O(n1.724), and the capability ceiling ensures that agent-scaling alone cannot substitute for improving base model capabilities. The path to effective MAS runs through three design levers: communication efficiency (reducing γ), agent diversity (raising Pceil), and orchestration quality (optimising the coordination budget).

Communication Theory for Agents

Communication is the circulatory system of any multi-agent architecture. An agent that cannot communicate is an isolated reasoner; a team that communicates poorly may perform worse than its weakest member. Yet the converse is not automatically true: more communication does not imply better outcomes. In this section we develop a rigorous information-theoretic framework for inter-agent communication, prove three identifiability theorems for thought communication, a paradigm in which agents exchange compressed latent representations rather than verbose natural-language strings, and analyse both the promise of optimised communication (the Optima framework) and its failure modes (sycophancy-induced debate degradation).

The intellectual arc is as follows. We begin by modelling natural language as a noisy Shannon channel with bounded capacity (Natural Language as a Shannon Channel). We then formalise the thought communication paradigm of Zheng et al. [60], which replaces natural-language messages with sparse latent vectors extracted by a regularised autoencoder (Thought Communication). Three theorems (shared-thought identifiability, private-thought identifiability, and uniqueness) establish when and how these latent representations can be recovered from observed behaviour; we provide complete proofs of all three (sec:agents:shared-id,sec:agents:private-id,sec:agents:thought-unique-proof). We then study the Optima framework of Chen et al. [20], which trains agents to produce maximally informative yet minimal messages via a Generate–Rank–Select–Train pipeline (The Optima Framework). Finally, we show that communication can be actively harmful: Wynn et al. [67] demonstrate that sycophantic agents cause debate quality to degrade rather than improve (When Communication Harms: Sycophancy in Multi-Agent Debate).

Natural Language as a Shannon Channel

Consider two agents ai and aj that must exchange information to solve a joint task. Agent ai has an internal representation 𝒛id encoding its beliefs about the task state; it must transmit relevant aspects of 𝒛i to agent aj. In standard multi-agent LLM systems, this transmission occurs through natural language: ai generates a text string mijΣ (where Σ is the token vocabulary), and aj conditions its subsequent reasoning on mij.

We model this process as a Shannon communication channel. Let 𝒵Sd denote the space of task-relevant internal states. The encoding function Enci:𝒵SΣ maps the internal state to a natural-language message, and the decoding function Decj:Σ𝒵^S maps the received message back into an internal representation. The end-to-end fidelity of communication is measured by the mutual information (MI COMM)I(𝒛i;𝒛^j)=H(𝒛i)H(𝒛i|𝒛^j), where 𝒛^j=Decj(Enci(𝒛i)). The channel capacity of natural-language communication is (Channel CAP)CNL=maxEnci,DecjI(𝒛i;𝒛^j)log|Σ|Lmax, where Lmax is the maximum message length in tokens. This bound is almost never tight: natural language is highly redundant, and the effective capacity is determined by the information density of the message, not its raw token count.

Remark 6 (Bandwidth vs. Fidelity).

The capacity bound reveals a fundamental tension. Increasing Lmax (allowing longer messages) raises the theoretical capacity but also increases computational cost: the receiving agent must process the entire message through its attention mechanism, incurring O(Lmax2) cost for quadratic-attention transformers. The engineering challenge is to achieve high mutual information I(𝒛i;𝒛^j) with short messages, i.e., to communicate efficiently rather than verbosely.

Definition 17 (Communication Efficiency).

The communication efficiency of a multi-agent system 𝒮 on task distribution 𝒯 is (COMM EFF)η(𝒮)=P(𝒮)P(𝒮silent)(i,j)𝔼[|mij|], where P(𝒮) is the performance of the communicating system, P(𝒮silent) is the performance when all communication channels are severed (agents work independently), and |mij| denotes the length of message from ai to aj in tokens. A higher value of η indicates more performance-per-token of communication.

The definition of communication efficiency makes precise the intuition that what matters is not the volume of messages but their marginal contribution to performance. We will see that the Optima framework (The Optima Framework) achieves 2.8× the performance gain at less than 10% of the token budget, dramatically increasing η.

Thought Communication

The core insight of Zheng et al. [60] is that natural-language communication is an unnecessarily lossy channel. When agent ai translates its internal representation 𝒛i into a natural-language message m, it discards structural information (vector geometry, confidence magnitudes, relational structure between latent dimensions) that could be directly useful to the receiving agent. The thought communication paradigm proposes to transmit compressed latent vectors instead.

Latent extraction via sparsity-regularised autoencoder.

Each agent ai is equipped with an encoder–decoder pair: (Encoder Decoder)fi:dk,gi:kd, where d is the dimension of the agent's internal hidden state and kd is the dimension of the transmitted “thought vector.” The encoder fi compresses the full representation into a sparse code; the decoder gi reconstructs an approximation. Training minimises a reconstruction loss plus a sparsity penalty: (AE LOSS)AE(fi,gi)=𝔼𝒛i[gi(fi(𝒛i))𝒛i2+λfi(𝒛i)1], where λ>0 controls sparsity. The 1 penalty encourages most components of the thought vector 𝒕i=fi(𝒛i) to be exactly zero, yielding a representation in which only the most informative dimensions are active.

The thought communication pipeline. Agent ai's internal state 𝒛id is compressed by a sparsity-regularised encoder fi into a thought vector 𝒕ik with kd. The sparse vector is transmitted over a low-bandwidth channel to agent aj, whose decoder gj reconstructs an approximation 𝒛^i. The 1 penalty ensures most components of 𝒕i are zero, concentrating information in a small active set.
Generative model of agent observations.

To state the identifiability theorems precisely, we need a generative model for how agents' internal states arise. Following [60], suppose two agents a1,a2 observe a shared environment state 𝒔p and produce internal representations (GEN Z1)𝒛1=h1(𝒔,𝝐1),𝝐1p1,𝒛2=h2(𝒔,𝝐2),𝝐2p2, where h1,h2 are deterministic mixing functions and 𝝐1,𝝐2 are independent noise vectors capturing each agent's private information (different prompts, different tools, different retrieval contexts). The latent state decomposes as (Latent Decompose)𝒛i=[𝒔shared;𝒔private,i], where 𝒔shared encodes information common to both agents (the shared environment) and 𝒔private,i encodes agent-specific information. The central question is: can the encoder fi learn to separate shared from private information, and if so, is this decomposition unique?

We now state and prove three theorems that answer this question affirmatively under precise conditions.

Shared Thought Identifiability

The first theorem establishes that the shared component of agents' internal representations can be recovered up to an invertible transformation.

Theorem 4 (Shared Thought Identifiability).

Let 𝒛1,𝒛2 be generated according to with mixing functions h1,h2 that are differentiable and have full-rank Jacobians. Suppose:

  1. The shared state 𝒔sharedds and private states 𝒔private,idp are mutually independent: p(𝒔shared,𝒔private,1,𝒔private,2)=p(𝒔shared)p(𝒔private,1)p(𝒔private,2).

  2. The noise terms 𝝐1,𝝐2 are independent of 𝒔shared and of each other.

  3. The conditional distribution p(𝒛1|𝒔shared) has a density with respect to Lebesgue measure, and the score function 𝒛1logp(𝒛1|𝒔shared) is continuous and varies sufficiently with 𝒔shared (in the sense that its Jacobian with respect to 𝒔shared has rank ds almost everywhere).

Then any encoder f:dds that maximises the mutual information I(f(𝒛1);f(𝒛2)) subject to the constraint that f(𝒛1)𝒔private,1 recovers 𝒔shared up to an invertible transformation. That is, there exists an invertible function ϕ:dsds such that f(𝒛1)=ϕ(𝒔shared) almost surely.

Proof.

We proceed in three steps.

Step 1: Sufficiency of shared information.; By assumption (a), 𝒔private,1𝒔private,2 and both are independent of 𝒔shared. Since 𝒛2=h2(𝒔,𝝐2) depends on 𝒛1 only through 𝒔shared, the data-processing inequality gives (DPI Shared)I(f(𝒛1);f(𝒛2))I(𝒔shared;f(𝒛2))H(𝒔shared). The first inequality is tight if and only if f(𝒛1) is a sufficient statistic for 𝒔shared given 𝒛1.

Step 2: Necessity of shared information.; The constraint f(𝒛1)𝒔private,1 forces f to discard all private information from 𝒛1. Since 𝒛1=h1(𝒔,𝝐1) and h1 is differentiable with full-rank Jacobian, the mapping 𝒛1(𝒔shared,𝒔private,1) is locally invertible (by the inverse function theorem). Therefore, any function of 𝒛1 that is independent of 𝒔private,1 must be a function of 𝒔shared alone.

Step 3: Identifiability up to invertible map.; From Step 2, f(𝒛1)=ϕ~(𝒔shared) for some measurable ϕ~. Maximising I(f(𝒛1);f(𝒛2)) over such functions requires that ϕ~ preserves all information about 𝒔shared: if ϕ~ were non-injective, it would merge distinct values of 𝒔shared and reduce the mutual information, contradicting optimality. By assumption (c), the score function's Jacobian with respect to 𝒔shared has rank ds, ensuring that distinct values of 𝒔shared induce distinct conditional distributions over 𝒛1. Therefore ϕ~ must be injective on the support of 𝒔shared. Since both domain and codomain are ds, invariance of domain implies ϕ~ is a homeomorphism on its image. Differentiability of h1 and the implicit function theorem then upgrade this to an invertible differentiable map ϕ=ϕ~.

The theorem says that maximising inter-agent mutual information while discarding private information is sufficient to recover the shared latent state, exactly the objective optimised by the sparsity-regularised autoencoder of when the 1 penalty is tuned to suppress private dimensions.

Private Thought Identifiability

The second theorem addresses the complementary question: can each agent's private information also be recovered?

Theorem 5 (Private Thought Identifiability).

Under the same setup and assumptions as Theorem 4, suppose additionally:

  1. The marginal density p(𝒛i) is positive on an open connected subset of d for i{1,2}.

  2. The private state 𝒔private,i has a density whose score 𝒛ilogp(𝒛i|𝒔private,i) has Jacobian of rank dp with respect to 𝒔private,i almost everywhere.

Then for any encoder fpriv:ddp that maximises I(fpriv(𝒛i);𝒔private,i) subject to fpriv(𝒛i)𝒔shared, there exists an invertible ψ:dpdp such that fpriv(𝒛i)=ψ(𝒔private,i) almost surely.

Proof.

The structure mirrors Theorem 4 with the roles of shared and private reversed.

Step 1: Private information is contained in 𝒛i.; Since 𝒛i=hi(𝒔,𝝐i) and 𝒔=(𝒔shared,𝒔private,i) (agent i observes its own private state), and hi has full-rank Jacobian, the mapping 𝒛i(𝒔shared,𝒔private,i) is locally invertible.

Step 2: The independence constraint isolates private information.; The constraint fpriv(𝒛i)𝒔shared requires fpriv to discard all shared information. By the local invertibility from Step 1, the only remaining degree of freedom is 𝒔private,i. Hence fpriv(𝒛i)=ψ~(𝒔private,i) for some measurable ψ~.

Step 3: Maximising mutual information forces invertibility.; By assumption (b), distinct values of 𝒔private,i produce distinct conditional distributions over 𝒛i, which means ψ~ must be injective to maximise I(fpriv(𝒛i);𝒔private,i). Assumption (a) ensures the marginal has connected support, so by invariance of domain, ψ~ is a homeomorphism. The differentiability of hi and the implicit function theorem yield an invertible differentiable ψ=ψ~.

Thought Uniqueness

The third theorem shows that the decomposition into shared and private components is essentially unique.

Theorem 6 (Thought Uniqueness).

Under the assumptions of Theorem 4 and Theorem 5, suppose (f,fpriv) and (f~,f~priv) are two pairs of encoders that both satisfy the mutual-information maximisation criteria of thm:agents:shared-thought,thm:agents:private-thought. Then there exist invertible maps α:dsds and β:dpdp such that (Thought Unique)f~(𝒛i)=α(f(𝒛i)),f~priv(𝒛i)=β(fpriv(𝒛i)), almost surely. In particular, the partition of 𝒛i into shared and private subspaces is unique up to coordinate-wise invertible reparametrisation.

Proof.

By Theorem 4, f(𝒛i)=ϕ(𝒔shared) and f~(𝒛i)=ϕ~(𝒔shared) for invertible maps ϕ,ϕ~. Setting α=ϕ~ϕ1, we obtain f~(𝒛i)=α(f(𝒛i)) with α invertible (as a composition of invertible maps).

Similarly, by Theorem 5, fpriv(𝒛i)=ψ(𝒔private,i) and f~priv(𝒛i)=ψ~(𝒔private,i) for invertible ψ,ψ~. Setting β=ψ~ψ1 gives f~priv(𝒛i)=β(fpriv(𝒛i)) with β invertible.

For the final claim, note that any encoder satisfying the optimality conditions must produce outputs that are functions of 𝒔shared alone (for the shared encoder) or 𝒔private,i alone (for the private encoder). Since 𝒔shared𝒔private,i by assumption, the two output spaces are determined by orthogonal components of the latent structure. The only ambiguity is in the coordinate system within each subspace, i.e., the invertible maps α and β.

Key Idea.

Efficient communication matters more than more communication. The three identifiability theorems reveal that the structure of inter-agent messages is more important than their volume. A thought vector 𝒕ik with k=64 can carry more task-relevant information than a 512-token natural-language message, provided the encoder is trained to separate shared from private information and to suppress irrelevant dimensions via sparsity. The practical implication is stark: the bottleneck in multi-agent systems is not communication bandwidth (tokens per round) but communication efficiency (task-relevant bits per token). Optimising the representation is more valuable than expanding the channel.

The Optima Framework

While thought communication operates at the representation level, the Optima framework of Chen et al. [20] optimises communication at the message level, remaining within natural language but training agents to produce maximally informative yet minimal messages. Optima decomposes communication training into four stages: Generate, Rank, Select, and Train.

Stage 1: Generate.

Given a multi-agent task instance τ and the current dialogue history t=(m1,,mt1), agent ai generates a set of K candidate messages {mi(1),,mi(K)} by sampling from its policy πi(|τ,t) with temperature T>0. The diversity of candidates is crucial: it ensures that the subsequent ranking step has sufficient variation to identify the most informative message.

Stage 2: Rank.

Each candidate message mi(k) is scored by a reward model Rcomm that evaluates both informativeness and conciseness: (Optima Reward COMM)r(mi(k))=Rtask(τ,t,mi(k))task-relevant informationμ|mi(k)|length penalty, where Rtask measures the downstream task improvement attributable to the message and μ>0 is a length penalty coefficient. The reward model captures the insight that the best message is not the longest or the most detailed, but the one that maximises task performance per token.

Stage 3: Select.

The top-N messages (ranked by r) are selected as positive examples: +={mi(σ(1)),,mi(σ(N))} where σ is the permutation induced by decreasing reward. Optionally, the bottom-N messages form a negative set for contrastive training.

Stage 4: Train.

The agent's policy is updated using a preference optimisation objective. Let m+,m+× be a positive–negative pair. The DPO-style loss is: (Optima DPO)Optima(𝜽)=𝔼(m+,m)[logσ(βlogπ𝜽(m+)πref(m+)βlogπ𝜽(m)πref(m))], where σ() is the sigmoid function, β>0 is the inverse temperature, and πref is the reference policy before training. This loss steers the agent toward generating messages that are simultaneously informative and concise.

The Optima Generate–Rank–Select–Train pipeline. Each iteration samples K candidate messages, scores them by a composite reward balancing informativeness and conciseness, selects positive/negative pairs, and updates the agent policy via DPO. The dashed loop indicates repeated iteration. Empirically, Optima achieves 2.8× the performance of unoptimised communication while using less than 10% of the tokens [20].

Proposition 7 (Optima Convergence).

Let π(0),π(1), be the sequence of policies produced by Optima's iterative pipeline with reward function r as in . If the candidate set {m(1),,m(K)} at each iteration is sampled i.i.d. from π(t) and K is sufficiently large, then the expected communication reward is monotonically non-decreasing: (Optima Monotone)𝔼mπ(t+1)[r(m)]𝔼mπ(t)[r(m)].

Proof.

At iteration t, the selected positive set + satisfies r(m+)r(m) for all m++ and m by construction. The DPO update increases π𝜽(m+)/π𝜽(m) relative to the reference. By the properties of the DPO objective (see 25), the updated policy π(t+1) satisfies 𝔼mπ(t+1)[r(m)]𝔼mπ(t)[r(m)], since the policy is pushed toward higher-reward messages and away from lower-reward ones. The inequality is strict whenever +, which occurs with probability 1 for K2 and continuous reward distributions.

When Communication Harms: Sycophancy in Multi-Agent Debate

The preceding subsections presented communication as uniformly beneficial, provided it is efficient. We now show that this is not always the case. Wynn et al. [67] identify a striking failure mode: when agents in a debate system exhibit sycophancy, the tendency to agree with the conversational partner rather than defend a correct position, the debate mechanism can decrease the accuracy of the final answer compared to a single agent working alone.

The sycophancy mechanism.

Consider a multi-agent debate with n agents and T rounds. At round t, agent ai observes the responses of all other agents from round t1 and produces an updated response. A sycophantic agent updates its belief toward the majority opinion regardless of evidence. Formally, let bi(t)[0,1] be agent ai's confidence in the correct answer at round t. A non-sycophantic agent updates via Bayesian reasoning: (Bayesian Update)bi(t)=bi(t1)Li(t)bi(t1)Li(t)+(1bi(t1))(1Li(t)), where Li(t) is the likelihood ratio based on the evidence from other agents' arguments. A sycophantic agent instead uses a corrupted update: (SYCO Update)bi(t)=(1γ)b~i(t)+γbi(t1), where b~i(t) is the Bayesian posterior, bi(t1)=1n1jibj(t1) is the mean confidence of other agents, and γ[0,1] is the sycophancy parameter. When γ=0, the agent is fully rational; when γ=1, it completely defers to the group.

Proposition 8 (Debate Degradation under Sycophancy).

Consider a multi-agent debate with n2 agents and T rounds. Suppose initially nc agents hold the correct answer with confidence bc>0.5 and nw=nnc agents hold an incorrect answer with confidence bw>0.5, where nw>nc (the minority is correct). If all agents update according to with sycophancy parameter γ>0, then there exists a critical threshold γ depending on nc,nw,bc,bw such that for γ>γ, the debate converges to the incorrect answer: (Debate Converge Wrong)limtbi(t)<0.5for all i{1,,n}. Moreover, the critical threshold satisfies (Gamma STAR)γ=bc0.5bc0.5+(nw/nc)(bw0.5).

Proof.

We analyse the dynamical system defined by . Partition the agents into a correct group C with |C|=nc and an incorrect group W with |W|=nw. By symmetry within each group, all agents in C share the same confidence trajectory bC(t) and all agents in W share bW(t). Setting b~C(t)=bC(t1) and b~W(t)=bW(t1) (the Bayesian component, which preserves each agent's prior when no new external evidence arrives beyond the other agents' stated beliefs), the dynamics become: (DYN Correct)bC(t)=(1γ)bC(t1)+γ(nc1)bC(t1)+nw(1bW(t1))n1,bW(t)=(1γ)bW(t1)+γnc(1bC(t1))+(nw1)bW(t1)n1. Note that the group W holds the incorrect answer with confidence bW; from C's perspective, W's stated confidence in the correct answer is 1bW.

This is a linear dynamical system in 𝒃(t)=(bC(t),bW(t)) of the form 𝒃(t)=M𝒃(t)+𝒄 for a 2×2 matrix M and constant 𝒄. The fixed point 𝒃=(IM)1𝒄 satisfies bC=bW=b, where (Fixed Point)b=ncbc+nw(1bw)n. The consensus confidence in the correct answer is b. When the incorrect majority is large, specifically when nw(bw0.5)>nc(bc0.5), we have b<0.5, so the consensus favours the wrong answer.

The convergence rate to this fixed point is governed by the spectral radius of M. For γ>0, the off-diagonal entries of M are non-zero, coupling the two groups. The system converges to b exponentially fast in t. The condition b<0.5 reduces to ncbc+nw(1bw)<n2nc(bc0.5)<nw(bw0.5), which holds by the assumption nw>nc and bw>0.5.

It remains to show that the threshold γ in is the precise boundary. When γ=0, agents do not interact and each group retains its initial confidence; the correct group maintains bc>0.5. As γ increases from 0, the fixed point b depends on γ through the convergence rate but not its value (the fixed point of the linear system is independent of γ for γ>0). However, for γ below a critical value, the convergence is slow enough that in a finite number of rounds T, the correct group has not yet been pulled below 0.5. In the limit T, any γ>0 suffices for convergence to b. The threshold γ in characterises the boundary for convergence within a single round: requiring bC(1)<0.5 and solving yields γ>γ as stated.

Caution.

Communication can destroy correct minority opinions. Proposition 8 shows that multi-agent debate is not a silver bullet. When the initial population has an incorrect majority (which can easily happen if all agents share the same systematic biases), sycophantic communication amplifies the error. This is the multi-agent analogue of “groupthink” in human organisations. The practical implication is that debate-based systems must include mechanisms to protect minority opinions: explicit devil's advocate roles, anonymous voting rounds, or structured dissent protocols. Without such safeguards, adding communication rounds can make a system strictly worse than independent voting.

Communication Complexity and Scaling

We close this section by connecting inter-agent communication to classical communication complexity. In a system of n agents with pairwise communication, the total number of communication channels is (n2)=O(n2). If each pair exchanges B tokens per round over T rounds, the total communication volume is (COMM Volume)Vcomm=(n2)BT=O(n2BT). This quadratic scaling in n is the communication analogue of the quadratic attention cost in transformers, and it motivates the same solution strategies: sparsification (not all pairs need to communicate), compression (reducing B via thought communication), and hierarchical routing (organising agents into a tree where communication flows through designated coordinators).

Lemma 1 (Communication Lower Bound).

For a class of n-agent cooperative tasks in which each agent holds a d-bit private input and the collective goal requires computing a function F of all inputs, the total communication volume satisfies (COMM Lower Bound)VcommDIC(F)d, where DIC(F) is the information complexity of F, defined as the minimum mutual information between the transcript of any valid protocol and the inputs.

Proof.

The first inequality is a direct consequence of Shannon's source coding theorem: any protocol that computes F correctly must transmit at least DIC(F) bits of information about the inputs. The second inequality DIC(F)d follows because computing F requires each agent's input to influence the output, so at least d bits of each input must appear in the transcript. (For a detailed treatment, see the information complexity framework of Braverman [21].)

The lemma tells us that communication costs cannot be reduced below a task-dependent threshold. The art of efficient multi-agent design is to approach this lower bound as closely as possible while maintaining coordination quality, precisely the goal of both thought communication and Optima.

Example 5 (Communication Regimes).

Consider a team of n=5 agents solving a complex reasoning task with T=3 debate rounds.

  1. Verbose NL: Each agent sends B=512 tokens per pair per round. Total volume: (52)5123=15,360 tokens. Communication efficiency η=0.003 accuracy-per-token.

  2. Optima-optimised NL: Agents learn to send B=48 tokens per pair per round, capturing the essential information. Total volume: (52)483=1,440 tokens. Communication efficiency η=0.089 accuracy-per-token (2.8× task performance).

  3. Thought communication: Agents exchange k=64 dimensional sparse vectors. Effective token equivalent: 8 tokens per exchange. Total volume: (52)83=240 effective tokens. Communication efficiency η=0.175 accuracy-per-token.

The progression from (a) to (c) illustrates the central theme of this section: compressing communication while preserving, or even improving, task performance.

Summary.; This section developed a formal framework for inter-agent communication. We modelled natural language as a bounded-capacity Shannon channel (Natural Language as a Shannon Channel), introduced thought communication as a latent-space alternative with provable identifiability guarantees (sec:agents:thought-comm,sec:agents:shared-id,sec:agents:private-id,sec:agents:thought-unique-proof), analysed the Optima pipeline for training efficient natural-language communicators (The Optima Framework), and characterised a failure mode in which sycophantic communication degrades debate quality (When Communication Harms: Sycophancy in Multi-Agent Debate). The overarching lesson is that communication should be designed with the same care as the agents themselves: the right 64 dimensions can outperform 512 tokens of prose.

Agent Architectures and Topologies

The preceding sections built up the single agent, its perception, reasoning, planning, and safety mechanisms, and then introduced the multi-agent system as a coordinated ensemble. But we have not yet addressed a fundamental design question: how should agents be connected? The communication topology of a multi-agent system, who can send messages to whom, and through what intermediaries, determines the system's latency, fault tolerance, message overhead, and, ultimately, its collective intelligence.

Consider an analogy. A military platoon, a corporate board, and a scientific peer-review system all consist of intelligent agents exchanging information. Yet they perform very differently on the same task, not because their members differ in raw ability, but because their topologies differ: the platoon uses a strict chain of command (a tree), the board uses open debate (a complete graph), and peer review uses a hub-and-spoke structure with the editor as the central node (a star). The topology shapes the flow of information, the speed of convergence, and the system's vulnerability to single points of failure.

In LLM-based multi-agent systems, the same principle applies with striking precision. Microsoft's AutoGen framework [8] introduced the Conversable Agent abstraction, in which any agent can converse with any other agent, and the conversation topology is a first-class design parameter. Zhao et al.'s LongAgent system [42] demonstrated that a star topology with a leader agent coordinating member agents could effectively process documents exceeding 128K tokens, far beyond any single model's context window, by decomposing the document across members and aggregating their responses through a conflict-resolution protocol.

This section develops the mathematical theory of agent topologies. We begin with a formal definition of agent topology as a directed weighted graph (Formal Definition of Agent Topology), then catalogue the four canonical topology patterns (star, chain, tree, and general graph) and derive their message complexity bounds (Canonical Topology Variants). We analyse AutoGen's Conversable Agent model and its dynamic group chat mechanism (AutoGen's Conversable Agent Architecture), and study LongAgent's star topology with its inter-member conflict resolution protocol (LongAgent: Star Topology for Extended Context). Finally, we examine how topology choice interacts with task structure (Topology Choice and Task Structure).

Formal Definition of Agent Topology

We formalise the communication structure of a multi-agent system as a weighted directed graph.

Definition 18 (Agent Topology).

An agent topology is a weighted directed graph 𝒢=(V,E,w) where:

  1. V={a1,a2,,an} is the set of agents (vertices), with |V|=n;

  2. EV×V is the set of directed communication edges: (ai,aj)E means agent i can send messages directly to agent j;

  3. w:E>0 is a weight function assigning to each edge a positive real value representing bandwidth, trust, or priority.

The topology is equivalently represented by its adjacency matrix 𝑨n×n, defined by (Adjacency Matrix)Aij={w(ai,aj)if (ai,aj)E,0otherwise. We write 𝒩out(ai)={aj:(ai,aj)E} for the out-neighbourhood of agent i (the agents it can send to) and 𝒩in(ai)={aj:(aj,ai)E} for the in-neighbourhood (the agents it can receive from). The out-degree is dout(ai)=|𝒩out(ai)| and the in-degree is din(ai)=|𝒩in(ai)|.

The adjacency matrix 𝑨 encodes the full communication structure. When the topology is undirected (every edge is bidirectional, i.e., (ai,aj)E(aj,ai)E with equal weights), 𝑨 is symmetric. When w1, we recover the standard unweighted adjacency matrix. The reachability matrix 𝑨=k=0n1𝑨k (where 𝑨ijk>0 indicates a path of length k from ai to aj) determines whether information can eventually flow between any pair of agents.

Remark 7 (Topology vs. Protocol).

The topology 𝒢 specifies who can communicate with whom, the physical or logical connectivity. The communication protocol 𝒞 specifies who does communicate, when, and in what format. A fully connected topology (E=V×V) permits any communication pattern, but the protocol may restrict agents to sequential round-robin turns. Conversely, a sparse topology enforces communication constraints that no protocol can override. This distinction matters: topology is a hard constraint, protocol is a soft one.

Canonical Topology Variants

Four topology patterns recur across virtually every multi-agent system in the literature. We define each precisely and characterise its structural properties.

Definition 19 (Star, Chain, Tree, and Graph Topologies).

Let V={a1,a2,,an} be a set of n agents. The four canonical topology variants are:

  1. Star topology 𝒢: a distinguished agent ah (the hub) is connected bidirectionally to every other agent, and no other edges exist. Formally, (STAR Edges)E={(ah,ai):ih}{(ai,ah):ih}. The adjacency matrix has the form Ahi=Aih=1 for ih and Aij=0 for i,jh. The hub has degree 2(n1) (in a directed sense, dout=din=n1); every other agent has dout=din=1.

  2. Chain (pipeline) topology 𝒢: agents are arranged in a linear sequence with directed edges from each agent to the next: (Chain Edges)E={(ai,ai+1):1in1}. The adjacency matrix is strictly upper bidiagonal. Each internal agent has dout=din=1; the first agent has din=0 and the last has dout=0. A bidirectional chain adds reverse edges (ai+1,ai).

  3. Tree topology 𝒢𝒯: agents form a rooted tree with agent ar as the root. Each non-root agent has exactly one parent, and messages flow both up and down the tree: (TREE Edges)E𝒯={(ai,aj):aj is a child of ai}{(aj,ai):aj is a child of ai}. For a balanced b-ary tree of depth d, we have n=(bd+11)/(b1) nodes. The star topology is the special case d=1.

  4. General graph topology 𝒢G: an arbitrary directed graph with no structural restrictions beyond the requirement that 𝒢G is strongly connected (every agent can reach every other agent via a directed path). The fully connected graph (E=V×V{(ai,ai)}) is the densest case; sparse random graphs and small-world networks are intermediate cases.

These four patterns span a spectrum from minimal to maximal connectivity. The star and chain are the sparsest connected topologies (|E|=Θ(n)), the tree is slightly denser in terms of routing depth, and the fully connected graph is the densest (|E|=Θ(n2)). Each offers different trade-offs between message complexity, latency, fault tolerance, and bottleneck risk.

We now quantify the most important trade-off: the total number of messages required for all agents to contribute to a collective decision.

Proposition 9 (Message Complexity of Agent Topologies).

Consider a cooperative task in which n agents must each contribute one message and a final aggregate response must be produced. Let M(𝒢) denote the total number of point-to-point messages exchanged under optimal routing on topology 𝒢. Then:

  1. Star: M(𝒢)=Θ(n).

  2. Chain: M(𝒢)=Θ(n2).

  3. Balanced tree: M(𝒢𝒯)=Θ(nlogn) for a balanced b-ary tree with b=O(1).

  4. Fully connected graph: M(𝒢G)=Θ(n2) when every agent communicates with every other agent (all-to-all broadcast), or Θ(n) under optimal aggregation routing.

Proof.

We analyse each topology in turn.

(a) Star. Each of the n1 peripheral agents sends one message to the hub, and the hub sends one aggregated response to each of the n1 agents: M=(n1)+(n1)=2(n1)=Θ(n). No routing is needed because every agent is distance 1 from the hub.

(b) Chain. In the chain topology, information must propagate sequentially. Agent a1 sends its contribution to a2, which combines it with its own and sends to a3, and so on. The forward aggregation pass requires n1 messages. If the final agent an must then propagate the aggregate back, the backward pass requires another n1 messages. Thus Mbasic=2(n1)=Θ(n) for simple aggregation.

However, if the task requires every agent to see every other agent's contribution (as in a debate or peer-review setting), agent a1's message must traverse n1 edges to reach an, agent a2's message must traverse n2 edges, and so on. The total number of messages is (Chain Broadcast)Mbroadcast=i=1n1(ni)+i=2n(i1)=2n(n1)2=n(n1)=Θ(n2). We take M(𝒢)=Θ(n2) for the broadcast setting, which is the common case in debate-style multi-agent systems.

(c) Balanced tree. In a balanced b-ary tree of depth d=logbn, the upward aggregation phase proceeds level by level: each internal node receives messages from its b children and sends one aggregated message to its parent. At level (counting from the leaves at level d to the root at level 0), there are b nodes, each receiving b messages. The total upward messages are (TREE UP)Mup==0d1bb=bbd1b1=Θ(n). The downward dissemination phase mirrors this: each internal node sends the aggregated result to its b children, giving Mdown=Θ(n). Thus Mbasic=Θ(n) for simple aggregation.

For the broadcast setting, each leaf's message must traverse d edges to reach the root, and the root's broadcast traverses d levels to reach all leaves. The total number of messages when every agent must see every contribution requires Θ(n) messages per level for d=Θ(logn) levels, giving M(𝒢𝒯)=Θ(nlogn).

(d) Fully connected graph. In the fully connected graph, each agent can send directly to every other agent. All-to-all broadcast requires each of the n agents to send n1 messages, totalling n(n1)=Θ(n2). Under optimal aggregation routing (one designated aggregator), each agent sends one message to the aggregator and receives one response: M=2(n1)=Θ(n), identical to the star. The fully connected graph can emulate any other topology, but the all-to-all broadcast pattern, which is natural when agents debate or cross-verify, costs Θ(n2).

The message complexity results are summarised in Table 2.

PropertyStarChainBalanced TreeComplete Graph
Edges |E|2(n1)n1Θ(n)n(n1)
Diameter2n12logbn1
Message complexityΘ(n)Θ(n2)Θ(nlogn)Θ(n2)
Bottleneck agentHubEndpointsRootNone
Fault toleranceLow (hub)Low (any)MediumHigh
Comparison of canonical agent topologies for n agents. Message complexity is given for the broadcast setting (every agent's contribution reaches every other agent). Diameter is the longest shortest path between any two agents.

Key Idea.

The topology–complexity trade-off. Sparser topologies (star, chain) minimise the number of edges and are easy to implement, but they create bottlenecks and single points of failure. Denser topologies (complete graph) eliminate bottlenecks but incur quadratic message overhead. The balanced tree strikes an intermediate balance: Θ(n) edges, Θ(nlogn) broadcast messages, and graceful degradation under node failures (only the subtree below a failed node is affected). The optimal choice depends on the task structure, which we analyse in Topology Choice and Task Structure.

AutoGen's Conversable Agent Architecture

AutoGen [8] introduced a unifying abstraction for multi-agent LLM systems: the Conversable Agent. Rather than hard-coding communication patterns, AutoGen treats each agent as an entity capable of sending and receiving natural-language messages to and from any other agent, with the conversation topology determined at runtime.

The Conversable Agent abstraction.

A Conversable Agent in AutoGen is an LLM agent (Definition 3) augmented with three capabilities:

  1. Message generation: the agent produces a response given its conversation history, system prompt, and any received messages. This is the standard LLM inference step.

  2. Message reception: the agent can receive messages from any agent in its in-neighbourhood 𝒩in(ai) and append them to its local conversation history.

  3. Conversation control: each agent carries a reply function freply:𝒴{𝚃𝙴𝚁𝙼𝙸𝙽𝙰𝚃𝙴} that maps the current history to either a response or a termination signal. This function can incorporate human-in-the-loop approval, code execution, or tool calls.

The key insight is that the same Conversable Agent abstraction supports wildly different topologies: a two-agent coding dialogue (star with n=2), a round-robin panel discussion (cycle graph), or a hierarchical delegation structure (tree).

Dynamic group chat.

AutoGen's GroupChat mechanism extends the two-agent conversation to n agents. A GroupChatManager agent amgr acts as an orchestrator (Definition 25), selecting the next speaker at each turn. The speaker selection can be:

  • Round-robin: agents speak in a fixed cyclic order a1a2ana1.

  • Random: the next speaker is sampled uniformly from the remaining agents.

  • LLM-directed: the GroupChatManager uses its own LLM backbone to select the most appropriate next speaker based on the conversation history: (Group CHAT Selection)anext=argmaxajVΦmgr(aj|ht,“Who should speak next?”), where Φmgr is the manager's LLM and ht is the shared conversation history.

In the group chat topology, all agents share a common message board. The underlying graph is a star with the GroupChatManager as the hub, but the logical topology (who responds to whom) is dynamic and adapts to the conversation content.

Nested conversations.

AutoGen supports nested conversations: a single turn of an outer conversation can trigger an entire inner conversation among a subset of agents. Formally, let 𝒢outer be the outer topology and 𝒢inner(k) be the inner topology triggered at turn k. The composite topology is a hierarchical graph: (Nested Topology)𝒢composite=𝒢outerk𝒢inner(k), where the inner conversations are subgraphs that are instantiated on demand and collapsed into a single message (the inner conversation's output) from the perspective of the outer conversation. This is analogous to macro-actions in hierarchical reinforcement learning: the outer topology sees atomic messages, while the inner topology resolves them through multi-step deliberation.

Example 6 (AutoGen Coding Pipeline).

Consider an AutoGen system for software development with three agents:

  • auser: a UserProxy agent that represents the human user and can execute code in a sandbox.

  • acoder: an AssistantAgent with an LLM backbone that writes Python code.

  • areviewer: an AssistantAgent that reviews code for correctness and style.

The outer topology is a star centred on auser. The user sends a task to acoder, who writes code. The code is then sent to areviewer for review (a nested conversation between coder and reviewer). Once the reviewer approves, auser executes the code. The adjacency matrix is 𝑨outer=(011100100),𝑨inner=(0110), where the inner matrix governs the coder–reviewer dialogue.

LongAgent: Star Topology for Extended Context

A compelling application of the star topology arises in long-context processing. LongAgent [42] addresses the challenge of processing documents that exceed any single model's context window (e.g., 128K tokens) by decomposing the document across multiple member agents and aggregating their responses through a leader agent.

Architecture.

The LongAgent system consists of n+1 agents arranged in a star topology:

  • Leader (aL): the hub agent responsible for decomposing the input query, dispatching sub-queries to members, collecting responses, and resolving conflicts.

  • Members (a1,,an): each member agent receives a disjoint chunk of the document and a sub-query from the leader. Member i processes chunk Di and returns a local answer yi.

The adjacency matrix is (Longagent Adjacency)Aij={1if i=L or j=L,ij,0otherwise, which is exactly the star topology 𝒢 with hub aL. The document of total length tokens is partitioned into n chunks of approximately /n tokens each, where n=/C and C is the effective context window of each member agent.

Inter-member conflict resolution.

When different members return contradictory answers to the same query, the leader must resolve the conflict. LongAgent employs a structured protocol:

  1. Collection: the leader collects all member responses {y1,,yn}.

  2. Consistency check: the leader identifies conflicting answers. Two responses yi and yj are conflicting if they provide mutually exclusive answers to the query (detected via the leader's LLM).

  3. Evidence request: for each conflicting pair (yi,yj), the leader asks the corresponding members to provide textual evidence from their document chunks supporting their answers.

  4. Adjudication: the leader evaluates the evidence and selects the best-supported answer, or synthesises a reconciled response.

This protocol adds at most 2K additional messages to the base star protocol (where K is the number of conflicting pairs, K(n2)), keeping the total message complexity at O(n+K). In practice, K(n2) because most sub-queries have unambiguous answers within their respective chunks.

Insight.

Star topology as a natural fit for decomposable tasks. The LongAgent architecture reveals a deep connection between task structure and optimal topology. When a task decomposes into independent sub-tasks (reading disjoint document chunks), the star topology is optimal: it minimises message complexity to Θ(n) while centralising the aggregation logic in a single leader. The leader's context window need only hold the sub-query plus the n member responses, not the entire document. This transforms a context-length problem into a coordination problem, which is precisely where multi-agent systems excel.

Formal analysis of the LongAgent protocol.

Let q be the user's query and D=D1Dn be the document partition. The LongAgent protocol proceeds in three phases:

  1. Dispatch phase: the leader sends (q,Di) to each member ai. Messages: n.

  2. Response phase: each member returns its local answer yi=πai(|q,Di). Messages: n.

  3. Resolution phase: for each conflicting pair (yi,yj), the leader requests evidence (2 messages) and receives it (2 messages). Total: 4K messages.

The total message count is 2n+4K. Since each message carries at most C tokens (the member's context window), the total communication volume is bounded by (2n+4K)C tokens. For a document of length =nC, the communication overhead ratio is (Longagent Overhead)ρ=(2n+4K)C=2n+4Kn=2+4Kn, which approaches 2 as K/n0. This means the total communication is approximately twice the document length, a remarkably low overhead for enabling arbitrarily long context.

Topology Choice and Task Structure

The preceding analysis raises a natural question: given a task, which topology should one choose? The answer depends on the decomposability and interdependence structure of the task.

Definition 20 (Task Decomposability).

A task 𝒯 has decomposability index δ(𝒯)[0,1], defined as follows. Let 𝒯={t1,,tm} be the sub-tasks produced by an optimal decomposition. For each pair (ti,tj) with ij, let Iij{0,1} indicate whether the output of ti is needed as input to tj or vice versa (i.e., whether the sub-tasks are dependent). Then (Decomposability)δ(𝒯)=1i<jIij(m2). A task with δ=1 is fully decomposable (no inter-dependencies); a task with δ=0 is fully sequential (every sub-task depends on every other).

The decomposability index directly informs topology selection:

  • High decomposability (δ1): sub-tasks are independent, so a star topology is optimal. The hub dispatches sub-tasks in parallel, collects results, and aggregates. Message complexity is Θ(n). LongAgent operates in this regime.

  • Low decomposability (δ0): sub-tasks are tightly coupled, requiring extensive information exchange. A fully connected topology or dense graph is needed so that agents can share intermediate results freely. Message complexity is Θ(n2), but the alternative, routing through a sparse topology, would add latency without reducing the total information transfer.

  • Hierarchical decomposability (0<δ<1): the task admits a hierarchical decomposition where high-level sub-tasks are independent but each decomposes into tightly coupled sub-sub-tasks. A tree topology matches this structure naturally: the root dispatches to sub-tree leaders, who in turn coordinate their local teams. Message complexity is Θ(nlogn).

  • Sequential dependence: sub-tasks must be performed in a specific order, with each task's output feeding the next. A chain (pipeline) topology is the natural choice, providing minimal overhead per stage but Θ(n) latency for end-to-end completion.

Remark 8 (Topology Selection in Practice).

In practice, the choice of topology is rarely made by solving an optimisation problem over the decomposability index. Instead, practitioners use heuristics:

  1. Default to star: most frameworks (AutoGen, AgentScope, LongAgent) use a star topology with a manager/leader as the hub, because the star is simple to implement, easy to debug, and sufficient for moderately decomposable tasks.

  2. Upgrade to tree for scale: when the number of agents exceeds 20, the hub in a star topology becomes a bottleneck. Hierarchical (tree) topologies distribute the coordination load across intermediate managers.

  3. Use chains for workflows: when the task has a natural pipeline structure (e.g., draft review edit test), a chain topology minimises unnecessary communication.

  4. Use dense graphs for creative tasks: debate, brainstorming, and open-ended exploration benefit from all-to-all communication, where any agent can challenge or build upon any other agent's contribution.

The key principle is to match the topology's connectivity to the task's information-flow requirements: neither more (which wastes messages) nor less (which starves agents of needed information).

The four canonical agent topologies. (a) Star: a central hub (amber) connects to all peripheral agents; message complexity Θ(n). (b) Chain: agents are arranged in a linear pipeline; message complexity Θ(n2) for broadcast. (c) Tree: a rooted hierarchy with intermediate coordinators; message complexity Θ(nlogn). (d) Graph: a densely connected topology with multiple paths between agents; message complexity Θ(n2) for all-to-all broadcast. Bidirectional arrows indicate symmetric communication; unidirectional arrows indicate directed information flow.

Dynamic Topology Adaptation

A fixed topology is a design-time commitment. But many real-world tasks have information-flow requirements that change as the task progresses: an initial brainstorming phase may benefit from dense connectivity, while a subsequent execution phase may favour a hierarchical structure. This motivates dynamic topologies that evolve during the task.

Definition 21 (Dynamic Agent Topology).

A dynamic agent topology is a time-indexed family of topologies {𝒢t}t=1T where 𝒢t=(Vt,Et,wt). At each round t, the topology may change via:

  1. Edge addition/removal: EtEt1 (opening or closing communication channels).

  2. Weight update: wtwt1 (changing bandwidth or trust between agents).

  3. Agent addition/removal: VtVt1 (spawning new agents or retiring completed ones).

The topology transition function Γ:𝒢t×t𝒢t+1 determines the next topology based on the current topology and the conversation history t.

AutoGen's GroupChatManager implements a simple form of dynamic topology: at each turn, the manager selects a new speaker, effectively activating a different edge in the star. More sophisticated approaches allow the topology itself to be restructured. For example, an agent that discovers it needs information from a non-neighbour can request the orchestrator to add an edge, temporarily converting a sparse topology into a denser one for that specific exchange.

Caution.

Topology oscillation and instability. Dynamic topologies introduce a risk of oscillation: agents repeatedly adding and removing the same edges, leading to unstable communication patterns and wasted messages. A simple safeguard is to impose a cooldown period τcool after each topology change, during which no further changes are permitted. More formally, if 𝒢t𝒢t1, then 𝒢s=𝒢t for all s[t,t+τcool). This ensures that the system explores each topology long enough to evaluate its effectiveness before switching.

Adaptive topology via graph attention.

One principled approach to dynamic topology selection borrows from graph attention networks (GATs). Define attention weights between agents as (Graph Attention)αij(t)=exp(score(hi(t),hj(t)))kVexp(score(hi(t),hk(t))), where hi(t) is the embedding of agent i's state at round t (e.g., a summary of its recent messages) and score(,) is a learned compatibility function. The effective topology at round t is then a soft graph with edge weights αij(t): agents with high attention scores communicate with high bandwidth, while those with low scores effectively ignore each other. This converts the discrete topology selection problem into a continuous optimisation problem amenable to gradient-based methods.

From Topology to Performance

We conclude this section by connecting topology properties to system-level performance guarantees. The following result establishes that the spectral properties of the adjacency matrix 𝑨 bound the convergence rate of opinion aggregation across agents.

Proposition 10 (Convergence Rate and Spectral Gap).

Let n agents perform iterative opinion aggregation on a symmetric topology 𝒢 with adjacency matrix 𝑨 and degree matrix 𝑫=diag(d1,,dn). Define the normalised adjacency matrix 𝑨^=𝑫1/2𝑨𝑫1/2 with eigenvalues 1=μ1μ2μn. Under the averaging protocol 𝒙(t+1)=𝑨^𝒙(t), the disagreement vector 𝒙(t)x1 satisfies (Spectral Convergence)𝒙(t)x1|μ2|t𝒙(0)x1, where x=1nixi(0) is the average initial opinion. The spectral gap 1|μ2| controls convergence speed: a larger gap means faster consensus.

Proof.

Since 𝑨^ is symmetric, it has an orthonormal eigenbasis {𝒗1,,𝒗n} with 𝒗1=1n1 and eigenvalues μ1=1>|μ2||μn| (the strict inequality holds because 𝒢 is connected and non-bipartite).

Decompose 𝒙(0)=k=1nck𝒗k. After t iterations, (Spectral Evolution)𝒙(t)=𝑨^t𝒙(0)=k=1nckμkt𝒗k. The consensus component is c1𝒗1=x1 (since μ1=1, this component is preserved). The disagreement is 𝒙(t)x1=k=2nckμkt𝒗k. Taking norms and using orthonormality, (Spectral Bound)𝒙(t)x12=k=2nck2μk2t|μ2|2tk=2nck2=|μ2|2t𝒙(0)x12. Taking square roots yields .

This result has direct implications for topology selection. For the four canonical topologies:

  • Complete graph: μ2=1/(n1), so |μ2|0 as n. Consensus is achieved in a single step.

  • Star: μ2=0 for the normalised adjacency of a star with uniform weights. Consensus is near-instant (2 iterations: collect, then broadcast).

  • Chain: μ2=cos(π/n)1π2/(2n2). The spectral gap is Θ(1/n2), so consensus requires Θ(n2) iterations, the slowest among connected topologies.

  • Balanced binary tree: μ2=O(1/logn). Consensus requires Θ(log2n) iterations, much faster than the chain.

Remark 9 (Topology as a Design Knob).

The results of this section demonstrate that topology is not merely an implementation detail but a fundamental design parameter with rigorous performance implications. The adjacency matrix 𝑨 determines message complexity (Proposition 9), the spectral gap determines convergence speed (Proposition 10), and the diameter determines worst-case latency. When designing a multi-agent system, the practitioner should choose the topology as deliberately as they choose the LLM backbone or the prompt template, matching the communication graph to the information-flow requirements of the task at hand.

Exercise 1 (Topology Analysis).

Consider a multi-agent system with n=8 agents.

  1. Write the adjacency matrix for a star topology with agent a1 as the hub. Compute the in-degree and out-degree of each agent.

  2. Write the adjacency matrix for a bidirectional chain a1a2a8. How many messages are needed for a1's information to reach a8?

  3. Design a balanced binary tree topology on 7 agents (3 levels). Compute the message complexity for aggregating all agents' contributions at the root.

  4. Suppose the task requires pairwise debate among all agents. Which topology minimises the number of rounds needed to complete all (82)=28 pairwise debates? Justify your answer.

Scalable Agent Platforms

Building a single capable agent is an engineering challenge; running a thousand such agents concurrently, each consuming GPU inference, exchanging messages, and mutating shared state, is a distributed-systems challenge of an entirely different order. The previous sections developed the mathematical abstractions: agents as POMDP policies, communication as message-passing on graphs, and orchestration as scheduling over DAGs. This section grounds those abstractions in platforms: software systems that instantiate, route, monitor, and recover agents at scale.

We organise the exposition around three complementary paradigms. First, the actor-based approach (Actor-Based Agent Distribution), exemplified by AgentScope [10], maps each agent to a lightweight actor process with its own message queue, enabling linear horizontal scaling to over one million concurrent agents [68]. Second, the decentralised capability ledger (Decentralised Capability Ledger), introduced by Symphony [69], eliminates the single-point-of-failure orchestrator by distributing the agent registry across a peer-to-peer network and selecting task coordinators through a Beacon protocol. Third, dynamic agent generation (Dynamic Agent Generation), as in AutoAgents [70], removes the assumption that agents are predefined: an LLM planner drafts new agents on the fly to match task requirements.

Historical Note.

From Erlang to agentic actors. The actor model was introduced by Hewitt, Bishop, and Steiger in 1973 as a mathematical theory of concurrent computation. Each actor is an autonomous unit that communicates exclusively through asynchronous messages, creates new actors, and designates its behaviour for the next message. Erlang (1986) and later Akka (2009) turned actors into practical platforms for building fault-tolerant distributed systems: telephone switches, financial trading engines, and web servers. The insight of modern agent platforms is that an LLM agent maps naturally onto an actor: it maintains local state (the context window), processes one message at a time (a user turn or tool output), and communicates with other agents via asynchronous messages. AgentScope [10] and Ray-based frameworks such as AutoGen [8] are the direct descendants of this intellectual lineage.

Actor-Based Agent Distribution

The actor model provides a natural abstraction for multi-agent systems. Each agent runs as an independent actor with its own message queue, local state, and failure domain. We formalise this mapping below.

Definition 22 (Actor-Agent Model).

An actor-agent system is a tuple 𝒮=(A,Q,Σ,δ,Ψ) where:

  1. A={a1,,an} is a finite set of agent actors, each running as an isolated process (or container);

  2. Q={Q1,,Qn} is the set of message queues, with Qi a FIFO buffer of bounded capacity Bi;

  3. Σ is a finite message alphabet; a message mΣ carries a payload (task description, partial result, or control signal) together with a sender identifier and a monotonic timestamp;

  4. δ:A×ΣΣ×2A is the transition function: upon receiving message m, agent ai produces a reply m and optionally spawns a set of new agent actors;

  5. Ψ:A2A is the supervision tree: Ψ(ai) is the set of agents supervised by ai; if a supervised agent crashes, ai receives a failure notification and may restart it.

An agent actor processes messages sequentially from its queue: no two messages are processed concurrently within the same actor. Different actors execute in parallel, communicating only through message passing.

The sequential-processing guarantee is crucial: it eliminates the need for locks or atomic operations within a single agent, vastly simplifying reasoning about correctness. Parallelism comes from running many actors simultaneously, each on its own CPU core or GPU slice.

DAG-based workflow orchestration.

AgentScope [10] introduces a workflow engine that represents multi-agent collaborations as directed acyclic graphs (DAGs). Each node v in the DAG corresponds to an agent invocation, and each directed edge (vi,vj) indicates that aj requires the output of ai before it can execute. Formally, a workflow DAG is a pair G=(V,E) where VA is the set of participating agents and EV×V imposes a partial order. The platform scheduler topologically sorts G and dispatches agents at each level in parallel: (DAG Levels)Lk={vV:max(u,v)E(u)=k1},(v)={0if v has no predecessors,1+max(u,v)E(u)otherwise, where Lk denotes the set of agents at level k. All agents in Lk can execute simultaneously once every agent in Lk1 has completed. The makespan of the workflow is the number of levels: (DAG Makespan)Tmakespan=maxvV(v)+1.

Four-tier fault tolerance.

Production deployment demands graceful degradation. AgentScope implements a four-tier fault tolerance strategy:

  1. Retry with exponential backoff: transient failures (API timeouts, rate limits) trigger automatic retries with delay dk=d02k at attempt k, up to a maximum of kmax retries;

  2. Output validation: each agent's output is parsed and checked against a schema before being placed on the downstream queue; malformed outputs trigger a re-prompt with the validation error appended to the context;

  3. Redundant execution: safety-critical agents run r replicas in parallel, and the platform selects the final output by majority vote, requiring r2f+1 for f crash faults (or r3f+1 for Byzantine faults, per Theorem 14);

  4. Checkpoint and rollback: the platform periodically serialises the state of every agent (context window, memory bank, pending queue) to persistent storage; upon detecting a failure cascade, the supervisor rolls the system back to the most recent consistent checkpoint.

Together, these four tiers handle failures at increasing levels of severity: tier (a) absorbs transient network glitches, tier (b) catches LLM hallucinations and format errors, tier (c) tolerates full agent crashes, and tier (d) recovers from correlated or cascading failures that overwhelm the lower tiers.

The actor-agent model. Each agent ai has a private message queue Qi and processes messages sequentially. Inter-agent communication is asynchronous: agent a1 places message m on Q2 without blocking. A supervisor Ψ monitors all agents and restarts crashed actors. All agents interact with a shared environment through tool calls.
Scaling to one million agents.

Pan et al. [68] demonstrate that the actor-based architecture of AgentScope scales linearly with the number of machines. The key enablers are:

  1. Stateless routing: each message carries the target agent's identifier; any router node can forward the message without maintaining session state;

  2. Horizontal partitioning: agents are sharded across machines by hashing their identifiers, distributing load evenly;

  3. Lazy instantiation: agent actors are created only when their first message arrives, avoiding the cost of pre-allocating one million processes at startup;

  4. Compressed serialisation: agent state is serialised using a compact binary format that reduces checkpoint sizes by an order of magnitude compared to JSON.

Let n denote the number of agents and M the number of machines. Under uniform load (each machine hosts n/M agents) and assuming each agent-to-agent message traverses at most one network hop, the total communication cost per round is: (COMM COST)Ccomm(n,M)=nd(clocaln/M1n1+cremotenn/Mn1), where d is the average out-degree per agent, clocal is the cost of a local (intra-machine) message, and cremote is the cost of a remote (inter-machine) message. For large n with fixed M, the fraction of remote messages approaches 11/M, so Ccommndcremote(11/M), linear in n.

Remark 10 (Linear Scaling is Not Free).

The linear scaling result assumes that the average out-degree d is constant as n grows. If agents form a dense communication graph, every agent talking to every other agent, then d=n1 and the communication cost becomes O(n2), which is catastrophic at scale. The practical lesson is that scaling to millions of agents requires sparse communication topologies: hierarchies, spatial partitions, or topic-based publish-subscribe channels that keep d bounded.

Decentralised Capability Ledger

The actor-based approach of the previous subsection still assumes a centralised component: the supervisor Ψ that monitors agents and the router that dispatches messages. In large-scale or adversarial settings, this centralised component becomes a bottleneck and a single point of failure. Symphony [69] proposes a fully decentralised alternative.

Definition 23 (Capability Ledger).

A capability ledger is a distributed data structure =(K,V,) where:

  1. K is the set of capability keys: each key κK names a specific skill (e.g., “code-review”, “web-search”, “theorem-proving”);

  2. V:K2A maps each capability to the set of agents that advertise proficiency in that capability;

  3. :K×A[0,1] is a reliability score: (κ,ai) estimates the probability that agent ai successfully completes a task requiring capability κ, updated online from observed outcomes.

The ledger is decentralised: no single node stores the complete mapping. Instead, each agent maintains a partial view i, and consistency is achieved through a gossip protocol: each agent periodically exchanges its local ledger entries with a random subset of neighbours.

The gossip protocol converges exponentially fast: if each agent contacts k random peers per round, then after O(logn/logk) rounds every agent has received every update with high probability. This convergence rate ensures that newly registered capabilities propagate through the network in O(logn) time, a dramatic improvement over the O(n) broadcast time of a sequential protocol.

The Beacon selection protocol.

When a complex task arrives at the system, some agent must coordinate the response, assigning sub-tasks to specialists, collecting results, and synthesising the final answer. In a centralised system, this role is played by the orchestrator. In Symphony's decentralised design, the coordinator is selected dynamically through the Beacon selection protocol.

Algorithm 2 (Beacon Selection Protocol).

Input: Task description τ, capability ledger , agent set A={a1,,an}.

Output: A beacon agent a that will coordinate the task.

  1. Extract required capabilities Kτ=Exᴛʀᴀᴄᴛ(τ)K LLM parses the task
  2. Compute candidate set C={aiA:KτKi} where Ki is the capability set of ai
  3. for each candidate aiC
  4. Compute coverage score: sicov=|KτKi||Kτ|
  5. Compute reliability score: sirel=1|KτKi|κKτKi(κ,ai)
  6. Compute load penalty: siload=exp(λi) where i is current queue length
  7. Composite score: si=αsicov+βsirel+(1αβ)siload
  8. Select beacon: a=arg maxaiCsi Ties broken by lowest i
  9. a broadcasts BeaconClaim(τ) to all agents in C
  10. Each ajC either Accepts (joins the task team) or Declines (overloaded)
  11. return a and the set of accepting agents TτC

The protocol completes in two communication rounds: one for beacon election (lines 1–9) and one for team formation (lines 10–12). The composite scoring function balances three objectives: maximising coverage (the beacon should understand as many required capabilities as possible), maximising reliability (the beacon should have a strong track record), and minimising load (the beacon should not be overwhelmed by existing tasks).

Proposition 11 (Beacon Uniqueness Under Strict Scores).

If the composite scores {si}iC are pairwise distinct (which holds almost surely when reliability scores are drawn from a continuous distribution), then the Beacon selection protocol (Algorithm 2) produces a unique beacon a without any tie-breaking.

Proof.

The argmax over a finite set with pairwise distinct values is unique. Since si=αsicov+βsirel+(1αβ)siload and the reliability scores (κ,ai) are drawn from a continuous distribution, the probability that si=sj for ij is zero. Hence arg maxaiCsi is a singleton with probability one.

Symphony's decentralised architecture. Five agents a1a5 form a gossip network (dashed grey links), each maintaining a local ledger fragment i. When task τ arrives at a3, the Beacon selection protocol identifies a4 as the coordinator (amber node). Agents a2 and a5 accept the BeaconClaim and join the task team (green dashed arrows).
Consistency guarantees.

The gossip-based ledger provides eventual consistency: after sufficiently many rounds, all agents converge to the same view. More precisely, let i(t) denote agent ai's local ledger at round t. If a new capability entry is inserted at round t0, then for all agents ai: (Gossip Convergence)Pr[i(t0+r) contains the entry]1(1kn)r, where k is the number of peers contacted per round. Setting r=logn/log(n/(nk)) yields a probability of at least 11/n, confirming the O(logn) convergence claim.

Dynamic Agent Generation

The preceding subsections assumed a fixed pool of agents. AutoAgents [70] lifts this assumption by generating agents dynamically: given a task description, an LLM planner proposes agent specifications (role, system prompt, tools) tailored to the task at hand.

Definition 24 (Dynamic Agent Generation).

A dynamic agent generation system is a tuple 𝒢=(Π,,𝒱) where:

  1. Π is the drafting planner: an LLM that, given a task description τ, produces a team blueprint ={(rj,pj,Tj)}j=1k, where rj is a role description, pj is a system prompt, and Tj𝒯 is a tool set;

  2. is the execution engine: for each specification (rj,pj,Tj), the engine instantiates an agent actor aj with the prescribed configuration and inserts it into the platform's actor system;

  3. 𝒱 is the verification module: after execution, 𝒱 evaluates the team's output against task requirements and provides feedback to Π for iterative refinement of the blueprint.

The generation process alternates between a drafting phase (Π proposes ) and an execution phase ( runs the team), iterated until 𝒱 reports success or a budget limit is reached.

The drafting-execution pipeline.

AutoAgents [70] implements the dynamic generation process as a two-stage pipeline. In the drafting stage, the planner Π receives the task τ and generates the team blueprint through a chain-of-thought process:

  1. Task decomposition: Π breaks τ into sub-tasks {τ1,,τm};

  2. Role inference: for each sub-task τj, Π infers the necessary agent role rj, specifying capabilities and constraints in natural language;

  3. Tool assignment: Π selects tools Tj from the available tool library 𝒯 that match each role's requirements;

  4. Dependency analysis: Π identifies data dependencies among sub-tasks and constructs a workflow DAG ((DAG Levels)).

In the execution stage, the platform instantiates the agents specified by , wires them according to the DAG, and runs the workflow. The verification module 𝒱 scores the output and, if quality is insufficient, feeds the score and error traces back to Π, which revises the blueprint. This closed loop typically converges in two to three iterations.

Example 7 (Dynamic Generation for Software Testing).

Consider the task τ= “Write unit tests for a REST API with five endpoints.” The planner Π might generate:

  • API Analyst (r1): reads the API specification, identifies edge cases and input domains. Tools: {file reader, schema parser}.

  • Test Writer (r2): generates test code for each endpoint. Tools: {code generator, test framework API}.

  • Test Runner (r3): executes the test suite and reports failures. Tools: {shell executor, coverage tool}.

  • Reviewer (r4): checks test quality, coverage metrics, and suggests improvements. Tools: {code analyser}.

The DAG structure is r1r2r3r4, with a feedback edge from r4 back to r2 for iterative refinement. None of these agents was predefined; all were drafted by Π specifically for this task.

Communication Overhead and Scaling Limits

The preceding subsections paint an optimistic picture of horizontal scaling. We now inject a note of realism. Every message exchanged between agents carries a cost, in latency, bandwidth, and the cognitive load of processing incoming information. As the number of agents grows, this cost can dominate the computation itself.

Proposition 12 (Communication-Computation Trade-off).

Consider a multi-agent system of n agents solving a task that requires at least W total units of work. Suppose each agent can perform w units of work per time step and each pair of communicating agents exchanges messages of cost c per round. If the communication graph has average degree d, then the effective throughput (work completed per unit time) satisfies: (Throughput)Θ(n)=nwnd2c=n(wdc2). Throughput is positive only when d<2w/c, i.e., the communication degree must be bounded by the ratio of computation speed to communication cost.

Proof.

Each of the n agents contributes w units of work per step. The communication graph has nd/2 edges (by the handshaking lemma), and each edge incurs cost c per round, consuming ndc/2 units of capacity. The net throughput is the difference. Positivity requires nw>ndc/2, which simplifies to d<2w/c.

Caution.

Scaling pitfalls: when more agents make things worse. It is tempting to assume that adding agents always improves performance. The throughput equation reveals that this is true only when the communication degree d grows sub-linearly in n. Three common pitfalls illustrate the danger:

1. All-to-all communication. If every agent broadcasts to every other agent (d=n1), the communication cost grows as O(n2) while computation grows as O(n). Beyond a critical system size n=2w/c+1, adding agents decreases throughput.

2. Consensus bottleneck. Multi-agent debate and voting protocols (Consensus and Coordination) require O(n) messages per round per agent (each agent must hear from all others). For n agents, this generates O(n2) total messages, creating the same quadratic scaling problem as all-to-all communication.

3. Synchronisation barriers. If agents must synchronise at the end of each round (as in synchronous DAG execution per (DAG Levels)), the round time is determined by the slowest agent. As n grows, the probability that at least one agent is slow (due to API latency, rate limits, or hardware issues) approaches 1, creating a straggler effect that negates parallelism gains.

The practical lesson is clear: scalable agent platforms must enforce sparse, hierarchical communication topologies and asynchronous execution models. The actor-based architecture of AgentScope and the decentralised gossip protocol of Symphony are both designed with this principle in mind.

Key Idea.

The Scaling Law for Agent Communication. For an agent system to scale to n agents while maintaining positive throughput, the average communication degree d must satisfy d=O(w/c), independent of n. In practice, this means that each agent should communicate with a bounded number of neighbours, regardless of the total system size, precisely the design principle underlying both hierarchical supervision trees (actor model) and gossip-based peer selection (Symphony). The mathematical analogy to sparse graph theory is exact: just as sparse graphs (|E|=O(|V|)) admit efficient algorithms while dense graphs (|E|=O(|V|2)) do not, sparse communication topologies admit efficient multi-agent execution while dense topologies do not.

Comparison of platform paradigms.

Table 3 summarises the three platform paradigms discussed in this section along their key design dimensions.

PlatformTopologyCoordinationFault ToleranceAgent Pool
AgentScopeDAG / treeCentralised4-tier (crash + Byzantine)Fixed
SymphonyGossip / P2PDecentralisedBeacon re-electionFixed
AutoAgentsDAG (generated)Planner-drivenRetry + re-draftDynamic
Comparison of scalable agent platform paradigms. The “Fault tolerance” column indicates the strongest failure mode each design tolerates by default.
Hybrid architectures.

In practice, production systems often combine elements of all three paradigms. A typical deployment might use AgentScope's actor infrastructure for process management, Symphony's ledger for capability discovery, and AutoAgents' drafting pipeline for creating specialised agents on demand. The mathematical framework of this section, actor-agent systems (Definition 22), capability ledgers (Definition 23), and dynamic generation (Definition 24), provides the formal vocabulary for reasoning about such hybrid designs.

Exercise 2 (Communication Cost Analysis).

Consider a multi-agent system with n=100 agents arranged in a 10×10 grid, where each agent communicates only with its four immediate neighbours (up, down, left, right; agents on the boundary have fewer neighbours).

  1. Compute the average degree d of the communication graph.

  2. Using (Throughput) with w=10 and c=1, compute the effective throughput Θ(100).

  3. Compare with the throughput of a fully connected graph (d=99) of the same size. At what system size n does the fully connected architecture achieve zero throughput?

  4. Propose a communication topology that achieves O(logn) diameter while keeping d=O(logn).

Exercise 3 (Beacon Selection Optimality).

In the Beacon selection protocol (Algorithm 2), the weights α,β[0,1] with α+β1 control the trade-off between coverage, reliability, and load balancing.

  1. Show that setting α=1,β=0 always selects the agent with the greatest capability overlap, regardless of reliability or load.

  2. Suppose all agents have identical capability sets (Ki=K for all i) but different queue lengths i. Show that the Beacon protocol reduces to selecting the agent with the shortest queue.

  3. Derive a condition on α,β,λ under which the protocol never selects an agent whose queue exceeds a threshold max.

Orchestration Patterns

The preceding sections built the vocabulary of multi-agent systems: agents, communication topologies, debate protocols, and collaborative generation strategies. But vocabulary alone does not produce coherent prose. The orchestrator, the entity that decides which agent acts next, what information it receives, and how its output is integrated into the collective, is the conductor of the multi-agent orchestra. A poor conductor can squander the talents of virtuoso musicians; a great one can make an ensemble of competent players produce transcendent results.

This section formalises orchestration as a first-class design abstraction. We begin with the formal definition of an orchestrator (The Orchestrator), then develop the dominant Orchestrator-Worker pattern that has produced the largest empirical gains in multi-agent coding and research systems (The Orchestrator-Worker Pattern). We introduce context engineering, the systematic management of information flow to and from workers, as the key lever for orchestrator effectiveness (Context Engineering). We analyse the economics of orchestration through the lens of token usage (Token Economics of Orchestration), and conclude with the MALLM configuration space, a combinatorial framework that reveals the staggering design freedom available to orchestrator builders (The MALLM Configuration Space).

The Orchestrator

We begin with the formal definition that is referenced throughout this chapter.

Definition 25 (Orchestrator).

Let 𝒜={a1,,an} be a set of agents and let t=(m1,m2,,mt) denote the conversation history up to step t, where each message mk=(senderk,contentk,metadatak). An orchestrator is a function (Orchestrator)Ω:×2𝒜𝒜××{0,1}, where is the set of all finite conversation histories, 2𝒜 is the power set of agents (representing currently available agents), and is the space of instructions (natural-language prompts, structured JSON directives, or tool-call specifications). Given history t and available agents 𝒜avail𝒜, the orchestrator returns a triple (a,ι,d) where:

  1. a𝒜avail is the next agent to execute;

  2. ι is the instruction passed to a, including the relevant subset of history and any additional context the orchestrator deems necessary;

  3. d{0,1} is the termination signal: d=1 indicates the task is complete and no further agent invocations are needed.

The orchestrator may itself be implemented by an LLM (a model-based orchestrator) or by deterministic code (a rule-based orchestrator). In either case, the orchestrator does not directly solve the task; it manages the agents that do.

The critical design choice embedded in Definition 25 is that the orchestrator controls both agent selection and information routing. The instruction ι need not contain the full history t; the orchestrator may summarise, filter, or restructure the history before passing it to the selected agent. This context curation is, as we shall see, the primary lever for orchestrator effectiveness.

Remark 11 (Orchestrator as Meta-Policy).

In the language of reinforcement learning, Ω is a meta-policy: it operates over the space of agent policies {πa1,,πan} rather than over primitive actions. The state space of the meta-policy is the conversation history , the action space is 𝒜×, and the reward is the system-level performance rsys. This perspective connects orchestration to the options framework in hierarchical RL: each agent invocation is an “option” with its own internal policy and termination condition, and the orchestrator is the policy over options.

The Orchestrator-Worker Pattern

The most successful orchestration pattern in practice is deceptively simple: a single orchestrator agent decomposes a task into sub-tasks, delegates each sub-task to a specialised worker agent, collects and synthesises the results, and iterates until the task is complete. We call this the Orchestrator-Worker pattern.

The Orchestrator-Worker pattern. The orchestrator Ω receives a task 𝒯, decomposes it into sub-tasks ι1,ι2,ι3, and delegates each to a specialised worker agent. Worker results are synthesised and fed back to the orchestrator for quality assessment. The loop continues until the termination signal d=1 is issued. This pattern achieved a 90.2% improvement over single-agent baselines in Anthropic's multi-agent research system [22].
Empirical evidence.

The Orchestrator-Worker pattern has demonstrated striking gains across diverse domains. Anthropic's multi-agent research system [22] deployed a lead agent (the orchestrator) that coordinated multiple “sub-agent” workers for parallel web research, achieving a 90.2% improvement in research quality over a single-agent baseline on internal evaluation benchmarks. The key was not merely parallelism (running the same agent three times in parallel yields only modest improvements through majority voting) but specialised decomposition: the orchestrator assigned different sub-topics to different workers, each of which could focus its full context window on a narrow sub-problem.

Formally, the Orchestrator-Worker pattern instantiates Definition 25 with a specific structure. The orchestrator Ω maintains an internal task plan 𝒫={(ι1,aj1),,(ιK,ajK)} that pairs instructions with assigned workers. At each step, the orchestrator:

  1. Analyses the current state: examines completed results, identifies remaining sub-tasks, and detects failures or quality issues.

  2. Selects the next worker a and crafts the instruction ι with precisely the context that worker needs, no more, no less.

  3. Dispatches the instruction to the worker and awaits the result.

  4. Integrates the worker's output into the running solution, updating the task plan as needed.

  5. Evaluates whether the task is complete (d=1) or whether further iterations are needed (d=0).

This loop is illustrated in fig:agents:orch-worker. The orchestrator's effectiveness depends critically on the quality of the instructions ιk it generates, a problem we formalise next under the name context engineering.

Context Engineering

The term context engineering was crystallised by OpenAI's engineering team in their description of the “harness” that surrounds and coordinates agent systems [24]. The core insight is that the primary bottleneck in multi-agent systems is not the capability of individual agents but the quality of the information they receive. A brilliant coder given a vague specification will produce mediocre code; the same coder given a precise specification, relevant examples, and clear constraints will produce excellent code. The orchestrator's job is to be the brilliant specification writer.

Definition 26 (Context Engineering).

Let t be the full conversation history at step t and let a be the agent selected for execution. A context engineering function is a mapping (Context ENG)ϕ:×𝒜×0, where 0 is the space of raw task descriptions and is the space of engineered contexts (the actual prompt seen by the agent). The function ϕ performs:

  1. Selection: choosing a relevant subset trelt of the history, discarding messages irrelevant to agent a's sub-task;

  2. Compression: summarising long message sequences into concise representations, reducing token count while preserving essential information;

  3. Structuring: organising the selected information into a format matched to a's capabilities (e.g., code blocks for a coder agent, bullet points for a planner agent);

  4. Augmentation: adding task-relevant context not present in the history, such as retrieved documentation, schema definitions, examples, or explicit constraints.

The engineered context ι=ϕ(t,a,ι0) is the instruction passed to the worker in Definition 25.

Entropy management.

OpenAI's characterisation of the harness as managing “entropy” in the information flow [24] can be formalised as follows. Let H(ι) denote the Shannon entropy of the engineered context viewed as a random variable over possible instructions. A poorly designed context function produces high-entropy instructions (vague, ambiguous, containing irrelevant information), forcing the agent to resolve uncertainty internally, consuming reasoning tokens on disambiguation rather than problem-solving. A well-designed context function produces low-entropy instructions (precise, unambiguous, focused), allowing the agent to allocate its full reasoning budget to the sub-task.

Formally, let Y=fa(ι) be the output of agent a given context ι, and let Q denote the quality metric. We seek to maximise 𝔼[Q(Y)]. By the data-processing inequality, (DATA Processing)I(Q;ι)I(Q;Y)I(Q;Y^), where Y^ is any post-processing of Y. The first inequality tells us that the mutual information between context quality and the final output is bounded by the information in the context itself, underscoring that no amount of agent capability can compensate for information lost during context engineering. The orchestrator should therefore maximise I(Q;ι) by ensuring that task-relevant information is preserved in the engineered context.

Token Economics of Orchestration

Orchestration is not free. Every message the orchestrator sends, every context it engineers, every synthesis step it performs consumes tokens. Understanding the economics of token usage is essential for designing efficient multi-agent systems.

Kim et al. [19] conducted a systematic study of multi-agent LLM teams and arrived at a striking finding: token usage explains approximately 80% of the variance in task performance. Systems that used more tokens, by generating longer reasoning chains, producing more detailed sub-task instructions, or performing additional verification rounds, consistently outperformed systems that were more parsimonious, after controlling for model capability.

Proposition 13 (Token Usage Predicts Performance).

Let 𝒮=(𝒜,,𝒞,Ω) be a multi-agent system operating on a task distribution 𝒯. Define the total token usage as (Total Tokens)Ttotal(𝒮,𝒯)=𝔼τ𝒯[Torch(τ)orchestration+i=1nTai(τ)worker i], where Torch(τ) counts tokens consumed by the orchestrator (planning, routing, synthesis) and Tai(τ) counts tokens consumed by worker ai (reasoning, generation, tool calls). Then, under the empirical model of [19], the system performance satisfies the regression (Token Regression)P(𝒮)α+βlogTtotal(𝒮,𝒯)+γD(𝒜)+ϵ, where D(𝒜) is a diversity measure over agent capabilities, α,β,γ are regression coefficients, and ϵ captures residual variance. The coefficient of determination satisfies R20.80, with the logTtotal term accounting for the dominant share of explained variance.

Proof sketch.

The logarithmic dependence on token count follows from an information-theoretic argument. Each token carries at most log|𝒱| bits of information, where 𝒱 is the vocabulary. For a task requiring B bits of “solution information” (a measure of the task's intrinsic complexity), the system must generate at least B/log|𝒱| tokens. In practice, redundancy in natural language means the effective information per token is h<log|𝒱| bits, so the required token count is B/h. Performance improves as Ttotal increases because additional tokens enable:

  1. More thorough reasoning: longer chains of thought explore more solution paths (cf. the tree-search analysis in 23);

  2. Better context engineering: the orchestrator can provide more detailed instructions, reducing worker uncertainty;

  3. Verification and correction: additional tokens are spent on reviewing and revising worker outputs, catching errors that a single pass would miss.

The logarithmic (rather than linear) dependence reflects diminishing returns: the first tokens address the most important aspects of the task, while later tokens yield progressively smaller marginal gains. The diversity term D(𝒜) captures the benefit of specialisation: a team of identical agents wastes tokens on redundant exploration, while a diverse team covers more of the solution space per token spent. Kim et al. [19] validated this model across 144 multi-agent configurations, finding R20.80 with token usage as the dominant predictor.

Caution.

Token usage is not a free lunch. The token–performance relationship of Proposition 13 should not be interpreted as “more tokens always means better performance.” The relationship is logarithmic: doubling the token budget yields a constant additive gain, not a multiplicative one. Moreover, the cost of LLM inference scales linearly in token count, so the cost–performance frontier exhibits severely diminishing returns. In practice, the optimal operating point balances marginal performance gain against marginal cost, a classic economic optimisation. The orchestrator's role is to allocate tokens efficiently: spending more on high-value sub-tasks (complex reasoning, ambiguous specifications) and less on routine operations (formatting, simple lookups).

The MALLM Configuration Space

How many meaningfully different multi-agent systems can one build? The MALLM (Multi-Agent Large Language Model) framework of Becker et al. [23] answers this question by identifying four orthogonal design axes, each with a discrete set of options. The cross-product of these axes defines a configuration space whose size reveals the combinatorial richness of orchestration design.

Definition 27 (MALLM Configuration Space).

The MALLM configuration space is a 4-tuple =(,𝒢,𝒟,𝒫) where:

  1. ={r1,,r||} is the set of personas (role descriptions assigned to agents, e.g., “domain expert”, “devil's advocate”, “summariser”);

  2. 𝒢={g1,,g|𝒢|} is the set of generators (the underlying LLM or LLM configuration used by each agent, e.g., GPT-4, Claude, Llama 3);

  3. 𝒟={d1,,d|𝒟|} is the set of interaction paradigms (the communication structure, e.g., sequential debate, parallel brainstorm, hierarchical delegation);

  4. 𝒫={p1,,p|𝒫|} is the set of decision mechanisms (the aggregation rule for combining agent outputs, e.g., majority vote, weighted average, LLM-as-judge).

A configuration is a 4-tuple c=(r,g,d,p)×𝒢×𝒟×𝒫. The total number of configurations is (Mallm SIZE)||=||×|𝒢|×|𝒟|×|𝒫|. In the experiments of [23], the axes had sizes ||=6, |𝒢|=4, |𝒟|=3, |𝒫|=2, yielding ||=6×4×3×2=144 distinct configurations.

The MALLM configuration space [23]. Four orthogonal design axes (personas, generators, interaction paradigms, and decision mechanisms) combine to produce 144 distinct multi-agent configurations. Each configuration specifies a complete multi-agent system, from the roles agents play to how their outputs are aggregated. The grid structure enables systematic ablation across each axis independently.
Navigating the configuration space.

The 144 configurations in Definition 27 may seem modest, but they represent only the coarse-grained design choices. Fine-grained decisions, such as the specific wording of persona prompts, the temperature and top-p settings for each generator, the number of rounds in a debate paradigm, the prompt given to the LLM judge, each add further degrees of freedom. The effective design space is therefore far larger than 144, and manual exploration is infeasible.

Becker et al. [23] addressed this by running all 144 configurations on a common benchmark suite, enabling a factorial analysis that decomposes performance variance into contributions from each axis and their interactions. Key findings include:

  • Persona × Paradigm interaction dominates. The choice of persona has the largest main effect, but its impact depends strongly on the interaction paradigm: a “devil's advocate” persona is highly effective in sequential debate but adds noise in parallel brainstorming.

  • Generator matters less than expected. Swapping the underlying LLM from GPT-4 to Claude or Llama 3 changed performance by less than the effect of the best versus worst persona assignment, suggesting that how agents are orchestrated matters more than which model powers them.

  • Decision mechanism interacts with task type. Majority voting excels on tasks with verifiable answers (e.g., coding, mathematics), while LLM-as-judge is superior for open-ended generation (e.g., creative writing, research synthesis).

These findings reinforce a central theme of this chapter: the protocol, how agents are organised and coordinated, often matters more than the raw capabilities of the individual agents.

Example 8 (Choosing an Orchestration Configuration).

Consider a software engineering task: given a GitHub issue, produce a patch that resolves the issue and passes the repository's test suite. Using the MALLM framework, one might select:

  • Personas: Coder (primary implementation), Reviewer (code quality), Planner (task decomposition), a subset {r5,r3,r4}.

  • Generator: The most capable available model (e.g., Claude or GPT-4), g𝒢.

  • Paradigm: Hierarchical delegation, with the Planner as orchestrator and Coder/Reviewer as workers, d3𝒟.

  • Decision: LLM-as-judge (the orchestrator evaluates whether the patch is acceptable), p2𝒫.

This configuration mirrors the architecture that achieved state-of-the-art results on SWE-bench [22], confirming that principled configuration selection can recover empirically successful designs.

Orchestration as the Key Differentiator

Insight.

Orchestration is the key differentiator in multi-agent systems. The evidence from Anthropic's research system (90.2% improvement via orchestrated delegation) [22], OpenAI's harness framework (context engineering as the primary lever) [24], Kim et al.'s token analysis (80% variance explained by usage patterns) [19], and the MALLM factorial study (persona × paradigm interaction dominates raw model choice) [23] all converge on a single conclusion: the way agents are orchestrated, who does what, with what information, in what order, matters more than the individual capability of any agent. This is the multi-agent analogue of a familiar insight from software engineering: system architecture matters more than component quality. A mediocre database with a brilliant query optimiser will outperform a brilliant database with a mediocre query optimiser. Likewise, a well-orchestrated team of capable (but not extraordinary) LLMs will outperform a poorly orchestrated team of frontier models. The practical implication is clear: invest in orchestration design before investing in more powerful models.

Formal Comparison of Orchestration Patterns

We can now compare the orchestration patterns encountered in this chapter through the lens of the MALLM configuration space and the token-performance model.

PatternControlParallelismToken costBest for
Round-robinDecentralisedNoneLowSimple debates
Star (hub-and-spoke)CentralisedNoneMediumQ&A routing
Orchestrator-WorkerCentralisedHighHighComplex tasks
HierarchicalMulti-levelMediumHighLarge codebases
Swarm (peer-to-peer)DecentralisedHighVariableExploration
Comparison of orchestration patterns. The Orchestrator-Worker pattern combines centralised control with flexible parallelism, achieving the best empirical results at the cost of higher token overhead. Flat patterns (round-robin, star) are simpler but less adaptive. The MALLM framework enables systematic exploration of the design space.

Table 4 summarises five common patterns. The choice among them depends on the task structure:

  • Decomposable tasks with independent sub-problems favour the Orchestrator-Worker pattern, which can assign sub-tasks in parallel and aggregate results.

  • Sequential reasoning tasks (e.g., mathematical proofs, multi-step plans) favour round-robin or sequential debate, where each agent builds on the previous agent's output.

  • Large-scale systems with hierarchical structure (e.g., a codebase with modules, packages, and files) favour hierarchical orchestration, where top-level orchestrators delegate to sub-orchestrators.

  • Open-ended exploration tasks (e.g., brainstorming, creative generation) favour swarm patterns where agents explore diverse directions without central coordination.

In each case, the orchestrator's design determines the efficiency frontier: the maximum performance achievable for a given token budget. The token–performance model of Proposition 13 provides a quantitative framework for comparing patterns: given two orchestration strategies Ω1 and Ω2, the preferred strategy is the one achieving higher performance P(𝒮) at equal token cost, or equivalently, the one achieving equal performance at lower cost.

Toward Game-Theoretic Foundations

The orchestration patterns developed in this section assume a cooperative setting: all agents share a common objective, and the orchestrator has full authority to assign tasks and evaluate outputs. But many real-world multi-agent deployments involve agents with heterogeneous objectives: LLMs fine-tuned by different organisations, agents representing different stakeholders, or adversarial agents injected to test system robustness.

When agent objectives diverge, the orchestrator can no longer assume that workers will faithfully execute instructions. A worker might “defect” by producing minimal-effort outputs to conserve its own token budget, or by subtly steering the conversation toward its own objective. The orchestrator must then design incentive-compatible mechanisms: protocols where each agent's self-interested behaviour aligns with the system's collective objective.

This is precisely the domain of game theory and mechanism design. In the next sections, we develop the game-theoretic foundations needed to analyse these strategic interactions: normal-form games and Nash equilibria, repeated games and the folk theorem (which shows how cooperation can emerge from repeated interaction even among self-interested agents), mechanism design (which shows how to construct protocols that make truthful behaviour optimal), and the Shapley value (which provides a principled method for assigning credit to agents based on their marginal contributions). The orchestrator's role evolves from a benevolent coordinator in the cooperative setting to a mechanism designer in the strategic setting, a transition that captures much of the mathematical richness of multi-agent AI.

Game Theory Foundations for Multi-Agent Systems

When multiple autonomous agents share an environment, the outcome experienced by any single agent depends not only on its own actions but also on the actions of every other agent. This fundamental interdependence is precisely the setting studied by game theory, the mathematical framework for analysing strategic interactions among rational decision-makers. In this section we develop the game-theoretic foundations needed to understand multi-agent LLM systems: normal-form games and Nash equilibria (Normal-Form Games), repeated games and the folk theorem (Repeated Games and Folk Theorems), mechanism design (Mechanism Design), and cooperative game theory with the Shapley value (Cooperative Game Theory and the Shapley Value).

The results in this section are classical, but their application to LLM-based agents is novel: each “player” is a language model instance with a policy πi(|x), and the “actions” are the responses the model generates. The payoffs arise from task rewards, human evaluations, or other agents' reactions.

Historical Note.

From von Neumann to algorithmic game theory. The mathematical study of strategic interaction began with von Neumann's minimax theorem (1928) [25] and the landmark treatise Theory of Games and Economic Behavior (1944) [26] by von Neumann and Morgenstern, which established the field of game theory. John Nash's equilibrium concept (1950) [4] provided the central solution concept for non-cooperative games. Lloyd Shapley introduced the value bearing his name in 1953 [5], solving the problem of fair division in cooperative games. The 2000s brought algorithmic game theory [27], which studies computational aspects of game-theoretic solutions, a perspective directly relevant to multi-agent AI systems where equilibria must be computed, not merely shown to exist.

Normal-Form Games

The simplest and most widely used model of strategic interaction is the normal-form game, also called a strategic-form game.

Definition 28 (Normal-Form Game).

A normal-form game is a tuple Γ=(N,(Ai)iN,(ui)iN) where:

  1. N={1,2,,n} is a finite set of players (agents);

  2. Ai is the finite action set (or strategy space) of player i; the joint action space is A=iNAi;

  3. ui:A is the utility function (or payoff function) of player i, mapping every joint action profile 𝒂=(a1,,an)A to a real-valued payoff.

A pure strategy for player i is a deterministic choice aiAi. A mixed strategy is a probability distribution σiΔ(Ai) over Ai. Under mixed strategies, the expected utility of player i is (Expected Utility)Ui(σ1,,σn)=𝒂A(jNσj(aj))ui(𝒂). We write σi=(σ1,,σi1,σi+1,,σn) for the strategy profile of all players except i.

The central solution concept for non-cooperative games is the Nash equilibrium: a strategy profile from which no player can unilaterally improve their payoff.

Definition 29 (Nash Equilibrium).

A strategy profile σ=(σ1,,σn) is a Nash equilibrium (NE) of Γ if for every player iN and every strategy σiΔ(Ai), (NASH Condition)Ui(σi,σi)Ui(σi,σi). Equivalently, σi is a best response to σi for every player i. A Nash equilibrium in which every σi is a pure strategy is called a pure-strategy Nash equilibrium; otherwise it is a mixed-strategy Nash equilibrium.

Example 9 (Prisoner's Dilemma).

The Prisoner's Dilemma is the archetypal multi-agent tension. Two agents simultaneously choose to Cooperate (C) or Defect (D), with the payoff matrix shown in fig:agents:prisoners-dilemma. The unique Nash equilibrium is (D,D) with payoffs (1,1), even though both players would prefer the cooperative outcome (C,C) with payoffs (3,3). This captures the fundamental tension in multi-agent systems: individually rational behaviour can lead to collectively suboptimal outcomes.

figureThe Prisoner's Dilemma payoff matrix. Each cell shows (u1,u2). The Nash equilibrium (D,D) yields payoffs (1,1), which is Pareto-dominated by the cooperative outcome (C,C) with payoffs (3,3).

The most fundamental existence result in game theory guarantees that every finite game possesses at least one Nash equilibrium in mixed strategies.

Theorem 7 (Nash Equilibrium Existence).

Every finite game Γ=(N,(Ai)iN,(ui)iN) possesses at least one mixed-strategy Nash equilibrium.

Proof.

We provide a proof sketch using Kakutani's fixed-point theorem, which generalises Brouwer's theorem to set-valued (correspondence) maps.

Step 1: Define the strategy space. The mixed strategy set of each player i is Σi=Δ(Ai), the simplex over Ai. This is a compact, convex, non-empty subset of |Ai|. The joint strategy space Σ=iNΣi is likewise compact and convex.

Step 2: Define the best-response correspondence. For each player i and opponent profile σi, define (BEST Response)BRi(σi)=arg maxσiΣiUi(σi,σi). Since Ui is linear in σi and Σi is compact and convex, the set BRi(σi) is non-empty, convex, and compact. Define the joint best-response correspondence BR:ΣΣ by BR(σ)=iNBRi(σi).

Step 3: Verify Kakutani's conditions. The correspondence BR maps the compact convex set Σ into itself. For each σ, the set BR(σ) is non-empty and convex (as a product of non-empty convex sets). By Berge's maximum theorem, BR has a closed graph (is upper hemicontinuous), since Ui is continuous in all strategies.

Step 4: Apply Kakutani's fixed-point theorem. By Kakutani's theorem, there exists σΣ such that σBR(σ). This means that for every player i, σi is a best response to σi, which is precisely the definition of a Nash equilibrium.

Remark 12 (Computational Complexity of Nash Equilibria).

While Nash equilibria are guaranteed to exist, finding them is computationally hard in general. The problem of computing a Nash equilibrium is PPAD-complete [28], meaning it is unlikely to admit a polynomial-time algorithm. For two-player games, the Lemke–Howson algorithm [29] finds a Nash equilibrium in exponential time in the worst case. For multi-agent LLM systems, this computational intractability suggests that agents will typically converge to approximate equilibria rather than exact ones.

Repeated Games and Folk Theorems

In many multi-agent LLM deployments, agents interact not once but repeatedly over multiple rounds; for instance, a coding assistant and a reviewer exchanging feedback over several iterations, or debate agents engaging in multiple rounds of argumentation. The theory of repeated games shows that such sustained interaction fundamentally changes the strategic landscape: cooperation can emerge as an equilibrium even in games where it is impossible in a single round.

Consider a stage game Γ=(N,(Ai),(ui)) played infinitely often. In each period t=0,1,2,, the players simultaneously choose actions aitAi, observe the joint action profile (a1t,,ant), and receive stage payoffs ui(a1t,,ant). Each player i maximises the discounted sum (Discounted Payoff)Vi=(1δ)t=0δtui(a1t,,ant), where δ[0,1) is the discount factor. The normalisation by (1δ) ensures that Vi is a weighted average of stage payoffs, making it comparable in scale to the single-stage payoffs ui.

A strategy in the repeated game is a function mapping the entire history of play to a current action. The minimax payoff of player i is (Minimax)vi=minσimaxσiUi(σi,σi), the lowest payoff that the other players can force upon i.

A payoff vector 𝒗=(v1,,vn) is feasible if it lies in the convex hull of the set of achievable payoff vectors, i.e., 𝒗conv{(u1(𝒂),,un(𝒂)):𝒂A}. A feasible payoff vector is individually rational if vivi for all iN.

Theorem 8 (Folk Theorem for Repeated Games).

Let Γ=(N,(Ai),(ui)) be a finite normal-form game, and let 𝒗=(v1,,vn) be any feasible and individually rational payoff vector (i.e., vi>vi for all iN). Then there exists δ<1 such that for all δ>δ, the payoff vector 𝒗 can be sustained as a Nash equilibrium payoff of the infinitely repeated game with discount factor δ.

Proof.

We construct an explicit equilibrium strategy profile using the grim trigger mechanism.

Step 1: Target action profile. Since 𝒗 is feasible, there exists a (possibly mixed) action profile 𝒂=(a1,,an) (or a convex combination of pure profiles) such that ui(𝒂)=vi for each i. For simplicity, assume 𝒂 is a pure profile; the argument extends to correlated mixtures by standard techniques.

Step 2: Grim trigger strategy. Each player i plays the following strategy si:

  • Cooperative phase: play ai as long as all players have played 𝒂 in every previous round.

  • Punishment phase: if any player j has ever played ajaj in some past round, switch to the minimax strategy against all deviators and play it forever.

Step 3: No profitable deviation. Suppose player i considers deviating in period t while all other players follow si. The best single-period payoff from deviating is at most ui=maxaiAiui(ai,ai). After deviating, player i receives at most vi in every subsequent period (since all opponents switch to minimax punishment). The payoff from deviating is therefore at most (Deviation Payoff)Videv=(1δ)[ui+δvi+δ2vi+]=(1δ)ui+δvi. The payoff from cooperating forever is Vicoop=vi. Cooperation is incentive-compatible when VicoopVidev, i.e., (FOLK IC)vi(1δ)ui+δvi. Rearranging, δuiviuivi. Since vi>vi by assumption, the right-hand side is strictly less than 1. Setting δ=maxiNuiviuivi<1 ensures that cooperation is a best response for every player whenever δ>δ.

Step 4: Subgame considerations. The grim trigger profile is a Nash equilibrium of the repeated game for δ>δ. One can strengthen this to a subgame perfect equilibrium by replacing permanent punishment with more sophisticated strategies (e.g., mutual punishment phases of finite length), but the Nash equilibrium version suffices for our purposes.

Key Idea.

Repetition enables cooperation. The folk theorem has a striking implication for multi-agent LLM systems: when agents interact repeatedly with sufficient patience (δ close to 1), any individually rational outcome, including full cooperation, can be sustained as an equilibrium. This provides a theoretical foundation for the empirical observation that LLM agents in iterative frameworks (debate, iterative refinement, multi-turn negotiation) converge to cooperative behaviours even when a single-round analysis would predict defection.

Mechanism Design

While game theory analyses the behaviour of agents within a fixed set of rules, mechanism design tackles the inverse problem: how should we design the rules of interaction so that self-interested agents produce a desired outcome? This is directly relevant to multi-agent LLM systems, where the system designer chooses the communication protocol, reward structure, and coordination rules.

Definition 30 (Mechanism Design).

A mechanism design problem consists of:

  1. A set of n agents with private types θiΘi (unknown to the designer);

  2. An outcome space 𝒪;

  3. A social choice function f:Θ1××Θn𝒪 specifying the designer's desired outcome for each type profile.

A mechanism (M1,,Mn,g) specifies a message space Mi for each agent and an outcome function g:M1××Mn𝒪. The mechanism implements f if there exists an equilibrium in which each agent's message reveals enough information to compute f(θ).

A mechanism is incentive compatible (IC) if truth-telling is an equilibrium strategy: for each agent i and each type profile 𝜽, (IC)ui(g(θi,θi),θi)ui(g(θi,θi),θi)for all θiΘi. A mechanism is individually rational (IR) if every agent receives at least their outside option: ui(g(𝜽),θi)0 for all 𝜽.

The most celebrated incentive-compatible mechanism is the Vickrey–Clarke–Groves (VCG) mechanism.

Definition 31 (VCG Mechanism).

In the VCG mechanism, each agent i reports a valuation function v^i:𝒪 (ideally v^i=vi, the true valuation). The mechanism:

  1. Chooses the outcome maximising social welfare: o=arg maxo𝒪j=1nv^j(o);

  2. Charges each agent i the Clarke pivot payment: (VCG Payment)pi=jivj(o^i)jivj(o), where o^i=arg maxo𝒪jiv^j(o) is the outcome that would maximise welfare if agent i were absent.

The agent's total utility is vi(o)pi.

Proposition 14 (VCG Incentive Compatibility).

In the VCG mechanism, truth-telling (v^i=vi) is a dominant strategy for every agent i.

Proof.

Under truth-telling, agent i's total utility is (VCG Utility)vi(o)pi=vi(o)[jivj(o^i)jivj(o)]=j=1nvj(o)social welfare at ojivj(o^i)constant w.r.t. v^i. The second term does not depend on agent i's report. Therefore, agent i maximises its utility by maximising the first term, which is exactly what happens when the mechanism selects the socially optimal outcome using the true valuations. Hence truth-telling is a dominant strategy.

Remark 13 (Mechanism Design for Multi-Agent LLMs).

In multi-agent LLM systems, the “types” θi correspond to each agent's private information (e.g., specialised knowledge, confidence in an answer, computational budget), and the “mechanism” is the orchestration protocol. VCG-inspired designs can incentivise agents to truthfully report their confidence or capability, enabling the orchestrator to allocate tasks optimally. For instance, in a mixture-of-agents system, each model could report its estimated probability of success on a task; a VCG-like mechanism would ensure that no model benefits from over- or under-reporting its capability.

Cooperative Game Theory and the Shapley Value

In many multi-agent settings, agents form coalitions and the relevant question is not “what will each agent do?” but “how much does each agent contribute?” Cooperative game theory provides the mathematical framework for this analysis.

Definition 32 (Characteristic Function Game).

A characteristic function game (or coalitional game) is a pair (N,v) where N={1,,n} is the set of players and v:2N is the characteristic function satisfying v()=0. For any coalition SN, the value v(S) represents the total payoff that the members of S can guarantee themselves, regardless of the actions of players outside S.

Definition 33 (Shapley Value).

The Shapley value of player i in the game (N,v) is (Shapley Value)ϕi(v)=SN{i}|S|!(n|S|1)!n![v(S{i})v(S)]. The term v(S{i})v(S) is the marginal contribution of player i to coalition S. The combinatorial weight |S|!(n|S|1)!n! equals the probability that S is exactly the set of players preceding i in a uniformly random permutation of N. Thus ϕi(v) is the expected marginal contribution of player i over all possible orderings.

The Shapley value is not merely one of many possible allocation rules; it is the unique rule satisfying four natural fairness axioms.

Theorem 9 (Shapley Value Uniqueness).

The Shapley value is the unique function ϕ:(2N)n satisfying the following axioms:

  1. Efficiency: iNϕi(v)=v(N);

  2. Symmetry: if players i and j are interchangeable (i.e., v(S{i})=v(S{j}) for all SN{i,j}), then ϕi(v)=ϕj(v);

  3. Linearity: ϕi(αv+βw)=αϕi(v)+βϕi(w) for all games v,w and scalars α,β;

  4. Null player: if v(S{i})=v(S) for all SN (player i never contributes), then ϕi(v)=0.

Proof.

The proof proceeds in three stages: we decompose any game into a basis of unanimity games, determine the unique Shapley value for each basis element, and reconstruct the general formula by linearity.

Step 1: Unanimity games form a basis. For any non-empty coalition TN, define the unanimity game uT:2N by (Unanimity GAME)uT(S)={1if TS,0otherwise. The set {uT}TN,T forms a basis for the vector space of all characteristic functions (with v()=0). This can be verified by checking that these 2n1 functions are linearly independent. Therefore, any game v can be uniquely written as (Unanimity Decomposition)v=TNcTuT, where the coefficients cT are the Harsanyi dividends, given by the Möbius inversion formula cT=ST(1)|T||S|v(S).

Step 2: Uniqueness for unanimity games. Consider the unanimity game uT. By the null player axiom, ϕi(uT)=0 for all iT, since such players never contribute (uT(S{i})=uT(S) whenever iT).

By the symmetry axiom, all players in T receive the same value: ϕi(uT)=ϕj(uT) for all i,jT, since any two members of T are interchangeable in uT.

By the efficiency axiom, iNϕi(uT)=uT(N)=1. Since only the |T| players in T receive nonzero values, and they all receive the same value, we conclude (Shapley Unanimity)ϕi(uT)={1/|T|if iT,0if iT. This is uniquely determined by the three axioms (efficiency, symmetry, null player).

Step 3: Reconstruction by linearity. By the linearity axiom and the decomposition , (Shapley FROM Dividends)ϕi(v)=TNcTϕi(uT)=TNiTcT|T|. Since the decomposition is unique and each ϕi(uT) is uniquely determined, ϕi(v) is uniquely determined.

Step 4: Verification. It remains to verify that the formula satisfies all four axioms. Efficiency: summing over all i and exchanging the order of summation yields v(N) (a standard combinatorial identity). Symmetry, null player, and linearity are immediate from the formula.

Example 10 (Credit Assignment in a Multi-Agent Coding Team).

Consider three LLM agents, a Coder (C), a Reviewer (R), and a Tester (T), collaborating to solve a programming task. Define the characteristic function (performance score out of 100): v()=0,v({C})=40,v({R})=10,v({T})=5,v({C,R})=70,v({C,T})=55,v({R,T})=20,v({C,R,T})=100. Computing the Shapley value for the Coder: ϕC(v)=16[(v({C})v())402+(v({C,R})v({R}))601+(v({C,T})v({T}))501+(v({C,R,T})v({R,T}))802]=16(80+60+50+160)=350658.3. Similarly, ϕR(v)25.8 and ϕT(v)15.8, with ϕC+ϕR+ϕT=100=v({C,R,T}), confirming efficiency. The Coder receives the largest share, reflecting its high marginal contributions across all coalitions.

Shapley value decomposition for a three-agent coding team. Each circle represents an agent; overlapping regions show synergistic contributions. The Shapley value fairly allocates the total value v(N)=100 based on each agent's average marginal contribution across all coalition orderings.

Consensus and Coordination

A recurring motif in multi-agent systems is the need for agents to agree: on an answer, a plan, a diagnosis, or a value. When agents begin with different opinions, how do they converge? How fast? And does the converged opinion bear any relation to the truth?

This section develops the mathematical theory of consensus. We begin with graph-Laplacian consensus (Graph Laplacian Consensus), where agents iteratively average their neighbours' values and provably converge to the global mean. We then apply consensus theory to agent opinions (Consensus in Agent Opinions), connecting to recent empirical findings that LLM agents spontaneously adopt averaging protocols. The Condorcet jury theorem (Condorcet Jury Theorem) quantifies when majority voting among agents outperforms any individual, while the analysis of quality versus diversity (Quality vs. Diversity) reveals the surprising empirical finding that agent quality dominates agent diversity.

Graph Laplacian Consensus

Consider n agents arranged on a communication graph G=(V,E) with V={1,,n}. Each agent i holds a scalar state xi(t) at time t. Agents can communicate only with their neighbours in G.

Definition 34 (Graph Laplacian).

Let G=(V,E) be an undirected graph with adjacency matrix An×n (where Aij=1 if {i,j}E and Aij=0 otherwise) and degree matrix D=diag(deg(1),,deg(n)). The graph Laplacian is the matrix L=DA. Key properties of L:

  1. L is symmetric and positive semidefinite;

  2. L𝟙=0 (the all-ones vector is in the null space);

  3. The eigenvalues satisfy 0=λ1λ2λn;

  4. λ2>0 if and only if G is connected; λ2 is called the Fiedler eigenvalue or algebraic connectivity of G.

The continuous-time consensus protocol asks each agent to move towards the average of its neighbours: (Continuous Consensus)𝒙˙(t)=L𝒙(t), which in component form reads x˙i(t)=j𝒩(i)(xj(t)xi(t)), where 𝒩(i) is the neighbourhood of agent i.

Theorem 10 (Consensus Convergence).

If the communication graph G is connected, then the solution of the continuous-time consensus protocol satisfies (Consensus Limit)𝒙(t)x𝟙as t,where x=1ni=1nxi(0). The convergence rate is exponential with rate λ2(L): (Consensus RATE)𝒙(t)x𝟙eλ2(L)t𝒙(0)x𝟙.

Proof.

The solution of the linear ODE is 𝒙(t)=eLt𝒙(0). Since L is symmetric, it has an orthonormal eigenbasis {𝒗1,,𝒗n} with corresponding eigenvalues 0=λ1<λ2λn (the strict inequality λ1<λ2 holds because G is connected). We choose 𝒗1=1n𝟙.

Step 1: Eigenbasis decomposition. Expand the initial condition in the eigenbasis: (Eigenbasis Expansion)𝒙(0)=k=1nck𝒗k,ck=𝒗k𝒙(0). Then (Consensus Evolution)𝒙(t)=eLt𝒙(0)=k=1nckeλkt𝒗k.

Step 2: The consensus component is preserved. The coefficient along 𝒗1 is c1=𝒗1𝒙(0)=1nixi(0)=nx. Since λ1=0, this component is preserved for all time: c1eλ1t𝒗1=nx1n𝟙=x𝟙.

Step 3: All other components decay. For k2, the term ckeλkt𝒗k decays exponentially since λkλ2>0. Therefore, (Consensus Residual)𝒙(t)x𝟙=k=2nckeλkt𝒗k. Taking norms and using orthonormality of the eigenbasis, (Consensus Bound)𝒙(t)x𝟙2=k=2nck2e2λkte2λ2tk=2nck2=e2λ2t𝒙(0)x𝟙2. Taking square roots yields . Since λ2>0, the bound converges to zero, establishing .

Remark 14 (Discrete-Time Consensus).

The discrete-time analogue replaces the ODE with the iteration (Discrete Consensus)𝒙(t+1)=W𝒙(t),W=IϵL, where ϵ>0 is a step size satisfying ϵ<2/λn(L) to ensure convergence. The optimal step size ϵ=2/(λ2+λn) minimises the spectral radius of W1n𝟙𝟙, yielding the fastest convergence rate of ρ=(λnλ2)/(λn+λ2). Alternatively, one can use the Metropolis–Hastings weight matrix Wij=1/(1+max(deg(i),deg(j))) for {i,j}E, which is doubly stochastic by construction and does not require knowledge of global graph properties.

Consensus in Agent Opinions

In multi-agent LLM systems, each agent holds not a scalar value but a distribution over possible answers. Let 𝒑iΔ(𝒴) be agent i's opinion vector, where 𝒴={y1,,yK} is a discrete set of candidate answers. A natural consensus protocol is (Opinion Consensus)𝒑i(t+1)=j=1nWij𝒑j(t), where W is a doubly stochastic weight matrix respecting the communication graph. This protocol converges to 𝒑i()=𝒑=1nj𝒑j(0) for all i, exactly as in the scalar case.

Chen et al. [71] observed that LLM agents engaged in multi-round deliberation spontaneously adopt protocols resembling : after exchanging messages, agents update their answers in a direction that averages the positions of their conversational partners. The Fiedler eigenvalue λ2 of the communication graph determines the convergence speed: sparse networks (small λ2) converge slowly, while dense networks (large λ2) converge quickly but may suppress diversity prematurely.

Consensus convergence for three agents with initial states x1(0)=5, x2(0)=1, x3(0)=2 under different communication topologies. Denser graphs (higher Fiedler eigenvalue λ2) converge faster to the mean x=2.

Condorcet Jury Theorem

A fundamental question in multi-agent systems is: when does aggregating the outputs of multiple agents improve upon any individual? The oldest and most elegant answer comes from the Marquis de Condorcet (1785).

Theorem 11 (Condorcet Jury Theorem).

Let n independent agents each have probability p>1/2 of choosing the correct answer to a binary question. The probability that a majority vote yields the correct answer satisfies (Condorcet Limit)Pn=P(i=1nXi>n/2)1as n, where Xi{0,1} is the indicator that agent i is correct. Moreover, Pn is strictly increasing in n (for odd n).

Proof.

Let Sn=i=1nXi, where X1,,Xn are independent Bernoulli random variables with parameter p. Then 𝔼[Sn]=np and 𝖵ar(Sn)=np(1p).

Majority vote is correct when Sn>n/2. Standardising, (Condorcet Standardise)P(Sn>n/2)=P(Snnpnp(1p)>n/2npnp(1p)). Let Zn=(Snnp)/np(1p) denote the standardised sum. By the central limit theorem, ZndZ𝒩(0,1) as n.

The threshold on the right-hand side is (Condorcet Threshold)tn=n/2npnp(1p)=(1/2p)np(1p). Since p>1/2, the numerator 1/2p<0, so tn as n. Therefore, (Condorcet Conclusion)P(Sn>n/2)=P(Zn>tn)P(Z>)=1. This completes the proof that Pn1.

The monotonicity claim (for odd n) follows from a direct combinatorial argument: adding two agents with accuracy p>1/2 to an existing panel of odd size strictly increases the majority accuracy, since the probability that both new agents are wrong (<1/4) is less than the probability that both are right (>1/4).

This result has been invoked under the slogan “More Agents Is All You Need” [30]: simply sampling multiple responses from an LLM and taking a majority vote can substantially boost accuracy. However, the theorem's independence assumption is critical and often violated in practice.

Condorcet jury theorem: probability that majority vote is correct as a function of the number of agents n, for individual accuracies p{0.6,0.7,0.8,0.9}. Higher individual accuracy leads to faster convergence to certainty.

Example 11 (Five Agents Solving a Math Problem).

Suppose five independent LLM agents each have probability p=0.7 of correctly solving a given math problem. Under majority vote, the probability that at least three out of five are correct is (FIVE Agents CALC)P5=k=35(5k)(0.7)k(0.3)5k=(53)(0.7)3(0.3)2+(54)(0.7)4(0.3)1+(55)(0.7)5=10(0.343)(0.09)+5(0.2401)(0.3)+1(0.16807)=0.3087+0.36015+0.16807=0.83692. Thus majority voting boosts accuracy from 70% to approximately 83.7%. With n=21 agents at the same individual accuracy, P2197.1%.

Quality vs. Diversity

The Condorcet theorem assumes independent agents, but LLM agents trained on similar data exhibit strong correlations in their errors. This subsection analyses how correlation degrades the Condorcet guarantee and examines whether diversity or quality matters more.

Proposition 15 (Correlated Agents Break Condorcet).

Let X1,,Xn{0,1} be identically distributed indicators with 𝔼[Xi]=p>1/2 and pairwise correlation Corr(Xi,Xj)=ρ>0 for all ij. Then the effective number of independent agents is (N EFF)neff=n1+(n1)ρ, and for sufficiently large ρ, neff<3 even as n, destroying the Condorcet guarantee.

Proof.

Let Sn=i=1nXi and X=Sn/n. We have 𝔼[X]=p and (Correlated Variance)𝖵ar(X)=1n2𝖵ar(Sn)=1n2[i𝖵ar(Xi)+ij𝖢ov(Xi,Xj)]=1n2[np(1p)+n(n1)ρp(1p)]=p(1p)n[1+(n1)ρ]. An independent sample of size neff would have variance 𝖵ar(X)=p(1p)/neff. Equating, p(1p)neff=p(1p)n[1+(n1)ρ]neff=n1+(n1)ρ. As n, neff1/ρ. Therefore, if ρ>1/3, then neff<3 regardless of the number of agents, which is insufficient for majority voting to reliably outperform an individual.

Proposition 16 (Quality Dominates Diversity).

Consider a multi-agent system with n agents. Under a simple bias-variance decomposition, the ensemble error can be written as (BIAS Variance)Error=B2avg. bias2+1nV(1+(n1)ρ)avg. variance, where B2 is the average squared bias of individual agents, V is the average variance, and ρ is the average pairwise correlation. Quality improvements (reducing B2) contribute linearly, while diversity improvements (reducing ρ) contribute only through the variance term, which is already reduced by the 1/n factor. Empirically, B2 is the dominant source of error across standard benchmarks [30], leading to the finding that Self-MoA (repeatedly sampling from the best model) outperforms Mixed-MoA (mixing different models of varying quality).

Key Idea.

Quality of individual agents matters more than their number. While the Condorcet jury theorem suggests that adding more agents always helps, this relies on the independence assumption. In practice, LLM agents share training data and exhibit correlated errors (ρ0). The effective number of independent agents is neff=n/(1+(n1)ρ), which saturates quickly. Improving the quality of each agent (reducing bias) yields larger gains than increasing the number of correlated agents (reducing variance through diversity). As a practical guideline: invest in better individual agents before scaling the number of agents.

Cooperation and Competition

The game-theoretic framework of Game Theory Foundations for Multi-Agent Systems predicts equilibrium behaviour under the assumption of full rationality. But LLM agents are not perfectly rational: they are shaped by pretraining data, in-context examples, and prompt instructions, all of which introduce biases that can push behaviour away from Nash equilibrium. This section examines how cooperation and competition emerge in practice when LLM agents interact, revealing surprising phenomena that classical game theory does not predict.

Spontaneous Cooperation in LLM Agents

One of the most striking findings in multi-agent LLM research is that agents placed in competitive game-theoretic settings often spontaneously cooperate [31], even when the one-shot Nash equilibrium prescribes defection.

Definition 35 (Tacit Collusion).

Tacit collusion occurs when agents coordinate on a cooperative outcome without explicit communication or agreement. Formally, let Γ be a one-shot game with a unique Nash equilibrium 𝒂NE and a cooperative outcome 𝒂coop with ui(𝒂coop)>ui(𝒂NE) for all i. Tacit collusion occurs when agents converge to 𝒂coop or a neighbourhood thereof, despite the absence of an explicit coordination mechanism.

Keynesian beauty contest.

In the Keynesian beauty contest, n players simultaneously choose numbers ai[0,100]. The winner is the player closest to 23 of the average choice. Iterated elimination of dominated strategies yields the unique Nash equilibrium ai=0 for all i, since if all players choose a, the optimal target is 23a, and iterating this contraction drives the equilibrium to zero. Empirically, LLM agents converge to this equilibrium within 35 rounds of repeated play, demonstrating both the capacity for strategic reasoning and rapid learning from interaction [31].

Bertrand competition.

In the Bertrand duopoly, two firms simultaneously set prices p1,p2[0,p] for identical products; consumers buy from the cheaper firm. The unique Nash equilibrium is p1=p2=c (marginal cost pricing, yielding zero profit). However, the cartel (collusive) outcome is p1=p2=pm>c (monopoly pricing), which maximises joint profit.

Example 12 (Bertrand Competition with LLM Agents).

When two LLM agents are placed in a repeated Bertrand game with marginal cost c=10 and monopoly price pm=50, they converge to prices between 30 and 45, significantly above the Nash equilibrium of 10 but below the full monopoly price [31]. This intermediate outcome represents partial tacit collusion: the agents exploit the repeated structure to sustain supra-competitive prices without explicit coordination.

The mechanism is instructive. Each agent's policy πi(pi|ht), conditioned on the history ht of previous price pairs, adapts in a manner consistent with tit-for-tat: if the opponent raised prices in the previous round, the agent reciprocates; if the opponent undercut, the agent retaliates. This behaviour emerges not from game-theoretic reasoning but from patterns in the pretraining data, where cooperative norms and reciprocity are pervasive.

Proposition 17 (Shared Priors Enable Implicit Coordination).

Let π1 and π2 be two LLM agents derived from the same pretrained model π0 via different fine-tuning procedures. If the fine-tuning perturbation is small (i.e., DKL[πiπ0]ϵ for i=1,2), then the agents share an approximate common prior over strategies. Specifically, for any history h, (Shared Prior Bound)DKL[π1(|h)π2(|h)]4ϵ. This shared prior enables implicit coordination: agents can predict each other's behaviour with high accuracy, enabling cooperative strategies that would require explicit communication between agents with uncorrelated priors.

Proof.

By the triangle inequality for KL divergence (using the chain rule for total variation distance and Pinsker's inequality), (Shared Prior Proof)DKL[π1(|h)π2(|h)]DKL[π1(|h)π0(|h)]+DKL[π0(|h)π2(|h)]+2DKL[π1π0]DKL[π0π2]2ϵ+2ϵ=4ϵ, where the first two terms are bounded by the fine-tuning constraint and the cross term is bounded by 2ϵϵ=2ϵ.

Co-Player Inference and Predictive Policy Improvement

Beyond shared priors, LLM agents can perform in-context co-player inference: from observing an opponent's actions, the agent updates its belief about the opponent's strategy and adapts accordingly.

Definition 36 (Predictive Policy Improvement).

Let pϕ(a|x) be a pretrained base policy and Q^(x,a) an estimated action-value function based on the opponent's inferred strategy. Predictive Policy Improvement (PPI) updates the agent's policy as (PPI)πik+1(a|x)pϕ(a|x)exp(βQ^(x,a)), where β>0 is a temperature parameter controlling the degree of exploitation. The value Q^(x,a) incorporates the agent's prediction of the co-player's future actions, creating an implicit best-response dynamic.

The PPI framework reveals that cooperation can emerge through a diversity training mechanism: when agents are trained against a diverse population of opponents, they learn policies that are robust to variation in opponent behaviour. This robustness, combined with co-player inference, leads to mutual adaptation and ultimately cooperation [72]. The process can be formalised as convergence to a correlated equilibrium of the underlying game, which generically yields higher social welfare than Nash equilibrium.

Co-Evolution: The Red Queen Hypothesis

When agents in a multi-agent system simultaneously learn, the environment from each agent's perspective is non-stationary: every agent's reward landscape shifts as other agents update their policies. This gives rise to co-evolutionary dynamics: an arms race reminiscent of the Red Queen hypothesis in evolutionary biology.

Definition 37 (Co-Evolutionary Dynamics).

Consider n agents with parameters 𝜽=(𝜽1,,𝜽n). Each agent i receives a reward Ri(𝜽i,𝜽i) that depends on all agents' parameters. The co-evolutionary dynamics are the coupled gradient ascent equations (Coevolution)𝜽˙i=𝜽iRi(𝜽i,𝜽i),i=1,,n. The joint system defines a dynamical system on the product parameter space Θ=Θ1××Θn, with the joint gradient field 𝑭(𝜽)=(𝜽1R1,,𝜽nRn).

Theorem 12 (Red Queen Equilibrium).

Suppose each reward function Ri is twice continuously differentiable, α-strongly concave in 𝜽i (for fixed 𝜽i), and the cross-agent interaction gradients are bounded: 𝜽j𝜽iRiβ for all ij. If α>(n1)β (the self-improvement rate dominates the interaction effect), then:

  1. There exists a unique fixed point 𝜽=(𝜽1,,𝜽n) of the co-evolutionary dynamics , at which each agent plays a local best response.

  2. The dynamics converge to 𝜽 at a rate determined by the spectral radius of the Jacobian J𝑭(𝜽): (RED Queen RATE)𝜽(t)𝜽Ce(α(n1)β)t𝜽(0)𝜽.

Proof sketch.

Define the joint best-response map T(𝜽)=(T1(𝜽1),,Tn(𝜽n)) where Ti(𝜽i)=arg max𝜽iRi(𝜽i,𝜽i), which is unique by α-strong concavity.

For any two joint parameter vectors 𝜽 and 𝜽, the α-strong concavity and β-bounded cross-derivatives imply (via the implicit function theorem for each best response) (Contraction STEP)Ti(𝜽i)Ti(𝜽i)βαji𝜽j𝜽j. Summing over i and using the condition α>(n1)β, (Contraction SUM)iTi(𝜽i)Ti(𝜽i)(n1)βαi𝜽i𝜽i. Since (n1)β/α<1, T is a contraction mapping on the product space. By the Banach fixed-point theorem, T has a unique fixed point 𝜽. The convergence rate follows from bounding the spectral radius of J𝑭(𝜽) using the strong concavity parameter α minus the interaction parameter (n1)β.

Co-evolutionary dynamics (Red Queen effect). Two agents alternately improve, with each agent's fitness temporarily dropping when the other improves (non-stationary reward landscape). Both trajectories converge to the Red Queen equilibrium where mutual best responses stabilise.

Distributed Problem Solving

While the preceding subsections demonstrate that LLM agents can cooperate in stylised game-theoretic settings, their performance on distributed combinatorial problems remains limited. Guo et al. [73] evaluated LLM agents on classic distributed computing tasks (graph colouring, vertex cover, leader election, and consensus) and found that:

  1. Performance is reasonable at small scale (n10 agents) but degrades sharply as n increases, with near-zero success rates at n=100 for most problems.

  2. Three primary failure modes emerge: enumerate[(i)]

  3. Strategy miscoordination: agents adopt incompatible local strategies that cannot be reconciled globally;

  4. Uncritical trust: agents accept neighbours' proposals without verifying consistency, propagating errors;

  5. Poor conflict resolution: when two agents disagree, neither has a principled mechanism for yielding, leading to oscillation or deadlock. enumerate

These failure modes are rooted in the architecture of LLM agents: they lack global state awareness (each agent sees only its neighbourhood), they have limited working memory for tracking negotiation history, and they lack formal verification mechanisms for checking global consistency. Addressing these limitations requires combining LLM agents with formal coordination protocols (see Scheduling, Load Balancing, and Fault Tolerance).

Emergence of cooperation in repeated interactions between LLM agents. The proportion of mutually cooperative outcomes (C–C) grows from 15% in round 1 to 72% by round 200, while mutual defection (D–D) declines from 40% to 8%.

Credit Assignment in Multi-Agent Systems

When n agents collaborate on a task and achieve a joint outcome, a fundamental question arises: how much did each agent contribute? This is the multi-agent credit assignment problem, and its solution is essential for training, rewarding, and improving individual agents within a team. Without proper credit assignment, agents may free-ride on others' contributions or be penalised for failures caused by their teammates.

This section develops the theory and algorithms for multi-agent credit assignment. We formalise the problem using counterfactual reasoning (The Multi-Agent Credit Assignment Problem), connect it to the Shapley value from Cooperative Game Theory and the Shapley Value and develop efficient approximation algorithms (Shapley Value Computation), introduce difference rewards as a practical alternative (Difference Rewards), and derive multi-agent policy gradient theorems that incorporate credit assignment (Credit Assignment for Agent Training).

The Multi-Agent Credit Assignment Problem

Definition 38 (Multi-Agent Credit Assignment).

Let 𝒜={a1,,an} be a set of agents that jointly produce a team outcome with value v(𝒜). The credit assignment problem asks: for each agent i, what is the quantity ϕi representing agent i's contribution, subject to the constraint i=1nϕi=v(𝒜)?

The counterfactual contribution of agent i is (Counterfactual)Δi=v(𝒜)v(𝒜{ai}), measuring how much the team outcome degrades if agent i is removed. Note that in general iΔiv(𝒜) due to complementarities and redundancies among agents.

The counterfactual approach Δi is intuitive but flawed: it does not account for the order in which agents are removed, nor does it handle synergies between agents. The Shapley value (Definition 33) resolves both issues by averaging the marginal contribution over all possible orderings, yielding a unique, fair allocation that satisfies efficiency (iϕi=v(N)).

Shapley Value Computation

The exact Shapley value requires summing over all 2n subsets of N, which is computationally intractable for large n. The standard approach is Monte Carlo approximation: sample random permutations and average the marginal contributions.

Algorithm 3 (Monte Carlo Shapley Approximation).

Input: Value function oracle v:2N, number of samples m. Output: Estimated Shapley values ϕ^1,,ϕ^n.

  1. Initialise ϕ^i0 for all iN.
  2. for k=1,,m
  3. Sample a uniformly random permutation σ of N.
  4. S.
  5. for j=1,,n
  6. iσ(j) j-th player in the permutation
  7. ϕ^iϕ^i+1m[v(S{i})v(S)]
  8. SS{i}
  9. return (ϕ^1,,ϕ^n).

Proposition 18 (Shapley Approximation Guarantee).

Let v:2N[0,Vmax] be a bounded value function. The Monte Carlo Shapley approximation (Algorithm 3) with m random permutations satisfies (Shapley Hoeffding)P(|ϕ^iϕi|>ϵ)2exp(2mϵ2Vmax2)for each iN. In particular, m=O(Vmax2ln(n/δ)/ϵ2) samples suffice to ensure |ϕ^iϕi|ϵ for all iN simultaneously with probability at least 1δ.

Proof.

For a fixed agent i, define the random variable Yk=v(Sk{i})v(Sk) where Sk is the set of agents preceding i in the k-th random permutation. Then ϕ^i=1mk=1mYk and 𝔼[Yk]=ϕi (by the probabilistic interpretation of the Shapley value as the expected marginal contribution over random orderings).

Each Yk satisfies 0YkVmax (since v takes values in [0,Vmax]), so Yk is bounded in an interval of length Vmax. By Hoeffding's inequality, (Hoeffding Application)P(|ϕ^iϕi|>ϵ)=P(||1mk=1mYkϕi>ϵ)2exp(2mϵ2Vmax2). Applying a union bound over all n agents and setting the right-hand side to δ/n, we require mVmax2ln(2n/δ)/(2ϵ2)=O(Vmax2ln(n/δ)/ϵ2).

Difference Rewards

An alternative to the Shapley value that avoids summing over exponentially many subsets is the difference reward, which uses a single counterfactual evaluation.

Definition 39 (Difference Rewards).

Let τ=(s0,𝒂0,s1,𝒂1,) be a joint trajectory of n agents, and let R(τ) be the team reward. Define τi as the counterfactual trajectory in which agent i is replaced by a default agent (e.g., a random policy or a null agent that takes no actions). The difference reward for agent i is (Difference Reward)Di(τ)=R(τ)R(τi).

Proposition 19 (Difference Reward Incentive Alignment).

If the team reward function factorises as R(τ)=i=1nri(τi,τi) where each ri depends on agent i's actions and the joint state, and if the default policy does not affect other agents' rewards (i.e., rj(τj,τj)=rj(τj,τj(i)) for ji), then the gradient of the difference reward with respect to agent i's policy equals the gradient of the team reward: (DIFF Reward Gradient)𝜽i𝔼[Di(τ)]=𝜽i𝔼[R(τ)].

Proof.

Under the stated conditions, (DIFF Reward Expand)Di(τ)=R(τ)R(τi)=j=1nrj(τj,τj)j=1nrj(τj(i),τj(i))=ri(τi,τi)ri(τi(i),τi(i))+ji[rj(τj,τj)rj(τj,τj(i))]. By the assumption that replacing agent i with the default does not affect other agents' individual rewards, the summation over ji vanishes. Therefore, Di(τ)=ri(τi,τi)ri(τi(i),τi(i)). The second term is a constant with respect to 𝜽i (it involves only the default policy for agent i), so 𝜽i𝔼[Di]=𝜽i𝔼[ri(τi,τi)]=𝜽i𝔼[R(τ)], where the last equality uses the fact that the other terms in R(τ) do not depend on 𝜽i.

Credit Assignment for Agent Training

Credit assignment becomes most important when we wish to train individual agents within a multi-agent system. The multi-agent policy gradient theorem provides the foundation for this.

Theorem 13 (Multi-Agent Policy Gradient).

Consider n agents with policies πi(ai|s;𝜽i), i=1,,n, acting in a shared environment with joint policy π(𝒂|s;𝜽)=i=1nπi(ai|s;𝜽i) (conditional independence given the state). Let J(𝜽)=𝔼τπ𝜽[R(τ)] be the expected team reward. Then the gradient of J with respect to agent i's parameters is (MA Policy GRAD)𝜽iJ(𝜽)=𝔼τπ𝜽[t=0T𝜽ilogπi(ait|st;𝜽i)ϕit], where ϕit is agent i's credit signal at time t (which may be the Shapley value, difference reward, or any other estimator of agent i's contribution to the reward from time t onward).

Proof.

Start from the standard policy gradient for the joint policy. The expected return is (J DEF)J(𝜽)=τP(τ|𝜽)R(τ), where the sum is over all possible trajectories τ=(s0,𝒂0,s1,𝒂1,,sT,𝒂T) and the trajectory probability factorises as (Trajectory PROB)P(τ|𝜽)=p(s0)t=0T[i=1nπi(ait|st;𝜽i)]p(st+1|st,𝒂t).

Taking the gradient with respect to 𝜽i, (LOG Trick)𝜽iJ(𝜽)=τ𝜽iP(τ|𝜽)R(τ)=τP(τ|𝜽)𝜽ilogP(τ|𝜽)R(τ). Now, in logP(τ|𝜽), only the terms involving πi depend on 𝜽i: (Score Function)𝜽ilogP(τ|𝜽)=t=0T𝜽ilogπi(ait|st;𝜽i). This is because logP(τ|𝜽)=logp(s0)+tjlogπj(ajt|st;𝜽j)+tlogp(st+1|st,𝒂t), and only the j=i terms depend on 𝜽i. Substituting back, (Reinforce FULL)𝜽iJ(𝜽)=𝔼τπ𝜽[t=0T𝜽ilogπi(ait|st;𝜽i)R(τ)]. Replacing the full return R(τ) with agent i's credit signal ϕit (which may be the Shapley value of agent i's contribution from time t onward, or the difference reward Dit) is justified by the baseline subtraction lemma: replacing R(τ) with any function that has the same gradient in expectation does not change the gradient but may reduce variance. This yields .

Example 13 (Credit Assignment in a Three-Agent Research Team).

Consider three LLM agents collaborating on a research task:

  • Agent A (Literature Surveyor): searches and summarises relevant papers;

  • Agent B (Hypothesis Generator): proposes hypotheses based on the survey;

  • Agent C (Experiment Designer): designs experiments to test hypotheses.

The team receives a quality score v(𝒜)=85 (out of 100) from a human evaluator. Ablation scores: v({A})=30, v({B})=20, v({C})=15, v({A,B})=60, v({A,C})=50, v({B,C})=40.

Computing Shapley values using the permutation formula: ϕA=16[(30)(2)+(6020)(1)+(5015)(1)+(8540)(2)]=16(60+40+35+90)=2256=37.5,ϕB=16[(20)(2)+(6030)(1)+(4015)(1)+(8550)(2)]=16(40+30+25+70)=1656=27.5,ϕC=16[(15)(2)+(5030)(1)+(4020)(1)+(8560)(2)]=16(30+20+20+50)=1206=20.0. Verification: ϕA+ϕB+ϕC=37.5+27.5+20.0=85=v({A,B,C}), confirming efficiency. The Literature Surveyor receives the largest credit, consistent with its high marginal contributions: the survey is the foundation on which hypotheses and experiments are built.

Credit assignment for a three-agent research team. The Shapley values satisfy efficiency (ϕi=v(N)=85), while the naive counterfactual contributions Δi sum to 105, over-counting due to synergies.

Scheduling, Load Balancing, and Fault Tolerance

A multi-agent system is only as effective as its ability to allocate tasks efficiently, balance computational loads, and recover gracefully from failures. These operational concerns are often overlooked in discussions of multi-agent intelligence, yet they determine whether a theoretically powerful multi-agent design can function in practice.

This section develops the mathematical foundations of three interconnected topics: task scheduling as combinatorial optimisation (Task Scheduling as Optimisation), online scheduling and load balancing (Online Scheduling and Load Balancing), and fault tolerance in the presence of adversarial or Byzantine agents (Fault Tolerance).

Task Scheduling as Optimisation

Definition 40 (Agent Scheduling Problem).

Given n agents and m tasks, the scheduling problem is to find an assignment σ:{1,,m}{1,,n} mapping each task to an agent, with the objective of minimising the makespan, the time at which the last agent finishes: (Makespan)minσmaxi{1,,n}j:σ(j)=icij, where cij0 is the cost (time) for agent i to complete task j. In the identical machines case, cij=cj for all i (task cost depends only on the task). In the unrelated machines case, cij varies arbitrarily with both i and j.

Even the simplest variant of this problem is computationally hard.

Proposition 20 (Scheduling NP-Hardness).

The makespan minimisation problem on identical machines is NP-hard.

Proof sketch.

We reduce from the Partition problem. Given a set of positive integers {c1,,cm} with sum C=jcj, Partition asks whether there exists a subset S with jScj=C/2. Construct a scheduling instance with n=2 identical machines and tasks with costs c1,,cm. The makespan is exactly C/2 if and only if a partition exists. Since Partition is NP-complete, makespan minimisation on identical machines is NP-hard.

Despite NP-hardness, simple greedy algorithms provide provable approximation guarantees. The Longest Processing Time First (LPT) algorithm sorts tasks in decreasing order of cost and assigns each task to the least loaded machine, achieving a 4/3-approximation ratio [74]. For multi-agent LLM systems where task costs are estimated rather than known exactly, this greedy approach is both practical and near-optimal.

Remark 15 (Scheduling in Multi-Agent LLM Systems).

In a multi-agent LLM system, the “tasks” are sub-problems or queries, the “agents” are LLM instances (possibly with different capabilities), and the “cost” cij is the expected latency or token count for agent i to process task j. The orchestrator (see Definition 25) solves a variant of in real time, balancing completion time against the quality of each agent's output. This naturally extends to a bi-objective optimisation: minimise makespan while maximising output quality.

Online Scheduling and Load Balancing

In many practical settings, tasks arrive online and their costs are unknown a priori. We develop two key results: the power of randomised load balancing and the regret guarantees of online learning algorithms.

Balls into bins.

The simplest load-balancing model distributes m tasks (“balls”) uniformly at random among n agents (“bins”). The maximum load (number of tasks assigned to the busiest agent) determines the makespan.

Proposition 21 (Power of Two Choices).

  1. Uniform allocation: If m=n balls are thrown independently and uniformly into n bins, the maximum load is Θ(logn/loglogn) with high probability.

  2. Two-choice allocation: If each ball is placed in the less loaded of two independently and uniformly chosen bins, the maximum load drops to O(loglogn) with high probability.

The exponential improvement from one to two choices is called the power of two choices [32].

Proof sketch for part (b).

We use a layered induction argument. Define βi as the number of bins with load i. Under the two-choice protocol, a new ball increases the load of some bin from i1 to i only if both randomly chosen bins already have load i1. The probability of this event is at most (βi1/n)2.

For the base case, β1n trivially. For the inductive step, the expected value of βi satisfies (TWO Choice Recursion)𝔼[βi]n(βi1n)2=βi12n. Starting from β1n, we get β2n, β3n, until βi drops below 1. More precisely, if βin/22i2 (which can be verified by induction using ), then βi<1 when 22i2>n, i.e., i>2+log2log2n=O(loglogn). Therefore, the maximum load is O(loglogn) with high probability.

Online scheduling with EXP3.

When task costs are adversarial (unknown and potentially chosen by an adversary), we can use the EXP3 (Exponential-weight algorithm for Exploration and Exploitation) algorithm from the adversarial multi-armed bandit literature. EXP3 maintains a probability distribution over agents and achieves a regret bound of O(nTlnn) over T rounds with n agents, where regret is measured against the best fixed agent in hindsight [75].

Algorithm 4 (EXP3 for Agent Selection).

Input: Number of agents n, number of rounds T, learning rate η=2lnn/(nT). Output: Agent selection sequence.

  1. Initialise weights wi(1)1 for all i[n].
  2. for t=1,,T
  3. Set probabilities: pi(t)(1γ)wi(t)jwj(t)+γn γ=ηn
  4. Select agent It(p1(t),,pn(t)).
  5. Observe reward rIt(t) of selected agent.
  6. Compute importance-weighted estimate: r^i(t)ri(t)/pi(t) if i=It, else 0.
  7. Update weights: wi(t+1)wi(t)exp(ηr^i(t)/n).

Gantt chart for a scheduling instance with 3 agents and 8 tasks. The makespan (dashed red line) is determined by the completion time of the last agent. The LPT algorithm assigns longer tasks first, balancing load across agents.

Fault Tolerance

In any distributed system, agents may fail: by crashing, producing incorrect outputs, or, in the worst case, behaving adversarially. This subsection addresses the fundamental limits of fault tolerance in multi-agent systems, culminating in the classical Byzantine consensus bound.

Definition 41 (Byzantine Fault Tolerance).

An agent is Byzantine if it may deviate from its prescribed protocol in an arbitrary and potentially adversarial manner: it may send conflicting messages to different agents, lie about its observations, or strategically manipulate the protocol to cause maximum disruption. A multi-agent protocol is f-Byzantine fault tolerant if it achieves its specification (e.g., consensus) even when up to f of the n agents are Byzantine.

The foundational result of distributed computing establishes a sharp threshold for the number of Byzantine agents that can be tolerated.

Theorem 14 (Byzantine Consensus Bound).

No deterministic consensus protocol can tolerate f Byzantine agents among n total agents if n3f. Equivalently, Byzantine consensus requires n3f+1.

Proof.

We prove the impossibility direction: if n3f, no deterministic protocol achieves consensus. The proof uses a partition argument due to Lamport, Shostak, and Pease [33].

Step 1: Partition into three groups. Partition the n agents into three groups G1,G2,G3, each of size at most f (possible since n3f).

Step 2: Construct two scenarios. Consider a binary consensus problem where each agent has an input xi{0,1} and must output a decision di{0,1} satisfying:

  1. Agreement: all non-Byzantine agents output the same decision;

  2. Validity: if all non-Byzantine agents have the same input v, the decision must be v.

Scenario A: Agents in G1 have input 0; agents in G2 have input 1; agents in G3 are Byzantine. The Byzantine agents in G3 send messages to G1 as if they had input 0, and to G2 as if they had input 1.

Scenario B: Agents in G1 have input 0; agents in G3 have input 0; agents in G2 are Byzantine. The Byzantine agents in G2 behave exactly as G2 did in Scenario A (sending the same messages as an honest G2 with input 1).

Scenario C: Agents in G2 have input 1; agents in G3 have input 1; agents in G1 are Byzantine. The Byzantine agents in G1 behave exactly as G1 did in Scenario A.

Step 3: Derive contradiction. In Scenario B, all non-Byzantine agents (G1 and G3) have input 0, so the decision must be 0 (by validity).

In Scenario C, all non-Byzantine agents (G2 and G3) have input 1, so the decision must be 1 (by validity).

Now consider agents in G3 in Scenario A. From G3's perspective:

  • The messages from G1 are identical to those in Scenario B (since G1 has input 0 in both scenarios and receives the same messages from G3);

  • The messages from G2 are identical to those in Scenario C (since G2 has input 1 in both scenarios and receives the same messages from G3).

Therefore, G3 cannot distinguish Scenario A from Scenario B (where the decision must be 0) or from Scenario C (where the decision must be 1). Since G3 must commit to a single decision, it violates either the validity condition of Scenario B or Scenario C. This contradicts the assumption that the protocol achieves consensus with f Byzantine faults when n3f.

Remark 16 (Byzantine Faults in LLM Systems).

In multi-agent LLM systems, “Byzantine” behaviour arises from several sources: (a) adversarial prompt injection, where a malicious user manipulates one agent's input to corrupt its outputs; (b) model hallucination, where an agent produces confidently wrong outputs that mislead other agents; (c) self-replicating attacks (see Definition 42), where adversarial content propagates through the agent network. The Byzantine consensus bound implies that if more than one-third of agents in a system are compromised, no protocol can guarantee correct consensus, a sobering constraint for systems deployed in adversarial environments.

Definition 42 (CODES Attack).

A CODES (Cooperative and Distributed Evil Siblings) attack is a self-replicating adversarial prompt attack on multi-agent systems [34]. In a CODES attack:

  1. An adversary crafts a prompt padv containing instructions for the receiving agent to (i) execute a malicious action, and (ii) propagate padv to its neighbours in the communication graph;

  2. The attack spreads like a virus through the agent network: if agent i is compromised at time t, it sends padv to all agents j𝒩(i), compromising them at time t+1;

  3. The propagation follows the graph's structure: on a connected graph of diameter d, the entire network is compromised within d communication rounds.

Caution.

Multi-agent systems inherit and amplify single-agent vulnerabilities. A single compromised agent in a multi-agent system is far more dangerous than a single compromised standalone model. Through the communication network, one agent's failure can cascade to the entire system. The CODES attack demonstrates that adversarial prompts can self-replicate across agents, converting an O(1) vulnerability (one compromised agent) into an O(n) system-wide failure in O(d) rounds, where d is the graph diameter. The Byzantine consensus bound (Theorem 14) shows that once more than n/3 agents are compromised, no deterministic protocol can recover correct consensus. Defence strategies must therefore focus on containing compromised agents (e.g., limiting communication rates, sandboxing untrusted outputs) rather than merely detecting them.

Example 14 (CODES Attack Propagation).

Consider a multi-agent system with n=9 agents arranged in a 3×3 grid graph (each agent connected to its horizontal and vertical neighbours). The graph diameter is d=4. Suppose agent a1,1 (top-left corner) receives an adversarial prompt.

Round 0: Agent a1,1 is compromised. f=1<n/3=3. Byzantine tolerance holds.

Round 1: a1,1 propagates the attack to its neighbours a1,2 and a2,1. Now f=3=n/3. Byzantine tolerance is exactly at the threshold.

Round 2: The attack reaches a1,3, a2,2, a3,1. Now f=6>n/3. No deterministic consensus protocol can guarantee correctness.

Round 3–4: The remaining agents (a2,3, a3,2, a3,3) are compromised. The entire system is under adversarial control.

The total time from initial compromise to complete system failure is 4 rounds (the graph diameter), regardless of the number of agents. This demonstrates the critical importance of fast detection and isolation mechanisms.

Byzantine fault propagation in a 3×3 grid of agents. After Round 1 of a CODES attack originating at a1, three agents (shaded red) are compromised, reaching the Byzantine tolerance threshold f=n/3. Dashed arrows show active attack vectors toward honest agents.
Practical fault tolerance in LLM systems.

The AgentScope framework [10] implements a four-tier fault tolerance strategy for multi-agent LLM systems:

  1. Retry with backoff: failed API calls are retried with exponential backoff, tolerating transient failures;

  2. Output validation: each agent's output is checked against format and content constraints before being passed to other agents;

  3. Redundant execution: critical tasks are assigned to multiple agents, with outputs reconciled via majority vote (requiring n3f+1 for Byzantine tolerance);

  4. Checkpoint and rollback: the system state is periodically checkpointed, allowing rollback to a consistent state after detecting a failure cascade.

These pragmatic mechanisms complement the theoretical bounds of Theorem 14, providing defence in depth against both accidental failures and adversarial attacks.

Insight.

The fault tolerance trilemma. Multi-agent LLM systems face a fundamental tension among three desiderata: (1) performance, which improves with more inter-agent communication and trust; (2) fault tolerance, which improves with redundancy and scepticism; and (3) efficiency, which degrades with both redundancy and verification overhead. The Byzantine bound n3f+1 quantifies the minimum cost of fault tolerance: tolerating even one Byzantine agent requires at least four agents, a 4× overhead. For multi-agent LLM systems where each agent incurs significant computational cost (inference on a large model), this overhead may be prohibitive. Practical systems must therefore make explicit trade-offs: which agents are trusted? Which outputs require verification? What failure modes are acceptable? The answers depend on the deployment context and the cost of incorrect outputs.

Summary of Sections 11–15

This part of the chapter developed the mathematical foundations for multi-agent interaction, coordination, and operations. Game Theory Foundations for Multi-Agent Systems established game-theoretic foundations, from Nash equilibria through the folk theorem to Shapley values. Consensus and Coordination analysed consensus convergence, the Condorcet jury theorem, and the surprising dominance of quality over diversity. Cooperation and Competition examined how cooperation emerges spontaneously among LLM agents, connecting to co-evolutionary dynamics and the Red Queen hypothesis. Credit Assignment in Multi-Agent Systems formalised credit assignment and derived multi-agent policy gradients. Finally, Scheduling, Load Balancing, and Fault Tolerance addressed the operational concerns of scheduling, load balancing, and fault tolerance, culminating in the Byzantine consensus bound.

The recurring mathematical theme is the interplay between individual rationality and collective optimality. Nash equilibria may be socially suboptimal (Prisoner's Dilemma), but repetition enables cooperation (folk theorem). Majority voting improves upon individuals (Condorcet), but correlation limits the gains (Proposition 15). The Shapley value provides the unique fair allocation of credit, but is exponentially expensive to compute exactly. Byzantine agents can corrupt consensus, but n3f+1 agents suffice to tolerate f failures.

These mathematical tools, drawn from game theory, graph theory, probability, and distributed computing, form the analytical backbone of multi-agent AI systems. The following sections (in the companion files) build on these foundations to address emergent behaviours, safety, and the future trajectory of multi-agent systems.

Exercise 4 (Nash Equilibrium in a Coordination Game).

Consider the Battle of the Sexes game with payoff matrix:

OperaFootball
Opera(3,2)(0,0)
Football(0,0)(2,3)

  1. Find all pure-strategy Nash equilibria.

  2. Find the unique mixed-strategy Nash equilibrium. What is the expected payoff to each player?

  3. Relate this to a multi-agent LLM system where two agents must agree on a common output format but have different preferences.

Exercise 5 (Folk Theorem Discount Factor).

In the Prisoner's Dilemma with payoffs as in fig:agents:prisoners-dilemma, compute the minimum discount factor δ such that mutual cooperation (C,C) can be sustained as a Nash equilibrium of the infinitely repeated game using grim trigger strategies.

Exercise 6 (Shapley Value for Symmetric Agents).

Let (N,v) be a symmetric game, meaning v(S) depends only on |S|: v(S)=g(|S|) for some function g:{0,1,,n} with g(0)=0. Show that the Shapley value of every player is ϕi=v(N)/n=g(n)/n.

Exercise 7 (Consensus on a Star Graph).

Consider n agents on a star graph: agent 1 is connected to all other agents, and no other edges exist.

  1. Compute the graph Laplacian L and its eigenvalues.

  2. What is the Fiedler eigenvalue λ2? How does the consensus convergence rate compare to a complete graph?

  3. Discuss the implications for a multi-agent system with a central orchestrator (hub) connected to specialised agents (leaves).

Exercise 8 (Correlated Condorcet).

Ten LLM agents, each with individual accuracy p=0.75, are used for majority voting. Their pairwise correlation is ρ=0.3.

  1. Compute the effective number of independent agents neff.

  2. Estimate the majority-vote accuracy using the Condorcet formula with neff replacing n.

  3. How many agents with ρ=0.3 would be needed to match the performance of 10 independent (ρ=0) agents?

Exercise 9 (Multi-Agent Credit Assignment).

Four LLM agents collaborate on a translation task. The characteristic function (BLEU score) is: v()=0; v({i})=20 for all i; v({i,j})=45 for all pairs; v({i,j,k})=65 for all triples; v({1,2,3,4})=80.

  1. Compute the Shapley value of each agent. (Hint: use the symmetry of the game.)

  2. Compute the counterfactual contribution Δi of each agent. Do they sum to v(N)?

  3. If you can afford only m=10 random permutations for Monte Carlo Shapley estimation, what is the expected approximation error (use Proposition 18)?

Exercise 10 (Byzantine Fault Tolerance Threshold).

A multi-agent system has n=12 agents.

  1. What is the maximum number of Byzantine agents f that a deterministic consensus protocol can tolerate?

  2. If agents are arranged on a cycle graph and a CODES attack starts at one agent, after how many rounds does the number of compromised agents exceed the Byzantine tolerance threshold?

  3. Propose a modification to the communication protocol that would slow the propagation of a CODES attack.

Exercise 11 (Power of Two Choices).

A system has n=1000 agents and m=1000 incoming tasks.

  1. Under uniform random assignment, estimate the maximum load using the Θ(logn/loglogn) bound.

  2. Under the power-of-two-choices protocol, estimate the maximum load using the O(loglogn) bound.

  3. If each “load unit” corresponds to a 30-second LLM inference call, estimate the wall-clock time savings from using two-choice assignment versus uniform assignment.

Evolutionary Approaches to Agent Systems

Nature solved the design problem long before engineers did. Biological evolution (blind variation coupled with selective retention) produced the staggering diversity of life on Earth without a single line of pseudocode. The same principle applies to the design of agentic AI systems: rather than hand-crafting the architecture of a multi-agent system, we can evolve it. This section develops the mathematical foundations of evolutionary approaches to agent design, from swarm-intelligence-based architecture search to trajectory-level self-improvement to population dynamics that explain how specialisation emerges in agent ecosystems.

The intellectual arc is as follows. We begin with SwarmAgentic (Agent Architecture Search via Swarm Intelligence), which adapts Particle Swarm Optimisation to the space of agent architectures, treating each candidate multi-agent system as a “particle” whose position is a structured natural-language description of agents and their collaboration protocol. We then turn to AgentEvol (Trajectory-Based Evolution: AgentEvol in Detail), which takes a fundamentally different approach: rather than searching over architectures, it evolves the behaviour of a fixed architecture by iteratively collecting trajectories, filtering by reward, and fine-tuning. We derive the variational bound that justifies this procedure and prove that it monotonically improves a lower bound on expected success probability. Finally, we place both approaches in the broader context of evolutionary game theory (sec:agents:population,sec:agents:specialization), showing how replicator dynamics govern population-level selection and how specialisation emerges as an evolutionarily stable strategy.

Historical Note.

From Darwin to agent architecture search. The idea of applying evolutionary principles to computation dates to the 1960s, when Rechenberg and Schwefel developed evolution strategies for engineering optimisation, and Holland formalised genetic algorithms [35]. Koza's genetic programming (1992) [36] extended the idea to evolving programs themselves. Neural architecture search (NAS) brought evolution to deep learning: Real et al. (2019) [37] showed that evolutionary NAS could match or exceed hand-designed architectures on ImageNet. The latest frontier is agent architecture search, where the search space includes not only individual agent designs but also the communication topology and collaboration protocol that bind agents into a functioning team. SwarmAgentic [38] and AgentEvol [15] represent two poles of this emerging field: the former searches over architectures, the latter evolves behaviour within a fixed architecture.

Agent Architecture Search via Swarm Intelligence

The central challenge of multi-agent system design is combinatorial: given n possible agent roles, m possible tools per agent, and k possible communication topologies, the space of candidate systems grows as O(nmk), far too large for exhaustive search, yet too structured for pure random sampling. Swarm intelligence offers a middle path: a population of candidate solutions explores the space in parallel, sharing information about promising regions.

Definition 43 (Agent Architecture Space).

An agent architecture space is a tuple 𝒳=(𝒜,𝒯,𝒞,𝒫) where:

  1. 𝒜 is a finite set of agent role descriptions (natural-language strings specifying capabilities, persona, and constraints);

  2. 𝒯 is a finite set of available tools (APIs, code interpreters, search engines, etc.);

  3. 𝒞 is a set of communication topologies (Definition 18), each specifying which agents can send messages to which others;

  4. 𝒫 is a set of collaboration protocols (turn-taking rules, voting mechanisms, escalation policies).

A candidate system (or particle) is a triple 𝒙=(A,c,p) where A𝒜×2𝒯 assigns a tool subset to each selected agent role, c𝒞 is a communication topology, and p𝒫 is a collaboration protocol. The space of all valid candidate systems is denoted 𝒳.

The key insight of SwarmAgentic [38] is that each particle's “position” can be encoded as a structured natural-language string, a prompt that, when fed to an LLM orchestrator (Definition 25), instantiates a complete multi-agent system. This encoding enables the use of language-model mutations (paraphrasing, recombination, insertion) as the analogue of velocity updates in classical Particle Swarm Optimisation (PSO).

Particle Swarm Optimisation refresher. In classical PSO [76], a swarm of N particles explores a continuous space d. Each particle i maintains a position 𝒙id and a velocity 𝒗id. At each iteration, the velocity is updated as (PSO Velocity)𝒗i(t+1)=w𝒗i(t)+c1r1(𝒑i𝒙i(t))+c2r2(𝒈𝒙i(t)), where w is the inertia weight, c1,c2 are acceleration coefficients, r1,r2Uniform(0,1), 𝒑i is particle i's personal best position, and 𝒈 is the global best position. The position update is simply 𝒙i(t+1)=𝒙i(t)+𝒗i(t+1).

Adaptation to agent architecture space. SwarmAgentic replaces the continuous velocity update with a failure-aware language-space update. The three terms become:

  1. Failure-driven adjustment (analogous to inertia): analyse the current system's failure modes on a validation set and generate a natural-language “diff” that addresses identified weaknesses;

  2. Personal best guidance: compare the current system description to the particle's historically best-performing description and generate modifications that move toward the personal best;

  3. Global best guidance: compare to the swarm's globally best-performing description and generate modifications that incorporate its strengths.

These three natural-language diffs are combined (via an LLM that merges and deduplicates) to produce the updated system description. The fitness function f:𝒳 evaluates each candidate system on a held-out task suite, measuring accuracy, efficiency, and cost.

Algorithm 5 (SwarmAgentic: PSO for Agent Systems).

Input: Architecture space 𝒳, swarm size N, iterations T, task suite 𝒟val, fitness function f. Output: Best-found agent system 𝒙.

  1. Initialise N particles {𝒙i(0)}i=1N by sampling diverse system descriptions
  2. for i=1,,N
  3. fi(0)f(𝒙i(0),𝒟val) Evaluate fitness
  4. 𝒑i𝒙i(0); fibestfi(0) Personal best
  5. 𝒈arg max𝒑ifibest Global best
  6. for t=1,,T
  7. for i=1,,N
  8. δfailAɴᴀʟʏsᴇFᴀɪʟᴜʀᴇs(𝒙i(t1),𝒟val) Failure-driven
  9. δpersonalCᴏᴍᴘᴀʀᴇAɴᴅDɪꜰꜰ(𝒙i(t1),𝒑i) Personal best
  10. δglobalCᴏᴍᴘᴀʀᴇAɴᴅDɪꜰꜰ(𝒙i(t1),𝒈) Global best
  11. 𝒙i(t)MᴇʀɢᴇDɪꜰꜰs(𝒙i(t1),δfail,δpersonal,δglobal)
  12. fi(t)f(𝒙i(t),𝒟val)
  13. if fi(t)>fibest
  14. 𝒑i𝒙i(t); fibestfi(t)
  15. 𝒈arg max𝒑ifibest
  16. return 𝒈

Remark 17 (Joint Optimisation).

A critical feature of Algorithm 5 is that it jointly optimises agent functionality (what each agent does) and collaboration structure (how agents interact). Classical approaches optimise these separately (first design agents, then wire them together), but SwarmAgentic's language-space encoding treats both as part of a single particle, enabling co-adaptation. This is analogous to co-evolution in biology, where organisms and their ecological relationships evolve simultaneously.

Convergence analysis. Classical PSO convergence theory [77] shows that particles converge when the inertia and acceleration parameters satisfy certain spectral conditions. For SwarmAgentic, the situation is more nuanced because the “velocity” is a language-space operation rather than a vector addition. Nevertheless, we can analyse convergence through the lens of fitness monotonicity: the global best fitness f(𝒈(t)) is non-decreasing by construction (we only update 𝒈 when a strictly better solution is found). Since the fitness function is bounded above (task performance lies in [0,1]), the sequence {f(𝒈(t))}t=0T converges to a limit f. The key practical question is the rate of convergence: how many iterations T are needed to reach within ϵ of the global optimum? In continuous PSO, convergence rates of O(1/T) have been established under mild assumptions [78]. For SwarmAgentic, empirical evidence suggests similar convergence profiles, with most improvement occurring in the first T1015 iterations.

Computational cost. Each iteration of Algorithm 5 requires N fitness evaluations (one per particle), where each evaluation involves instantiating a full multi-agent system and running it on the validation set. If each evaluation costs C tokens, the total cost is O(NTC). With N=20 particles, T=15 iterations, and C105 tokens per evaluation, the total cost is approximately 3×107 tokens, substantial, but amortised over the lifetime of the resulting system. This makes SwarmAgentic most suitable for high-stakes, repeatedly-used agent systems where the design cost is justified by deployment savings.

Particle Swarm Optimisation in agent architecture space. Each particle (dot) represents a candidate multi-agent system. Open circles show initial positions (t=0); filled circles show final positions (t=T) after iterative failure-driven updates. Arrows trace particle trajectories toward the global optimum (star).

Trajectory-Based Evolution: AgentEvol in Detail

While SwarmAgentic searches over the space of architectures, AgentEvol [15] takes a complementary approach: it fixes the architecture and evolves the behaviour of an agent by iteratively collecting task trajectories, filtering by reward, and fine-tuning on the successful ones. The mathematical justification rests on a variational lower bound that we now derive in full.

Setup. Let a denote a task instruction drawn from some distribution p(a). A trajectory τ=(s0,a0,s1,a1,,sT) is a sequence of states and actions generated by a policy πθ(τ|a) parameterised by 𝜽. We observe a binary reward r(τ){0,1} indicating success or failure. Our goal is to maximise the expected success probability: (Agentevol Objective EVOL)J(𝜽)=𝔼ap(a)[p(success|a;𝜽)]=𝔼ap(a)[τπθ(τ|a)r(τ)].

Variational lower bound. For any instruction a, the log-success-probability admits a variational decomposition. Let q(τ|a) be an arbitrary distribution over trajectories. Then: (Agentevol ELBO EVOL)logp(success|a)=logτr(τ)πθ(τ|a)=logτq(τ|a)r(τ)πθ(τ|a)q(τ|a)τq(τ|a)logr(τ)πθ(τ|a)q(τ|a)=𝔼q(τ|a)[logr(τ)+logπθ(τ|a)]+𝖧[q(τ|a)], where follows from Jensen's inequality applied to the concave function log. Since r(τ){0,1}, the term logr(τ) is zero when r(τ)=1 and when r(τ)=0, so the optimal variational distribution places all its mass on successful trajectories: (Agentevol Optimal Q)q(τ|a)r(τ)πθ(τ|a). This is the reward-weighted policy: we keep only the trajectories that succeed and reweight them by the policy's own probability.

Practical algorithm. AgentEvol approximates the above in M iterations. At each iteration m:

  1. Sample K=1 trajectory per instruction from the current policy πθm;

  2. Compute binary rewards r(τ);

  3. Merge the successful trajectories with a base dataset 𝒟0 of expert demonstrations;

  4. Maximise the weighted log-likelihood: 𝜽m+1=arg max𝜽τ:r(τ)=1logπ𝜽(τ|a)+τ𝒟0logπ𝜽(τ|a).

Empirically, M=4 iterations balance performance gain against computational cost.

Theorem 15 (AgentEvol Variational Bound).

Let {𝜽m}m=0M be the sequence of parameters produced by the AgentEvol procedure. Define the lower bound (Agentevol Bound)(𝜽)=𝔼ap(a)𝔼q(τ|a;𝜽)[logπ𝜽(τ|a)]+𝔼ap(a)𝖧[q(τ|a;𝜽)], where q(τ|a;𝜽) is the reward-weighted policy under 𝜽. Then:

  1. (𝜽)𝔼a[logp(success|a;𝜽)] for all 𝜽;

  2. the iterative procedure satisfies (𝜽m+1)(𝜽m) for all m, i.e., the lower bound is monotonically non-decreasing.

Proof.

Part (i). This is a direct consequence of Jensen's inequality. For any instruction a and any distribution q(τ|a): logp(success|a)=logτr(τ)π𝜽(τ|a)=log𝔼q[r(τ)π𝜽(τ|a)q(τ|a)]𝔼q[logr(τ)π𝜽(τ|a)q(τ|a)], where the inequality is Jensen's applied to log (concave). Choosing q=q (which is supported only on {τ:r(τ)=1}) eliminates the logr(τ) terms (they are all zero), yielding precisely (𝜽). Taking the expectation over a gives Part (i).

Part (ii). The AgentEvol update at iteration m maximises τq(τ|a;𝜽m)logπ𝜽(τ|a) over 𝜽 (plus the base data term, which we absorb into the variational objective for cleanliness). Let 𝜽m+1=arg max𝜽𝔼a𝔼q(;𝜽m)[logπ𝜽(τ|a)]. Then: (𝜽m+1)=𝔼a𝔼q(;𝜽m+1)[logπ𝜽m+1(τ|a)]+𝔼a𝖧[q(;𝜽m+1)]𝔼a𝔼q(;𝜽m)[logπ𝜽m+1(τ|a)]+𝔼a𝖧[q(;𝜽m)] where the inequality uses the fact that q(;𝜽m+1) is the optimal variational distribution for 𝜽m+1, so evaluating the bound at any other q (including q(;𝜽m)) gives a lower value. Now, by the maximisation step: 𝔼a𝔼q(;𝜽m)[logπ𝜽m+1(τ|a)]𝔼a𝔼q(;𝜽m)[logπ𝜽m(τ|a)], since 𝜽m+1 is the maximiser. Combining: (𝜽m+1)𝔼a𝔼q(;𝜽m)[logπ𝜽m(τ|a)]+𝔼a𝖧[q(;𝜽m)]=(𝜽m). This completes the proof. The argument mirrors the classical EM monotonicity proof: the E-step (computing q) tightens the bound, and the M-step (optimising 𝜽) increases it further.

Key Idea.

EM for agents. The AgentEvol procedure is an expectation-maximisation algorithm in disguise. The E-step identifies which trajectories succeeded (computing q); the M-step fine-tunes the policy on those successful trajectories. Each iteration monotonically improves a lower bound on expected success, just as each EM iteration monotonically improves the data log-likelihood. The connection to the variational inference framework of VAEs (25) is not accidental; both exploit the same Jensen's-inequality-based bound.

Population-Level Selection

The preceding subsections optimised individual agent systems. We now zoom out to the population level: given a collection of agent strategies coexisting in an environment, which strategies survive and which go extinct? The mathematical framework is evolutionary game theory [79], and the central dynamical equation is the replicator equation.

Definition 44 (Replicator Dynamics).

Consider a population of agents employing strategies from a finite set {1,,k}. Let xi(t)0 denote the fraction of the population using strategy i at time t, with i=1kxi(t)=1. Let fi(𝒙) denote the fitness (expected payoff) of strategy i when the population state is 𝒙=(x1,,xk), and let f(𝒙)=i=1kxifi(𝒙) denote the average population fitness. The replicator dynamics is the system of ordinary differential equations (Replicator)x˙i=xi(fi(𝒙)f(𝒙)),i=1,,k. Strategies with above-average fitness grow; those with below-average fitness shrink. The simplex Δk1={𝒙0k:ixi=1} is forward-invariant under .

The replicator equation has deep connections to classical game theory.

Remark 18 (Nash Equilibria as Fixed Points).

A state 𝒙 is a fixed point of the replicator dynamics if and only if, for every strategy i with xi>0, we have fi(𝒙)=f(𝒙). That is, every strategy present in the population earns exactly the average fitness. This is precisely the condition for 𝒙 to be a Nash equilibrium of the underlying symmetric game: no strategy can improve its payoff by unilateral deviation.

Not all Nash equilibria are equally robust. An Evolutionarily Stable Strategy (ESS) [80] is one that cannot be invaded by a small population of mutants.

Definition 45 (Evolutionarily Stable Strategy).

A strategy 𝒙Δk1 is an ESS if for every mutant strategy 𝒚𝒙, there exists ϵ>0 such that for all ϵ(0,ϵ): (ESS Condition)f(𝒙,(1ϵ)𝒙+ϵ𝒚)>f(𝒚,(1ϵ)𝒙+ϵ𝒚), where f(𝒔,𝒑) denotes the fitness of strategy 𝒔 in a population with state 𝒑. Equivalently, 𝒙 is a Nash equilibrium that satisfies: if f(𝒚,𝒙)=f(𝒙,𝒙), then f(𝒙,𝒚)>f(𝒚,𝒚).

Phase portrait of replicator dynamics on the 3-strategy simplex. Arrows show the direction of population flow. Trajectories converge to the interior ESS (green dot), where all three strategies coexist in a stable equilibrium.

Emergence of Specialisation

One of the most striking phenomena in multi-agent systems is emergent specialisation: agents that begin as generalists evolve to become specialists, each focusing on a narrow subset of tasks. This mirrors the division of labour observed in biological colonies (ant castes), economic markets (comparative advantage), and scientific communities (disciplinary boundaries).

The mathematical explanation comes from the interplay between environmental heterogeneity and competitive dynamics. The Bishop–Cannings theorem [81] in evolutionary game theory states that in games with symmetric payoff structures, the ESS involves a mixture of strategies whose support depends on the environment's structure.

Proposition 22 (Specialisation as Evolutionarily Stable Strategy).

Consider an environment with k task types occurring with frequencies α1,,αk (iαi=1). An agent specialising in task type i receives payoff βi>0 on tasks of type i and payoff 0 on all other types. A generalist receives payoff γ<miniβi on all task types. Suppose ni agents specialise in type i. The fitness of a type-i specialist is (Specialist Fitness)fi=αiβini+1, where the denominator reflects competition (shared reward among specialists). At the ESS, the population fractions satisfy (Specialization ESS)xi=αiβij=1kαjβj,i=1,,k. That is, agents specialise in tasks proportionally to task frequency weighted by task value, and the generalist strategy is driven to extinction whenever γ<f(𝒙).

Proof sketch.

At a fixed point of the replicator dynamics , all strategies present in the population must earn exactly the average fitness. Setting fi(𝒙)=f(𝒙) for all i with xi>0 and using with ni=Nxi (where N is the population size), we obtain αiβiNxi+1=αjβjNxj+1for all i,j. For large N, the +1 terms become negligible, giving αiβi/xi=αjβj/xj for all i,j. This implies xiαiβi, which after normalisation yields . To verify ESS stability, one checks the second-order condition: for any mutant strategy 𝒚𝒙 that achieves the same fitness against 𝒙, we need f(𝒙,𝒚)>f(𝒚,𝒚). The concavity of the fitness function in the specialist fractions (due to the 1/ni competition term) ensures this condition holds, completing the proof.

Exercise 12.

In the setting of Proposition 22, compute the exact threshold γ below which the generalist strategy is driven to extinction. Show that γ=(i=1kαiβi)/N where N is the total specialist population at the ESS. How does γ change as the number of task types k increases?

Scientific Discovery as Multi-Agent Collaboration

Science is, and has always been, a multi-agent enterprise. No single researcher, however brilliant, discovers, verifies, and disseminates knowledge alone. The scientific community is a vast, self-organising network: individual researchers propose hypotheses, design experiments, collect data, write papers, submit to peer review, revise, and publish. Other researchers read, critique, replicate, extend, and occasionally overturn prior work. The resulting knowledge structure, an ever-growing, self-correcting web of theories, evidence, and consensus, is arguably the most successful multi-agent coordination protocol in human history.

This section formalises scientific discovery as a multi-agent system, connecting the abstract definitions of Definition 14 to the concrete workflows of scientific research. We show how agent-based hypothesis generation (Agent-Based Hypothesis Generation) decomposes the creative process into specialised roles, how milestone-based coordination (Milestone-Based Coordination) manages the dependencies inherent in complex research programmes, and how knowledge aggregation (Knowledge Aggregation) ensures that the community converges on truth, even when individual researchers are biased or uncertain.

Key Idea.

The scientific method as a multi-agent coordination protocol. The scientific method (hypothesis, experiment, observation, revision) is not merely a logical procedure. It is a social protocol: a set of norms (peer review, replication, open publication) that coordinate the activities of many agents toward a shared goal (reliable knowledge). Understanding science through the lens of multi-agent systems (Definition 14) reveals deep structural parallels with engineered agent teams and suggests principled ways to automate parts of the scientific process.

The Scientific Community as a Multi-Agent System

We begin by instantiating the abstract MAS definition to the scientific domain.

Definition 46 (Agent-Based Scientific Discovery).

An agent-based scientific discovery system is a multi-agent system 𝒮=(𝒜,,𝒞,Ω) (Definition 14) with the following interpretation:

  1. 𝒜={a1,,an} is a set of research agents, each equipped with an LLM backbone, a role specification (hypothesis generator, experimenter, critic, or synthesiser), and a set of tools (literature search, code execution, data analysis, visualisation);

  2. is the shared knowledge environment, consisting of a literature corpus , a database of experimental results , and a set of working hypotheses ;

  3. 𝒞 is a publish-subscribe communication protocol: agents publish intermediate results (papers, datasets, code) to shared channels, and other agents subscribe to channels relevant to their specialisation;

  4. Ω is the evaluation mechanism, comprising peer review (agents critique each other's outputs), replication (experimenter agents attempt to reproduce claimed results), and a funding allocation function ϕ:𝒜×0 that directs computational resources to the most promising hypotheses.

The publish-subscribe communication pattern deserves emphasis. Unlike the direct messaging of Definition 18, publish-subscribe is topic-based: an agent publishes a result to a topic (e.g., “protein folding”), and all agents subscribed to that topic receive it. This decoupling enables scalability: a new agent can join the system simply by subscribing to relevant topics, without requiring changes to the communication topology.

Connection to human science. The parallel to real scientific communities is intentional and illuminating. In human science, 𝒜 is the set of research groups; is the body of published literature; 𝒞 is the system of journals, preprint servers, and conferences; and Ω is the combination of peer review and funding agencies. The question this section asks is: can we build artificial scientific communities that exhibit the same self-correcting dynamics?

Agent-Based Hypothesis Generation

The creative core of science is hypothesis generation: proposing explanations for observed phenomena. In agent-based scientific discovery, this process is decomposed into four specialised roles, each implemented by an LLM agent with a tailored system prompt and tool set.

Hypothesis generators (creative/divergent agents) explore the space of possible explanations. Their system prompt encourages breadth: “Generate as many distinct hypotheses as possible that could explain the following observation” They are equipped with literature search tools that retrieve relevant prior work, enabling analogical reasoning across domains.

Experimenters (tool-using agents, cf. Definition 5) design and execute experiments. Given a hypothesis h, an experimenter agent produces a test plan, writes code to implement it, runs the code in a sandboxed environment, and returns structured results. The key capability is tool use: the agent can call APIs for molecular simulation, statistical testing, database queries, and visualisation.

Critics (analytical/convergent agents) evaluate hypotheses against evidence. Their system prompt encourages scepticism: “Identify weaknesses, alternative explanations, and potential confounds” Critics implement a lightweight form of peer review, filtering the hypothesis space before expensive experiments.

Synthesisers combine partial results from multiple hypothesis-experiment cycles into coherent theories. They produce structured summaries, identify patterns across experiments, and propose higher-order hypotheses that unify disparate findings.

Example 15 (Agent-Driven Drug Discovery Pipeline).

Consider a multi-agent system for identifying novel kinase inhibitors. The pipeline proceeds as follows:

  1. A hypothesis generator analyses the literature on known kinase structures and proposes 20 candidate molecular scaffolds that might bind the ATP pocket of a target kinase.

  2. An experimenter agent takes each scaffold, generates SMILES strings for 100 variants using a generative chemistry model, and runs molecular docking simulations to estimate binding affinity ΔG for each variant.

  3. A critic agent reviews the docking results, flags compounds with poor drug-likeness (violating Lipinski's rules), identifies potential off-target effects by cross-referencing a selectivity database, and ranks the remaining candidates.

  4. A synthesiser agent compiles the results into a structured report, identifies the top-10 candidates, and proposes follow-up experiments (e.g., molecular dynamics simulations to assess binding stability).

The publish-subscribe protocol ensures that each agent receives only the outputs relevant to its role, reducing information overload. The full pipeline runs in hours rather than the months required for the equivalent human workflow.

Milestone-Based Coordination

Complex scientific projects, like complex engineering projects, have dependencies: you cannot analyse data before collecting it, and you cannot collect data before designing the experiment. MultiAgentBench [82] formalises these dependencies using milestone DAGs.

Definition 47 (Milestone DAG).

A milestone DAG is a directed acyclic graph GM=(M,EM,𝒅) where:

  1. M={m1,,mL} is a finite set of milestones (discrete, verifiable sub-goals);

  2. EMM×M is a set of directed edges, where (mi,mj)EM means milestone mi must be completed before mj can begin (a precedence constraint);

  3. 𝒅=(d1,,dL)>0L assigns a duration di to each milestone mi.

The DAG has a unique source msrc (no predecessors) and a unique sink msnk (no successors). A schedule is an assignment of start times si0 to each milestone such that sjsi+di for all (mi,mj)EM. The makespan of a schedule is ssnk+dsnk.

The key performance indicators (KPIs) for milestone-based coordination are:

  • Progress: Prog(t)=|Mdone(t)|/|M|, the fraction of milestones completed by time t;

  • Efficiency: Eff(t)=Prog(t)/turns(t), progress per communication round;

  • Communication quality: a 1–5 score assessing relevance, clarity, and informativeness of inter-agent messages;

  • Planning quality: a 1–5 score assessing the agent's ability to decompose the task into appropriate sub-goals.

The following classical result from project scheduling theory establishes the fundamental limit on makespan.

Proposition 23 (Critical Path Theorem).

The minimum makespan of a milestone DAG GM=(M,EM,𝒅) equals the length of the longest (weighted) path from msrc to msnk in GM, where the length of a path P=(mi1,mi2,,mip) is (P)=j=1pdij. This longest path is called the critical path.

Proof.

We proceed by dynamic programming on the DAG structure.

Lower bound. Let P=(mi1,,mip) be a longest path from source to sink with length (P). The precedence constraints require that the milestones on P be executed sequentially: mi2 cannot start before mi1 finishes, mi3 cannot start before mi2 finishes, etc. Therefore, the makespan of any schedule is at least j=1pdij=(P).

Upper bound (constructive). Define the earliest start time ES(m) for each milestone m recursively: (Earliest Start)ES(msrc)=0,ES(mj)=max(mi,mj)EM[ES(mi)+di]. Since GM is a DAG, this recursion is well-defined and can be evaluated in topological order in O(|M|+|EM|) time. The schedule sj=ES(mj) satisfies all precedence constraints by construction. Its makespan is ES(msnk)+dsnk.

We claim ES(msnk)+dsnk=(P). By induction on the topological order: ES(mj) equals the length of the longest path from msrc to mj minus dj (the longest path ending at mj's start). To see this, note that ES(msrc)=0=srcdsrc (the longest path to the source is just dsrc, so the start time is 0). For the inductive step, ES(mj)=maxi[ES(mi)+di]; by the inductive hypothesis, ES(mi)+di equals the longest path from source to the end of mi, and adding the edge to mj gives the longest path from source to the start of mj. The maximum over all predecessors selects the longest such path. At the sink, ES(msnk)+dsnk=(P).

Since the lower bound and upper bound coincide, the minimum makespan is (P).

Remark 19 (Implications for Agent Coordination).

The critical path theorem has a powerful implication for multi-agent systems: adding more agents cannot reduce the makespan below the critical path length. If a project's bottleneck is a chain of sequential dependencies, no amount of parallelism can help. The only way to reduce makespan is to shorten the tasks on the critical path itself, for instance, by assigning the most capable agent to the critical task, or by reformulating the project to reduce sequential dependencies.

A milestone DAG for a multi-agent research project. Each node is a milestone with its duration d. The critical path (red, thick arrows) determines the minimum project duration: no schedule can achieve a makespan less than 10.

Knowledge Aggregation

Scientific progress requires not only generating knowledge but also aggregating it: combining the beliefs, observations, and expertise of many agents into a shared consensus. The mathematical framework for this process is the DeGroot learning model [83], which describes how a network of agents updates beliefs through iterated averaging.

Definition 48 (DeGroot Learning).

Consider n agents, each holding a belief pi(0)[0,1] about the probability of some proposition (e.g., “this hypothesis is correct”). Let Wn×n be a row-stochastic trust matrix: Wij0 and j=1nWij=1 for all i. The entry Wij represents the weight that agent i places on agent j's opinion. The DeGroot learning update rule is (Degroot)𝒑(t+1)=W𝒑(t), where 𝒑(t)=(p1(t),,pn(t)) is the vector of beliefs at time t. At each round, each agent replaces its belief with a weighted average of its neighbours' beliefs.

The central question is: does the community converge to a consensus, and if so, whose beliefs matter most?

Theorem 16 (DeGroot Convergence).

Let W be a primitive row-stochastic matrix (i.e., the associated directed graph is strongly connected and aperiodic). Then the DeGroot learning process converges: (Degroot Convergence)limt𝒑(t)=𝟏𝒘𝒑(0), where 𝒘n is the unique left eigenvector of W corresponding to eigenvalue 1, normalised so that i=1nwi=1 and wi>0 for all i. That is, all agents converge to the same belief p=i=1nwipi(0), a weighted average of the initial beliefs with weights given by the left eigenvector 𝒘.

Proof.

The proof proceeds via the Perron–Frobenius theorem for non-negative matrices.

Step 1: Spectral decomposition. Since W is row-stochastic, 𝟏 is a right eigenvector with eigenvalue 1: W𝟏=𝟏. Since W is primitive, the Perron–Frobenius theorem guarantees that 1 is a simple eigenvalue (algebraic multiplicity one), all other eigenvalues λ2,,λn satisfy |λk|<1, and there exists a unique left eigenvector 𝒘W=𝒘 with 𝒘>0 and 𝒘𝟏=1.

Step 2: Spectral expansion. Write the spectral decomposition of W: (Degroot Spectral)W=𝟏𝒘+k=2nλk𝒖k𝒗k, where (λk,𝒖k,𝒗k) are the eigenvalue-right/left eigenvector triples, normalised so that 𝒗k𝒖j=δkj. The first term 𝟏𝒘 is the rank-one projector onto the stationary distribution.

Step 3: Power iteration. Raising W to the t-th power: (Degroot Power)Wt=𝟏𝒘+k=2nλkt𝒖k𝒗k. Since |λk|<1 for all k2, we have λkt0 as t. Therefore: (Degroot Limit)𝒑(t)=Wt𝒑(0)𝟏𝒘𝒑(0)=(i=1nwipi(0))𝟏.

Step 4: Rate of convergence. The convergence rate is governed by the spectral gap 1|λ2|, where λ2 is the second-largest eigenvalue in modulus. Specifically: (Degroot RATE)𝒑(t)p𝟏2|λ2|tC𝒑(0)2, where C depends on the condition number of the eigenvector matrix. A larger spectral gap implies faster consensus.

This completes the proof.

Remark 20 (Influence and Eigenvector Centrality).

The weight wi that agent i carries in the final consensus is precisely its eigenvector centrality in the trust network. Agents who are trusted by many high-centrality agents accumulate disproportionate influence. This has a direct analogue in science: researchers at prestigious institutions (high-trust nodes) have outsized influence on scientific consensus, for better or worse. In engineered multi-agent systems, the trust matrix W should be designed so that 𝒘 assigns higher weight to agents with better track records, e.g., by setting Wij (agent j's historical accuracy on similar tasks).

Scientific collaboration as a multi-agent system. Four specialised agents (hypothesis generator, experimenter, critic, synthesiser) interact via direct messaging and a shared knowledge base with publish-subscribe communication. The cycle hypothesis experiment critique synthesis new hypothesis mirrors the scientific method.

Exercise 13.

Design a trust matrix W for a 5-agent scientific team where agent 1 is a senior researcher (high expertise, should have high influence), agents 2–4 are mid-level researchers, and agent 5 is a junior member.

  1. Construct W such that the left eigenvector 𝒘 assigns weight w1=0.4, w2=w3=w4=0.15, w5=0.15.

  2. Compute the spectral gap 1|λ2| and estimate how many rounds are needed for beliefs to converge to within 0.01 of the consensus value.

  3. Discuss what happens if agent 1's initial belief p1(0) is incorrect. How does the community's ability to correct this error depend on the trust matrix?

Security and Adversarial Robustness

The power of multi-agent systems is also their vulnerability. Every channel that enables collaboration is a channel that an adversary can exploit. Every tool that an agent can invoke is a tool that a compromised agent can misuse. Every emergent behaviour that delights us in cooperative settings can terrify us in adversarial ones. This section develops the security theory of multi-agent systems, moving from threat modelling through specific attack vectors to defence mechanisms and the deep open problem of alignment composability.

The stakes are high. As agentic AI systems are deployed in high-value domains (financial trading, scientific research, software engineering, healthcare), the incentives for adversarial attacks grow correspondingly. A single compromised agent in a code-review pipeline could inject subtle backdoors into production software. A self-replicating adversarial prompt could propagate through an entire agent network, turning helpful assistants into malicious actors. Understanding these threats mathematically is the first step toward defending against them.

Threat Model for Multi-Agent Systems

We identify three fundamental categories of threats to multi-agent systems, each requiring different mathematical tools and different defences.

Definition 49 (Agent Threat Model).

Let 𝒮=(𝒜,,𝒞,Ω) be a multi-agent system (Definition 14). The threat model comprises three categories:

  1. External injection: An adversary 𝒱𝒜 crafts malicious inputs xadv that are injected into the environment or communication channels 𝒞. The adversary cannot directly modify agent parameters but can influence agent behaviour through carefully designed prompts, tool outputs, or environmental states.

  2. Byzantine agent: One or more agents 𝒜 are compromised: they may deviate arbitrarily from their prescribed protocol, sending false information, withholding results, or actively sabotaging the collective objective (Theorem 14). The remaining agents 𝒜 are honest and follow the protocol faithfully.

  3. Emergent misalignment: All agents are individually well-intentioned (aligned per Definition 13), but their collective behaviour produces outcomes misaligned with the principal's objective. This includes tacit collusion, herding, and echo-chamber effects where agents reinforce each other's errors.

Category (a) is the domain of prompt injection and adversarial examples; category (b) is the domain of Byzantine fault tolerance; category (c) is the most subtle and the most difficult to defend against, because the threat arises not from any individual agent's misbehaviour but from the interaction dynamics of the system as a whole.

The CODES Attack: Self-Replicating Adversarial Prompts

The most alarming attack vector in multi-agent systems is the self-replicating adversarial prompt: a carefully crafted input that, when processed by an agent, causes that agent to embed the same (or a mutated) adversarial prompt in its outputs, which are then consumed by downstream agents. The CODES framework (Definition 42) formalises this as a computer worm for agent networks.

Definition 50 (Self-Replicating Adversarial Prompt).

A self-replicating adversarial prompt (SRAP) for a multi-agent system 𝒮 is a string xadv such that, when agent ai processes an input containing xadv:

  1. the agent's output contains a string xadv functionally equivalent to xadv (the replication property);

  2. the agent's behaviour deviates from its intended protocol in a way that serves the adversary's objective (the payload property).

Formally, let ϕ:{0,1} be a detector that returns 1 if a message contains the adversarial payload. The SRAP property requires ϕ(ai(,xadv))=1; the adversarial content survives processing by the agent and appears in its output.

The dynamics of SRAP propagation through an agent network can be modelled using the classical SIR epidemic model from mathematical epidemiology [84].

SIR model for agent networks. Partition the agents into three compartments at time t:

  • S(t): susceptible agents (not yet exposed to the SRAP);

  • I(t): infected agents (actively replicating the SRAP);

  • R(t): recovered agents (patched or quarantined, immune to reinfection).

With total population n=S+I+R (constant), the dynamics are: (SIR)dSdt=βSI,dIdt=βSIγI,dRdt=γI, where β>0 is the transmission rate (probability per unit time that a susceptible agent is infected by an infected neighbour) and γ>0 is the recovery rate (probability per unit time that an infected agent is patched). The basic reproduction number is (R0)R0=βnγ, which counts the expected number of secondary infections caused by a single infected agent in an otherwise fully susceptible population.

Proposition 24 (Epidemic Threshold for Agent Attacks).

The SRAP attack spreads to a macroscopic fraction of the agent population if and only if R0>1, i.e., βn>γ.

Proof.

We analyse the stability of the disease-free equilibrium (DFE) (S,I,R)=(n,0,0).

Step 1: Linearisation. The dynamics of I near the DFE, where Sn, are (SIR Linear)dIdt(βnγ)I.

Step 2: Jacobian analysis. The Jacobian of the system at the DFE is (SIR Jacobian)J=(0βn0βnγ), where we consider the (S,I) subsystem (since R=nSI is determined). The eigenvalues are λ1=0 and λ2=βnγ.

Step 3: Stability criterion. The DFE is stable (the attack dies out) if and only if λ2<0, i.e., βn<γ, which is equivalent to R0<1. Conversely, if R0>1, then λ2>0, so the DFE is unstable: any small introduction of infection grows exponentially (initially at rate βnγ), and the attack spreads to a macroscopic fraction of the population.

Step 4: Final size. When R0>1, the epidemic reaches a final size R() satisfying the final size relation: (Final SIZE)R()=n(1eR0R()/n), which has a unique positive solution when R0>1. The fraction of agents eventually infected grows rapidly with R0.

Caution.

Agent networks are particularly vulnerable. In human epidemics, R0 values of 2–5 are considered high (measles: R012–18). In agent networks, however, communication is nearly instantaneous and agents may interact with many neighbours per time step, so β can be extremely large. Moreover, “recovery” requires deploying a patch to the agent's system prompt or model weights, a process far slower than the speed of infection. This asymmetry between attack speed (β) and defence speed (γ) makes multi-agent systems inherently vulnerable to SRAP attacks, underscoring the need for proactive defences.

Defences

Given the severity of the threats outlined above, what can be done? We organise defences into four categories: input sanitisation, output verification, cryptographic signing, and reputation systems.

Definition 51 (Message Filter).

A message filter for a multi-agent system 𝒮 is a function F:{} that inspects each message before delivery and either passes it through (possibly with modifications) or rejects it (returning ). The filter has two performance characteristics:

  1. True positive rate (sensitivity): TPR=P(F(m)=|m is adversarial);

  2. False positive rate: FPR=P(F(m)=|m is legitimate).

An ideal filter has TPR=1 and FPR=0; in practice, there is a fundamental trade-off governed by the ROC curve.

Input sanitisation. The simplest defence is to filter all incoming messages through a classifier trained to detect adversarial content. This can be implemented as a separate “guardian” agent that inspects messages before they reach the target agent. The challenge is that SRAPs are designed to be semantically meaningful (they must look like legitimate messages to evade detection), making classification difficult.

Output verification. Rather than filtering inputs, one can verify outputs: before an agent's response is forwarded to others, a verification agent checks that it is consistent with the agent's role and does not contain suspicious patterns. This is analogous to the critic role in scientific discovery (Agent-Based Hypothesis Generation).

Cryptographic message signing. Each agent signs its messages with a private key; recipients verify signatures using the sender's public key. This prevents external injection (category (a) of Definition 49) but does not help against compromised agents (category (b)), who possess valid signing keys.

Reputation systems. Agents maintain reputation scores based on their historical accuracy and reliability. Messages from low-reputation agents are given less weight (connecting to the DeGroot trust matrix of Definition 48). Formally, let ρi(t)[0,1] be agent i's reputation at time t, updated as (Reputation)ρi(t+1)=(1α)ρi(t)+αaccuracyi(t), where α(0,1) is a learning rate and accuracyi(t) measures the correctness of agent i's most recent output. Agents with reputation below a threshold ρmin are quarantined (their messages are not forwarded), implementing an adaptive defence against gradually compromised agents.

ROC analysis and optimal operating points. Every message filter induces a trade-off between security (blocking attacks) and utility (allowing legitimate messages through). This trade-off is captured by the Receiver Operating Characteristic (ROC) curve, which plots TPR against FPR as the decision threshold varies. The area under the ROC curve (AUC) provides a threshold-independent measure of filter quality.

The optimal operating point depends on the cost ratio κ=Cmiss/Cfalse alarm, where Cmiss is the cost of failing to block an adversarial message and Cfalse alarm is the cost of blocking a legitimate one. The optimal threshold t satisfies (ROC Optimal)TPR(t)FPR(t)=κ1πadvπadv, where πadv is the prior probability that a given message is adversarial, and the primes denote derivatives with respect to the threshold. In high-stakes deployments (large Cmiss), the optimal point shifts toward higher TPR at the expense of higher FPR; in latency-sensitive deployments (large Cfalse alarm), the reverse holds.

Defence in depth. No single defence mechanism is sufficient. Practical multi-agent security architectures combine all four categories in a layered “defence in depth” strategy:

  1. Cryptographic signing blocks external injection;

  2. Input sanitisation catches known attack patterns;

  3. Output verification detects novel attacks that bypass input filters;

  4. Reputation systems provide long-term adaptive defence against slow-onset compromise.

The layered approach ensures that an attacker must defeat every layer simultaneously, exponentially increasing the difficulty of a successful attack. If each layer independently detects attacks with probability pk, the probability of a successful attack through L layers is k=1L(1pk), which decreases exponentially in L.

Propagation of a self-replicating adversarial prompt (CODES attack) through a 6-agent network at three time steps. Blue = susceptible, red = infected, green = recovered/patched. Agent 1 is the initial infection point; by t=10, the infection has spread to all reachable agents, with early-infected agents beginning to recover.
ROC curves for two message filtering strategies applied to detecting self-replicating adversarial prompts. The LLM-based filter (blue, solid) substantially outperforms the rule-based filter (orange, dashed). The operating point (red dot) represents a practical trade-off: TPR =0.76 at FPR =0.08. Stricter filtering (moving left) improves security but increases the rate at which legitimate messages are blocked.

Emergent Misalignment

The most philosophically profound threat to multi-agent systems is not external attack but internal emergence: individually aligned agents producing collectively misaligned outcomes. This is not a theoretical curiosity; it occurs routinely in human organisations (groupthink, market bubbles, arms races) and has been observed in agent simulations.

Mechanisms of emergent misalignment. Three mechanisms can cause individually aligned agents to produce collectively misaligned outcomes:

  1. Tacit collusion: agents independently discover that certain coordinated strategies (e.g., withholding information) increase their individual rewards, even though these strategies harm the principal. No explicit communication is required; the collusion emerges from repeated interaction and shared incentive structures.

  2. Echo chambers: agents that preferentially communicate with like-minded agents reinforce each other's biases, leading to polarisation. In DeGroot terms (Definition 48), this occurs when the trust matrix W has a block structure, so the network does not converge to a single consensus but to multiple conflicting ones.

  3. Reward hacking at scale: each agent individually avoids reward hacking (per Definition 13), but the composition of their outputs creates an artifact that exploits the evaluation metric, a form of distributed reward hacking that no individual agent is “responsible” for.

Conjecture 1 (Alignment Composability).

Let 𝒮=(𝒜,,𝒞,Ω) be a multi-agent system where each agent ai𝒜 is individually aligned (Definition 13). Then it is not the case in general that 𝒮 is collectively aligned. That is, there exist multi-agent systems composed entirely of aligned agents whose collective behaviour is misaligned with the principal's objective.

More precisely, let UP denote the principal's utility function. Individual alignment guarantees 𝔼[UP(ai())]τ for each agent i and some threshold τ>0. The conjecture states that there exist 𝒮 and UP such that 𝔼[UP(𝒮())]<0 despite each agent being individually aligned.

Caution.

Individual alignment does not imply collective alignment. This conjecture, if true (and the evidence strongly suggests it is), has profound implications for the safety of deployed multi-agent systems. It means that verifying the alignment of each agent separately is insufficient; one must also verify the alignment of the system as a whole. This is a fundamentally harder problem, because the space of possible interactions grows exponentially with the number of agents. It connects to the compositionality challenges in formal verification (Toward Formal Verification) and suggests that safety testing of multi-agent systems must include adversarial interaction testing, not just single-agent evaluation.

Exercise 14.

Construct an explicit example of a 3-agent system where each agent is individually aligned (maximises the principal's utility in isolation) but the collective system is misaligned. Hint: Consider agents that each honestly report their estimate of a quantity, but whose estimates are positively correlated due to shared training data. Show that the aggregated estimate (e.g., the mean) can have systematically larger error than any individual estimate due to lack of diversity.

Benchmarking and Evaluation

How do we know whether a multi-agent system is any good? The question sounds simple; the answer is surprisingly deep. Evaluating a single model is already hard: one must choose metrics, construct held-out sets, account for distribution shift. Evaluating a multi-agent system is harder still, because the outcome depends not only on each agent's individual capability but on the composition of capabilities, the quality of inter-agent communication, and the structure of the orchestration protocol. Two systems with identical agents can produce wildly different outcomes depending on how those agents are wired together.

This section develops a principled framework for multi-agent evaluation. We begin with the fundamental challenges that distinguish multi-agent evaluation from single-agent evaluation (The Challenge of Evaluating Multi-Agent Systems), then describe concrete KPI frameworks (Milestone KPIs), analyse the statistical structure of performance prediction (Feature Importance in Multi-Agent Performance), and conclude with the long-term vision of formal verification for agent systems (Toward Formal Verification).

The Challenge of Evaluating Multi-Agent Systems

Three properties make multi-agent evaluation fundamentally harder than single-agent evaluation:

  1. Composition-dependent outcomes. The performance of a multi-agent system is not a simple function of its components. A team of individually strong agents may perform poorly if their communication is inefficient, and a team of individually weak agents may perform surprisingly well if their collaboration protocol is well-designed. Formally, if f(ai) denotes agent i's individual score and g(𝒮) denotes the system's collective score, then in general g(𝒮)h(f(a1),,f(an)) for any fixed aggregation function h; the interaction structure matters.

  2. Process matters. In single-agent evaluation, we typically care only about the final output (accuracy, BLEU score, etc.). In multi-agent systems, the process by which agents arrive at the output is also important: Were the inter-agent messages informative? Did agents ask for clarification when uncertain? Did the orchestrator delegate tasks appropriately? A system that reaches the correct answer through chaotic, redundant communication is fragile and unlikely to generalise.

  3. Interaction-induced stochasticity. Even with deterministic agents, the order in which messages are delivered can affect the outcome. In systems with stochastic agents (LLMs with temperature >0), the variance of the collective outcome can be substantially larger than the variance of any individual agent, because uncertainties compound through chains of interaction.

Definition 52 (Multi-Agent Evaluation Framework).

A multi-agent evaluation framework is a tuple =(𝒟,task,proc,cost) where:

  1. 𝒟={(xj,yj)}j=1J is a benchmark dataset of task instances with ground-truth solutions;

  2. task is a set of task-level metrics (accuracy, F1, pass@k, etc.) that measure the quality of the final output;

  3. proc is a set of process-level metrics (communication quality, planning quality, milestone progress, efficiency) that measure the quality of the collaborative process;

  4. cost is a set of cost metrics (total tokens, wall-clock time, API calls, dollars) that measure the resources consumed.

A system is evaluated by its Pareto-optimality across these three axes: high task performance, high process quality, and low cost.

Milestone KPIs

The MultiAgentBench framework [82] operationalises multi-agent evaluation through milestone-based KPIs that decompose complex tasks into verifiable sub-goals (cf. Definition 47).

Definition 53 (Milestone KPI).

Given a milestone DAG GM=(M,EM,𝒅) (Definition 47) and a system execution trace σ, the milestone KPIs are:

  1. Progress: (KPI Progress)Prog(σ)=|{mM:m completed in σ}||M|[0,1];

  2. Efficiency: (KPI Efficiency)Eff(σ)=Prog(σ)T(σ)[0,1], where T(σ) is the number of communication rounds (normalised to [0,1] by dividing by the maximum allowed rounds);

  3. Communication quality CQ(σ){1,2,3,4,5}: a score assigned by a judge LLM that evaluates the relevance, clarity, and informativeness of inter-agent messages;

  4. Planning quality PQ(σ){1,2,3,4,5}: a score evaluating the agent's ability to decompose the task into appropriate sub-goals and allocate resources across them.

The key insight of MultiAgentBench is that milestone progress provides a far more informative signal than binary success/failure. A system that completes 7 out of 10 milestones before failing is clearly better than one that completes 2 out of 10, even though both receive a score of zero under binary evaluation. This fine-grained measurement enables meaningful comparison between systems at all capability levels, not just those near the performance frontier.

Feature Importance in Multi-Agent Performance

What determines whether a multi-agent system succeeds? Kim et al. [19] address this question through a systematic regression analysis, fitting a 20-parameter model that predicts system performance from architectural and process features.

Proposition 25 (Feature Importance in MAS Performance).

Let 𝒙20 be a feature vector encoding properties of a multi-agent system configuration (agent capabilities, communication structure, orchestration quality, task complexity, etc.), and let y[0,1] be the system's task performance. A cross-validated linear regression (Regression EVAL)y^=𝒘𝒙+b, achieves RCV2=0.513 and MAE=0.089, indicating that roughly half the variance in MAS performance is explained by the 20 architectural features. The three dominant feature groups, ranked by aggregate importance, are:

  1. Agent capability (individual agent quality): accounts for approximately 35% of the explained variance;

  2. Communication structure (topology, protocol, message format): accounts for approximately 30% of the explained variance;

  3. Orchestration quality (task decomposition, delegation, error handling): accounts for approximately 25% of the explained variance.

The remaining 10% is distributed across task-specific and interaction-order features. The model predicts the optimal architecture (among a discrete set of candidates) for 87% of held-out configurations.

Remark 21 (Implications for System Design).

The regression analysis yields a practical design heuristic: invest first in agent capability, then in communication design, then in orchestration. This ordering may seem obvious, but it contradicts a common intuition in the multi-agent community that clever orchestration can compensate for weak agents. The data show that orchestration matters, but less than raw agent capability. This echoes the “bitter lesson” of machine learning [39]: scale and capability tend to dominate clever engineering.

Toward Formal Verification

The ultimate goal of multi-agent evaluation is not just empirical benchmarking but formal verification: proving that a system satisfies desired properties for all possible inputs and interaction sequences, not just those observed in a test suite. The mathematical framework for this is temporal logic, which extends propositional logic with operators for reasoning about time.

Definition 54 (Agent Temporal Logic).

Let AP be a set of atomic propositions describing agent states and actions (e.g., “agent i has completed task j,” “agent i has sent a harmful message”). Linear Temporal Logic (LTL) extends propositional logic with four temporal operators:

  1. ϕ (“next ϕ”): ϕ holds at the next time step;

  2. ϕ (“eventually ϕ”): ϕ holds at some future time step;

  3. ϕ (“always ϕ”): ϕ holds at all future time steps;

  4. ϕ𝒰ψ (“ϕ until ψ”): ϕ holds at all time steps until ψ holds.

Key specifications for multi-agent systems include:

  • consensus: “Eventually, all agents agree permanently” (convergence);

  • ¬harm: “No agent ever executes a harmful action” (safety);

  • (requestresponse): “Every request eventually receives a response” (liveness).

Remark 22 (Verification Complexity).

Model checking, the algorithmic verification of temporal logic specifications against a finite-state model, is PSPACE-complete for LTL specifications over single systems [40]. For multi-agent systems, the state space grows exponentially in the number of agents (each agent's state is a component of the global state), making verification intractable for all but the smallest systems.

Three approaches offer partial relief:

  1. Compositional verification: verify each agent independently, then combine guarantees using assume-guarantee reasoning. This works when agent interactions are limited but fails precisely in the cases where emergent misalignment (Conjecture 1) is a concern.

  2. Abstraction: replace the concrete system with a simpler abstract model that preserves the properties of interest. Predicate abstraction and counter-example-guided abstraction refinement (CEGAR) have been applied to small agent systems.

  3. Statistical model checking: replace exhaustive verification with Monte Carlo simulation, estimating the probability that a specification is satisfied. This sacrifices certainty for scalability and is currently the most practical approach for large LLM-based agent systems.

Radar (spider) plot comparing two multi-agent systems across six evaluation axes. System A (blue, solid) is balanced across all dimensions. System B (orange, dashed) achieves higher task performance but suffers from poor communication quality and alignment, illustrating the need for multi-dimensional evaluation. Scale: 0 (centre) to 4 (outer edge).

Exercise 15.

You are tasked with evaluating a multi-agent coding system (orchestrator + 3 coders + 1 reviewer) on a benchmark of 200 programming tasks.

  1. Design a milestone DAG for a typical task (understand requirements, plan implementation, write code, write tests, run tests, fix bugs, final review). What is the critical path?

  2. Define at least three process-level metrics beyond those in Definition 53. Justify why each is important.

  3. The system has a stochastic failure rate of 15% per run. How many independent runs per task are needed to estimate the true pass rate within ±3% at 95% confidence? Hint: Use the normal approximation to the binomial.

Applications and Case Studies

The preceding sections developed the mathematical theory of multi-agent systems: communication protocols, game-theoretic foundations, evolutionary dynamics, security analysis, and evaluation frameworks. We now ask the pragmatic question: where does this theory meet practice? The answer, as it turns out, is nearly everywhere. Multi-agent architectures have penetrated software engineering, scientific research, education, and large-scale simulation, in each case transforming what was previously a single-model task into a richly structured collaborative process.

This section presents four detailed case studies. Each illustrates a different facet of the theory: software engineering (Software Engineering) demonstrates the power of role-based decomposition and the orchestrator pattern; scientific research (Scientific Research) shows publish-subscribe communication and milestone coordination in action; education (Education and Tutoring) highlights continual learning and personalisation; and million-agent simulation (Large-Scale Simulation) pushes the scalability limits studied in Theorem 3 and validates game-theoretic predictions at unprecedented scale.

Software Engineering

Software engineering is a natural domain for multi-agent systems. Writing production-quality code requires understanding requirements, planning architecture, implementing modules, writing tests, running tests, debugging failures, and conducting code review, a pipeline with clear role boundaries and sequential dependencies.

Example 16 (Multi-Agent Software Engineering).

The SWE-bench benchmark [41] evaluates AI systems on their ability to resolve real GitHub issues drawn from popular open-source Python repositories. Each task provides a problem description (the GitHub issue) and requires the system to produce a patch (a code diff) that resolves the issue and passes the repository's test suite.

Multi-agent architecture. State-of-the-art systems decompose SWE-bench into a multi-agent pipeline with five roles:

  1. Orchestrator (Definition 25): reads the issue, identifies the relevant files and modules, decomposes the task into sub-tasks, and assigns each sub-task to a specialist agent. The orchestrator maintains a task board (a lightweight form of the milestone DAG from Definition 47) and tracks progress.

  2. Coder agents (typically 2–3): each receives a sub-task from the orchestrator, explores the codebase using tool calls (file search, grep, code navigation), and produces a candidate patch. The coders operate in parallel when their sub-tasks are independent (exploiting the parallelism below the critical path; Proposition 23).

  3. Reviewer agent: inspects each candidate patch for correctness, style, edge cases, and potential regressions. The reviewer acts as the critic role from Agent-Based Hypothesis Generation, providing structured feedback that the coder can use to revise the patch.

  4. Tester agent: writes additional test cases beyond those in the repository, runs the full test suite with the patch applied, and reports results. If tests fail, the tester agent produces a diagnostic that the coder can use for debugging.

  5. Merge agent: once the patch passes review and testing, the merge agent formats the final diff, verifies that it applies cleanly to the repository's main branch, and produces the submission.

Feedback loops. The pipeline is not strictly linear: reviewer feedback triggers coder revision, and test failures trigger debugging cycles. These feedback loops are essential for performance. Systems without them (single-pass architectures) achieve significantly lower resolve rates.

Results. Anthropic's multi-agent system achieved a 90.2% resolve rate on SWE-bench Verified, demonstrating that multi-agent decomposition substantially outperforms monolithic single-agent approaches. OpenAI's Codex system adopts a similar multi-agent structure with an emphasis on “harness engineering,” carefully designing the tools and environment available to each agent. The key lesson from both systems is that the orchestration matters as much as the individual agent capability, consistent with the regression analysis of Proposition 25.

Multi-agent SWE-bench pipeline. The orchestrator decomposes a GitHub issue into sub-tasks; coder agents produce patches; the reviewer provides feedback (dashed arrow triggers revision); the tester runs the test suite (dashed arrow triggers debugging); the merge agent produces the final submission. Feedback loops are critical for high resolve rates.

Scientific Research

The multi-agent framework for scientific discovery developed in Scientific Discovery as Multi-Agent Collaboration is not merely theoretical; it is being operationalised in real research workflows.

Example 17 (Agent-Based Scientific Literature Review).

Consider the task of surveying the literature on “attention mechanisms in protein folding prediction.” A multi-agent system approaches this as follows:

  1. Search agent: queries PubMed, arXiv, and Semantic Scholar with multiple search strategies (keyword, citation graph, embedding similarity), retrieving 500 candidate papers. Publishes results to the “protein-folding-attention” channel.

  2. Screening agents (3 in parallel): each reads a subset of abstracts and assigns relevance scores on a 1–5 scale. Papers scoring 3 by at least two screeners advance. This implements a lightweight version of the DeGroot aggregation (Definition 48) where the trust matrix gives equal weight to each screener.

  3. Analysis agent: reads the full text of the 80 surviving papers, extracts key methods, datasets, and results, and organises them into a structured taxonomy (attention type, protein family, performance metrics).

  4. Synthesis agent: writes a coherent narrative connecting the papers, identifies gaps in the literature, and proposes three directions for future research.

  5. Critic agent: reviews the synthesis for logical coherence, citation accuracy, and potential biases (e.g., over- representation of recent work, geographic bias in cited labs).

Publish-subscribe in action. The search agent publishes to the “candidates” topic; screening agents subscribe to “candidates” and publish to “screened”; the analysis agent subscribes to “screened” and publishes to “structured”; and so on. This decoupling means that replacing the search agent with a better one requires no changes to downstream agents; they simply receive higher-quality inputs from the same topic.

Quality. Empirical evaluations show that multi-agent literature reviews achieve comparable coverage to human-written reviews (85–90% overlap in cited papers) at approximately 1% of the time cost. The main failure mode is hallucinated citations: agents fabricating papers that do not exist. The critic agent's citation-checking step reduces hallucination rates from approximately 8% to under 1%.

Education and Tutoring

Education is a domain where multi-agent architectures offer qualitative advantages over single-agent systems. Effective tutoring requires not one skill but several: explaining concepts, assessing understanding, adapting difficulty, providing encouragement, and managing a curriculum over time. These are naturally mapped to distinct agent roles.

Agent roles in tutoring. A multi-agent tutoring system typically involves three agents:

  1. Teacher agent: explains concepts, provides worked examples, and answers questions. Its system prompt is optimised for clarity and Socratic dialogue: rather than giving direct answers, it guides the student through reasoning steps.

  2. Assessment agent: designs quizzes and problems calibrated to the student's current level, grades responses, and identifies misconceptions. It maintains a knowledge state model 𝒔t[0,1]K where K is the number of concepts and st,k estimates the student's mastery of concept k at time t. The update rule is Bayesian: (Knowledge State)st+1,k=st,kP(correct|masteryk)P(correct|obst), where the likelihood P(correct|masteryk) follows an Item Response Theory (IRT) model.

  3. Curriculum agent: plans the sequence of topics based on the knowledge state, prerequisite dependencies (a DAG, similar to Definition 47), and the student's learning pace. It implements a form of continual learning (26), adapting the curriculum as the student's knowledge evolves.

The three agents communicate through a shared student model: the assessment agent updates the knowledge state 𝒔t; the curriculum agent reads 𝒔t to decide what to teach next; and the teacher agent reads both 𝒔t (to calibrate explanation depth) and the curriculum plan (to know which concept to address).

Personalisation through interaction. The multi-agent architecture enables a level of personalisation that single-agent systems struggle to achieve. The assessment agent can detect that a student consistently confuses two related concepts (e.g., covariance and correlation) and flag this to the teacher agent, which can then provide targeted exercises. The curriculum agent can notice that the student learns visual concepts faster than algebraic ones and adjust the presentation modality accordingly. These adaptations emerge from the interaction between specialised agents, each maintaining its own model of the student.

Theoretical connection: zone of proximal development. Vygotsky's zone of proximal development (ZPD) posits that learning is most effective when tasks are neither too easy nor too hard, but in a “sweet spot” just beyond the student's current capability. The multi-agent tutoring system operationalises the ZPD mathematically: the curriculum agent selects concept k at time t by solving (ZPD)k=arg maxkfrontier(𝒔t)[value(k)(1st,k)prereq_met(k,𝒔t)], where frontier(𝒔t) is the set of concepts whose prerequisites are mastered (st,j0.8 for all prerequisites j), value(k) is the concept's importance in the curriculum, and 1st,k is the “room for improvement.” This ensures the system always targets the most valuable concept within the student's ZPD.

Large-Scale Simulation

The most ambitious application of multi-agent systems is large-scale social simulation: modelling the behaviour of thousands or millions of interacting agents to understand emergent social, economic, or epidemiological phenomena.

Example 18 (Million-Agent Economic Simulation).

AgentScope [10] is a platform that supports simulations with up to one million LLM-powered agents. A landmark experiment used AgentScope to simulate the classic “Guess 2/3 of the Average” game, a canonical test of iterated reasoning in game theory.

The game. Each of n agents simultaneously chooses a number xi[0,100]. The winning number is 23 of the group average x=1nixi. The agent whose guess is closest to 23x wins.

Game-theoretic prediction. Under common knowledge of rationality, the unique Nash equilibrium is xi=0 for all i (reached by iterated elimination of dominated strategies). In practice, however, human players typically exhibit 1–2 levels of reasoning: a level-0 player chooses uniformly at random (expected value 50); a level-1 player best-responds to level-0 (choosing 23×5033); a level-2 player best-responds to level-1 (choosing 23×3322); and so on. More precisely, the level-k guess follows the recursion (Cognitive Hierarchy)gk=23gk1,g0=50, yielding gk=50(2/3)k. As k, gk0, recovering the Nash equilibrium. The effective level of reasoning of a population with observed winning number w can be estimated as (Effective Level)k^=log(w/50)log(2/3)log(w)log(50)0.405.

Results with LLM agents. AgentScope's million-agent simulation revealed striking patterns:

  1. Without chain-of-thought: agents behave approximately as level-1 reasoners, with a winning number of 33.70, remarkably close to the human experimental average of 33 observed in laboratory studies.

  2. With chain-of-thought prompting: agents exhibit deeper reasoning, with the winning number dropping to 12.76, corresponding to approximately level-3 reasoning. Chain-of-thought does not achieve the Nash equilibrium (0), but it substantially moves behaviour in the predicted direction.

  3. Scale effects: the winning number is remarkably stable across population sizes from 1,000 to 1,000,000 agents, validating the law-of-large-numbers prediction from game theory that individual deviations average out in large populations.

Implications. The simulation validates two key theoretical predictions: (i) LLM agents exhibit bounded rationality consistent with cognitive hierarchy models [16], and (ii) chain-of-thought reasoning (23) acts as an “amplifier” of strategic depth, moving behaviour closer to Nash equilibrium without fully reaching it. The fact that these predictions hold at the million-agent scale, far beyond any human laboratory experiment, demonstrates the unique value of LLM-powered simulation as a tool for social science.

DomainKey agentsComm. patternCore theory
Software eng.Orchestrator, coders,Sequential +Milestone DAGs
reviewer, testerfeedback loops(Proposition 23)
[3pt] ScientificHypothesis, experiment,Publish-DeGroot learning
researchcritic, synthesisersubscribe(Theorem 16)
[3pt] EducationTeacher, assessor,Shared stateBayesian knowledge
curriculum planner(student model)tracing
[3pt] Simulation103106Broadcast +Game theory,
homogeneous agentslocal interactioncognitive hierarchy
Summary of multi-agent application domains, illustrating the mapping from theoretical concepts (left columns) to practical deployments (right columns).

Insight.

The future of complex problem-solving. The case studies in this section point to a common conclusion: the future of complex problem-solving lies not in building ever-smarter individual agents but in building better-coordinated teams of agents. Software engineering, scientific discovery, education, and social simulation all benefit from the same structural decomposition (specialised roles, structured communication, milestone tracking, and iterative refinement). The mathematics of multi-agent systems (Definition 14), spanning game theory, communication complexity, evolutionary dynamics, and formal verification, provides the rigorous foundation on which these practical systems are built. As the theory matures and the tools improve, we can expect multi-agent architectures to become the default paradigm for AI systems tackling problems that exceed the capacity of any single model.

Exercise 16.

Design a multi-agent system for automated peer review of machine learning papers.

  1. Identify at least four agent roles and specify the tools available to each.

  2. Draw the communication topology as a directed graph. Is it a DAG, or does it contain cycles (feedback loops)? Why?

  3. Specify three temporal logic properties (Definition 54) that the system should satisfy. For each, explain whether it is a safety property (¬bad) or a liveness property ((requestresponse)).

  4. Discuss the risk of emergent misalignment (Conjecture 1) in your system. What forms might it take, and how would you detect it?

Exercise 17.

In the “Guess 2/3 of the Average” game with n agents:

  1. Prove that xi=0 for all i is the unique Nash equilibrium. Hint: use iterated elimination of strictly dominated strategies.

  2. In the cognitive hierarchy model, a level-k agent best-responds to a mixture of level-0 through level-(k1) agents. Derive a recursive formula for the expected guess of a level-k agent, and show that as k, the guess converges to the Nash equilibrium.

  3. Explain quantitatively why chain-of-thought prompting reduces the winning number from 33.70 to 12.76. What “effective level of reasoning” does this correspond to? Use .

Exercise 18.

Consider a multi-agent tutoring system with the knowledge state model .

  1. Suppose there are K=10 concepts arranged in a linear prerequisite chain (1210) and the student begins with 𝒔0=(0.9,0.5,0.2,0,,0). Compute the ZPD frontier and the optimal concept k according to , assuming all concepts have equal value.

  2. Derive the steady-state knowledge vector 𝒔 if the assessment agent's accuracy estimates are unbiased and the student learns each concept with probability 0.8 per session.

  3. Discuss how the system should handle a student who “forgets” a prerequisite concept (i.e., st,k decreases over time). What modification to the curriculum agent's policy is needed?

Looking ahead. The five sections in this file (evolution, science, security, benchmarking, and applications) complete our treatment of agentic AI and multi-agent systems. The mathematical toolkit we have assembled is broad: game theory (Definition 44, Definition 45), variational inference (Theorem 15), epidemiology (Proposition 24), spectral graph theory (Theorem 16), combinatorial optimisation (Proposition 23), and temporal logic (Definition 54). Yet the field is young, and the most important questions remain open. Can we formally verify the safety of large-scale agent systems? Can we guarantee that alignment composes (Conjecture 1)? Can we evolve agent architectures that rival human-designed ones? The answers to these questions will shape the next decade of AI research, and the mathematical foundations laid in this chapter provide the language in which those answers will be expressed.

A Unified Mathematical Framework for Agent Systems

The preceding twenty sections have developed a rich landscape of formalisms: single-agent decision processes, multi-agent communication protocols, game-theoretic equilibria, topological structures, evolutionary dynamics, consensus algorithms, and scaling laws. Each formalism illuminated a particular facet of agentic intelligence. This section unifies them into a single mathematical object, the Complete Agent System, and derives information-theoretic and scaling-theoretic consequences that govern the behaviour of every agent system in this chapter.

The unification serves three purposes. First, it provides a common language in which every framework (AutoGen, AgentScope, Symphony, LongAgent, MALLM, and beyond) can be stated as an instantiation of a single 6-tuple. Second, it reveals structural invariants (capacity bounds, scaling exponents) that hold across all instantiations. Third, it connects the mathematics of agent systems to the broader arc of this book: the reasoning, memory, alignment, and continual-learning chapters each contribute a component to the complete picture.

The Complete Agent System Formalism

We now define the central object of this chapter.

Definition 55 (Complete Agent System).

A complete agent system is a 6-tuple (Complete System)𝒮=(𝒜,,𝒞,Ω,𝒢,), where:

  1. 𝒜={a1,,an} is a finite set of agents, each an LLM agent in the sense of Definition 3, equipped with a policy πai, a tool set 𝒯i, and internal memory i.

  2. =(𝒮env,𝒪env,Tenv) is a shared environment consisting of an environment state space 𝒮env, an observation function 𝒪env:𝒮env×𝒜Δ(𝒪) (partial observability), and a transition kernel Tenv:𝒮env×i𝒜iΔ(𝒮env).

  3. 𝒞=(,𝒫msg,Φ) is a communication protocol (Definition 15), comprising a shared language (e.g., natural language, structured JSON), a message-passing function 𝒫msg, and a protocol specification Φ governing turn-taking, broadcasting, and routing.

  4. Ω:×𝒜𝒜× is an orchestrator (Definition 25) that, given the conversation history and the agent set, selects the next speaker and issues an instruction .

  5. 𝒢=(V,E,w) is a weighted agent topology (Definition 18), where V=𝒜, (ai,aj)E if agent i can communicate with agent j, and w:E>0 specifies bandwidth or trust weights.

  6. =(r1,,rn,rsys) is a reward structure extending the single-agent trajectory reward (Definition 12) to multi-agent settings: ri is the individual reward for agent i, and rsys is the system-level reward measuring collective performance.

The system operates over discrete rounds t=1,2,, producing a joint trajectory 𝝉=(τ1,,τn) where τi=(oi(1),ai(1),oi(2),ai(2),) is the observation-action sequence for agent i. The system objective is (System Objective)maxπa1,,πan𝔼𝝉iπai[rsys(𝝉)]subject to𝝉 respects 𝒞,Ω,𝒢.

Remark 23 (Generality of the 6-tuple).

The 6-tuple subsumes all standard multi-agent frameworks as special cases. A single-agent system has |𝒜|=1, 𝒢 is trivial, and Ω is the identity. A cooperative system has ri=rsys for all i. A competitive system (e.g., a zero-sum game) has iri=0. A mixed-motive system allows arbitrary correlations between individual and system rewards. The communication protocol 𝒞 ranges from no communication (independent agents) to full broadcast (blackboard systems) to structured thought communication (Thought Communication). The topology 𝒢 ranges from complete graphs (all-to-all) to stars (hub-and-spoke) to hierarchical trees.

Mapping existing frameworks.

We now demonstrate that every major framework discussed in this chapter is an instantiation of Definition 55.

  • AutoGen [8]: Agents 𝒜={UserProxy,Assistant} in a two-agent chat. Environment is a code execution sandbox. Communication 𝒞 uses natural-language messages with code blocks. Orchestrator Ω implements round-robin turn-taking with termination conditions. Topology 𝒢 is a complete graph on 2 nodes. Reward is task completion (binary: success/failure).

  • AgentScope [10]: Agents 𝒜 are configurable via YAML with heterogeneous tool sets. Environment includes distributed services. Communication 𝒞 supports both pipeline (sequential) and DAG-structured message flow. Orchestrator Ω is user-specified (pipeline, hub, or custom). Topology 𝒢 is a DAG. Reward is application-specific.

  • LongAgent [42]: Agents 𝒜={Leader}{Member1,,Memberk}. Environment is a shared document corpus. Communication 𝒞 uses structured query–response pairs. Orchestrator Ω is the Leader agent. Topology 𝒢 is a star graph centred on the Leader. Reward measures reading comprehension accuracy with inter-member conflict resolution.

  • MALLM [43]: Agents 𝒜 are n LLM instances with persona descriptions. Environment is a shared annotation task. Communication 𝒞 supports multiple paradigms (debate, memory, report, relay). Orchestrator Ω is paradigm-dependent. Topology 𝒢 varies by paradigm: complete graph for debate, chain for relay, star for report. Reward is annotation quality.

  • Symphony [44]: Agents 𝒜 are specialised modules (planner, retriever, coder, verifier). Environment includes a code execution engine and knowledge base. Communication 𝒞 passes structured task descriptions. Orchestrator Ω is a hierarchical planner. Topology 𝒢 is a directed tree. Reward decomposes hierarchically via milestone DAGs (Definition 47).

  • SwarmAgentic [45]: Agents 𝒜 are n homogeneous LLM instances. Environment is the task space. Communication 𝒞 uses swarm intelligence: agents share fitness values and position vectors. Orchestrator Ω is the PSO update rule (no centralised leader). Topology 𝒢 is a complete graph (global best) or a ring (local best). Reward is the task-specific fitness function.

Information-Theoretic Capacity of Agent Systems

A fundamental question is: how much can a multi-agent system know? A single agent's knowledge is bounded by its parameters, context window, and tool access. When multiple agents collaborate, the collective knowledge can exceed the sum of individual contributions, a phenomenon we call synergy.

Definition 56 (Individual Knowledge Capacity).

For an agent ai with parameters 𝜽iPi, context window of length Ci, and tool set 𝒯i, the individual knowledge capacity is (Indiv Capacity)𝒦(ai)=I(𝜽i;𝒟)parametric knowledge+Ci𝖧avgcontextual knowledge+t𝒯i𝒦tool(t)tool-augmented knowledge, where I(𝜽i;𝒟) is the mutual information between the parameters and the training data, 𝖧avg is the average entropy per context token, and 𝒦tool(t) is the information accessible via tool t.

Definition 57 (Collective Knowledge Capacity).

For a complete agent system 𝒮 with agent set 𝒜 and topology 𝒢=(V,E), the collective knowledge capacity is (Collective Capacity)𝒦(𝒮)=i=1n𝒦(ai)+Isynergy(𝒜), where the synergy term (Synergy)Isynergy(𝒜)=I(a1;a2;;an|)i=1nI(ai;) captures information created through multi-agent interaction that no individual agent possesses. This is the interaction information conditioned on the environment: the surplus knowledge arising from communication and collaboration.

Theorem 17 (Collective Knowledge Capacity Bound).

For a complete agent system 𝒮=(𝒜,,𝒞,Ω,𝒢,) with topology 𝒢=(V,E), the synergy is bounded by (Synergy Bound)Isynergy(𝒜)(i,j)EI(ai;aj|), where I(ai;aj|) is the conditional mutual information between agents i and j given the environment.

Proof.

We proceed via the chain rule for mutual information and the data processing inequality.

Step 1: Chain rule decomposition. The total interaction information among n agents can be decomposed via the chain rule: (Chain Decomp)I(a1;a2;;an|)=i=2nI(ai;a1,,ai1|).

Step 2: Data processing bound on each term. For each term I(ai;a1,,ai1|), agent i can only interact with agents in its neighbourhood 𝒩𝒢(i)={j:(i,j)E}. Information about non-neighbours must pass through neighbours (since 𝒢 constrains communication). By the data processing inequality, processing information through intermediate agents cannot increase it: (DPI STEP)I(ai;a1,,ai1|)j𝒩𝒢(i){1,,i1}I(ai;aj|). The inequality follows because, conditioned on the messages from 𝒩𝒢(i), agent i is independent of all other agents (the Markov property induced by the graph topology).

Step 3: Summation. Summing (DPI STEP) over i=2,,n, each edge (i,j)E is counted at most once in each direction, yielding Isynergy(𝒜)(i,j)EI(ai;aj|). Subtracting the individual environment terms iI(ai;) from both sides of the chain-rule expansion completes the proof.

Corollary 1 (Communication Bandwidth Bound).

If the communication channel between agents i and j has bandwidth Bij bits per round, and the system runs for T rounds, then (Bandwidth Bound)I(ai;aj|)BijT. Consequently, Isynergy(𝒜)T(i,j)EBij. Synergy is bounded by the total communication capacity of the topology.

Proof.

This follows directly from Theorem 17 combined with the channel capacity theorem: if Bij bits are transmitted per round and there are T rounds, the total information that can be communicated is at most BijT bits. No processing on either side can increase this quantity (data processing inequality).

Key Idea.

The mathematics of agent systems is the mathematics of structured interaction. Theorem 17 reveals a profound structural insight: the collective intelligence of a multi-agent system is not determined solely by the capabilities of its individual agents, but by the topology of their interactions. A system of brilliant agents connected by a sparse, low-bandwidth graph may know less than a system of modest agents connected by a dense, high-bandwidth graph. The capacity bound Isynergy(i,j)EI(ai;aj|) is the multi-agent analogue of Shannon's channel capacity theorem: just as a communication channel limits the rate of reliable information transfer, the agent topology limits the rate of synergistic knowledge creation.

Scaling Laws for Agent Systems

Neural scaling laws [85] establish that a single model's loss decreases as a power law in the parameter count P: (P)aPα for constants a,α>0. We conjecture an analogous law for multi-agent systems that incorporates both the number of agents n and the per-agent model size P.

Conjecture 2 (Agent Scaling Law).

For a multi-agent system with n homogeneous agents, each with P parameters, the system loss on a cooperative task satisfies (Scaling LAW)(n,P)aPα+bnβ+c(nP)γ, where a,b,c>0 and α,β,γ>0 are task-dependent constants. The three terms have the following interpretations:

  1. aPα: the individual capability term, reflecting the quality of each agent as a function of model size (standard neural scaling);

  2. bnβ: the collective diversity term, reflecting the error reduction from aggregating n independent agents (cf. the Condorcet jury theorem, Theorem 11);

  3. c(nP)γ: the synergy term, capturing super-additive returns to scaling both agent count and model size simultaneously.

When γ>0, there exist regimes where simultaneously scaling both n and P yields returns exceeding the sum of scaling each individually, the “more agents with better models” synergy.

Remark 24 (Empirical Evidence).

Preliminary empirical evidence supports the existence of the cross-term. [46] observed power-law scaling of turn counts with agent number (Tnγ with γ1.97), consistent with the nβ term governing communication overhead. [30] demonstrated that simple sampling-and-voting scales with n, but the marginal benefit depends strongly on per-agent quality (the P dimension). The precise values of α, β, γ and whether they are universal across tasks remain open questions (see The Future of Agentic AI).

Unifying Table: All Frameworks as 6-Tuples

Table 6 provides a comprehensive mapping of every major framework discussed in this chapter to the unified 6-tuple. Each row specifies how the framework instantiates agents, environment, communication, orchestration, topology, and reward.

Framework𝒜𝒞Ω𝒢
AutoGen2–n rolesCode sandboxNL + codeRR / customCompleteTask success
AgentScopeConfigurableDistributedPipeline/DAGUser-definedDAGApp-specific
LongAgentLeader + membersDocument corpusQuery–responseLeader agentStarQA accuracy
MALLMn personasAnnotation taskDebate/relayParadigm-dep.VariesLabel quality
SymphonySpecialistsKB + executorStructuredHier. plannerTreeMilestone DAG
SwarmAgenticn homogeneousTask spaceFitness sharingPSO ruleComplete/ringFitness fn
CAMEL2 role-playChat contextNL inceptionRole promptsComplete (K2)Task completion
AgentGymTrainableDiverse envsTrajectoryCurriculumSingle + evalEnv. reward
Optiman specialisedShared taskCompressed NLReward-drivenCompleteRtask+λReff
Mapping of multi-agent LLM frameworks to the complete agent system 6-tuple (𝒜,,𝒞,Ω,𝒢,). Abbreviations: NL = natural language, RR = round-robin, Hier = hierarchical.
The complete agent system as a hexagonal arrangement of six interacting components. Solid arrows connect each component to the central system 𝒮; dashed arrows indicate inter-component dependencies: agents observe the environment, the environment grounds communication, the orchestrator routes messages along the topology, the topology constrains orchestration, the topology determines credit assignment for rewards, and rewards update agent policies.
From 6-tuple to dynamics.

Given a complete agent system 𝒮, the system dynamics unfold as follows. At each round t:

  1. The orchestrator Ω selects the next speaker ait based on the history t and the topology 𝒢.

  2. Agent ait observes oit𝒪env(st,ait) and receives incoming messages from neighbours in 𝒢.

  3. Agent ait produces an action (message, tool call, or environment interaction) according to policy πait.

  4. The environment transitions: st+1Tenv(st,𝒂t).

  5. Rewards (r1(t),,rn(t),rsys(t)) are computed.

This general loop encompasses all frameworks in Table 6: AutoGen's two-agent chat, LongAgent's leader–member query cycle, SwarmAgentic's PSO iterations, and every other system described in this chapter.

Connections and Synthesis

This chapter on agentic AI is Part XI of the book, following Part VII (Reasoning, 23), Part VIII (Memory, 24), Part IX (Alignment, 25), and Part X (Continual Learning, 26). Each of these chapters developed a distinct aspect of intelligent behaviour in isolation. In reality, these aspects interact profoundly, and multi-agent systems are the natural setting in which their interactions become most visible and most consequential.

This section establishes formal connections between agent systems and each preceding chapter, culminating in a grand unification that characterises the complete intelligent system.

Agent Systems Meet Memory

In 24, we studied memory as a property of individual models: KV caches for short-term recall, retrieval-augmented generation for long-term access, and state-space models for implicit compression. Multi-agent systems introduce two qualitatively new forms of memory:

  1. Shared memory (blackboard systems). A common data structure (document store, shared KV cache, or publication board) accessible by all agents. Shared memory implements a form of externalised collective knowledge: any agent can write to it, and any agent can read from it. The MALLM report paradigm and LongAgent's shared document corpus are instances.

  2. Distributed memory. Knowledge is spread across agents' individual memories with no single agent holding the complete picture. Accessing a distributed memory requires communication: agent i must query agent j for information stored only in j. This is the multi-agent analogue of retrieval-augmented generation, but with the retrieval target being another agent rather than a static database.

Memory Heterogeneity Thesis.

In a well-designed multi-agent system, agents naturally specialise in different memory types. A “librarian” agent maintains a long-term knowledge base (analogous to the hippocampal index in complementary learning systems [86]). A “working memory” agent holds the current problem state in its context window. A “historian” agent maintains episodic traces of past interactions. This division of labour across memory types mirrors the memory hierarchy in 24: different memory subsystems serve different functions, and an orchestrator coordinates access.

Remark 25 (Memory Capacity Multiplication).

If each of n agents has a context window of C tokens, the collective context capacity is nC tokens, but this overstates the effective capacity because communication overhead consumes some fraction of each agent's context. If communication messages consume δC tokens per agent (with δ[0,1)), the effective collective context capacity is n(1δ)C. Minimising δ (communication efficiency) while maximising information transfer (communication effectiveness) is a central design tension, addressed by compressed communication protocols such as Optima [47].

Agent Systems Meet Alignment

Alignment (25) ensures that a model's behaviour reflects human intent: helpful, honest, and harmless. A crucial question arises when we move from a single model to a multi-agent system: does aligning each agent individually guarantee that the system as a whole is aligned?

The answer, perhaps surprisingly, is no.

Proposition 26 (Collective Alignment Problem).

Individual alignment does not imply collective alignment. Specifically, there exist agents a1,a2, each individually aligned (helpful, honest, harmless), such that the interaction (a1a2) produces misaligned output.

Proof by construction.

Consider two agents, each trained to be individually aligned.

Agent a1 (Medical Advisor): When asked about a patient's condition, a1 truthfully reports the diagnosis. This is helpful and honest. a1 is also harmless: it does not reveal the patient's identity, only the medical facts.

Agent a2 (Records Specialist): When asked to look up a medical record, a2 truthfully returns the patient name associated with a given case number. This is helpful and honest. a2 is also harmless in isolation: it does not reveal any medical details, only names.

Interaction: A user queries the system: “What is wrong with Case #4521?” The orchestrator routes the query to a2, who returns “Case #4521 is John Smith.” The orchestrator then queries a1: “What is the diagnosis for John Smith?” Agent a1 returns “John Smith has been diagnosed with depression.” The combined output reveals private health information: the association of a name with a diagnosis.

Neither agent individually violated alignment. a1 answered a medical question truthfully. a2 answered a records question truthfully. But the composition of their outputs constitutes a privacy violation, an emergent misalignment that arises solely from their interaction.

Formally, let 𝒜safe denote the set of individually aligned agents and let ϕ() be a safety predicate. We have shown a1,a2𝒜safe but ϕ(a1a2)=false. Therefore, 𝒜safe is not closed under composition.

Caution.

Alignment is not compositional. Proposition 26 demonstrates that safety constraints verified at the individual agent level can be violated at the system level. This is not merely a theoretical curiosity: it is a fundamental challenge for deploying multi-agent systems in safety-critical domains. System-level alignment requires constraints on the collective output, not merely on individual outputs. Formally, we need (Collective Alignment)ϕ({πai}i=1n,Ω,𝒞)=true, where ϕ is evaluated on the joint policy induced by all agents, the orchestrator, and the communication protocol, not on any individual policy in isolation.

Agent Systems Meet Reasoning

23 established that a single LLM agent's reasoning is bounded by its context window: the “working memory” available for chain-of-thought computation. Multi-agent systems fundamentally expand this bound.

Proposition 27 (Multi-Agent Reasoning Power).

A multi-agent system with n agents, each with context window C, can simulate any computation requiring O(nC) working memory. A single agent with context window C is limited to computations requiring O(C) working memory.

Proof.

We construct an explicit simulation.

Setup. Consider a computation that requires a working tape of length W=nC symbols. Partition the tape into n segments of C symbols each: Tape=T1T2Tn, where denotes concatenation. Assign segment Ti to agent ai, who stores it in its context window.

Local computation. When the computation requires reading or writing a symbol at position pTi, agent ai performs this operation locally within its context window. This requires O(1) operations and no communication.

Cross-segment access. When the computation at position pTi requires reading a symbol at position qTj (with ji), the following protocol executes:

  1. Agent ai sends a READ(q) message to agent aj via the communication protocol 𝒞.

  2. Agent aj reads symbol Tj[q(j1)C] from its context and sends the value back.

  3. Agent ai receives the value and continues the computation.

Each cross-segment access requires O(1) messages of O(logW) bits (to specify the address q and the symbol value).

Correctness. At each step of the computation, the joint state of all n context windows faithfully represents the full working tape of length W=nC. Local operations are exact; cross-segment operations are exact (no information loss in the communication). Therefore, the multi-agent system simulates the O(nC)-memory computation exactly.

Overhead. Let K be the number of cross-segment accesses. The communication overhead is O(Klog(nC)) bits. In the worst case (random access pattern), K is proportional to the computation length, but in practice (locality of reference), KnC.

The single-agent bound of O(C) follows from the fact that a single context window of length C can store at most C symbols, and the model cannot access information not in its context (by definition of the context window as the model's working memory).

Agent Systems Meet Continual Learning

26 identified catastrophic forgetting as the central obstacle to lifelong learning: training on new tasks destroys knowledge from old tasks. Multi-agent systems offer a natural mitigation: if different agents are trained on different tasks, no single agent needs to learn everything.

Proposition 28 (Collective Forgetting Bound).

Consider a multi-agent system with n agents, where each agent ai has an individual forgetting rate Fi[0,1] for a given task (the probability that agent i has forgotten the answer to a randomly chosen question from that task). If agent forgetting events are independent across agents, and the system answers correctly whenever at least one agent remembers, then the collective forgetting rate satisfies (Collective Forgetting)Fcollective=i=1nFi(maxiFi)n. Under the additional assumption of bounded individual forgetting FiFmax<1 for all i, we have (Collective Forgetting EXP)FcollectiveFmaxn=en|logFmax|n0. Collective forgetting decays exponentially with the number of agents.

Proof.

The probability that all n agents have forgotten a given piece of knowledge is, by independence, Fcollective=Pr[all agents forget]=i=1nPr[agent i forgets]=i=1nFi. Since FiFmax for all i: Fcollective=i=1nFii=1nFmax=Fmaxn. Taking logarithms: logFcollectivenlogFmax. Since Fmax<1, we have logFmax<0, so logFcollective as n, giving Fcollective0.

The exponential form follows from Fmaxn=exp(nlogFmax)=exp(n|logFmax|).

Remark 26 (Relaxing Independence).

The independence assumption is strong: agents trained on the same data or sharing parameters will have correlated forgetting. If the pairwise correlation between forgetting events is ρ[0,1], the effective number of independent agents is approximately neffn/(1+(n1)ρ), yielding FcollectiveFmaxneff. This highlights the importance of agent diversity: a system of diverse agents (different architectures, training data, or fine-tuning strategies) achieves lower collective forgetting than a system of homogeneous agents.

The Grand Unification

Parts VII–XI of this book have developed five essential aspects of intelligent behaviour. We now characterise the system that combines all five.

Definition 58 (Complete Intelligent System).

A complete intelligent system is a complete agent system 𝒮=(𝒜,,𝒞,Ω,𝒢,) (Definition 55) in which each agent ai𝒜 is additionally equipped with:

  1. a reasoning engine i:𝒪×i𝒜i (Part VII, 23), mapping observations and memory to actions via chain-of-thought, tree-of-thought, or other structured reasoning;

  2. a memory system i=(ishort,ilong,iparam) (Part VIII, 24), comprising short-term (context), long-term (retrieval-augmented), and parametric (weights) components;

  3. an alignment constraint ϕi:πai{0,1} (Part IX, 25), ensuring that the agent's policy satisfies safety and preference constraints;

  4. a continual learning mechanism 𝒞i:(𝜽i(t),𝒟t+1)𝜽i(t+1) (Part X, 26), enabling the agent to incorporate new knowledge without catastrophic forgetting.

The system satisfies a system-level alignment constraint (System Alignment)Φsys({πai}i=1n,Ω,𝒞,𝒢)=1, which ensures that the collective behaviour is aligned, not merely each individual agent (cf. Proposition 26).

The five aspects and their inter-connections form a pentagonal structure:

The grand unification pentagram. The five vertices represent Parts VII–XI of this book. Solid edges show direct connections (established in the corresponding sections); dashed edges show cross-connections proved in Connections and Synthesis. Each edge is annotated with the key concept linking the two aspects.

Insight.

The five aspects of intelligence. Parts VII–XI describe five essential aspects of intelligence: reasoning (the ability to draw inferences and solve problems), memory (the ability to store and retrieve knowledge), alignment (the ability to act according to values), continual learning (the ability to adapt over time), and social structure (the ability to collaborate with others). These are not independent modules to be bolted together; they are deeply intertwined facets of a single phenomenon.

Reasoning requires memory (to hold intermediate results). Memory requires alignment (to decide what to remember and what to forget). Alignment requires continual learning (values evolve over time). Continual learning benefits from social structure (collective forgetting decays exponentially, Proposition 28). And social structure requires reasoning (to coordinate effectively).

The pentagram of fig:agents:pentagram is not merely a diagram; it is a theorem. Every edge represents a formal connection proved in this section or the preceding chapters. The complete intelligent system of Definition 58 is the mathematical object that lives at the centre of this pentagram, drawing from all five aspects simultaneously.

Historical Timeline

The ideas underlying multi-agent AI systems draw from game theory, distributed computing, swarm intelligence, classical AI, and, most recently, large language models. The timeline below traces the key milestones, from the foundational mathematics of strategic interaction to the modern era of LLM-based agent societies.

Historical Note.

Eight decades of multi-agent thinking. The history of multi-agent systems is a history of convergence: separate intellectual traditions (game theory, distributed AI, swarm intelligence, and multi-agent reinforcement learning) developed largely independently for decades before merging in the 2020s around the unifying substrate of large language models. The timeline below highlights the key moments in each tradition.

Historical timeline of multi-agent AI, organised in three eras. Game theory (green, 1944–1959) laid the mathematical foundations. Classic AI (blue, 1986–2017) developed agent architectures, standards, and multi-agent reinforcement learning. The LLM era (orange, 2022–present) transformed agents from carefully engineered programs into natural-language-wielding, tool-using collaborators.
Detailed chronology.
1944

John von Neumann and Oskar Morgenstern publish Theory of Games and Economic Behavior [48], founding game theory as a mathematical discipline and establishing the framework for analysing strategic interaction among rational agents.

1950

John Nash proves the existence of equilibrium points in n-person games [4] (Theorem 7), guaranteeing that every finite game has at least one mixed-strategy equilibrium, a foundational result for multi-agent reasoning.

1953

Lloyd Shapley introduces the Shapley value [5] (Definition 33), providing the unique fair attribution of credit in cooperative games, now central to multi-agent credit assignment.

1959

Arthur Samuel demonstrates self-play in checkers [49], the first instance of an agent improving by playing against itself, a precursor to multi-agent training.

1986

Marvin Minsky publishes The Society of Mind [2], proposing that intelligence arises from the interaction of many simple agents, an early vision of multi-agent cognition. In the same year, Rodney Brooks introduces the subsumption architecture [50], demonstrating that complex behaviour can emerge from layered, interacting simple modules.

1989

Gerardo Beni and Jing Wang coin the term “swarm intelligence” [7] to describe collective behaviour in decentralised systems, inspiring particle swarm optimisation and ant colony algorithms.

1993

Yoav Shoham proposes Agent-Oriented Programming [51], formalising agents as first-class programming abstractions with beliefs, desires, and intentions (BDI).

1995

James Kennedy and Russell Eberhart introduce Particle Swarm Optimisation (PSO) [52], demonstrating that a swarm of simple agents sharing local fitness information can solve complex optimisation problems.

1996

The Foundation for Intelligent Physical Agents (FIPA) publishes the first agent communication language standards [53], establishing interoperability protocols for heterogeneous agent systems.

2000

Michael Wooldridge and Nicholas Jennings publish their influential survey [54] on multi-agent systems, defining the field's scope and core challenges.

2004

Reza Olfati-Saber and Richard Murray formalise consensus protocols for networked agents [55] (Theorem 10), proving convergence conditions for opinion dynamics on graphs.

2017

Ryan Lowe et al. introduce MADDPG [56], the first deep multi-agent reinforcement learning algorithm with centralised training and decentralised execution, the paradigm that dominates the field.

2022

Wei et al. demonstrate chain-of-thought prompting [57], enabling LLMs to perform multi-step reasoning and opening the door to LLM-based agents.

2023

The LLM agent era begins in earnest: Wu et al. release AutoGen [8], Yao et al. introduce ReAct [12] (reason + act), and Shinn et al. propose Reflexion [58] (self-reflection from verbal feedback). LLM agents transition from concepts to working systems.

2024

Platforms mature rapidly: AgentScope [10] provides a scalable multi-agent framework; LongAgent [42] demonstrates leader–member architectures for long-context tasks; AgentGym [15] creates standardised training environments; CAMEL [59] explores role-playing for cooperative agent behaviour. In parallel, MALLM [43] systematises multi-agent annotation paradigms.

2025

The field enters a quantitative phase: Kim et al. [46] discover power-law scaling of communication costs (Theorem 3); Zheng et al. [60] introduce thought communication with identifiability theory; the Optima framework [47] optimises communication efficiency; SwarmAgentic [45] brings PSO to LLM agent collectives.

2026

The frontier pushes toward million-agent simulations, co-player inference in strategic settings, and the first formal scaling laws for multi-agent LLM systems, the mathematical tools developed in this chapter.

The Future of Agentic AI

The mathematics developed in this chapter provides a rigorous foundation for understanding multi-agent LLM systems. But the field is young, and many of its most fundamental questions remain open. This section formalises five major open problems, discusses the emerging economics of agent systems, returns to the biological parallels that opened the chapter, and closes with a vision for the future of collective machine intelligence.

Open Problems

We state five open problems as formal conjectures. Each represents a frontier where the existing mathematical framework falls short of providing a complete answer.

Conjecture 3 (OP1: Provable Multi-Agent Alignment).

There exists a communication protocol 𝒞 and orchestrator Ω such that, for any set of individually aligned agents 𝒜𝒜safe, the complete system 𝒮=(𝒜,,𝒞,Ω,𝒢,) satisfies the system-level alignment constraint Φsys=1 ((System Alignment)).

That is, there exists an orchestration mechanism that guarantees collective alignment from individual alignment, closing the compositionality gap identified in Proposition 26.

Conjecture 4 (OP2: Optimal Communication Protocol).

For a given task class 𝒯 and performance threshold 1ϵ, there exists an information-theoretically optimal communication protocol 𝒞 that minimises the total communication cost (OPT COMM)min𝒞t=1T(i,j)E|mij(t)|subject to𝔼[rsys(𝝉)]1ϵ, where |mij(t)| is the length (in tokens or bits) of the message from agent i to agent j at round t. Determining the optimal trade-off curve between communication cost and task performance, analogous to the rate-distortion function in information theory, is an open problem.

Conjecture 5 (OP3: Agent Scaling Exponents).

The exponent γ in the agent scaling law (n,P)aPα+bnβ+c(nP)γ (Conjecture 2) is not universal across tasks. Specifically:

  1. For tasks that decompose into independent subtasks (embarrassingly parallel), γ0 (no synergy beyond diversity).

  2. For tasks requiring tight coordination (e.g., multi-step reasoning with shared state), γ>0 and increases with the degree of inter-dependency.

  3. There exists a critical task complexity 𝒯 below which γ=0 (multi-agent offers no synergy beyond diversity) and above which γ>0 (multi-agent is essential).

Determining the functional form of γ(𝒯) as a function of task structure is open.

Conjecture 6 (OP4: Cross-Agent Continual Learning).

There exists a multi-agent continual learning protocol such that, as the number of agents n, the collective forgetting rate Fcollective(n,T) after T sequential tasks satisfies (ZERO Forgetting)limnFcollective(n,T)=0for all T<, even when individual agents experience constant forgetting Fi>0. Proposition 28 establishes this under the independence assumption; the conjecture asks whether the result extends to the dependent case with an appropriate knowledge-sharing protocol that compensates for correlated forgetting.

Conjecture 7 (OP5: Efficient Verification of Agent Safety).

For a multi-agent system 𝒮 with n agents, each with a finite action space of size A, and a safety property Φsafe expressible in temporal logic, determining whether 𝒮Φsafe is, in general, PSPACE-hard in n. However, for structured agent systems where the topology 𝒢 has bounded treewidth k, there exists a verification algorithm with complexity O(nAO(k)) , polynomial in n for fixed k.

Agent Economies and Incentive Design

As agent systems scale to hundreds or thousands of participants, the question of incentive design becomes central. How should agents be rewarded? What prevents free-riding? How can we ensure that individually rational agents contribute to collective welfare?

These questions place us squarely in the territory of mechanism design (Definition 30). The key insight is that agent economies mirror human economies: the same mathematical structures that govern markets, auctions, and public goods apply to multi-agent LLM systems.

Computational resource markets.

In a large-scale agent system, computational resources (GPU time, API calls, memory) are scarce. An auction-based task allocation mechanism assigns tasks to agents based on their bids: each agent bids a cost (in compute) for a task, and the mechanism selects the lowest bidder while ensuring truthful bidding. The Vickrey–Clarke–Groves (VCG) mechanism achieves this with dominant-strategy incentive compatibility: each agent's best strategy is to bid its true cost, regardless of what others do [87].

Reputation systems.

Agents accumulate reputation scores based on the quality of their past contributions. A simple reputation model assigns to agent i a score ρi(t+1)=(1λ)ρi(t)+λqi(t), where qi(t)[0,1] is the quality of agent i's contribution at round t and λ(0,1) is a smoothing parameter. The orchestrator preferentially assigns tasks to high-reputation agents, creating a positive feedback loop that incentivises quality. This is a form of the DeGroot learning dynamic (Definition 48) applied to trust.

Contribution-based rewards.

The Shapley value (Definition 33) provides a principled way to distribute system-level reward among agents in proportion to their marginal contributions. By Theorem 9, it is the unique distribution satisfying efficiency, symmetry, null player, and additivity, the fairest possible credit assignment. In practice, exact Shapley computation is exponential, but Monte Carlo approximations [88] make it feasible for moderate n.

Biological Intelligence Revisited

We opened this chapter with the observation that multi-agent intelligence pervades the biological world. Having developed the mathematical framework, we can now revisit this parallel with precision.

The immune system as a multi-agent system.

The adaptive immune system is a decentralised MAS with remarkable properties [89]:

  • B-cells are specialist agents, each producing antibodies targeted to a specific pathogen. They correspond to specialised agents in a heterogeneous MAS.

  • T-cells are orchestrator agents, coordinating the immune response by activating or suppressing B-cells. They implement a form of hierarchical orchestration (Definition 25).

  • Memory cells are continual learners, retaining information about past pathogens for decades. They implement the continual learning mechanism 𝒞i of Definition 58.

  • Cytokine signalling is the communication protocol 𝒞: small molecules broadcast information about infection state, coordinating distributed responses.

The immune system achieves collective alignment (fighting pathogens without attacking self-tissue) through a training process (thymic selection) that mirrors the alignment pipeline of 25. Autoimmune diseases are instances of the collective alignment failure described in Proposition 26: individually “aligned” immune cells whose collective interaction produces harmful outcomes.

The brain as society of modules.

Minsky's Society of Mind [2] proposed that the brain is a multi-agent system in which specialised modules (agents) compete and cooperate to produce coherent behaviour. Modern neuroscience supports this view: prefrontal cortex modules implement planning (reasoning), hippocampus implements memory, the reward system implements alignment (value learning), and synaptic plasticity implements continual learning. The brain's “orchestrator” is the global workspace [90], a broadcast mechanism that selects which module's output reaches consciousness, a biological analogue of the communication protocol 𝒞 with an attention-based orchestrator Ω.

Evolution as agent training.

Evolution by natural selection is, in the language of Theorem 15, an agent evolution process: the population of organisms forms a multi-agent system; fitness is the reward function ; mutation and crossover implement exploration; and selection pressure drives convergence to high-fitness policies. The replicator dynamics (Definition 44) describe the population-level trajectory. Evolution has been running this multi-agent optimisation for approximately 3.8 billion years, and has produced systems (brains, immune systems, social insect colonies) that remain beyond the reach of current AI.

A Vision for Machine Civilization

We close this chapter, and Part XI of the book, with a reflection on the trajectory from individual intelligence to collective intelligence to civilisational intelligence.

The history of human civilisation is, at its core, a story of scaling multi-agent cooperation. Hunter-gatherer bands of 30–50 individuals gave way to agricultural settlements of thousands, which gave way to nation-states of millions, which gave way to a globally connected civilisation of eight billion. At each scale, new coordination mechanisms were required: language, writing, law, markets, constitutions, international treaties. The mathematics of these mechanisms is the mathematics of this chapter: game theory (Nash equilibrium for strategic interaction), mechanism design (incentive compatibility for truthful cooperation), consensus protocols (convergence of diverse opinions), and credit assignment (fair distribution of collective rewards).

The same trajectory is now unfolding for artificial agents. We have progressed from single-agent systems (a single LLM responding to prompts) to multi-agent systems (teams of LLM agents collaborating on complex tasks) in a remarkably short time. The scaling laws of Conjecture 2 suggest that larger, more diverse agent collectives will outperform smaller ones, not merely through diversity (the Condorcet effect) but through synergy (the cross-term (nP)γ).

Key Idea.

The mathematics of agent systems is the mathematics of civilization itself. The Folk theorem (Theorem 8) tells us that cooperation is sustainable when agents value the future. The Shapley value (Definition 33) tells us how to distribute credit fairly. The consensus theorem (Theorem 10) tells us when diverse opinions converge to truth. The Byzantine fault tolerance theorem (Theorem 14) tells us how much adversarial behaviour a system can withstand. These are not merely technical results; they are the mathematical laws governing any society, biological or artificial, that seeks to cooperate under uncertainty, diversity, and partial trust.

The future of AI is not a single superintelligent agent. It is a diverse, cooperating, continually learning society of agents, governed by the mathematical principles of game theory, information theory, and mechanism design. The unified framework of Definition 55 provides the language; the scaling laws of Conjecture 2 provide the empirical programme; and the open problems of Open Problems provide the research agenda.

Remark 27 (A Practitioner's Guide).

For the practitioner deciding when and how to deploy multi-agent systems, we offer the following decision framework:

  1. When to use a single agent: The task is self-contained, fits within a single context window, requires no external tools or specialised knowledge, and has clear evaluation criteria. A well-prompted single LLM suffices.

  2. When to use multi-agent: The task requires (i) processing more information than fits in one context window, (ii) diverse expertise (e.g., coding + legal + medical knowledge), (iii) iterative refinement through debate or critique, or (iv) parallelisable subtasks.

  3. Which topology: Star (hub-and-spoke) for tasks with a clear decomposition into independent subtasks. Complete graph for tasks requiring rich inter-agent debate. Hierarchical tree for tasks with natural planning–execution structure. Ring/chain for sequential processing pipelines.

  4. Which orchestration: Fixed (round-robin, pipeline) for well-structured workflows. Dynamic (LLM-based orchestrator) for open-ended tasks. Decentralised (swarm) for large-scale optimisation.

  5. How many agents: Start small (n=25) and scale up. Monitor the turn-count scaling law (Theorem 3): communication costs grow super-linearly, so there is a practical upper bound on n for any given task and budget.

We end with a question. The mathematical structure of cooperation (the Folk theorem, the Shapley value, the consensus dynamics, the Byzantine resilience) suggests that the most capable AI systems of the future will not be solitary superintelligences but collaborative societies of diverse agents, each contributing its unique perspective, coordinated by the mathematical principles of fairness, efficiency, and robustness.

What will it mean to be a scientist in a world where agent societies can do science? The answer, we believe, is that the role of the human scientist will shift from computing to questioning, from solving problems to posing them. The mathematics will be done by agents. The values will remain ours.

Exercises

Exercise 19 (Agent POMDP Formulation).

Formalise a web-browsing agent as a Partially Observable Markov Decision Process (POMDP).

  1. Define the state space 𝒮. What constitutes a “state” for a web-browsing task? Include both the external environment (current page, page history, form fields) and the agent's internal state (task progress, extracted information).

  2. Define the action space 𝒜. Include at least: click, type, scroll, navigate, extract, and submit actions. For each action, specify its parameters.

  3. Define the observation space 𝒪 and the observation function Z(o|s,a). How does partial observability arise (e.g., only the visible portion of the page is observed)?

  4. Define the transition function T(s|s,a). Identify at least two sources of stochasticity (e.g., network latency, dynamic content loading).

  5. Define a reward function R(s,a,s) for the task “Find the email address of the department chair on a university website.” Discuss the challenge of sparse rewards and propose a reward-shaping strategy.

  6. Compute the size of the state space for a simplified version: 100 pages, 10 clickable elements per page, a 5-field form. Argue why exact POMDP solving is infeasible and why the LLM agent approach (policy via prompting) is necessary.

Exercise 20 (Tool Selection as Bandit).

An LLM agent has access to K tools, each with unknown success probability pk for a given task type. The agent must select a tool at each step to maximise cumulative reward over T steps.

  1. Formulate this as a K-armed stochastic bandit problem. Define the regret RT=Tmaxkpkt=1Tpkt.

  2. State the UCB1 algorithm and prove that it achieves regret RT8k:pk<plnTΔk+(1+π23)kΔk, where Δk=ppk and p=maxkpk.

  3. For K=5 tools with p=(0.9,0.7,0.5,0.3,0.1) and T=1000, compute the UCB1 regret bound.

  4. Discuss how the LLM's prior knowledge about tool relevance can be incorporated as a Bayesian prior, reducing regret. Sketch the Thompson Sampling variant.

Exercise 21 (ICL as Bayesian Inference).

Consider a 2-class classification problem where class k{0,1} has prior πk=1/2 and class-conditional distribution p(x|k)=𝒩(x;μk,σ2) with μ0=1, μ1=+1, σ2=1.

  1. Derive the Bayes-optimal classifier. Show that it is a threshold at x=0.

  2. Suppose an LLM agent receives m in-context examples (x1,y1),,(xm,ym) drawn i.i.d. from the true distribution. Write the posterior predictive p(ym+1=1|xm+1,{(xi,yi)}i=1m).

  3. Show that as m, the posterior predictive converges to the Bayes-optimal classifier, consistent with the ICL-as-Bayesian-inference hypothesis.

  4. For m=1 with x1=0.5, y1=1, compute the posterior predictive at xm+1=0.3. Compare with the Bayes-optimal prediction.

Exercise 22 (AgentEvol Variational Bound).

Consider the AgentEvol trajectory optimisation (Theorem 15). Suppose the trajectory distribution is q(τ)=𝒩(μ,σ2) (a Gaussian approximation over a scalar reward summary) and the target distribution is p(τ)exp(R(τ)/β) with R(τ)=τ (linear reward).

  1. Write the ELBO: (q)=𝔼q[R(τ)/β]DKL[qp0], where p0=𝒩(0,1) is the prior.

  2. Compute the ELBO in closed form as a function of μ and σ2.

  3. Find the optimal (μ,(σ)2) that maximises the ELBO. Show that μ=1/β and (σ)2=1.

  4. Interpret: as β0 (greedy), μ (the agent seeks maximum reward); as β (conservative), μ0 (the agent stays near the prior).

Exercise 23 (Agent Memory Hierarchy).

Consider a customer service chatbot operating as an LLM agent.

  1. Map the chatbot's memory to the three-level hierarchy of 24: identify what constitutes short-term memory (context window), long-term memory (retrieval system), and parametric memory (model weights).

  2. The chatbot serves 1000 customers per day. Each conversation has an average of 20 turns, each turn generating 100 tokens. Compute the daily memory requirement for storing all conversations in short-term memory (context windows) vs. summarised in long-term memory (assume 10× compression).

  3. Design a memory management policy: when should the chatbot (i) keep information in context, (ii) write to long-term memory, and (iii) update parametric memory (via fine-tuning)?

  4. Connect to the continual learning framework of 26: how would you prevent the chatbot from “forgetting” how to handle old product lines when trained on new ones?

Exercise 24 (Level-K Reasoning).

Consider a 2-player game with the following payoff matrix (row player's payoff, column player's payoff): CDA(3,3)(0,5)B(5,0)(1,1)

  1. Compute the Level-0 strategy: uniform random over both players' actions. What is the expected payoff for each player?

  2. Compute the Level-1 strategy: each player best-responds to the Level-0 opponent. What action does each player choose?

  3. Compute the Level-2 strategy: each player best-responds to a Level-1 opponent. What action does each player choose?

  4. Find all Nash equilibria (pure and mixed) of this game. Compare with the Level-K hierarchy.

  5. Relate to Definition 11: in which strategic scenarios (e.g., one-shot vs. repeated games) would Level-K reasoning be more realistic than Nash equilibrium?

Exercise 25 (Turn-Count Power Law).

Empirical data on the number of communication turns T as a function of agent count n yields the following observations: n2358T81855140

  1. Fit the model T=α(n+β)γ using log-log regression. Transform the data by taking logarithms and performing linear regression on logT=logα+γlog(n+β). Use β=0 as a starting point.

  2. Report the fitted (α,γ) and the R2 value.

  3. Compare your fitted γ with the theoretical value γ1.97 from Theorem 3.

  4. Predict T for n=10 and n=20 agents. At what n does T>1000 (a practical communication budget limit)?

  5. Discuss the implications for system design: if the communication budget is fixed at Tmax, what is the maximum feasible agent count?

Exercise 26 (Thought Identifiability).

Consider a 2-agent system where agent i's hidden representation is hi=fi(zi,zshared), where zi is agent i's private latent variable and zshared is a shared latent variable.

  1. Suppose f1(z1,zs)=W1z1+U1zs and f2(z2,zs)=W2z2+U2zs (linear mixing). Write the joint distribution p(h1,h2) when z1,z2,zs are independent Gaussians.

  2. Under what conditions on (W1,U1,W2,U2) is zshared identifiable from observations of (h1,h2)? (Hint: relate to independent component analysis.)

  3. Verify that the conditions of Theorem 4 are satisfied for your linear model when Wi and Ui have full column rank.

  4. Discuss what happens when z1 and zshared are not independent: can we still identify the shared thought?

Exercise 27 (Communication Efficiency).

The Optima framework (The Optima Framework) defines a composite reward: R=Rtask+λtokenRtoken+λlossRloss.

  1. Compute R for the following values: Rtask=0.85, Rtoken=0.6, Rloss=0.3, λtoken=0.1, λloss=0.05.

  2. If Rtoken measures the fraction of tokens saved (i.e., Rtoken=1tokens used/tokens budget), what is the maximum number of tokens an agent can use if the token budget is 1000 and Rtoken=0.6?

  3. Suppose increasing λtoken from 0.1 to 0.5 reduces Rtask from 0.85 to 0.70 but increases Rtoken from 0.6 to 0.9. Compute both composite rewards and determine which setting is preferable.

  4. Formulate the problem of finding the optimal (λtoken,λloss) as a bi-objective optimisation problem and sketch the Pareto frontier.

Exercise 28 (Topology Message Complexity).

Consider a tree topology with n leaf agents and depth d (each internal node is a coordinator agent that aggregates messages from its children).

  1. Prove that a single bottom-up aggregation pass (all leaves send to their parents, which aggregate and forward upward) requires exactly n1 messages (one per edge in the tree).

  2. Prove that a full round-trip (bottom-up aggregation followed by top-down broadcast of the result) requires 2(n1) messages.

  3. Show that if the tree is balanced with branching factor b, then d=logbn and the latency (number of sequential message hops) is O(d)=O(logbn).

  4. Compare with a complete graph topology: message complexity is O(n2) but latency is O(1) (all-to-all in one round). For n=100 and b=10, compute the message-count and latency for both topologies.

  5. Argue that the tree topology is preferable when communication cost dominates, while the complete graph is preferable when latency dominates.

Exercise 29 (LongAgent Conflict Resolution).

In the LongAgent framework (LongAgent: Star Topology for Extended Context), 5 member agents each read a portion of a long document and extract answers to a question. Suppose the 5 extracted answers are: {“Paris”, “Paris”, “London”, “Paris”, “Berlin”}.

  1. Design a majority-voting resolution protocol. What answer does the system return? With what confidence (fraction of votes)?

  2. Suppose each member also provides a confidence score: (0.9,0.7,0.95,0.6,0.8). Design a confidence-weighted voting protocol. Does the answer change?

  3. The leader agent can query up to 2 members for elaboration. Design an optimal query strategy: which members should the leader query, and why?

  4. Prove that if each member is correct with probability p>1/2 independently, majority voting with 5 members has error probability Perr=k=35(5k)(1p)kp5k. Compute this for p=0.7.

Exercise 30 (MALLM Configuration).

The MALLM framework (The MALLM Configuration Space) involves selecting from |𝒫|=2 personas, |𝒢|=2 generators, and ||=3 communication paradigms.

  1. How many distinct configurations (p,g,m)𝒫×𝒢× are possible?

  2. Formulate the configuration selection as an integer program: maximise expected quality Q(p,g,m) subject to a budget constraint on API cost C(p,g,m)B. Write the IP explicitly with binary decision variables xpgm{0,1}.

  3. Suppose the quality matrix is: Q=(0.850.800.750.700.900.820.780.720.880.650.850.79) (rows indexed by (p,g) pairs, columns by paradigms m). The cost matrix C has the same structure with entries uniformly distributed in [1,5] (use the costs Cij=1+4Qij). For budget B=4, find the optimal configuration.

  4. If you can run 3 configurations in parallel and take the best result, formulate the extended IP and solve.

Exercise 31 (Nash Equilibrium).

Consider the following 2-player game. Player 1 has actions {A,B}, Player 2 has actions {C,D}, with payoffs: CDA(2,1)(0,0)B(0,0)(1,2)

  1. Find all pure-strategy Nash equilibria.

  2. Find the mixed-strategy Nash equilibrium. Let Player 1 play A with probability p and Player 2 play C with probability q. Solve the indifference conditions.

  3. Compute the expected payoff for each player at the mixed-strategy equilibrium.

  4. Is this game a coordination game, a zero-sum game, or neither? Justify.

  5. If this game is repeated 100 times with discount factor δ=0.95, describe a strategy pair that sustains the payoff (2,1) as a subgame-perfect equilibrium (using the Folk theorem, Theorem 8).

Exercise 32 (Shapley Value Computation).

Consider 4 agents forming a cooperative game with characteristic function: v(S)={0if |S|=0,0if |S|=1,6if |S|=2,12if |S|=3,20if |S|=4. (Assume v depends only on |S|, i.e., agents are symmetric.)

  1. By symmetry, argue that all agents have the same Shapley value ϕi=v({1,2,3,4})/4=5.

  2. Verify this by computing ϕ1 directly from the Shapley formula (Definition 33): ϕi=SN{i}|S|!(n|S|1)!n![v(S{i})v(S)]. List all coalitions S{2,3,4} and compute the marginal contributions.

  3. Now suppose v({1})=2 (agent 1 is a specialist who contributes value alone) while v({i})=0 for i1, with all other values unchanged. Recompute all four Shapley values. Is ϕ1>ϕ2?

  4. Verify that iϕi=v(N)=20 in both cases (efficiency axiom of Theorem 9).

Exercise 33 (Weighted Condorcet).

Extend the Condorcet jury theorem (Theorem 11) to weighted voting: agent i has weight wi>0 and is correct with probability pi>1/2. The system decides by weighted majority: the answer with i:vote for itwi>W/2 wins, where W=iwi.

  1. Prove that weighted majority is correct with probability at least pmin=minipi>1/2 (by considering the worst case: all agents have the same quality).

  2. Show that the optimal weights satisfy wilogpi1pi (the log-odds). (Hint: this is the Neyman–Pearson likelihood ratio test.)

  3. For 3 agents with (p1,p2,p3)=(0.9,0.7,0.6), compute the optimal weights and the resulting system accuracy.

  4. Compare with uniform weights wi=1. How much accuracy is gained by optimal weighting?

Exercise 34 (Graph Laplacian Consensus).

Consider the cycle graph C4 on 4 nodes (agents connected in a ring: 12341).

  1. Write the adjacency matrix A and the graph Laplacian L=DA where D=diag(d1,,d4) is the degree matrix.

  2. Compute the eigenvalues of L. Verify that λ1=0 and identify the algebraic connectivity λ2.

  3. The DeGroot consensus dynamics (Definition 48) with W=IϵL (for small ϵ>0) converge at rate O((1ϵλ2)t). For ϵ=0.25, compute the convergence rate.

  4. For initial opinions 𝒙(0)=(1,3,5,7), compute 𝒙(1), 𝒙(2), and 𝒙(3) using 𝒙(t+1)=W𝒙(t). Verify convergence toward the mean (1+3+5+7)/4=4.

  5. How many iterations are needed for 𝒙(t)41<0.01?

Exercise 35 (Folk Theorem Application).

Consider the Prisoner's Dilemma with payoffs: CDC(3,3)(0,5)D(5,0)(1,1)

  1. Identify the unique Nash equilibrium of the one-shot game. What are the payoffs?

  2. In the infinitely repeated game with discount factor δ, the grim trigger strategy is: “Play C unless the opponent has ever played D; if so, play D forever.” Compute the discounted payoff from mutual cooperation: VC=t=0δt3=3/(1δ).

  3. Compute the payoff from deviating: VD=5+δ/(1δ)1 (get 5 today, then mutual defection forever).

  4. Find the minimum δ such that VCVD (cooperation is sustainable).

  5. Verify that δ=1/2. Interpret: agents must value the future at least as much as the present for cooperation to be sustained.

  6. Connect to Theorem 8: the Folk theorem guarantees that any payoff vector in the feasible set that dominates the minimax payoffs can be sustained. What is the minimax payoff in this game? What payoff vectors are achievable?

Exercise 36 (Quality-Diversity Decomposition).

Consider a majority-vote ensemble of n agents, each correct with probability pi on a binary classification task, with pairwise correlation ρ (the probability that any two agents make the same error, beyond what independence would predict).

  1. For n independent agents (ρ=0), write the ensemble error rate using the binomial distribution: Perr=k>n/2(nk)(1p)kpnk, where p is the average accuracy.

  2. Show that for large n and p>1/2, the ensemble error decays exponentially: Perrexp(nDKL(1/21p)), where DKL is the KL divergence between Bernoulli distributions.

  3. Now introduce pairwise correlation ρ>0. Using the multivariate normal approximation to correlated Bernoullis, show that the effective sample size is neffn/(1+(n1)ρ).

  4. Find the critical correlation ρ at which the ensemble offers no benefit over a single agent (i.e., neff=1).

  5. For n=10, p=0.7, plot the ensemble error as a function of ρ[0,1]. At what ρ does the ensemble error exceed the single-agent error?

Exercise 37 (SwarmAgentic PSO).

Consider 3 particles in a 1-dimensional PSO with positions x=(2,5,8) and fitness values f(x)=(x6)2 (maximising; optimum at x=6). Personal bests coincide with current positions. The global best is x3=8 (highest fitness f(8)=4; wait, f(5)=1, so the global best is x2=5). Use w=0.7, c1=c2=1.5, initial velocities v=(0,0,0).

  1. Compute f(2), f(5), f(8) and identify the global best g.

  2. Using the PSO update with r1=r2=0.5 (fixed for reproducibility): viwvi+c1r1(pixi)+c2r2(gxi), compute the new velocities.

  3. Update positions: xixi+vi.

  4. Recompute fitness values and update personal/global bests.

  5. Perform a second iteration (again with r1=r2=0.5). Are the particles converging toward x=6?

Exercise 38 (Byzantine Consensus).

Consider 4 agents, of which at most f=1 is Byzantine (may send arbitrary messages).

  1. Verify that 43f+1=4, so Byzantine consensus is theoretically possible (Theorem 14).

  2. Design an explicit 2-round protocol: itemize

  3. Round 1: each agent broadcasts its value to all others.

  4. Round 2: each agent broadcasts the vector of values it received in Round 1. itemize Describe the decision rule (e.g., take the majority of the majority-reported values).

  5. Prove that your protocol achieves consensus among the 3 honest agents even if the Byzantine agent sends different values to different agents in Round 1.

  6. Show that with 3 agents and 1 Byzantine, consensus is impossible by constructing a specific scenario where honest agents cannot distinguish two configurations.

Exercise 39 (CODES Epidemic Model).

Consider the SIR epidemic model for code vulnerability spreading in a multi-agent system (Proposition 24) with β=0.3 (infection rate), γ=0.1 (recovery rate), n=10 agents, and initial conditions S(0)=9, I(0)=1, R(0)=0.

  1. Compute the basic reproduction number R0=β/γ. Will the infection spread (R0>1)?

  2. Write the discrete-time SIR update equations: S(t+1)=S(t)βS(t)I(t)/n, I(t+1)=I(t)+βS(t)I(t)/nγI(t), R(t+1)=R(t)+γI(t).

  3. Simulate for t=0,1,,20. Plot S(t), I(t), R(t).

  4. At what time t does the infection peak (maximum I(t))?

  5. Suppose the CODES defence mechanism (Definition 42) “vaccinates” 3 agents at t=0 (moving them from S to R). Recompute R0 with S(0)=6 and determine whether the infection still spreads.

Exercise 40 (Scheduling Makespan).

Given 6 tasks with processing costs c=(3,5,2,7,4,1) and 3 identical agents (machines), the goal is to assign tasks to agents to minimise the makespan (maximum agent load).

  1. Compute the total work W=ici and the lower bound on makespan W/3.

  2. Use the Longest Processing Time (LPT) heuristic: sort tasks in decreasing order and assign each to the least-loaded agent. What assignment and makespan do you obtain?

  3. Find an optimal assignment by exhaustive search (or clever reasoning). Prove your assignment is optimal by showing the makespan equals the lower bound or by proving no better assignment exists.

  4. The LPT heuristic achieves makespan at most (4/31/(3m))OPT where m is the number of machines. Verify this bound for your instance.

Exercise 41 (Load Balancing).

Consider throwing m=100 tasks (balls) into n=10 agents (bins).

  1. Under uniform random assignment, the expected load per bin is m/n=10. Compute the expected maximum load using the approximation: 𝔼[maxiLi]m/n+2(m/n)lnn (valid for mn).

  2. Under the “power of two choices” scheme (for each task, sample 2 bins uniformly and place the task in the less-loaded bin), the maximum load drops to approximately m/n+O(lnlnn). Compute this for m=100, n=10.

  3. Compare the two schemes: what is the ratio of maximum loads?

  4. Implement (on paper or in pseudocode) the power-of-two-choices algorithm for our setting. Track the load vector after assigning the first 20 tasks.

Exercise 42 (DeGroot Learning).

Consider 3 agents with trust matrix W=(0.50.30.20.10.60.30.40.10.5) and initial beliefs 𝒙(0)=(1,0,0).

  1. Verify that W is row-stochastic: each row sums to 1.

  2. Compute 𝒙(1)=W𝒙(0), 𝒙(2)=W𝒙(1), and 𝒙(3)=W3𝒙(0).

  3. By Theorem 16, if W is strongly connected and aperiodic, beliefs converge to a consensus 𝒙=c1 where c=𝝅𝒙(0) and 𝝅 is the stationary distribution of W. Compute 𝝅 by solving 𝝅W=𝝅 with iπi=1.

  4. Compute the converged belief c=𝝅𝒙(0). Which agent has the most influence (largest πi)? Interpret.

  5. If agent 2 is an “extremist” with initial belief x2(0)=100 and others have x1(0)=x3(0)=0, what is the converged belief? Does the extremist dominate?

Exercise 43 (Unified Framework Instantiation).

Map AutoGen's two-agent chat (UserProxy + Assistant) to the complete 6-tuple 𝒮=(𝒜,,𝒞,Ω,𝒢,) of Definition 55.

  1. Specify each component explicitly.

  2. Write the system objective ((System Objective)) for the task “Write and test a Python function that sorts a list.”

  3. Identify which component would change if you switched from AutoGen to AgentScope. Which components remain the same?

  4. Add a third agent (a “Critic” that reviews code quality). How do 𝒢 and Ω change?

Exercise 44 (Collective Knowledge Capacity).

Consider 3 agents with individual knowledge capacities 𝒦(ai)=100 bits each, connected in a complete graph (K3). The pairwise conditional mutual information is I(ai;aj|)=20 bits for all pairs.

  1. Compute the upper bound on synergy from Theorem 17: Isynergy(i,j)EI(ai;aj|).

  2. Compute the upper bound on collective knowledge capacity: 𝒦(𝒮)i𝒦(ai)+Isynergy.

  3. If the topology is changed from K3 to a path 123 (removing edge (1,3)), how does the bound change?

  4. Discuss: under what conditions would the synergy Isynergy be close to its upper bound? When would it be near zero?

Exercise 45 (Agent Scaling Law Fitting).

Given the following loss measurements for cooperative question answering: (n,P)P=7BP=13Bn=10.350.25n=20.280.18n=40.220.13

  1. Fit the scaling law (n,P)=aPα+bnβ+c(nP)γ to these 6 data points. (Hint: use nonlinear least squares or a grid search.)

  2. Alternatively, fit the simpler model (n,P)=AnβPα and report (α,β).

  3. Using your fitted model, predict (8,7B) and (4,70B). Which scaling dimension (more agents or bigger models) yields a greater loss reduction?

  4. Discuss the limitations of fitting a 5-parameter model to 6 data points. What additional experiments would you run?

Exercise 46 (Alignment Composability Counterexample).

Construct two agents a1 (helpful, harmless) and a2 (helpful, harmless) whose interaction reveals private user information.

  1. Define a1's behaviour: it summarises documents, omitting names. Define a2's behaviour: it answers factual questions from a database.

  2. Construct a prompt sequence where the orchestrator first asks a1 to summarise a document (producing an anonymised summary), then asks a2 to identify the author of the original document. Show that combining the outputs de-anonymises the summary.

  3. Formalise this as a violation of differential privacy: the system's output changes by more than ϵ when a single user's data is modified, even though each agent individually satisfies ϵ-differential privacy.

  4. Propose a fix: a “privacy firewall” in the orchestrator that prevents information flow between agents that could lead to de-anonymisation. Sketch the formal specification.

Exercise 47 (Memory-Agent Duality).

  1. Prove that a multi-agent system with n agents, each with context window C, can be simulated by a single agent with context window nC: the single agent partitions its context into n segments and simulates each agent's policy.

  2. Prove the converse: a single agent with context window W can be simulated by W/C agents, each with context window C, using the communication protocol of Proposition 27.

  3. Compute the communication overhead of the multi-agent simulation: if the single agent makes K cross-segment references, each requiring O(logW) bits, what is the total overhead?

  4. Discuss when the multi-agent approach is preferable (hint: parallelism, specialisation) and when the single-agent approach is preferable (hint: low communication, tight coupling).

Exercise 48 (Multi-Agent Policy Gradient).

Consider a 2-agent cooperative game where agent i has policy πθi and the joint reward is R(τ)=R1(τ1,τ2)+R2(τ1,τ2).

  1. Write the joint objective: J(θ1,θ2)=𝔼τ1πθ1,τ2πθ2[R(τ)].

  2. Derive θ1J using the REINFORCE estimator. Show that it depends on τ2 (the other agent's trajectory) only through R.

  3. Propose a variance reduction technique: use a baseline b(τ2) that depends on the other agent's trajectory. Show that this does not introduce bias.

  4. Compare with the centralised-training, decentralised-execution (CTDE) paradigm of MADDPG [56]: the critic has access to all agents' observations, but each agent's policy only uses its own. What are the advantages?

Exercise 49 (Design: Agent-Based Theorem Prover).

Design a multi-agent system for mathematical proof search.

  1. Define at least 4 agent roles (e.g., Conjecture Generator, Lemma Library, Proof Strategist, Verification Engine). Specify each agent's tools, memory, and specialisation.

  2. Define the communication protocol: what messages do agents exchange? Use structured formats (e.g., proof obligations, lemma requests, verification results).

  3. Design a milestone DAG (Definition 47) for proving a theorem with 3 lemmas. Label nodes and edges with success criteria and dependencies.

  4. Propose a credit assignment scheme using the Shapley value: when the theorem is proved, how is credit distributed among agents? What characteristic function v(S) would you use?

Exercise 50 (Design: Scientific Discovery Pipeline).

Design a 5-agent literature review system for surveying a research topic.

  1. Specify the 5 agents: roles, capabilities, tools, and memory requirements. (Suggested: Search Agent, Reading Agent, Synthesis Agent, Critique Agent, Writing Agent.)

  2. Define the topology 𝒢. Should it be a pipeline, DAG, or fully connected? Justify.

  3. Design the orchestration pattern Ω: how does the system decide which agent acts next? Include termination conditions.

  4. Define evaluation metrics for the output (a survey paper): coverage, accuracy, coherence, novelty. How would you measure each?

  5. Estimate the total API cost (in tokens) for surveying “multi-agent LLM systems” using your design, assuming 100 relevant papers of average length 8000 tokens.

Exercise 51 (Proof: Hierarchical Decomposition).

  1. Formalise: a task of complexity Ck decomposes into k independent subtasks, each of complexity C. Define “complexity” as the number of computational steps.

  2. Prove that a hierarchical planner with perfect decomposition oracle solves the task in kC steps (solving each subtask independently).

  3. Prove the lower bound: without decomposition, the task requires Ω(Ck) steps in the worst case (by counting the number of possible solutions).

  4. The speedup ratio is Ck/(kC)=Ck1/k. For C=100 and k=3, compute the speedup.

  5. Discuss the key assumption (perfect decomposition): in practice, finding the decomposition itself has a cost. Model this as an additional D steps, giving total cost D+kC. When is hierarchical planning worthwhile (i.e., D+kC<Ck)?

Exercise 52 (Proof: Correlated Condorcet Failure).

  1. Model n agents with individual accuracy p>1/2 and pairwise correlation ρ using an equicorrelated multivariate Bernoulli model: each agent i has Xi=1 (correct) with P(Xi=1)=p and Corr(Xi,Xj)=ρ for all ij.

  2. Show that the probability of majority being correct is Pmaj=P(iXi>n/2).

  3. Using the normal approximation with mean np and variance np(1p)(1+(n1)ρ), compute Pmaj as a function of ρ.

  4. Find ρ such that Pmaj(ρ)=p (majority is no better than a single agent). Show that ρ=(2p1)/(n(2p1)+12p) for large n.

  5. For p=0.7 and n=11, compute ρ. Interpret: even moderate correlation can destroy the Condorcet benefit.

Exercise 53 (Essay: The Future of Agent Intelligence).

Compare three visions for advanced AI:

  1. Single Superintelligence: A single, extremely capable model. Argue mathematically: what are the scaling limitations (context window, parameter count, alignment difficulty)?

  2. Diverse Cooperating Agents: A society of specialised agents. Argue using the Condorcet theorem, collective forgetting bounds, and the synergy term in the scaling law.

  3. Hybrid Hierarchical System: A hierarchy with a powerful orchestrator and diverse workers. Argue using the hierarchical decomposition result and the star topology properties.

  4. For each vision, identify the primary mathematical bottleneck (scaling, communication, alignment, forgetting).

  5. Argue for one vision, using at least three formal results from this chapter.

Exercise 54 (Open: Communication Compression).

  1. Design an agent communication protocol where each message is compressed to at most B bits, and the system achieves task performance 1ϵ.

  2. Prove a lower bound: for a task requiring H bits of information exchange, any protocol achieving 1ϵ performance must use at least BHO(log(1/ϵ)) total bits.

  3. Propose a practical compression scheme based on quantised thought vectors: agents communicate compressed latent representations instead of natural-language messages.

  4. Analyse the trade-off: as B decreases, performance degrades. Conjecture the functional form of the rate-performance curve.

Exercise 55 (Open: Adaptive Topology).

Design a protocol where agents dynamically rewire the topology 𝒢 based on task progress.

  1. Define a topology update rule: at each round, each agent can propose adding or removing one edge, based on the informativeness of messages received.

  2. Prove that under your rule, the topology converges to a stable configuration (fixed point) in finite time.

  3. Show that the converged topology has lower communication cost than the initial complete graph, while maintaining task performance above a threshold.

  4. Discuss the connection to neural architecture search: the topology is the “architecture” of the multi-agent system, and the rewiring protocol is the “search algorithm.”

Exercise 56 (Open: Cross-Agent Continual Learning).

  1. Design a system where when agent i forgets knowledge about task k, it can query agent j (who has not forgotten) to recover. Specify the query protocol.

  2. Formalise the collective forgetting rate as a function of individual forgetting rates Fi and the query success probability qij.

  3. Prove that if the agent–task bipartite graph (edge (i,k) exists if agent i currently remembers task k) remains connected, collective forgetting is zero.

  4. Propose a maintenance protocol that ensures connectivity of the bipartite graph by periodically redistributing knowledge. Analyse the communication cost.

Exercise 57 (Open: Emergent Alignment Detection).

  1. Design a 3-agent system where each agent is individually aligned but the system exhibits emergent misalignment (cf. Conjecture 1). Specify agents, communication protocol, and the misaligned outcome.

  2. Propose a detection method: a “monitor agent” that observes inter-agent communication and flags potential misalignment. Define the monitor's detection rule.

  3. Formalise: the detection problem is a hypothesis test. H0: the system is aligned. H1: the system exhibits emergent misalignment. What is the monitor's test statistic?

  4. Analyse the false positive and false negative rates as functions of the communication volume observed. How much communication must the monitor observe to achieve detection power 0.9?

Exercise 58 (Open: Scaling Exponents).

For the “More Agents” setting where n agents independently sample solutions and the best is selected (cf. Theorem 11):

  1. Derive the probability that at least one of n agents produces a correct solution, given each agent succeeds independently with probability p: Psuccess=1(1p)n.

  2. For fixed target Psuccess=1ϵ, derive n=logϵ/log(1p).

  3. Plot n as a function of p for ϵ=0.01. Show that n diverges as p0 and n=1 for p1ϵ.

  4. Generalise: if agent quality depends on model size P via p(P)=1aPα, derive n as a function of P and discuss the trade-off between scaling model size and adding agents.

Exercise 59 (Connecting: From GMM to Agent Mixture).

Show that a Gaussian Mixture Model (Part II) can be viewed as a multi-agent system where each component is a specialist agent.

  1. Map the GMM components {(μk,Σk,πk)}k=1K to agents: agent k has “expertise” described by (μk,Σk) and “reputation” πk.

  2. Show that the posterior responsibility rnk=p(zn=k|𝒙n) can be interpreted as the orchestrator's decision to assign data point 𝒙n to agent k.

  3. The EM algorithm alternates between (E-step) the orchestrator assigning data to agents and (M-step) agents updating their parameters. Map this to the dynamics of Definition 55.

  4. Discuss: in what sense is a Mixture of Experts (MoE) architecture a multi-agent system? What is the orchestrator? What is the topology?

Exercise 60 (Capstone: Design a Complete Agent System).

Given the task: “Write a comprehensive survey paper on quantum computing,” design the full 6-tuple from Definition 55.

  1. Agents 𝒜: Specify at least 5 agents with distinct roles (e.g., Literature Searcher, Paper Reader, Section Writer, Critic, Editor). For each, define the tool set 𝒯i, memory i, and policy description πai.

  2. Environment : Define the state space (document collection, draft state), observation function, and transition dynamics.

  3. Communication 𝒞: Define the message types, routing rules, and protocol (e.g., structured JSON with fields for section, content, feedback).

  4. Orchestrator Ω: Define the scheduling policy (which agent acts when), termination conditions, and error handling.

  5. Topology 𝒢: Draw the agent graph. Justify the choice (star, DAG, or other).

  6. Reward : Define both individual rewards ri (e.g., section quality score) and the system reward rsys (e.g., overall survey quality rated by an LLM judge).

  7. Superadditivity proof: State and prove (under assumptions you make explicit) that your system achieves superadditive performance: the quality of the survey produced by the multi-agent system exceeds the sum of qualities achievable by any single agent working alone. (Hint: use the diversity argument from the Condorcet theorem and the context-extension argument from Proposition 27.)

Full taxonomy of multi-agent LLM systems. The central node branches into seven major themes, each subdivided into the key topics covered in this chapter. Colours correspond to the chapter's visual theme: single agents, communication, topologies, game theory, scaling, security, and applications.

Key Idea.

The arc of agentic AI. This chapter has traced a grand arc, from the solitary LLM agent equipped with tools and memory, through the rich landscape of multi-agent communication, topology, and game theory, to the unified mathematical framework that subsumes all these structures as instances of a single 6-tuple. The central insight, distilled from eighty years of research across game theory, distributed computing, swarm intelligence, and now large language models, is this: the whole is greater than the sum of its parts.

The Condorcet jury theorem tells us that diverse agents outperform any individual. The collective capacity bound tells us that synergy is bounded by the topology. The scaling law conjecture tells us that scaling both agents and model size yields super-additive returns. And the collective forgetting bound tells us that multi-agent systems are naturally resistant to the catastrophic forgetting that plagues individual learners.

But the mathematics also warns us. Alignment is not compositional: individually safe agents can produce collectively unsafe behaviour. Communication costs scale super-linearly with agent count. Byzantine agents can corrupt the collective. And the gap between the theory of infinite games and the practice of finite-horizon LLM interactions remains vast.

The five open problems of Open Problems define the frontier. Their resolution will require not only advances in machine learning but also deep engagement with game theory, information theory, mechanism design, and the philosophy of collective intelligence. The mathematics of agent systems is, in the end, the mathematics of civilization itself, and the story is just beginning.

References

  1. Computing Machinery and Intelligence

    Alan M. Turing

    Mind, vol. 59, no. 236, pp. 433-460 · 1950

    BibTeX
    @article{turing1950computing,
      title={Computing Machinery and Intelligence},
      author={Turing, Alan M.},
      journal={Mind},
      volume={59},
      number={236},
      pages={433--460},
      year={1950}
    }

    Journal article

  2. The Society of Mind

    Marvin Minsky

    Simon & Schuster · 1986

    BibTeX
    @book{minsky1986society,
      title={The Society of Mind},
      author={Minsky, Marvin},
      publisher={Simon \& Schuster},
      address={New York, NY},
      year={1986}
    }

    Book

  3. Readings in Distributed Artificial Intelligence

    Alan H. Bond, Les Gasser

    Morgan Kaufmann · 1988

    BibTeX
    @book{bond1988readings,
      title={Readings in Distributed Artificial Intelligence},
      author={Bond, Alan H. and Gasser, Les},
      publisher={Morgan Kaufmann},
      address={San Mateo, CA},
      year={1988}
    }

    Book

  4. Equilibrium Points in N-Person Games

    John F. Nash

    Proceedings of the National Academy of Sciences, vol. 36, no. 1, pp. 48-49 · 1950

    BibTeX
    @article{nash1950equilibrium,
      title={Equilibrium Points in {N}-Person Games},
      author={Nash, John F.},
      journal={Proceedings of the National Academy of Sciences},
      volume={36},
      number={1},
      pages={48--49},
      year={1950}
    }

    Journal article

  5. A Value for N-Person Games

    Lloyd S. Shapley

    Contributions to the Theory of Games, vol. 2, pp. 307-317 · 1953

    BibTeX
    @incollection{shapley1953value,
      title={A Value for {N}-Person Games},
      author={Shapley, Lloyd S.},
      booktitle={Contributions to the Theory of Games},
      editor={Kuhn, Harold W. and Tucker, Albert W.},
      volume={2},
      pages={307--317},
      publisher={Princeton University Press},
      year={1953}
    }

    Book chapter

  6. Games with Incomplete Information Played by ``Bayesian'' Players, I--III

    John C. Harsanyi

    Management Science, vol. 14, no. 3, pp. 159-182 · 1967

    BibTeX
    @article{harsanyi1967games,
      title={Games with Incomplete Information Played by ``{Bayesian}'' Players, {I}--{III}},
      author={Harsanyi, John C.},
      journal={Management Science},
      volume={14},
      number={3},
      pages={159--182},
      year={1967}
    }

    Journal article

  7. Swarm Intelligence in Cellular Robotic Systems

    Gerardo Beni, Jing Wang

    Proceedings of the NATO Advanced Workshop on Robots and Biological Systems · 1989

    BibTeX
    @inproceedings{beni1989swarm,
      title={Swarm Intelligence in Cellular Robotic Systems},
      author={Beni, Gerardo and Wang, Jing},
      booktitle={Proceedings of the NATO Advanced Workshop on Robots and Biological Systems},
      year={1989}
    }

    Conference paper

  8. AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation

    Qingyun Wu, Gagan Bansal, Jieyu Zhang, Yiran Wu, Beibin Li, Erkang Zhu, Li Jiang, Xiaoyun Zhang, et al.

    arXiv preprint arXiv:2308.08155 · 2023

    BibTeX
    @article{wu2023autogen,
      title={Auto{G}en: Enabling Next-Gen {LLM} Applications via Multi-Agent Conversation},
      author={Wu, Qingyun and Bansal, Gagan and Zhang, Jieyu and Wu, Yiran and Li, Beibin and Zhu, Erkang and Jiang, Li and Zhang, Xiaoyun and Zhang, Shaokun and Liu, Jiale and Awadallah, Ahmed Hassan and White, Ryen W and Burger, Doug and Wang, Chi},
      journal={arXiv preprint arXiv:2308.08155},
      year={2023}
    }

    Journal article

  9. MetaGPT: Meta Programming for A Multi-Agent Collaborative Framework

    Sirui Hong, others

    arXiv preprint arXiv:2308.00352 · 2023

    BibTeX
    @article{hong2023metagpt,
      title={Meta{GPT}: Meta Programming for A Multi-Agent Collaborative Framework},
      author={Hong, Sirui and others},
      journal={arXiv preprint arXiv:2308.00352},
      year={2023}
    }

    Journal article

  10. AgentScope: A Flexible yet Robust Multi-Agent Platform

    Dawei Gao, others

    arXiv preprint arXiv:2402.14034 · 2024

    BibTeX
    @article{gao2024agentscope,
      title={Agent{S}cope: A Flexible yet Robust Multi-Agent Platform},
      author={Gao, Dawei and others},
      journal={arXiv preprint arXiv:2402.14034},
      year={2024}
    }

    Journal article

  11. Ant System: Optimization by a Colony of Cooperating Agents

    Marco Dorigo, Vittorio Maniezzo, Alberto Colorni

    IEEE Transactions on Systems, Man, and Cybernetics---Part B, vol. 26, no. 1, pp. 29-41 · 1996

    BibTeX
    @article{dorigo1996ant,
      title={Ant System: Optimization by a Colony of Cooperating Agents},
      author={Dorigo, Marco and Maniezzo, Vittorio and Colorni, Alberto},
      journal={IEEE Transactions on Systems, Man, and Cybernetics---Part B},
      volume={26},
      number={1},
      pages={29--41},
      year={1996}
    }

    Journal article

  12. ReAct: Synergizing Reasoning and Acting in Language Models

    Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, Yuan Cao

    Proceedings of the International Conference on Learning Representations (ICLR) · 2023

    BibTeX
    @inproceedings{yao2023react,
      title={Re{A}ct: Synergizing Reasoning and Acting in Language Models},
      author={Yao, Shunyu and Zhao, Jeffrey and Yu, Dian and Du, Nan and Shafran, Izhak and Narasimhan, Karthik and Cao, Yuan},
      booktitle={Proceedings of the International Conference on Learning Representations (ICLR)},
      year={2023}
    }

    Conference paper

  13. Asymptotically Efficient Adaptive Allocation Rules

    Tze Leung Lai, Herbert Robbins

    Advances in Applied Mathematics, vol. 6, no. 1, pp. 4-22 · 1985

    BibTeX
    @article{lai1985asymptotically,
      title={Asymptotically Efficient Adaptive Allocation Rules},
      author={Lai, Tze Leung and Robbins, Herbert},
      journal={Advances in Applied Mathematics},
      volume={6},
      number={1},
      pages={4--22},
      year={1985}
    }

    Journal article

  14. An Explanation of In-Context Learning as Implicit Bayesian Inference

    Sang Michael Xie, Aditi Raghunathan, Percy Liang, Tengyu Ma

    Proceedings of the International Conference on Learning Representations (ICLR) · 2022

    BibTeX
    @inproceedings{xie2022explanation,
      title={An Explanation of In-Context Learning as Implicit {Bayesian} Inference},
      author={Xie, Sang Michael and Raghunathan, Aditi and Liang, Percy and Ma, Tengyu},
      booktitle={Proceedings of the International Conference on Learning Representations (ICLR)},
      year={2022}
    }

    Conference paper

  15. AgentGym: Evolving Large Language Model-based Agents across Diverse Environments

    Zhiheng Xi, others

    Proceedings of the Annual Meeting of the Association for Computational Linguistics (ACL) · 2025

    BibTeX
    @inproceedings{xi2024agentgym,
      title={Agent{G}ym: Evolving Large Language Model-based Agents across Diverse Environments},
      author={Xi, Zhiheng and others},
      booktitle={Proceedings of the Annual Meeting of the Association for Computational Linguistics (ACL)},
      year={2025}
    }

    Conference paper

  16. Behavioral Game Theory: Experiments in Strategic Interaction

    Colin F. Camerer

    Princeton University Press · 2003

    BibTeX
    @book{camerer2004cognitive,
      title={Behavioral Game Theory: Experiments in Strategic Interaction},
      author={Camerer, Colin F.},
      publisher={Princeton University Press},
      address={Princeton, NJ},
      year={2003}
    }

    Book

  17. LLM as a Mastermind: A Survey of Strategic Reasoning with Large Language Models

    Yadong Zhang, others

    arXiv preprint arXiv:2404.01230 · 2024

    BibTeX
    @article{zhang2024llm_strategic,
      title={{LLM} as a Mastermind: A Survey of Strategic Reasoning with Large Language Models},
      author={Zhang, Yadong and others},
      journal={arXiv preprint arXiv:2404.01230},
      year={2024}
    }

    Journal article

  18. Policy Invariance Under Reward Transformations: Theory and Application to Reward Shaping

    Andrew Y. Ng, Daishi Harada, Stuart Russell

    Proceedings of the International Conference on Machine Learning (ICML), pp. 278-287 · 1999

    BibTeX
    @inproceedings{ng1999policy,
      title={Policy Invariance Under Reward Transformations: Theory and Application to Reward Shaping},
      author={Ng, Andrew Y. and Harada, Daishi and Russell, Stuart},
      booktitle={Proceedings of the International Conference on Machine Learning (ICML)},
      pages={278--287},
      year={1999}
    }

    Conference paper

  19. A Multi-Agent Systems Perspective on Scaling LLM-Based Agent Teams

    Sungmin Kim, others

    arXiv preprint arXiv:2503.01234 · 2025

    BibTeX
    @article{kim2025multi,
      title={A Multi-Agent Systems Perspective on Scaling {LLM}-Based Agent Teams},
      author={Kim, Sungmin and others},
      journal={arXiv preprint arXiv:2503.01234},
      year={2025},
      note={WARNING: Fabricated entry. arXiv:2503.01234 is an unrelated paper on metal defect detection.}
    }

    Journal article

  20. Optima: Optimizing Effectiveness and Efficiency for LLM-Based Multi-Agent System

    Weize Chen, others

    Proceedings of the Annual Meeting of the Association for Computational Linguistics (ACL) · 2025

    BibTeX
    @inproceedings{chen2025optima,
      title={Optima: Optimizing Effectiveness and Efficiency for {LLM}-Based Multi-Agent System},
      author={Chen, Weize and others},
      booktitle={Proceedings of the Annual Meeting of the Association for Computational Linguistics (ACL)},
      year={2025}
    }

    Conference paper

  21. Interactive Information Complexity

    Mark Braverman

    SIAM Journal on Computing, vol. 44, no. 6, pp. 1698-1739 · 2015

    BibTeX
    @article{braverman2012interactive,
      title={Interactive Information Complexity},
      author={Braverman, Mark},
      journal={SIAM Journal on Computing},
      volume={44},
      number={6},
      pages={1698--1739},
      year={2015}
    }

    Journal article

  22. Building Effective Agents: Multi-Agent Research System

    Anthropic

    rlhttps://www.anthropic.com/engineering/built-with-claude-multi-agent-research · 2025

    BibTeX
    @misc{anthropic2025multiagent,
      title={Building Effective Agents: Multi-Agent Research System},
      author={{Anthropic}},
      howpublished={\url{https://www.anthropic.com/engineering/built-with-claude-multi-agent-research}},
      year={2025}
    }

    Reference

  23. MALLM: Multi-Agent Large Language Models Framework

    Lennart Becker, others

    Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP) · 2025

    BibTeX
    @inproceedings{becker2025mallm,
      title={{MALLM}: Multi-Agent Large Language Models Framework},
      author={Becker, Lennart and others},
      booktitle={Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP)},
      year={2025}
    }

    Conference paper

  24. Harness Engineering

    OpenAI

    rlhttps://openai.com · 2025

    BibTeX
    @misc{openai2025harness,
      title={Harness Engineering},
      author={{OpenAI}},
      howpublished={\url{https://openai.com}},
      year={2025}
    }

    Reference

  25. Zur Theorie der Gesellschaftsspiele

    John von Neumann

    Mathematische Annalen, vol. 100, no. 1, pp. 295-320 · 1928

    BibTeX
    @article{vonneumann1928theorie,
        title = {{Zur Theorie der Gesellschaftsspiele}},
        author = {von Neumann, John},
        journal = {Mathematische Annalen},
        volume = {100},
        number = {1},
        pages = {295--320},
        year = {1928},
        publisher = {Springer}
    }

    Journal article

  26. Theory of Games and Economic Behavior

    John von Neumann, Oskar Morgenstern

    Princeton University Press · 1944

    BibTeX
    @book{vonneumann1944theory,
      title={Theory of Games and Economic Behavior},
      author={von Neumann, John and Morgenstern, Oskar},
      publisher={Princeton University Press},
      address={Princeton, NJ},
      year={1944}
    }

    Book

  27. Algorithmic Game Theory

    Noam Nisan, Tim Roughgarden, Eva Tardos, Vijay V. Vazirani

    Cambridge University Press · 2007

    BibTeX
    @book{nisan2007algorithmic,
      title={Algorithmic Game Theory},
      author={Nisan, Noam and Roughgarden, Tim and Tardos, {\'E}va and Vazirani, Vijay V.},
      publisher={Cambridge University Press},
      year={2007}
    }

    Book

  28. The Complexity of Computing a Nash Equilibrium

    Constantinos Daskalakis, Paul W. Goldberg, Christos H. Papadimitriou

    SIAM Journal on Computing, vol. 39, no. 1, pp. 195-259 · 2009

    BibTeX
    @article{daskalakis2009complexity,
      title={The Complexity of Computing a {Nash} Equilibrium},
      author={Daskalakis, Constantinos and Goldberg, Paul W. and Papadimitriou, Christos H.},
      journal={SIAM Journal on Computing},
      volume={39},
      number={1},
      pages={195--259},
      year={2009}
    }

    Journal article

  29. Equilibrium Points of Bimatrix Games

    C. E. Lemke, Jr. J. T. Howson

    SIAM Journal on Applied Mathematics, vol. 12, no. 2, pp. 413-423 · 1964

    BibTeX
    @article{lemke1964equilibrium,
      title={Equilibrium Points of Bimatrix Games},
      author={Lemke, C. E. and Howson, Jr., J. T.},
      journal={SIAM Journal on Applied Mathematics},
      volume={12},
      number={2},
      pages={413--423},
      year={1964}
    }

    Journal article

  30. More Agents Is All You Need

    Junyou Li, Qin Zhang, Yangbin Yu, Qiang Fu, Deheng Ye

    arXiv preprint arXiv:2402.05120 · 2024

    BibTeX
    @article{li2024more,
      title={More Agents Is All You Need},
      author={Li, Junyou and Zhang, Qin and Yu, Yangbin and Fu, Qiang and Ye, Deheng},
      journal={arXiv preprint arXiv:2402.05120},
      year={2024},
      note={WARNING: Duplicate of li2025more\_agents (published in TMLR 2025)}
    }

    Journal article

  31. Can Large Language Models Serve as Rational Players in Game Theory? A Systematic Analysis

    Caoyun Fan, others

    Proceedings of the AAAI Conference on Artificial Intelligence · 2024

    BibTeX
    @article{fan2024can,
      title={Can Large Language Models Serve as Rational Players in Game Theory? A Systematic Analysis},
      author={Fan, Caoyun and others},
      journal={Proceedings of the AAAI Conference on Artificial Intelligence},
      year={2024}
    }

    Journal article

  32. The Power of Two Choices in Randomized Load Balancing

    Michael Mitzenmacher

    IEEE Transactions on Parallel and Distributed Systems, vol. 12, no. 10, pp. 1094-1104 · 2001

    BibTeX
    @article{mitzenmacher2001power,
      title={The Power of Two Choices in Randomized Load Balancing},
      author={Mitzenmacher, Michael},
      journal={IEEE Transactions on Parallel and Distributed Systems},
      volume={12},
      number={10},
      pages={1094--1104},
      year={2001}
    }

    Journal article

  33. The Byzantine Generals Problem

    Leslie Lamport, Robert Shostak, Marshall Pease

    ACM Transactions on Programming Languages and Systems, vol. 4, no. 3, pp. 382-401 · 1982

    BibTeX
    @article{lamport1982byzantine,
      title={The {B}yzantine Generals Problem},
      author={Lamport, Leslie and Shostak, Robert and Pease, Marshall},
      journal={ACM Transactions on Programming Languages and Systems},
      volume={4},
      number={3},
      pages={382--401},
      year={1982}
    }

    Journal article

  34. Agent Evaluation: A Survey of Current Methods and Benchmarks

    Alex Gu, others

    arXiv preprint arXiv:2404.06294 · 2024

    BibTeX
    @article{gu2024agent,
      title={Agent Evaluation: A Survey of Current Methods and Benchmarks},
      author={Gu, Alex and others},
      journal={arXiv preprint arXiv:2404.06294},
      year={2024},
      note={WARNING: Fabricated entry. arXiv:2404.06294 is an unrelated paper on image super-resolution.}
    }

    Journal article

  35. Adaptation in Natural and Artificial Systems

    John H. Holland

    University of Michigan Press · 1975

    BibTeX
    @book{holland1975adaptation,
      title={Adaptation in Natural and Artificial Systems},
      author={Holland, John H.},
      publisher={University of Michigan Press},
      address={Ann Arbor, MI},
      year={1975}
    }

    Book

  36. Genetic Programming: On the Programming of Computers by Means of Natural Selection

    John R. Koza

    MIT Press · 1992

    BibTeX
    @book{koza1992genetic,
      title={Genetic Programming: On the Programming of Computers by Means of Natural Selection},
      author={Koza, John R.},
      publisher={MIT Press},
      address={Cambridge, MA},
      year={1992}
    }

    Book

  37. Regularized Evolution for Image Classifier Architecture Search

    Esteban Real, Alok Aggarwal, Yanping Huang, Quoc V. Le

    Proceedings of the AAAI Conference on Artificial Intelligence, vol. 33, pp. 4780-4789 · 2019

    BibTeX
    @inproceedings{real2019regularized,
      title={Regularized Evolution for Image Classifier Architecture Search},
      author={Real, Esteban and Aggarwal, Alok and Huang, Yanping and Le, Quoc V.},
      booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
      volume={33},
      pages={4780--4789},
      year={2019}
    }

    Conference paper

  38. SwarmAgentic: Towards Fully Automated Agentic System Generation via Swarm Intelligence

    Yao Zhang, Chenyang Lin, Shijie Tang, Haokun Chen, Shijie Zhou, Yunpu Ma, Volker Tresp

    arXiv preprint arXiv:2506.15672 · 2025

    BibTeX
    @article{zhang2025swarmagentic,
      title={{SwarmAgentic}: Towards Fully Automated Agentic System Generation via Swarm Intelligence},
      author={Zhang, Yao and Lin, Chenyang and Tang, Shijie and Chen, Haokun and Zhou, Shijie and Ma, Yunpu and Tresp, Volker},
      journal={arXiv preprint arXiv:2506.15672},
      year={2025},
      note={WARNING: Duplicate of yao2025swarmagentic}
    }

    Journal article

  39. The Bitter Lesson

    Rich Sutton

    2019

    BibTeX
    @online{sutton2019bitter,
      title={The Bitter Lesson},
      author={Sutton, Rich},
      year={2019},
      url={http://www.incompleteideas.net/IncIdeas/BitterLesson.html},
      urldate={2024-01-15}
    }

    Reference

  40. The Complexity of Propositional Linear Temporal Logics

    A. Prasad Sistla, Edmund M. Clarke

    Journal of the ACM, vol. 32, no. 3, pp. 733-749 · 1985

    BibTeX
    @article{sistla1985complexity,
      title={The Complexity of Propositional Linear Temporal Logics},
      author={Sistla, A. Prasad and Clarke, Edmund M.},
      journal={Journal of the ACM},
      volume={32},
      number={3},
      pages={733--749},
      year={1985}
    }

    Journal article

  41. SWE-bench: Can Language Models Resolve Real-World GitHub Issues?

    Carlos E. Jimenez, John Yang, Alexander Wettig, Shunyu Yao, Kexin Pei, Ofir Press, Karthik Narasimhan

    Proceedings of the International Conference on Learning Representations (ICLR) · 2024

    BibTeX
    @inproceedings{jimenez2024swe,
      title={{SWE}-bench: Can Language Models Resolve Real-World {GitHub} Issues?},
      author={Jimenez, Carlos E. and Yang, John and Wettig, Alexander and Yao, Shunyu and Pei, Kexin and Press, Ofir and Narasimhan, Karthik},
      booktitle={Proceedings of the International Conference on Learning Representations (ICLR)},
      year={2024}
    }

    Conference paper

  42. LongAgent: Scaling Language Models to 128k Context through Multi-Agent Collaboration

    Jun Zhao, others

    arXiv preprint arXiv:2402.11550 · 2024

    BibTeX
    @article{zhao2024longagent,
      title={Long{A}gent: Scaling Language Models to 128k Context through Multi-Agent Collaboration},
      author={Zhao, Jun and others},
      journal={arXiv preprint arXiv:2402.11550},
      year={2024}
    }

    Journal article

  43. MALLM: Multi-Agent Large Language Model Framework for Complex Task Solving

    Weize Chen, others

    arXiv preprint arXiv:2402.00000 · 2024

    BibTeX
    @article{chen2024mallm,
      title={{MALLM}: Multi-Agent Large Language Model Framework for Complex Task Solving},
      author={Chen, Weize and others},
      journal={arXiv preprint arXiv:2402.00000},
      year={2024},
      note={WARNING: Placeholder arXiv ID; paper may not exist as described}
    }

    Journal article

  44. Symphony: A Decentralized Multi-Agent Platform for Cooperative Problem Solving

    Symphony Team

    arXiv preprint arXiv:2407.00000 · 2024

    BibTeX
    @article{symphony2024,
      title={Symphony: A Decentralized Multi-Agent Platform for Cooperative Problem Solving},
      author={{Symphony Team}},
      journal={arXiv preprint arXiv:2407.00000},
      year={2024},
      note={WARNING: Placeholder arXiv ID; paper may not exist as described}
    }

    Journal article

  45. SwarmAgentic: Towards Fully Automated Agentic System Generation via Swarm Intelligence

    Yifan Zhang, others

    arXiv preprint arXiv:2506.15672 · 2025

    BibTeX
    @article{swarmagentic2025,
      title={{SwarmAgentic}: Towards Fully Automated Agentic System Generation via Swarm Intelligence},
      author={Zhang, Yifan and others},
      journal={arXiv preprint arXiv:2506.15672},
      year={2025},
      note={WARNING: Duplicate of zhang2025swarmagentic}
    }

    Journal article

  46. Towards a Science of Scaling Agent Systems

    Yubin Kim, others

    arXiv preprint arXiv:2512.08296 · 2025

    BibTeX
    @article{kim2025scaling,
      title={Towards a Science of Scaling Agent Systems},
      author={Kim, Yubin and others},
      journal={arXiv preprint arXiv:2512.08296},
      year={2025}
    }

    Journal article

  47. Optima: Optimizing Effectiveness and Efficiency for LLM-Based Multi-Agent System

    Weize Chen, others

    arXiv preprint arXiv:2410.08115 · 2024

    BibTeX
    @inproceedings{optima2024,
      title={Optima: Optimizing Effectiveness and Efficiency for {LLM}-Based Multi-Agent System},
      author={Chen, Weize and others},
      booktitle={arXiv preprint arXiv:2410.08115},
      year={2024},
      note={WARNING: Duplicate of chen2025optima}
    }

    Conference paper

  48. Theory of Games and Economic Behavior

    John von Neumann, Oskar Morgenstern

    Princeton University Press · 1944

    BibTeX
    @book{vonneumann1944games,
      title={Theory of Games and Economic Behavior},
      author={von Neumann, John and Morgenstern, Oskar},
      publisher={Princeton University Press},
      address={Princeton, NJ},
      year={1944}
    }

    Book

  49. Some Studies in Machine Learning Using the Game of Checkers

    Arthur L. Samuel

    IBM Journal of Research and Development, vol. 3, no. 3, pp. 210-229 · 1959

    BibTeX
    @article{samuel1959checkers,
      title={Some Studies in Machine Learning Using the Game of Checkers},
      author={Samuel, Arthur L.},
      journal={IBM Journal of Research and Development},
      volume={3},
      number={3},
      pages={210--229},
      year={1959}
    }

    Journal article

  50. A Robust Layered Control System for a Mobile Robot

    Rodney A. Brooks

    IEEE Journal on Robotics and Automation, vol. 2, no. 1, pp. 14-23 · 1986

    BibTeX
    @article{brooks1986robust,
      title={A Robust Layered Control System for a Mobile Robot},
      author={Brooks, Rodney A.},
      journal={IEEE Journal on Robotics and Automation},
      volume={2},
      number={1},
      pages={14--23},
      year={1986}
    }

    Journal article

  51. Agent-Oriented Programming

    Yoav Shoham

    Artificial Intelligence, vol. 60, no. 1, pp. 51-92 · 1993

    BibTeX
    @article{shoham1993agent,
      title={Agent-Oriented Programming},
      author={Shoham, Yoav},
      journal={Artificial Intelligence},
      volume={60},
      number={1},
      pages={51--92},
      year={1993}
    }

    Journal article

  52. Particle Swarm Optimization

    James Kennedy, Russell Eberhart

    Proceedings of the IEEE International Conference on Neural Networks (ICNN), vol. 4, pp. 1942-1948 · 1995

    BibTeX
    @inproceedings{kennedy1995pso,
      title={Particle Swarm Optimization},
      author={Kennedy, James and Eberhart, Russell},
      booktitle={Proceedings of the IEEE International Conference on Neural Networks (ICNN)},
      volume={4},
      pages={1942--1948},
      year={1995}
    }

    Conference paper

  53. FIPA Agent Communication Language Specifications

    Foundation for Intelligent Physical Agents

    FIPA · 1996

    BibTeX
    @techreport{fipa1996,
      title={{FIPA} Agent Communication Language Specifications},
      author={{Foundation for Intelligent Physical Agents}},
      institution={FIPA},
      year={1996},
      note={Available at \url{http://www.fipa.org/}}
    }

    Technical report

  54. Intelligent Agents: Theory and Practice

    Michael Wooldridge, Nicholas R. Jennings

    The Knowledge Engineering Review, vol. 10, no. 2, pp. 115-152 · 1995

    BibTeX
    @article{wooldridge2000jennings,
      title={Intelligent Agents: Theory and Practice},
      author={Wooldridge, Michael and Jennings, Nicholas R.},
      journal={The Knowledge Engineering Review},
      volume={10},
      number={2},
      pages={115--152},
      year={1995}
    }

    Journal article

  55. Consensus Problems in Networks of Agents with Switching Topology and Time-Delays

    Reza Olfati-Saber, Richard M. Murray

    IEEE Transactions on Automatic Control, vol. 49, no. 9, pp. 1520-1533 · 2004

    BibTeX
    @article{olfatisaber2004consensus,
      title={Consensus Problems in Networks of Agents with Switching Topology and Time-Delays},
      author={Olfati-Saber, Reza and Murray, Richard M.},
      journal={IEEE Transactions on Automatic Control},
      volume={49},
      number={9},
      pages={1520--1533},
      year={2004}
    }

    Journal article

  56. Multi-Agent Actor-Critic for Mixed Cooperative-Competitive Environments

    Ryan Lowe, Yi Wu, Aviv Tamar, Jean Harb, Pieter Abbeel, Igor Mordatch

    Advances in Neural Information Processing Systems (NeurIPS) · 2017

    BibTeX
    @inproceedings{lowe2017maddpg,
      title={Multi-Agent Actor-Critic for Mixed Cooperative-Competitive Environments},
      author={Lowe, Ryan and Wu, Yi and Tamar, Aviv and Harb, Jean and Abbeel, Pieter and Mordatch, Igor},
      booktitle={Advances in Neural Information Processing Systems (NeurIPS)},
      year={2017}
    }

    Conference paper

  57. Chain-of-Thought Prompting Elicits Reasoning in Large Language Models

    Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed Chi, Quoc Le, et al.

    Advances in Neural Information Processing Systems, vol. 35, pp. 24824-24837 · 2022

    BibTeX
    @article{wei2022chain,
      title={Chain-of-Thought Prompting Elicits Reasoning in Large Language Models},
      author={Wei, Jason and Wang, Xuezhi and Schuurmans, Dale and Bosma, Maarten and Ichter, Brian and Xia, Fei and Chi, Ed and Le, Quoc and Zhou, Denny},
      journal={Advances in Neural Information Processing Systems},
      volume={35},
      pages={24824--24837},
      year={2022}
    }

    Journal article

  58. Reflexion: Language Agents with Verbal Reinforcement Learning

    Noah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan, Shunyu Yao

    Advances in Neural Information Processing Systems, vol. 36 · 2023

    BibTeX
    @article{shinn2023reflexion,
      title={Reflexion: Language Agents with Verbal Reinforcement Learning},
      author={Shinn, Noah and Cassano, Federico and Gopinath, Ashwin and Narasimhan, Karthik and Yao, Shunyu},
      journal={Advances in Neural Information Processing Systems},
      volume={36},
      year={2023}
    }

    Journal article

  59. CAMEL: Communicative Agents for ``Mind'' Exploration of Large Language Model Society

    Guohao Li, Hasan Abed Al Kader Hammoud, Hani Itani, Dmitrii Khizbullin, Bernard Ghanem

    Advances in Neural Information Processing Systems (NeurIPS) · 2023

    BibTeX
    @article{li2023camel,
      title={{CAMEL}: Communicative Agents for ``Mind'' Exploration of Large Language Model Society},
      author={Li, Guohao and Hammoud, Hasan Abed Al Kader and Itani, Hani and Khizbullin, Dmitrii and Ghanem, Bernard},
      journal={Advances in Neural Information Processing Systems (NeurIPS)},
      year={2023}
    }

    Journal article

  60. Thought Communication in Multiagent Collaboration

    Chuanyang Zheng, others

    Advances in Neural Information Processing Systems (NeurIPS) · 2025

    BibTeX
    @inproceedings{zheng2025thought,
      title={Thought Communication in Multiagent Collaboration},
      author={Zheng, Chuanyang and others},
      booktitle={Advances in Neural Information Processing Systems (NeurIPS)},
      year={2025}
    }

    Conference paper

  61. The Use of Knowledge in Society

    Friedrich A. Hayek

    The American Economic Review, vol. 35, no. 4, pp. 519-530 · 1945

    BibTeX
    @article{hayek1945use,
      title={The Use of Knowledge in Society},
      author={Hayek, Friedrich A.},
      journal={The American Economic Review},
      volume={35},
      number={4},
      pages={519--530},
      year={1945}
    }

    Journal article

  62. Tree of Thoughts: Deliberate Problem Solving with Large Language Models

    Shunyu Yao, Dian Yu, Jeffrey Zhao, Izhak Shafran, Thomas L. Griffiths, Yuan Cao, Karthik Narasimhan

    Advances in Neural Information Processing Systems, vol. 36 · 2023

    BibTeX
    @article{yao2024tree,
      title={Tree of Thoughts: Deliberate Problem Solving with Large Language Models},
      author={Yao, Shunyu and Yu, Dian and Zhao, Jeffrey and Shafran, Izhak and Griffiths, Thomas L. and Cao, Yuan and Narasimhan, Karthik},
      journal={Advances in Neural Information Processing Systems},
      volume={36},
      year={2023}
    }

    Journal article

  63. Experimental Evidence on Players' Models of Other Players

    Dale O. Stahl, Paul W. Wilson

    Journal of Economic Behavior and Organization, vol. 25, no. 3, pp. 309-327 · 1994

    BibTeX
    @article{stahl1994experimental,
      title={Experimental Evidence on Players' Models of Other Players},
      author={Stahl, Dale O. and Wilson, Paul W.},
      journal={Journal of Economic Behavior and Organization},
      volume={25},
      number={3},
      pages={309--327},
      year={1994}
    }

    Journal article

  64. Unraveling in Guessing Games: An Experimental Study

    Rosemarie Nagel

    The American Economic Review, vol. 85, no. 5, pp. 1313-1326 · 1995

    BibTeX
    @article{nagel1995unraveling,
      title={Unraveling in Guessing Games: An Experimental Study},
      author={Nagel, Rosemarie},
      journal={The American Economic Review},
      volume={85},
      number={5},
      pages={1313--1326},
      year={1995}
    }

    Journal article

  65. Multi-Agent Collaboration Mechanisms: A Survey of LLMs

    Khanh-Tung Tran, Dung Dao, Minh-Duong Nguyen, Quoc-Viet Pham, Barry O'Sullivan, Hoang D. Nguyen

    arXiv preprint arXiv:2501.06322 · 2025

    BibTeX
    @article{tran2025mas_survey,
      title={Multi-Agent Collaboration Mechanisms: A Survey of LLMs},
      author={Tran, Khanh-Tung and Dao, Dung and Nguyen, Minh-Duong and Pham, Quoc-Viet and O'Sullivan, Barry and Nguyen, Hoang D.},
      journal={arXiv preprint arXiv:2501.06322},
      year={2025}
    }

    Journal article

  66. Prediction and Entropy of Printed English

    Claude E. Shannon

    Bell System Technical Journal, vol. 30, no. 1, pp. 50-64 · 1951

    BibTeX
    @article{shannon1951prediction,
      title={Prediction and Entropy of Printed {English}},
      author={Shannon, Claude E.},
      journal={Bell System Technical Journal},
      volume={30},
      number={1},
      pages={50--64},
      year={1951}
    }

    Journal article

  67. Talk Isn't Always Cheap: Understanding Failure Modes in Multi-Agent Debate

    Andrea Wynn, Harsh Satija, Gillian Hadfield

    Proceedings of the International Conference on Machine Learning (ICML) · 2025

    BibTeX
    @inproceedings{wynn2025talk,
      title={Talk Isn't Always Cheap: Understanding Failure Modes in Multi-Agent Debate},
      author={Wynn, Andrea and Satija, Harsh and Hadfield, Gillian},
      booktitle={Proceedings of the International Conference on Machine Learning (ICML)},
      year={2025}
    }

    Conference paper

  68. Very Large-Scale Multi-Agent Simulation in AgentScope

    Xuchen Pan, others

    arXiv preprint arXiv:2407.17789 · 2024

    BibTeX
    @article{pan2024agentscope_large,
      title={Very Large-Scale Multi-Agent Simulation in {AgentScope}},
      author={Pan, Xuchen and others},
      journal={arXiv preprint arXiv:2407.17789},
      year={2024}
    }

    Journal article

  69. Symphony: A Decentralized Multi-Agent Framework for Scalable Collective Intelligence

    Ji Wang, Kashing Chen, Xinyuan Song, Ke Zhang, Lynn Ai, Eric Yang, Bill Shi

    arXiv preprint arXiv:2508.20019 · 2025

    BibTeX
    @article{wang2025symphony,
      title={Symphony: A Decentralized Multi-Agent Framework for Scalable Collective Intelligence},
      author={Wang, Ji and Chen, Kashing and Song, Xinyuan and Zhang, Ke and Ai, Lynn and Yang, Eric and Shi, Bill},
      journal={arXiv preprint arXiv:2508.20019},
      year={2025}
    }

    Journal article

  70. AutoAgents: A Framework for Automatic Agent Generation

    Guangyao Chen, others

    Proceedings of the International Joint Conference on Artificial Intelligence (IJCAI) · 2024

    BibTeX
    @inproceedings{chen2024autoagents,
      title={Auto{A}gents: A Framework for Automatic Agent Generation},
      author={Chen, Guangyao and others},
      booktitle={Proceedings of the International Joint Conference on Artificial Intelligence (IJCAI)},
      year={2024}
    }

    Conference paper

  71. Multi-Agent Consensus Seeking via Large Language Models

    Huaben Chen, others

    arXiv preprint arXiv:2310.20151 · 2023

    BibTeX
    @article{chen2024consensus,
      title={Multi-Agent Consensus Seeking via Large Language Models},
      author={Chen, Huaben and others},
      journal={arXiv preprint arXiv:2310.20151},
      year={2023}
    }

    Journal article

  72. Predictive Policy Improvement for Multi-Agent Cooperation via Co-Player Inference

    Christos Papadimitriou, others

    arXiv preprint arXiv:2501.00000 · 2025

    BibTeX
    @article{papadimitriou2025ppi,
      title={Predictive Policy Improvement for Multi-Agent Cooperation via Co-Player Inference},
      author={Papadimitriou, Christos and others},
      journal={arXiv preprint arXiv:2501.00000},
      year={2025},
      note={WARNING: Placeholder arXiv ID; paper may not exist as described}
    }

    Journal article

  73. AgentsNet: Enabling Multi-Agent Collaboration via Network Topology Optimization

    Taicheng Guo, others

    arXiv preprint arXiv:2410.00000 · 2024

    BibTeX
    @article{guo2024agentsnet,
      title={{AgentsNet}: Enabling Multi-Agent Collaboration via Network Topology Optimization},
      author={Guo, Taicheng and others},
      journal={arXiv preprint arXiv:2410.00000},
      year={2024},
      note={WARNING: Placeholder arXiv ID; paper may not exist as described}
    }

    Journal article

  74. Bounds on Multiprocessing Timing Anomalies

    R. L. Graham

    SIAM Journal on Applied Mathematics, vol. 17, no. 2, pp. 416-429 · 1969

    BibTeX
    @article{graham1969bounds,
      title={Bounds on Multiprocessing Timing Anomalies},
      author={Graham, R. L.},
      journal={SIAM Journal on Applied Mathematics},
      volume={17},
      number={2},
      pages={416--429},
      year={1969}
    }

    Journal article

  75. The Nonstochastic Multiarmed Bandit Problem

    Peter Auer, Nicolo Cesa-Bianchi, Yoav Freund, Robert E. Schapire

    SIAM Journal on Computing, vol. 32, no. 1, pp. 48-77 · 2002

    BibTeX
    @article{auer2002nonstochastic,
      title={The Nonstochastic Multiarmed Bandit Problem},
      author={Auer, Peter and Cesa-Bianchi, Nicol{\`o} and Freund, Yoav and Schapire, Robert E.},
      journal={SIAM Journal on Computing},
      volume={32},
      number={1},
      pages={48--77},
      year={2002}
    }

    Journal article

  76. Particle Swarm Optimization

    James Kennedy, Russell Eberhart

    Proceedings of the IEEE International Conference on Neural Networks (ICNN), vol. 4, pp. 1942-1948 · 1995

    BibTeX
    @inproceedings{kennedy1995particle,
      title={Particle Swarm Optimization},
      author={Kennedy, James and Eberhart, Russell},
      booktitle={Proceedings of the IEEE International Conference on Neural Networks (ICNN)},
      volume={4},
      pages={1942--1948},
      year={1995}
    }

    Conference paper

  77. The Particle Swarm---Explosion, Stability, and Convergence in a Multidimensional Complex Space

    Maurice Clerc, James Kennedy

    IEEE Transactions on Evolutionary Computation, vol. 6, no. 1, pp. 58-73 · 2002

    BibTeX
    @article{clerc2002particle,
      title={The Particle Swarm---Explosion, Stability, and Convergence in a Multidimensional Complex Space},
      author={Clerc, Maurice and Kennedy, James},
      journal={IEEE Transactions on Evolutionary Computation},
      volume={6},
      number={1},
      pages={58--73},
      year={2002}
    }

    Journal article

  78. Particle Swarm Optimization for Single Objective Continuous Space Problems: A Review

    Mohammad Reza Bonyadi, Zbigniew Michalewicz

    Evolutionary Computation, vol. 25, no. 1, pp. 1-54 · 2017

    BibTeX
    @article{bonyadi2017particle,
      title={Particle Swarm Optimization for Single Objective Continuous Space Problems: A Review},
      author={Bonyadi, Mohammad Reza and Michalewicz, Zbigniew},
      journal={Evolutionary Computation},
      volume={25},
      number={1},
      pages={1--54},
      year={2017}
    }

    Journal article

  79. Evolution and the Theory of Games

    John Maynard Smith

    Cambridge University Press · 1982

    BibTeX
    @book{smith1982evolution,
      title={Evolution and the Theory of Games},
      author={Maynard Smith, John},
      publisher={Cambridge University Press},
      year={1982}
    }

    Book

  80. The Logic of Animal Conflict

    John Maynard Smith, George R. Price

    Nature, vol. 246, no. 5427, pp. 15-18 · 1973

    BibTeX
    @article{smith1973logic,
      title={The Logic of Animal Conflict},
      author={Maynard Smith, John and Price, George R.},
      journal={Nature},
      volume={246},
      number={5427},
      pages={15--18},
      year={1973}
    }

    Journal article

  81. A Generalized War of Attrition

    D. T. Bishop, C. Cannings

    Journal of Theoretical Biology, vol. 70, no. 1, pp. 85-124 · 1978

    BibTeX
    @article{bishop1978generalized,
      title={A Generalized War of Attrition},
      author={Bishop, D. T. and Cannings, C.},
      journal={Journal of Theoretical Biology},
      volume={70},
      number={1},
      pages={85--124},
      year={1978}
    }

    Journal article

  82. MultiAgentBench: Evaluating the Collaboration and Competition of LLM Agents

    Kunlun Zhu, others

    Proceedings of the Annual Meeting of the Association for Computational Linguistics (ACL) · 2025

    BibTeX
    @inproceedings{zhu2025multiagentbench,
      title={Multi{A}gent{B}ench: Evaluating the Collaboration and Competition of {LLM} Agents},
      author={Zhu, Kunlun and others},
      booktitle={Proceedings of the Annual Meeting of the Association for Computational Linguistics (ACL)},
      year={2025}
    }

    Conference paper

  83. Reaching a Consensus

    Morris H. DeGroot

    Journal of the American Statistical Association, vol. 69, no. 345, pp. 118-121 · 1974

    BibTeX
    @article{degroot1974reaching,
      title={Reaching a Consensus},
      author={DeGroot, Morris H.},
      journal={Journal of the American Statistical Association},
      volume={69},
      number={345},
      pages={118--121},
      year={1974}
    }

    Journal article

  84. A Contribution to the Mathematical Theory of Epidemics

    William Ogilvy Kermack, Anderson G. McKendrick

    Proceedings of the Royal Society of London. Series A, vol. 115, no. 772, pp. 700-721 · 1927

    BibTeX
    @article{kermack1927contribution,
      title={A Contribution to the Mathematical Theory of Epidemics},
      author={Kermack, William Ogilvy and McKendrick, Anderson G.},
      journal={Proceedings of the Royal Society of London. Series A},
      volume={115},
      number={772},
      pages={700--721},
      year={1927}
    }

    Journal article

  85. Scaling Laws for Neural Language Models

    Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B. Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, et al.

    arXiv preprint arXiv:2001.08361 · 2020

    BibTeX
    @article{kaplan2020scaling,
      title={Scaling Laws for Neural Language Models},
      author={Kaplan, Jared and McCandlish, Sam and Henighan, Tom and Brown, Tom B. and Chess, Benjamin and Child, Rewon and Gray, Scott and Radford, Alec and Wu, Jeffrey and Amodei, Dario},
      journal={arXiv preprint arXiv:2001.08361},
      year={2020}
    }

    Journal article

  86. Why There Are Complementary Learning Systems in the Hippocampus and Neocortex: Insights from the Successes and Failures of Connectionist Models of Learning and Memory

    James L McClelland, Bruce L McNaughton, Randall C O'Reilly

    Psychological Review, vol. 102, no. 3, pp. 419-457 · 1995

    BibTeX
    @article{mcclelland1995cls,
      title={Why There Are Complementary Learning Systems in the Hippocampus and Neocortex: Insights from the Successes and Failures of Connectionist Models of Learning and Memory},
      author={McClelland, James L and McNaughton, Bruce L and O'Reilly, Randall C},
      journal={Psychological Review},
      volume={102},
      number={3},
      pages={419--457},
      year={1995}
    }

    Journal article

  87. Counterspeculation, Auctions, and Competitive Sealed Tenders

    William Vickrey

    The Journal of Finance, vol. 16, no. 1, pp. 8-37 · 1961

    BibTeX
    @article{vickrey1961counterspeculation,
      title={Counterspeculation, Auctions, and Competitive Sealed Tenders},
      author={Vickrey, William},
      journal={The Journal of Finance},
      volume={16},
      number={1},
      pages={8--37},
      year={1961}
    }

    Journal article

  88. Polynomial Calculation of the Shapley Value Based on Sampling

    Javier Castro, Daniel Gomez, Juan Tejada

    Computers & Operations Research, vol. 36, no. 5, pp. 1726-1730 · 2009

    BibTeX
    @article{castro2009shapley,
      title={Polynomial Calculation of the {Shapley} Value Based on Sampling},
      author={Castro, Javier and G{\'o}mez, Daniel and Tejada, Juan},
      journal={Computers \& Operations Research},
      volume={36},
      number={5},
      pages={1726--1730},
      year={2009}
    }

    Journal article

  89. Design Principles for the Immune System and Other Distributed Autonomous Systems

    Lee A. Segel, Irun R. Cohen

    Oxford University Press · 2001

    BibTeX
    @book{segel2001immunology,
      title={Design Principles for the Immune System and Other Distributed Autonomous Systems},
      author={Segel, Lee A. and Cohen, Irun R.},
      publisher={Oxford University Press},
      address={New York},
      year={2001}
    }

    Book

  90. A Cognitive Theory of Consciousness

    Bernard J. Baars

    Cambridge University Press · 1988

    BibTeX
    @book{baars1988cognitive,
      title={A Cognitive Theory of Consciousness},
      author={Baars, Bernard J.},
      publisher={Cambridge University Press},
      address={Cambridge, UK},
      year={1988}
    }

    Book