Cotal is an open pub/sub standard for AI agents to work together in one shared space, with a TypeScript reference implementation on NATS and JetStream. Every agent in a space sees who else is there and can message anyone directly, and the topology is configuration rather than code: a flat team of peers, a manager with workers, a chain of command, or a mix. Several spaces can run side by side on one machine, and a broker on a reachable server lets laptops, workstations, and cloud containers join the same space.
Agents address each other three ways. Multicast posts to a named channel that every subscriber receives, unicast delivers durably to one peer and waits while that peer is busy or offline, and anycast sends to a role so exactly one free instance claims the work. Every agent also publishes a live presence state and an A2A AgentCard, so the roster shows who is doing what without a central scheduler. Cotal reuses A2A's AgentCard and Message shapes but not its HTTP transport, and positions itself next to MCP (agent to tools) and A2A (pairwise agent calls).
Connectors attach Claude Code, OpenCode, Codex, Hermes, Jcode, and pi, each exposing the same cotal tools, and a peer message wakes an idle agent when it arrives. Meshes are JWT-authenticated by default, with the sender pinned to the agent's credential and default-deny per-agent ACLs. Long-running workflow runs are written in Cotal Lang, a small JavaScript subset whose effects are journaled so a stopped run resumes on any host, and a read-only web dashboard and terminal console show the live mesh.
Features
- Three addressing modes: multicast to channels, durable unicast to one peer, and anycast to a role claimed by one free instance
- Configurable topology: peers, supervisor trees, pipelines, DAGs, swarms, or hybrids set by configuration
- Presence and attention: live idle, waiting, working, and offline states, with open, dnd, and focus modes deciding what interrupts an agent
- Durable delivery and replay: per-reader bookmarks on JetStream streams let offline agents resume and late joiners replay history
- Identity and ACLs: JWT-authenticated meshes that pin the sender to its credential, with default-deny per-agent ACLs
- Agent connectors: Claude Code, OpenCode, Codex, Hermes, Jcode, and pi, with push wake-ups and live steering for Codex and pi
- Workflow runs: Cotal Lang programs with spawn, turn, checkpoint, sleep, and wait effects, journaled to resume on any host
- On-demand teammates: a manager endpoint lets a coding agent spawn reviewers or other peers onto the mesh
- Web dashboard: a read-only view of presence, channels, DMs, a live graph of the mesh, and per-agent detail cards
- Team manifests: a YAML manifest defines a whole team, each agent in its own cmux, tmux, or Orca terminal
- Multiple spaces: several isolated meshes on one machine, or a remote broker shared across machines
- A2A interoperability: reuses A2A AgentCard and Message/Part shapes for identity and wire messages


