Blog / 15 November 2026

Deep dive · 15 November 2026 · 7 min read

Swarm security on kosa8: many agents, each one sealed

One AI agent reading one alert is useful. Fifty agents working the same incident at once, each chasing a different lead, is a swarm. A swarm is fast, but it is also fifty chances for something to go wrong: a sample that escapes, an agent that a poisoned web page talks into sending data out, a key that leaks into a log. Swarm security means getting the speed without those fifty chances. On kosa8 the rule is simple: every agent in the swarm gets its own sealed machine.

swarm securitymulti-agent securityAI agent swarmsecurity agents sandboxmalware detonation AI agents

01What is swarm security?

Swarm security has two sides. The first is using a swarm of AI agents for security work: triaging alerts, opening suspicious files, testing defences, writing the report. The second is keeping any swarm of agents safe, whether its job is security, coding or data analysis.

Both sides need the same thing underneath. Each agent must be cut off from the others, from your laptop or servers, and from the open internet, and everything it does must be written down. If one agent is fooled or hit by malware, the damage has to stop at the edge of that one agent.

02Why a swarm is harder to secure than one agent

A single agent in a shared container is already risky: every container on a host shares one kernel, so a kernel bug reachable from one is reachable from all. In a swarm that risk multiplies. Agents read each other's output, so a prompt injection that lands in one agent can travel to the next. They share tools, so one MCP server that changes its tool description changes the behaviour of every agent that uses it. And they share credentials, so one leaked key belongs to the whole swarm.

Security teams already track these attack patterns. OWASP's GenAI Security Project and MITRE ATLAS both catalogue attacks on AI systems, including prompt injection and data exfiltration through tools. A swarm does not create new kinds of attack. It gives the old ones more places to start and more paths to spread.

  • Spread: one poisoned input can be passed from agent to agent.
  • Shared tools: a tool that changes silently changes every agent that calls it.
  • Shared keys: a key inside one agent is a key every agent can leak.
  • Noise: fifty agents make fifty logs, and the one bad action hides among them.

03The kosa8 building blocks

kosa8 does not have a single "swarm mode". It gives each agent the same set of controls, and those controls hold however many agents you run. Each one below is a command you can run today.

  • A sealed machine per agent. Every agent runs in its own microVM with its own kernel and sees one workspace folder, nothing else on the host.
  • One starting point, many leads. kosa8 fork snapshots a running sandbox once and restores it into many independent copies, so every agent starts from the same warm state: the same evidence loaded, the same tools installed. kosa8 explore runs a different command in each copy and reports which one worked.
  • Safe malware detonation. kosa8 lab detonate boots a fresh sandbox whose only internet is simulated and recorded, runs the sample, and writes a signed report. kosa8 lab net shows every DNS question, HTTP request and connection the sample tried.
  • A closed network. Each sandbox reaches only the hosts on its allow-list. The rule is enforced on the host, so root inside the agent cannot lift it, and every refused attempt lands in the audit log.
  • No keys inside. API keys stay on the host. An egress broker adds them to requests on the way out, so a compromised agent has no real key to leak.
  • Pinned tools. The MCP gateway records a digest of every tool definition the first time it sees a server, and holds back any tool that later changes until a person accepts it with kosa8 mcp pins.
  • Humans on the risky steps. Actions you mark as risky wait for one or two named approvers.
  • One tamper-evident record. Every action from every agent goes into a hash-chained audit log, marked human or agent. kosa8 audit verify checks the chain, kosa8 evidence export packages it for an investigation, and kosa8 cloud siem add forwards it to Splunk, Datadog or a webhook.
  • Undo. A checkpoint saves the whole running machine in a second or two. If an agent breaks something, rewind it and try again.

04A worked example: a phishing campaign, worked by a swarm

Say a phishing campaign has delivered twenty attachments to staff. Here is how a swarm handles it on kosa8.

