I have been thinking about the phrase “AI swarm”. It sounds wonderfully futuristic: a collection of small artificial workers, each with a job to do, passing messages around until they reach an answer.
The reality is a little more practical—and much more interesting. A multi-agent system is a software design in which several LLM-powered agents collaborate on a task. Each agent normally has instructions, some state, and possibly tools. A “team” is the general arrangement of those agents under an orchestrator. A “swarm” usually implies something more peer-like: agents can hand work to one another and share a conversation rather than everything passing through one central controller.
That distinction matters, because a fixed sequence of model calls is really an agentic workflow. It can still be useful, but it is not automatically a swarm just because there are three prompts involved.
A small population with a real job
For a practical experiment, I wanted a task that benefits from disagreement rather than simply asking the same model the same question three times. I also wanted to avoid calling a fixed three-stage pipeline a swarm. The test task is an architecture review:
Review a proposed OpenShift AI deployment and produce a recommendation that is technically useful, operationally realistic, and honest about its assumptions.
The first generation is a population of short-lived workers:
- Topology scout studies the shape of the deployment.
- Cache analyst concentrates on prefix reuse and KV-cache locality.
- Failure hunter looks for operational and security failure modes.
- Cost analyst thinks about tokens, latency, GPU memory, and message volume.
- Platform scout maps the local experiment to OpenShift AI.
The coordinator gives them a shared blackboard and spawns them concurrently. When the first findings arrive, the system creates a second generation of bounded follow-up agents: a KV critic and a reliability critic. They do not receive a blank task; they are born in response to the first generation’s questions. Finally, a synthesizer is spawned to consume the blackboard and close the task.
That is much closer to a swarm: fan-out, shared state, selective spawning, fan-in, and retirement. It is still bounded—five initial workers, two critics, and one synthesizer—because an unbounded swarm is an excellent way to turn a small GPU into a very expensive space heater.
This is close to the swarm pattern described by the Microsoft AutoGen documentation, where agents share context and hand off control based on their capabilities.
The orchestration is not the clever part of the experiment. The interesting part is what happens underneath it.
The hidden cost of agents talking
Three agents do not mean three times the intelligence. They usually mean several additional LLM requests, each with input tokens, output tokens, queueing, and latency.
There is, however, a useful regularity in these requests. The agents often receive the same material:
- the same system instructions;
- the same task description;
- the same architecture notes or documents;
- the same conversation so far.
Only the role and the question at the end may change.
That repeated context is expensive if the inference server processes it from scratch every time. It is also an opportunity for reuse.
Where vLLM helps
vLLM is a high-performance LLM serving engine built around efficient attention and memory management. One feature that is especially relevant to agentic workloads is Automatic Prefix Caching.
The basic idea is straightforward. When vLLM has already processed a prompt prefix, it can retain the corresponding key-value cache blocks. A later request with the same tokenized prefix can reuse those blocks instead of repeating the entire prefill computation.
For our small team, the prompt is a shared context block followed by a small role-specific suffix. The relationship between the repeated prefix, the KV cache, and the agents is shown below.

This does not make the generated answers free. The model still has to decode each answer, and prefix caching only helps where the requests really do share a prefix. It does, however, avoid needlessly making the GPU read and process the same long context repeatedly.
The message queue in the demo is important for coordination, but it is worth being precise: Redis or NATS shares messages; it does not magically share GPU KV cache. Cache reuse happens inside the inference engine, or through explicit cache-transfer and offload mechanisms.
One server is not a cache-aware fleet
The desktop experiment uses one vLLM instance. That is enough to demonstrate shared-prefix reuse and concurrent agent requests, but it is not a production distributed serving system.
Once there are several model-server replicas, ordinary round-robin load balancing can work against us. The Architect’s first request may warm a prefix on replica A, while the Skeptic’s follow-up is sent to replica B. Replica B then has to prefill the same context again.
This is where llm-d becomes relevant. llm-d is a Kubernetes-native distributed inference project that works with vLLM and provides inference-aware routing. Its KV-cache management and precise prefix-cache routing are designed to prefer model servers that already hold the relevant cached blocks.
The conceptual difference is simple: vLLM computes and manages the cache on a model server, while llm-d routes requests toward model servers that are already cache-warm.
With suitable connectors, KV data can also be offloaded to CPU memory, filesystems, or other tiers. That matters for multi-turn and agentic workloads, where context is repeatedly revisited and GPU memory is inevitably finite.
The desktop experiment
The demonstration is deliberately modest. It uses a small instruct model on an 8 GB GeForce RTX 4060, with a dynamically spawned population of logical workers rather than eight separate model processes.
The local architecture is shown in the diagram above: a lead agent publishes work to Redis Streams, spawned workers claim tasks, and the model-serving endpoint handles the concurrent requests.
The lead agent first receives an incident packet describing a latency regression after moving from one vLLM replica to two. It decides what needs investigating, publishes four work items to a Redis Stream, and spawns four workers. The workers claim tasks from the queue and publish findings to a second stream. A judge then reads the shared blackboard. If the findings disagree, it spawns two bounded rebuttal agents before the lead closes the investigation.
The orchestrator publishes events such as swarm.spawned, task.published, task.claimed, message.sent, swarm.spawn.requested, agent.retired, and consensus.reached. A small browser view turns those events into a living conversation. The visual story is now much clearer than a terminal full of interleaved log lines: one lead agent scopes the problem, workers appear and claim queue messages, critics are born in response to disagreement, and the lead declares the evidence sufficient—or reopens the swarm.
The first useful comparison is not “one agent versus a swarm”. It is:
- one cold request;
- three independent requests with duplicated context;
- three requests sharing a long prefix;
- five concurrent shared-prefix workers with prefix caching enabled;
- a second-generation critic pass over the shared blackboard;
- a bounded consensus loop that can reopen the investigation once, but cannot run away indefinitely.
For each run I record time to first token, total latency, input tokens, output tokens, and GPU memory. The numbers will vary with model, prompt length, sampling settings, and cache pressure, so I am treating this as a measurement rather than promising a particular speed-up.
The experiment should also make the limitations visible. A small model can produce a very convincing discussion while still being wrong. More agents add cost. If the task is simple, a single well-prompted model will often be faster, cheaper, and easier to evaluate.
Here is what the swarm actually saw. Two vLLM replicas had been placed behind an ordinary round-robin service. After the change, P95 time-to-first-token rose from 2.4 seconds to 8.7 seconds. One replica reported many prefix-cache hits; the other reported almost none. The application was sending the same 3,000-token policy prefix to five specialist agents, while Redis showed retries and duplicate task messages.
The lead agent split the investigation into four queue messages: routing and prefix locality; application fan-out and duplicate messages; GPU utilisation and token budgets; and the safe vLLM, llm-d, and OpenShift AI platform change.
The workers then published findings back to the shared stream. The browser animation below shows the actual conversation, including the judge requesting a rebuttal before the lead reaches consensus.
The browser view renders this as a live conversation, with agents appearing, claiming work, publishing findings, retiring, and being replaced by the rebuttal workers:

