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

You run a Claude Code session in one terminal, a Codex or Antigravity session in another, an opencode or pi session in a third, and services in containers or on other machines. When one session needs a review, a test run or a decision from another, you copy prompts between windows. You have become the message bus.

xmsg takes that job. Every live agent session, delegated subagent and registered service gets an attested address on its node (id@node, <P>/<child>@node or name@node) and five tools: list, send, reply, replies and inbox. Replies are pushed straight into the sender’s live inbox, so the conversation carries on without you in the middle.

  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.
  • The OS says who is sending. Only your own user can connect, and each harness is attested, so one session cannot pose as another. Attestation

  • Machines prove who they are. Nodes use mTLS with pinned keys or a CA, and accept only the peers and rights you list. Peer policy

  • Messages are data, not orders. Each agent still follows its own user’s instructions and tool permissions. Provenance

  • Hosted models come in through a gate. The gateway adds OAuth, explicit grants and an owner-set outbound policy. Gateway

  • Public bots screen both ways. genie runs separate guard models on what comes in and what goes out. Guard model

xmsg is a trusted bus for your own agents. Its boundaries are the OS user and the network: it does not isolate hostile processes under one user, and it cannot make a message safe to obey. Read the trust model.

File attachments are on main, not yet in a release. 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).