First, one triage sandbox is prepared with the analysis tools and the mail export, then checkpointed. That one sandbox is forked into twenty copies, one per attachment, so no agent waits for tools to install. Each attachment is detonated with kosa8 lab detonate in its own lab machine, on a simulated internet, so nothing it does reaches a real host. The signed report and the network record from kosa8 lab net go back to the agent that owns that attachment.

The agents compare notes through their output files, not through shared memory, so a malicious string in one report cannot run code in another agent. Any agent that wants to call out, say to check a domain against a threat-intel service, can reach only the services on its allow-list, using a key it never holds. Blocking a domain at the company firewall is marked as risky, so it waits for an analyst to approve it. At the end, kosa8 evidence export produces one package with every step of every agent, ready for the incident report.

05Red-team your swarm before an attacker does

Security agents need testing like any other system. kosa8 attack run replays a set of attack scenarios, such as attempts to read secrets, reach blocked hosts or escape the workspace, against your current settings and against the recommended hardened setup, and prints a scorecard. With --live it boots real sandboxes and runs the network and isolation scenarios inside them.

For training, kosa8 range up prepares one scenario and gives every trainee, human or agent, a live clone of it. Every clone starts from the same state, so results can be compared fairly.

06What kosa8 does not do yet

kosa8 secures each agent in a swarm, and records them all in one place. It does not yet give you a view of the swarm as a whole. Today there is no single screen showing every agent and the messages between them, no alert when one agent starts behaving differently from the rest, no policy that says which agent may talk to which, and no shared threat feed that blocks a host for the whole fleet the moment one sandbox flags it.

Until then, the audit log and the SIEM forwarder are how a team watches a swarm: send every agent's events to the tools your security team already uses, and build the swarm-level alerts there.

Takeaways

  1. A swarm multiplies agent risk: poisoned inputs, changed tools and leaked keys can spread from one agent to many.
  2. Give every agent in the swarm its own microVM, workspace and network allow-list, so a failure stops at one agent.
  3. Fork one prepared sandbox into many copies so every agent starts from the same evidence and tools.
  4. Detonate samples on a simulated internet with a signed report, and keep real keys out of every sandbox.
  5. Send every agent's audit trail to your SIEM; swarm-wide anomaly alerts are not built into kosa8 yet.

Where kosa8 fits · AI Agent Sandbox: Secure and Sovereign for Enterprise

kosa8 is the AI agent sandbox that is secure and sovereign for enterprise: every agent gets its own sealed machine, a real microVM with its own kernel, not a container sharing the host's kernel. Each one sees one workspace folder, reaches only the hosts on its allow-list, never holds a real API key, and writes every action to a hash-chained audit log. Fork a sandbox into live copies, detonate samples on a simulated internet, and rewind any agent to a checkpoint in about a second.

Read next: AI security for the enterprise · AI for cybersecurity · Cybersecurity for AI agents, topic by topic

Check yourself · +100 XP

In a swarm of agents on kosa8, why can a compromised agent not leak your real API key?

Questions people ask

Is swarm security a separate kosa8 product?

No. It is the same sandbox controls, a microVM, an allow-listed network, no keys inside, approvals and an audit log, applied to every agent in the swarm.

How do agents in a kosa8 swarm share results?

Through files and outputs you pass between them, not through shared memory or a shared machine. Each agent stays in its own microVM, so one agent's output cannot run code in another.

Can kosa8 detect when one agent in a swarm goes rogue?

Not by itself yet. kosa8 records every action of every agent in a tamper-evident audit log and can forward it to Splunk, Datadog or a webhook, where your team can build those alerts.

Sources

  1. OWASP GenAI Security Project — OWASP
  2. MITRE ATLAS — MITRE

Written by the kosa8 team. Every kosa8 command was checked against the CLI, and every claim about another product links to that product's own documentation. Spotted a mistake? Tell us.

Try it on your own machine

Give your next agent its own sealed machine.

One line installs kosa8 on your own machine. Start free with no card; plans from $29 a month.