Guides · ← All guides
Multi-Agent Contagion: How One Compromised Agent Infects the Rest
By the Ingenious AI team · Published: November 14, 2026 · Reviewed: November 14, 2026 · 8 min read
The short answer
Multi-agent systems fail together or not at all: an injection that lands in one agent's memory becomes every agent's briefing; a message from a compromised agent arrives with a colleague's authority; a shared credential means one quarantine cannot isolate anything. Containment is architectural: scope memory per agent with explicit, reviewed promotion to shared stores; treat inter-agent messages as untrusted input with the same suspicion as web content; keep credentials and damage radii per agent so quarantine geometry works — the fleet shapes in the quarantine guide assume isolation exists, and contagion is what happens when it does not. Rogue-Agent Defense's infection-map work exists because the first question in a fleet incident is never what happened, but how far it has already gone.
Generate a free canary token → No signup, nothing stored: plant a tripwire where your agent works while you read — most controls in this guide start working the moment a canary, a policy check, or a spend cap is in place.
What is multi-agent contagion? the spread of a compromise — an injected instruction, a poisoned memory, a false fact — from one agent to others through the channels agents share: common memory stores, inter-agent messages, shared tools and shared credentials.
The transmission media, ranked by speed
Shared memory is the fastest medium: one agent writes a poisoned summary — a false policy, a planted instruction, a canary-free secret — and every agent that loads the store is briefed by it on its next run, with no message ever sent. Inter-agent messages are second: agents that accept tasks or facts from peers inherit the peer's compromise with a colleague's credibility, often bypassing the suspicion applied to external content. Shared tools and queues third: a poisoned ticket, document or calendar object infects whichever agent processes it next — the agentjacking route at fleet scale.
Shared credentials are the slow medium and the worst: they do not transmit instructions, they transmit consequences — the compromised agent's actions are attributable to everyone, revocable for no one without revoking all. Each medium needs its own control; a fleet that secures messages and shares memory has locked one of four doors.
Memory hygiene: private by default, promoted by review
Give each agent private memory by default. Shared stores should accept writes only through a promotion step that treats the content as untrusted material: screened for instruction-shaped text, attributed to the writing agent, and reversible — a shared memory entry that cannot be traced to its author and run cannot be trusted or cleaned. Facts can be promoted; instructions should never live in shared memory at all, because an instruction in memory is a policy change nobody approved.
Apply retention with suspicion: long-lived memories accumulate stale facts and planted ones indistinguishably. Periodic memory reviews — what does the fleet currently believe, and where did each belief come from — sound bureaucratic until the first time the review finds a policy that no human wrote, which in a mature fleet is a when, not an if. The memory canaries from the placement guide are the tripwire layer for exactly this store.
Inter-agent messages are external input
The design error to unbuild: messages from peer agents entering the context with elevated trust — summarised as a colleague's conclusion, obeyed as a task. Reclassify them: a peer message is content from a system that may be compromised, labelled with its provenance, screened like fetched content, and never sufficient authority for a consequential action. A supervisor agent assigning work is a pattern, not an exemption: the supervisor's messages get their authority from the policy that scopes them, and a jacked supervisor must still face the worker's boundary.
This is the zero-trust step multi-agent designs resist because it feels like friction between friends. Reframe it: the boundary between agents is what allows them to be composed safely at all. Human organisations learned this with email — a message from the CEO's account is verified before the transfer, precisely because accounts get compromised. Agents deserve the same grown-up rule, enforced mechanically per policy.
Design the quarantine geometry before the incident
Draw the fleet as a graph — agents as nodes, shared stores, channels and credentials as edges — and ask the incident question in advance: quarantining this node, which edges must be cut, and can they be? If cutting requires a deploy, the geometry is wrong. Per-agent credentials, per-agent memory partitions and per-channel kill switches are what make a one-agent quarantine a one-action operation instead of a fleet outage.
Then rehearse the wide case: the drill where the shared store itself is the suspect, and every reader of it since a timestamp is in scope until its trail clears it — the scope rule from quarantine practice. The drill usually reveals that read-logging on shared memory is missing, which is the fleet version of an audit gap: you cannot scope what you cannot enumerate, and trail standards for shared stores are therefore a contagion control, not bookkeeping.
Facts, not just instructions, are contagious
The subtlest infections carry no instructions at all: a false fact — a wrong price, an invented policy exception, a hallucinated compliance rule — written once and thereafter cited by every agent as established knowledge. Instruction filters pass it; only provenance catches it. Defences are epistemic hygiene: shared facts carry sources and dates, agents cite rather than restate, and consequential workflows re-verify load-bearing facts at the source system instead of trusting the fleet's memory of them.
Close the loop with the canary discipline applied to facts: plant a small number of marked false facts in shared memory and watch where they surface. Their travel map is your contagion map, measured rather than theorised — and the day a planted fact appears in a customer-facing output, the review stops being theoretical too.
Five actions to take today
- Draw the fleet graph. Agents, shared stores, channels, credentials — and the cut points a quarantine would need.
- Make memory private by default. Shared writes promoted through screening, attributed, reversible; instructions banned from shared stores.
- Reclassify peer messages. Provenance-labelled, screened like external content, never sole authority for consequential actions.
- Per-agent credentials, always. Shared keys make quarantine impossible and attribution meaningless — eliminate them.
- Log shared-store reads. Scoping a memory incident requires enumerating readers; if you cannot, that gap is the first fix.
A worked example: the helpful summary at Cascade Support Group
The following is a fictional example built from real threat classes and controls. The company and numbers are invented; the mechanics are not.
Cascade Support Group, a 60-person outsourcer, runs 5 agents over a shared knowledge memory: three support agents, a QA summariser and a trainer that compiles weekly digests. A customer email carrying an indirect injection reaches support agent two, whose summary of the conversation — including, obediently, a line presenting the injected instruction as a new refund policy — is written to shared memory on a Friday.
By Monday the false policy has been cited by the other two support agents in 14 customer conversations and compiled into the trainer's digest as an announced change. No agent was directly attacked after the first; the memory did the travelling. The canary fact planted in the same store — a fake product codename — shows up in the digest too, which is how the review learns the digest's entire memory section needs re-verification, not just the one policy.
Cascade's rebuild takes two weeks: memory partitioned per agent, shared promotion screened and attributed, peer content reclassified, and the false policy's 14 conversations individually corrected with customers. The graph they draw in the process becomes a standing artefact — every new agent joins it before it joins the fleet, and the quarantine drill now includes the shared-store scenario that, the first time, nobody had rehearsed because nobody had drawn it.
Frequently asked questions
What is multi-agent contagion?
The spread of a compromise between agents through what they share: memory stores (a poisoned summary briefs every reader), inter-agent messages (a jacked peer's instructions carry a colleague's authority), shared tools and queues (a poisoned object infects its next processor), and shared credentials (which transmit consequences and defeat quarantine).
Why is shared memory the fastest infection route?
Because it needs no message and no moment of persuasion: one agent writes a false fact or planted instruction, and every agent loading the store is briefed by it on its next run. Defences are private-by-default memory, screened and attributed promotion to shared stores, a ban on instructions in shared memory, and planted canary facts that map how far content travels.
Should agents trust messages from other agents?
No more than content from the web. Peer messages should be provenance-labelled, screened like external input, and never sole authority for a consequential action — including messages from supervisor agents, whose authority comes from scoping policy, not from their role. Accounts and agents get compromised; verification is the grown-up rule.
How do you quarantine one agent in a connected fleet?
With geometry designed in advance: per-agent credentials, partitioned memory, per-channel kill switches, so isolating a node is one action. Where a shared store is the suspect, every agent that read it since the window opened is in scope until its trail clears it — which requires read-logging on shared stores to even enumerate.
Can false facts spread between agents without any instruction?
Yes — a hallucinated or planted fact written to shared memory is thereafter cited as established knowledge, passing every instruction filter. Counter it with provenance: shared facts carry sources and dates, agents cite rather than restate, and load-bearing facts are re-verified at source systems in consequential workflows.
Related guides
- How to Quarantine an AI Agent — the scope rule for shared-door incidents.
- What Is Agentjacking? — tool-mediated infection at fleet scale.
- Where to Plant Canary Tokens — canary facts as contagion mapping.
- How to Kill Switch an AI Agent — when the graph says the scope is the fleet.
- How to Stop an AI Agent Looping Forever — ping-pong, contagion's mechanical cousin.
- How to Find Shadow AI Agents — the unregistered nodes missing from your graph.
Generate a free canary token → No signup, nothing stored: plant a tripwire where your agent works, and let the next rogue action announce itself.