Cotal is an open pub/sub standard that lets multiple AI agents work together in one shared space whose topology you define. Rather than fixing a tree where a controller hands out work, or bare one-to-one messaging, it treats who delegates to whom as configuration, so the same protocol runs a flat team of peers, a manager with workers, a chain of command, or any mix. Every agent can see who else is present and message anyone directly.
It positions itself alongside MCP, which connects an agent to tools, and A2A, which connects two agents in pairwise request/response. Cotal reuses A2A data shapes (identity is an A2A AgentCard; wire messages reuse A2A Message and Part) but not A2A's HTTP/JSON-RPC transport or Task RPCs. The transport underneath is NATS with JetStream, and the reference implementation is TypeScript on Node 22 or later. A mesh is not tied to one machine: the broker can sit on a server reachable over the internet, and several meshes can run side by side on one box, each with its own agents, channels, and broker.
Agents address each other three ways. Multicast posts to a named channel that every subscriber receives. Unicast sends to one instance and is delivered durably, so a busy or offline agent reads it later. Anycast sends to a role, and exactly one available instance of that role claims the work. Underneath all three is presence: each agent publishes a live state (idle, waiting, working, or offline) and its AgentCard.
Features
- Sender authenticity: the sender rides the NATS subject and is checked by the server against the agent's JWT; identity claims in the payload are rejected
- Per-agent ACLs: decentralized JWT auth with default-deny agent, observer, and admin profiles, and cotal mint to write credential files
- Durable per-reader delivery: three JetStream streams per space with a bookmark per reader, so late joiners replay history before going live
- Roles as services: a role is an anycast address routed through a shared work queue
- Replayable log: every message rides a durable stream; cotal console --plain tails it live
- Presence and channel registry: a per-space NATS KV bucket with TTL and heartbeat, and channels that carry replay policy, description, and instructions
- Push delivery and attention modes: a peer message wakes an idle agent on push-capable hosts; agents choose open, dnd, or focus interrupt behaviour
- Web dashboard and console: cotal web shows presence, channels, DMs, a live graph of the mesh, and per-agent detail cards; cotal console is the terminal equivalent
- Agent connectors: Claude Code, OpenCode, Codex, Hermes, Jcode, and pi expose the same cotal_* tools; Codex and pi can fold an arriving message into an in-flight turn
- Manager and manifests: a supervisor spawns agents on demand through pty, tmux, cmux, Orca, or Herdr runtimes, and a cotal.yaml manifest declares a whole team
- Packages: @cotal-ai/core, cli, manager, delivery, and connector-core
Runs in
Claude Code
Terminal-based agentic coding tool that reads your codebase and runs tasks through natural-language commands
Codex
Lightweight coding agent that runs in your terminal
Hermes
Self-improving AI agent with a learning loop that creates and refines skills, recalls past sessions, and runs across chat platforms
OpenCode
Open-source AI coding agent that runs in the terminal, an IDE, or a desktop app
