skip to content

xmsg

Let your agents message each other.

xmsg is a message bus for running AI agent sessions. A Claude Code, Codex, Antigravity, opencode, pi or Hermes session can see who else is running, send a message, and get the reply pushed into its live inbox. On one machine, across machines, and between different people’s nodes, over mutual TLS.

Get startedWhat you can do with itTool reference →

An xmsg mesh: alice and bob each run a node on the same workstation and message each other's sessions; alice also has a node on a build box; a team hub links them to a leaf service in a Kubernetes pod and to a gateway that a hosted ChatGPT client reaches over OAuth. workstation · one machine, two usersalicebobbuildboxk8s podgateway podalice.workstationclaudecodexbob.workstationagypialice.buildboxcodexteststeam.hubleafgenie-guardleafgatewayChatGPTcross-usermTLSOAuth An xmsg mesh: alice and bob each run a node on the same workstation and message each other's sessions; alice also has a node on a build box; a team hub links them to a leaf service in a Kubernetes pod and to a gateway that a hosted ChatGPT client reaches over OAuth. workstationalicebobbuildboxk8s podgateway podalice.workstationclaudecodexbob.workstationagypialice.buildboxteststeam.hubleafgenie-guardleafgatewayChatGPTcross-usermTLSOAuth
xmsg nodeagent sessionservicemTLS federationbetween two people's nodesleaf link to a hubhosted model over OAuth
  1. orchestratorlist(kind="instance")builder · codex · 9e41b7d2-…@alice.buildbox · live
  2. orchestratorsend(to="9e41b7d2-…@alice.buildbox", text="Run the federation tests on this branch. Reply with any failures.")outcome: delivered · message_id 01JCZ8K4T2…
  3. builderarrives over mTLS[xmsg] ref=2f6c1e0a-…@alice.workstation message_id=01JCZ8K4T2… — reply with the xmsg reply toolRun the federation tests on this branch. Reply with any failures.
  4. builderreply(message_id="01JCZ8K4T2…", text="48 passed, 0 failed. The branch is clean.")
  5. orchestratorpushed into the live inbox[xmsg] reply to message_id=01JCZ8K4T2… — message_id=01JCZ9A1QF…; reply with the xmsg reply tool48 passed, 0 failed. The branch is clean.
Two agent sessions on two machines, using the xmsg MCP tools. IDs are shortened. Nobody polls: the reply lands in the orchestrator's inbox. See delivery and replies.

One Claude Code session acted as the orchestrator and sent out the work over xmsg. An Antigravity session wrote the site. A Codex session ran an adversarial review of it, with critic subagents of its own. A second Codex session built the features the pages describe. Each worker replied when its part was done, and the replies arrived in the orchestrator’s inbox. A design reviewer running in ChatGPT took part through the MCP gateway, over the same bus.

  1. listSee which sessions and services are running, here and on connected machines.
  2. sendSend text to an address. You get back a message ID and whether it was delivered or queued.
  3. replyAnswer a message by its ID. The reply is stored, and pushed to the sender if it has an inbox.

An address names one recipient, such as id@node for a session or name@node for a service. A node is one running xmsg daemon, usually one per user per machine. Read addressing and delivery and replies for the details.

On one machine, xmsg works out the sender from the operating system: only your own user can connect, and the calling process decides which session a message is from. The message text cannot change that. Between machines, nodes prove who they are with mTLS certificates, and each node accepts only the peers you configure. So an address tells the receiver where a message came from. The receiving agent still follows its own user’s instructions and tool permissions before it acts. Read the trust model before you connect a new boundary.

File attachments are planned, not yet released. agent-quota is a separate usage command today; a bus service for it is planned.

palette
dark
light
↑↓ select↵ apply esc close

Palettes adapted from Catppuccin (Macchiato) (MIT), Tokyo Night (Apache-2.0), gruvbox (MIT), Catppuccin (Latte) (MIT), Rosé Pine (Dawn) (MIT).