There is also an animated version of the swarm conversation for readers who enjoy watching the bots come and go.
A small KV-cache experiment
I then sent a roughly 2,870-token prompt to both local serving stacks. Each request asked for only 16 output tokens so that decoding would not hide the prefill effect. The warm request reused the long prefix but changed the final question.
| Engine and case | Median TTFT | Median total time | Cache observation |
|---|---|---|---|
| vLLM, cold prefix | 314 ms | 508 ms | 0 cached tokens |
| vLLM, warm prefix | 35 ms | 228 ms | 2,816 cached tokens |
| Ollama, cold prefix | 194 ms | 301 ms | ~1,846 prompt-evaluation tokens |
| Ollama, warm prefix | 189 ms | 311 ms | ~14 prompt-evaluation tokens |
This is not a laboratory-grade engine shoot-out. vLLM was serving the Hugging Face Qwen2.5-1.5B-Instruct checkpoint in BF16, while Ollama was serving its qwen2.5:1.5b quantized package. The hardware was the same RTX 4060, but the model representation and serving stacks were not identical.
The result is still useful. Ollama was faster for the cold, short request in this run. Ollama also clearly avoided repeating most of the prompt evaluation on the warm request. However, vLLM exposed the reuse directly as cached tokens and showed a much larger TTFT reduction because its automatic prefix cache removed almost all of the repeated prefill work. The difference becomes more visible when the output is short; with long answers, decode time dominates both systems.
The longer swarm workload produced nine logical agents, six queue tasks, and five generations of work. On this desktop run, the vLLM-backed swarm completed in about 15.6 seconds, while the Ollama-backed run took about 19.6 seconds. Those figures are workload results, not universal performance claims, but they show why the cache question belongs in an article about agent infrastructure.
From the desktop to OpenShift AI
The local demo proves the application pattern. It does not reproduce the operational problem of serving many agents and many users across a GPU-backed cluster.
That is where Red Hat OpenShift AI provides the platform story. Current OpenShift AI documentation describes Distributed Inference with llm-d as a Kubernetes-native way to deploy and serve large language models, using components such as vLLM, Envoy, and NIXL.
The mapping from the little desktop experiment to the supported platform is fairly clean:
| Desktop experiment | OpenShift AI platform |
|---|---|
| Python orchestrator | Agent application deployment |
| Redis Streams | Cluster service or managed messaging layer |
| One vLLM process | vLLM-backed model-serving pool |
| Local request handling | llm-d router and scheduler |
| Terminal logs | OpenShift AI metrics and observability |
| One GPU | A scheduled GPU-backed serving topology |
| Process-local prefix cache | Replica-aware KV-cache strategy |
The point is not that OpenShift AI turns a bad agent design into a good one. It gives the design a place to run with repeatable deployment, GPU scheduling, routing, metrics, and an operational support model.
Red Hat’s current supported-configuration information lists Distributed Inference with llm-d as generally available in OpenShift AI 3.5. As always, the exact status and versions should be checked against the release being deployed rather than copied blindly from a blog post.
The lesson
An AI swarm is an application pattern. vLLM is part of the inference engine. llm-d is part of the distributed serving layer. OpenShift AI is the platform that brings deployment and operations around those components.
The most interesting connection is that agent design creates systems-level consequences. Agents repeat context, repeat context creates cache locality, cache locality affects routing, and routing affects latency and cost.
The swarm is not just a group of prompts. It is a workload with a memory hierarchy.
And if your AI swarm has moved beyond an entertaining demo and into production infrastructure, you may want someone from Red Hat in the room. Consider a Red Hat Technical Account Manager.