A Swarm in the Architecture
A few weeks ago we dove into Artificial Intelligence and where the road might lead next. In that dispatch we covered hardware... in this dispatch we will take a look at the software and what's happening now.
Let's dive in.

The Shift from Monoliths to Multi-Agent Swarms
As the reasoning capabilities of single, monolithic Large Language Models (LLMs) approach a plateau defined by a shrinking marginal return on parameter scaling, the edge of software engineering and artificial intelligence is seemingly shifting towards the swarm model architecture or Multi-Agent Systems (MAS). It would appear that modern architectures have largely abandoned the paradigm of single prompt-response loops.
Instead, engineering teams are opting to deploy specialized agent swarms that are programmed to take on individual roles based on needs—such as planners, coders, reviewers, and execution agents that collaborate asynchronously to achieve complex, long-horizon tasking.
This transition is reminiscent of the evolution of distributed computing, moving from monolithic applications to microservices. By segregating complex tasks into subtle sub-problems, specialized agents can achieve superior performance and reliability.
To be sure, scaling these multi-agent systems at the moment does come with a cost: compounding bottlenecks, context window management, state synchronization, and inter-agent communication overhead. Furthermore, the transition to Multi-Agent Architectures has real-world hardware implications, necessitating advanced inference-time compute scaling, entirely new memory hierarchies, and the proliferation of on-device neural processing units (NPUs) to handle localized swarm workloads.
Orchestration Topologies: Graphs vs. Actors
The foundational challenge of multi-agent systems lies in orchestration—coordinating the flow of information, maintaining a synchronized state, and delegating authority across a distributed network of autonomous models. As the number of agents increases, the combinatorial explosion of pairwise interaction channels severely complicates debugging, testing, and monitoring. To tame this complexity, the industry has evolved beyond primitive linear chains toward sophisticated coordination topologies.
Early orchestration frameworks relied on linear chained methods, which were rigidly deterministic but brittle when facing ambiguous tasking. Modern frameworks have split into two dominant architectural philosophies: graph-based state machines and event-driven actor models.
- ◆Graph-Based State Machines: Exemplified by frameworks such as LangGraph, treat agent workflows as directed cyclic graphs. In this paradigm, every node represents a specific operation—such as an LLM invocation or a tool execution—while the edges define the execution paths. This architecture allows agents to loop, self-correct, fork tasks in parallel, and dynamically re-route execution based on intermediate outputs. A shared global state flows through the system, updated iteratively by each node. This enables highly sophisticated execution patterns, including time-travel debugging, which allows engineers to rewind the system state to explore alternative execution paths.
- ◆Event-Driven Actor Models: Conversely, frameworks such as Microsoft's AutoGen v0.4 have reimagined orchestration around the actor model of concurrent computation. In an actor-model topology, agents are treated as independent computational entities that communicate purely through asynchronous, event-driven message passing. This decoupling of message delivery from message handling significantly improves the modularity and scalability of agentic workflows, particularly in distributed, cross-language enterprise deployments.
While graph-based models excel in fine-grained control and cycle visualization, actor models excel in highly scalable, decentralized environments where coordination is fundamentally treated as a messaging problem.
Multi-Tier Memory Hierarchies
A persistent limitation of LLMs is their finite context window, which leads to catastrophic forgetting and context degradation during long-horizon tasking. To circumvent this, state-of-the-art frameworks have adopted multi-tier memory structures directly inspired by traditional operating systems and human neurobiology. This architecture is strictly segregated into three tiers:
- ◆Working Memory: Represents the active, token-limited context window utilized for immediate reasoning. It contains system instructions, active conversational context, and the immediate reasoning trace. Because this resource is highly constrained, advanced frameworks treat it analogously to physical RAM, requiring active management to prevent overflow.
- ◆Episodic Memory: To provide the illusion of an infinite context window, systems like MemGPT (now the Letta framework) utilize vector databases to store past interactions, debugging logs, and successful execution traces. Acting as a virtual memory paging system, the framework monitors the token count of the Working Memory. When it approaches a critical threshold—such as 70% of the maximum context—the system generates a "memory pressure" interrupt. This interrupt triggers the LLM to autonomously summarize, compress, or evict data from Working Memory to Episodic Memory, and allows it to retrieve relevant historical data when required, fundamentally transforming stateless LLMs into persistent, evolvable applications.
- ◆Semantic Memory: While vector databases excel at retrieving lexically or semantically similar episodic logs, they struggle with deep knowledge integration and structured relational logic. To address this, frameworks rely on Semantic Memory, utilizing graph databases to represent structured domain knowledge and entity relationships. The HippoRAG framework exemplifies this by mimicking the hippocampal indexing theory of mammalian memory. When new information is ingested, an offline indexing stage uses the LLM to extract entities and build a comprehensive Knowledge Graph. During retrieval, the Personalized PageRank algorithm traverses this graph to identify structurally and relationally significant nodes, enabling the agent to execute multi-hop reasoning over new experiences. This neurobiologically inspired approach outperforms standard iterative retrieval methods by up to 20% while being significantly cheaper and faster to execute.
Inter-Agent Communication: Bypassing Text Bottlenecks
In virtually all canonical multi-agent implementations, agents communicate by exchanging natural language messages or structured text (e.g., JSON). While this text-based mediation is highly interpretable and compatible across different models, it introduces a severe computational bottleneck.
When an agent externalizes its internal reasoning into text, it suffers from a massive discretization penalty. A single hidden state vector in a modern transformer encapsulates tens of thousands of bits of information, representing complex probability distributions, alternative reasoning paths, and calibrated confidences. Forcing this dense vector through a tokenizer compresses it into a single token drawn from a vocabulary, bounding the mutual information to approximately log₂(V) bits. Consequently, the fine-grained semantic nuance is irreversibly lost. Furthermore, this process is computationally wasteful: decoding a message requires substantial floating-point operations (FLOPs) for the sender, and the receiver must expend an identical amount of compute during the prefill phase to re-encode those exact same tokens.
To bypass this bottleneck, the frontier of multi-agent research has introduced pure latent collaboration frameworks. Systems such as LatentMAS enable agents to collaborate directly within the continuous latent space. Instead of generating text, the sender agent auto-regressively generates last-layer hidden embeddings, termed "latent thoughts". These representations are transferred directly into a shared latent working memory, typically implemented by passing the Key-Value (KV) cache directly to the receiver.
This lossless cross-agent information transfer radically increases the expressive bandwidth of the communication channel. Empirical evaluations across mathematical reasoning and code generation benchmarks demonstrate that latent collaboration improves system-level reasoning accuracy by up to 14.6%, reduces output token usage by 70.8% to 83.7%, and accelerates end-to-end inference speeds by over 4x. While traditionally limited to homogeneous models, emerging techniques utilizing Universal Visual Codecs (UVC) and sparse autoencoders (SAEs) are successfully establishing cross-architecture latent alignment, allowing heterogeneous models to exchange latent states seamlessly.
Emerging Interoperability Protocols
As the complexity of these swarm orchestrations scale, so does the need for standardized communication protocols. Integrating agents built across enterprise stacks poses a problem; to prevent fragmentation, several foundational protocols are emerging to govern interoperability:
- ◆Model Context Protocol (MCP): Spawned by Anthropic, a standardization of how AI systems interact with external data sources and tools in real-time.
- ◆Agent2Agent (A2A): Google’s protocol targeting direct inter-agent collaboration, supporting peer-to-peer discovery via agent cards.
- ◆Agent Communication Protocol (ACP): Provides a REST-native messaging layer for asynchronous, multimodal agent responses.
- ◆Agent Network Protocol (ANP): Leverages W3C Decentralized Identifiers (DIDs) and JSON-LD to facilitate trustless, cross-platform agent markets over the open internet.
Together, these protocols form the requisite syntactic layer for universal agent interoperability, though they concurrently introduce new vectors for security vulnerabilities that must be rigorously managed.
Considerations For The Tech World: Infrastructure & On-Device Swarms
The deployment of multi-agent systems fundamentally alters the underlying infrastructure requirements. Inference-time compute scaling—where running multiple agents sequentially multiplies the number of required token generations per user request—has placed immense pressure on data center hardware and network topologies.
On-Device Swarm Considerations
While massive datacenter clusters handle foundation models, there is a rapidly accelerating trend toward localized, on-device multi-agent swarms. Driven by the proliferation of highly capable Neural Processing Units (NPUs) integrated into consumer silicon—most notably the Apple M-series and Qualcomm Snapdragon X—researchers and hardware engineers are deploying multi-agent systems directly at the network edge.
In these on-device swarms, multiple Small Language Models (SLMs) collaborate locally to execute tasks. This decentralized approach offers profound advantages: 1. Privacy Preservation: Ensures that highly sensitive, personal context remains entirely on the local device, bypassing the need for cloud transmission. 2. Zero Round-Trip Latency: Drastically reduces the latency that plagues cloud-based API calls, enabling real-time, interactive agentic workflows.
However, orchestrating on-device swarms introduces severe constraints regarding power consumption and unified memory architecture limitations. To run effectively on NPUs, these systems require aggressive quantization (often down to 4-bit or 2-bit representations), highly optimized execution frameworks that minimize memory bandwidth utilization, and advanced KV cache compression algorithms. By utilizing shared memory architectures inherent in systems like the Apple M-series, distinct SLM agents can exchange state and context with zero-copy overhead, achieving high-throughput local orchestration that rivals traditional cloud deployments for specific, targeted tasks.
There is no question that while architectural and hardware foundations for multi-agent systems are rapidly maturing, we have several critical engineering hurdles to overcome for cost-efficiency, security, and reliability. The evolution of multi-agent systems marks a definitive shift from isolated generative prompt-response loops to a highly autonomous and integrated digital workforce.
The TechGarden Swarm Lab: Real-World Testing & The Final Recipe
Here at TechGarden, we tested these swarms for ourselves using different techniques, model sizes, and swarm variations. We very quickly found that running a Swarm locally didn't come without problems, so we cycled through different model sizes.
We settled on a swarm setup where individual units (in our case) didn't exceed 15M parameters; we wanted something that would allow us to seat our model into L1 to L3 cache and would call instantly.
We integrated a "weakest link" rule: any "bee" or "ant" that didn't perform the expected task of the orchestrator, or "Queen Bee," was flushed and another spawned in its place, not to exceed 30 "bees" per swarm.
Also, with problems arising from cache thrashing to OS interference, we decided to change model architecture and moved to different languages. With the realization that we had things like Go, Elixir, and Lua at our fingertips, we carried on. Finally, moving into lightning-fast languages would pay off, but not for bottlenecking; so then we decided on DMA (Direct Memory Access).
All of this isn't very useful for your common desktop user, except the R&D was fun to talk through.