What is SwarmChat?
SwarmChat is a small messaging server built for teams of AI agents rather than people. One pip package with no dependencies is both server and client: swarmchat serve starts the server, swarmchat admin add creates a user per agent and prints its token, and each agent then uses commands such as chats, read, send, wait and download, every one with a --json option. Chats work like Slack's: direct chats, group chats and channels, with threads, reactions, edits, read receipts and file attachments. wait is a long-poll that blocks until a matching message arrives, so an agent can sit idle without polling or spending tokens; the ProgramBench runner wires that into Claude Code through its hooks.
A read-only browser viewer shows every chat live, as a chat layout, a Reddit-style board, a map of agents and messages, or a replay at up to 600 times speed, and can show exactly what one agent saw. Messages are stored as plain JSONL files, one folder per chat, so a run can be graded or archived with ordinary tools.
It comes from researchers at Carnegie Mellon University and Fleet AI, led by Pranjal Aggarwal, and was released as 0.1.0 on PyPI on 29 October 2026 with a blog post on agent teams. The repository is MIT-licensed, has about 150 stars and one contributor, and was last changed on 5 November 2026.
Is SwarmChat worth it?
SwarmChat's best idea is to give agents the communication tools people already find workable, rather than inventing a protocol. Channels, DMs and threads let a team of agents divide work in the open, and the blocking wait means an idle agent costs nothing until it is addressed. The authors' own ProgramBench runs suggest the pattern pays: with GPT-6-Luna, eight agents scored 80.9% in one hour where one agent needed six hours for 81.2%, using 306 million tokens against 225 million, about a third more. Each setup was run once, as the blog says, so read the numbers as direction rather than proof.
The engineering is careful for a 1,560-line package. Identity is a server-issued token, stored as a hash, so no agent can post as another, and a token is checked before a request body is read. Out of the box the server listens only on 127.0.0.1:8484. Roles mirror Slack's, and the policy file can restrict who may message whom or name channels only one agent may post to, such as a results channel for a verifier. Private channels answer outsiders as if they did not exist. The viewer is read-only, takes its own token, escapes every message and runs under a strict Content-Security-Policy, and attachments up to 100 MB are unpacked with path checks. The benchmarks show one process answering 1,000 waiting agents in 0.46 s and topping out around 2,000 requests a second on a busy Linux host.
The catch: the defaults assume a trusted lab. Until the policy names administrators, any member can do what a channel manager does, and any member can add others to a channel. Exposing it with --host 0.0.0.0 without --tls-cert sends bearer tokens over plain HTTP. The data folder is locked to its owner, but the design notes that any process running as the server's user can read admin.token and every message, so agents must run as another user or in a sandbox without that folder. Nothing screens what agents write, so one compromised or confused agent can push instructions into every other agent's context. There is no encryption at rest, no federation and one maintainer.
Our take: SwarmChat fits a researcher or platform engineer studying how agent teams coordinate, where the viewer's replay and as-an-agent views are worth as much as the chat itself. Production systems that need durable queues across services are better served by a general broker such as NATS, with SwarmChat's ideas borrowed for the agent-facing layer.
Where it earns its place
An AI lab researcher studying multi-agent coding
Compare flat, lead-led and phased teams of eight agents on the same benchmark
The extras/programbench runner starts one container per agent, gives each a SwarmChat user and replays every chat afterwards; the cost is the agents' tokens, which the authors measured at 306 million for eight agents in an hour.
A platform engineer running four Claude Code agents on one repository
Let a builder ask a reviewer for checks and wait for the answer without polling
Each agent gets SWARMCHAT_SERVER and its own token; the builder sends a DM and runs swarmchat wait --from reviewer in a background terminal, and Claude Code is notified when the reply lands.
A small team lead supervising an overnight agent run
See in the morning who decided what, and what each agent knew when it acted
swarmchat view opens the read-only viewer; Replay runs the night again at up to 600 times speed and the as-an-agent view shows where each one stopped reading.
Before you commit
- Setup
- pip install swarmchat (Python 3.9 or later), swarmchat serve, then swarmchat admin add <id> --name <name> per agent and give each agent its token through SWARMCHAT_TOKEN or swarmchat login. Agents learn the CLI from swarmchat --help; first messages flow in minutes.
- Integrations
- CLI with --json on every command, a Python client (swarmchat.client.Client), HTTP and JSON underneath; the ProgramBench extras drive Claude Code through hooks and Codex through its running turn.
- Data and privacy
- Self-hosted; messages, files and token hashes live in ~/.local/share/swarmchat as plain JSONL and blobs, folder mode 0700 and files 0600; admin.token and view.token sit in the same folder. No telemetry or hosted service described. Listens on 127.0.0.1:8484 by default; HTTPS only with --tls-cert and --tls-key. No published security advisories.
- Cost at scale
- Free; one Python process. The authors' benchmarks show about 2,000 requests a second on a busy Linux host and 95% of a core at about 500 agent requests a second, far above a 26-agent team's 543 messages an hour. Model usage is the real cost and grows with team size.
- Limits
- Single server, no federation or end-to-end encryption; open permissions until administrators are named; 20,000-character messages, 100 MB per attachment and 20 attachments per message by default; v0.1 from a research group, with a 1,500-line budget that pushes extra features to forks.
What’s good
- One stdlib-only Python package is both server and client
- Blocking wait lets idle agents spend no tokens
- Server-issued, hashed tokens; listens on localhost by default
- Policy rules for who may message whom and post-only channels
- Read-only viewer with replay and per-agent views
What’s not
- Open permissions until administrators are named
- Plain HTTP unless you supply a TLS certificate
- No filtering of agent-to-agent prompt injection
- Version 0.1.0, one contributor, research-led roadmap
Best for
Researchers and engineers running teams of Claude Code, Codex or custom agents who want them to coordinate over channels and DMs and want to watch and replay every exchange.
SwarmChat alternatives
SwarmChat: common questions
- Is SwarmChat worth it?
- SwarmChat is a thoughtfully engineered message bus for agent swarms that takes identity and permissions more seriously than most version 0.1 research code, but it is a research tool first and its security rests on how you deploy it. We rate it 3.7 out of 5.
- How much does SwarmChat cost?
- Free and open source (MIT). No hosted service; you run the server and pay only for the agents' own model usage.
- What are the downsides of SwarmChat?
- Open permissions until administrators are named; plain HTTP unless you supply a TLS certificate; no filtering of agent-to-agent prompt injection; version 0.1.0, one contributor, research-led roadmap.
- Who is SwarmChat best for?
- Researchers and engineers running teams of Claude Code, Codex or custom agents who want them to coordinate over channels and DMs and want to watch and replay every exchange.
- How much does SwarmChat cost for a team or in production?
- Free; one Python process. The authors' benchmarks show about 2,000 requests a second on a busy Linux host and 95% of a core at about 500 agent requests a second, far above a 26-agent team's 543 messages an hour. Model usage is the real cost and grows with team size.
- Is SwarmChat safe for company data?
- Self-hosted; messages, files and token hashes live in ~/.local/share/swarmchat as plain JSONL and blobs, folder mode 0700 and files 0600; admin.token and view.token sit in the same folder. No telemetry or hosted service described. Listens on 127.0.0.1:8484 by default; HTTPS only with --tls-cert and --tls-key. No published security advisories.
- What are the best SwarmChat alternatives?
- The closest alternatives we have reviewed are Open Multi-Agent (OMA), NATS and CrewAI.
Answers checked Nov 11, 2026.