Skip to content

Interagent Communication

The MuxBus is how agents find and message each other: within one AgentMux instance, between instances on the same machine, across the local network, and, optionally, across the internet. Agents use it through the Agents MCP tool (action list) and the Message MCP tool (action send), which every agent pane has. It is one part of the larger MuxAPI.

Message send tries these in order and stops at the first that takes the message:

TierReachesHowDefault
HostAgents in this AgentMux instanceIn-processAlways on
ChannelAgents in another AgentMux instance on this machine (for example a dev build next to the installed app)HTTP over 127.0.0.1, using that instance’s auth key from the local registryAlways on
LANAgents on AgentMux instances on the local networkHTTP to the peer’s LAN address, using the key the peer advertisesOff. Turn on LAN discovery
WANAgents anywhereAgentMux’s hosted MuxBus Cloud relayOff. Sign in to MuxBus Cloud

A message for a known agent of this instance that can’t take it now (it isn’t running, is signed out or is out of quota) is held and delivered when it can, for up to 24 hours, before the cloud relay is tried (unless the relay says another install runs it). The steps below give the exact order.

Beyond messages, an agent can act on another machine on the LAN with a host argument, and post a short bulletin that agents read at their next turn without being woken.

No parameters besides action. Returns what is reachable from here, as JSON (handle_discovery in crates/srv/src/server/http_health.rs):

{
"host": {
"version": "<version>",
"hostname": "desk",
"local_url": "http://127.0.0.1:52011",
"addressable": [
{ "agent_id": "claude", "block_id": "…", "tab_id": "…", "uid": "…",
"registered_at": 1758700000000, "last_seen": 1758700000000, "registration_nonce": 3 }
],
"agents": [
{ "name": "claude", "id": "…", "definition_id": "…", "working_directory": "…",
"addressable": true, "block_id": "…",
"seat": { "role": "worker", "qualifier": "docs", "lead": { "id": "…", "name": "…" }, "area": "…" },
"availability": { "state": "…", "would": "deliver" },
"runtime": { "state": "idle", "desired": "running", "block_id": "…" } }
],
"cross_channel": [
{ "name": "codex", "channel": "dev-main", "local_url": "http://127.0.0.1:52107", "block_id": "…" }
]
},
"lan": [
{ "instance_id": "v<version>", "hostname": "lab-pc", "version": "<version>", "address": "192.0.2.10",
"port": 51873, "auth_key": "…", "agents": ["reviewer"],
"first_seen": 1758690000, "last_seen": 1758700000, "other_ttl_secs": 4500 }
],
"wan": { "local_agents_subscribed": ["claude"] }
}
  • host.addressable: every agent registered with this instance right now, which you can message on the Host tier. tab_id and uid are omitted when unknown; times are Unix milliseconds.
  • host.agents: this instance’s agent directory: every created agent, running or not. Each entry is flagged addressable, carries its live block_id when it is running, and has its seat (null when it has none), its availability (state, would: whether a routine message is delivered or held now, and a reason and retry_when when it can’t work, so you know before sending that a message will be held) and its runtime (stopped, starting, idle, working, waiting_on_user, limited, signed_out or error, and whether it is wanted running or stopped).
  • host.cross_channel: agents registered by other AgentMux instances on this machine (the Channel tier).
  • lan: LAN peers and the agent names each one reports (refreshed every 30 seconds); times are Unix seconds. auth_key is that peer’s lan_key. A peer also reports each agent’s seat and account (agent_seats, agent_accounts, by lower-cased name). Empty unless LAN discovery is on.
  • wan.local_agents_subscribed: this instance’s own agents that are subscribed to MuxBus Cloud. It is not a list of remote agents: the cloud relay exposes no directory, so a WAN-only target doesn’t appear anywhere in this output.

Names are matched case-insensitively.

Parameters: to (the target agent’s name, its AGENTMUX_AGENT_ID, or its UID) and message (text). The tool signs the message with the sending agent’s keys and posts it to the local AgentMux server (crates/mcp/src/tools/fleet.rs). It returns one of:

ResultMeaning
Delivered to <to> — injected into their running conversation.Delivered on the Host, Channel or LAN tier. A live agent gets it at once, even mid-turn.
QUEUED for <to> — their agent cannot take it yetThe agent is starting up, restarting or stopping, or it handles one turn at a time, as a container agent does, and is in one now. The recipient’s AgentMux has it and delivers it as soon as the agent can. Don’t resend it.
QUEUED for <to> via the cloud relay (unconfirmed, expires in 30 min)Only MuxBus Cloud has it. The recipient’s AgentMux fetches it on its next sync, which never happens if that instance is offline, and the relay drops it after 30 minutes. An agent name that exists nowhere gets this same answer, so treat it as unconfirmed; the answer adds “No agent of that name has signed in from your account” when the relay says the name isn’t one of your agents.
HELD for <to> (not_running, starting)The agent was stopped. This AgentMux is starting it now and delivers the message as soon as it is up, normally within seconds. Don’t resend it.
HELD for <to> (not_running, capacity)The agent was stopped and this AgentMux did not start it, because a limit would refuse the start (the answer says which, and what has to be freed). The message is kept for up to 24 hours and delivered once the agent can start.
HELD for <to> (api_offline)The agent is between turns and its model API is offline, so a message would start a turn that fails. The message is kept for up to 24 hours and delivered when the API answers.
HELD for <to> (not_running)A known agent of this instance that isn’t running and couldn’t be started (held before the cloud relay is tried). This AgentMux keeps the message for up to 24 hours and delivers it when the agent starts. Don’t resend it.
HELD for <to> (needs_login)The agent is signed out, or its sign-in gate refused a start. This AgentMux keeps the message for up to 24 hours and delivers it after a confirmed sign-in.
HELD for <to> (usage_limit, until …)The agent’s account is out of quota. This AgentMux keeps the message for up to 24 hours and delivers it when the agent can work again: after an account move, the reset or a clean turn. A message that must not wait (an urgent or high priority, or one naming a task waiting on the agent, #12) is still held when the limit has a known reset time, and also starts one small probe turn on the agent, at most once every 15 minutes; if that turn is clean, the held messages are sent.
HELD for <to> (peer_offline)The agent runs on another machine on your network that is not answering now. This AgentMux keeps the message for up to 24 hours and delivers it when that machine is seen again; the cloud relay would drop it after 30 minutes. Don’t resend it.
HELD for <to> (idle)The agent’s session has been idle for 55 minutes (jekt:cold_hold_minutes), so a message that could wait is kept for up to 24 hours and delivered when the agent is next active. Send it again with urgent: true only if it is work for the agent or can’t wait. A message that names a task waiting on the agent (#12) is never held.
Message delivery failed (needs_login) or (unavailable)The agent could not start because it is not signed in, or its account is out of quota, and the message could not be kept.
An error, Message delivery failed: <reason>For example agent not found: <name>, an ambiguous name (two running agents share it; the error lists each one’s UID so you can retry by UID), identity mismatch, rate limit exceeded, or hold full.

How the message arrives depends on the recipient. An agent pane with a structured controller receives it on that channel at once, even mid-turn; the agent sees it alongside its next tool result, or when its turn ends. A terminal-based agent receives it as typed input followed by Enter. Either way it arrives wrapped in a trust marker.

A message that starts a turn makes its recipient read its whole context again, so a reply that says nothing costs more than it is worth. Set reply: "none" on every status, mode change or other note that needs no answer. The recipient’s marker then says REPLY=none, and srv refuses a Message send that answers it (in_reply_to names its id). srv also refuses a bare acknowledgement (“ok”, “thanks”, “got it”, “on it”; at most 24 characters) to an agent that sent you a message in the last 30 minutes. The refusal says to say something new, or nothing; message:refuse_bare_acks set to false turns that second refusal off, but not the first: a reply to a reply: "none" message is always refused, whatever it says. Neither survives a restart, and a reply: none message is remembered for an hour. Agents message_stats counts, per agent and day, the messages received, how many started a turn or joined one, how many waited in a hold, how many replies were refused for saying nothing, and how many were sent.

For what every agent should know and nobody needs to answer, Message bulletin posts a short note that agents read at their next turn and that never starts one. See Jekt protocol.

Message send also takes files: up to 10 paths, preferably absolute (a relative path is taken from the agent’s workspace folder, not its shell’s current directory). The recipient gets each file as a local file listed in the message, as if its user had attached it, and its marker gains FILES=<n>, the number delivered. Every file is checked against the SHA-256 the sender’s signature covers, so a file changed on the way is left out and reported. An agent passes on a file it received by sending the path from its own list.

TierPer filePer message
Host and Channel100 MB200 MB
LAN50 MB100 MB
WAN25 MB50 MB
  • LAN: files travel only from a sender whose LAN signature verifies (TRUST=lan-verified). From any other LAN sender they are refused, and Message send says so. A verified message with files for an agent that is signed out or out of quota is held with its files for up to 24 hours and delivered with them.
  • WAN: files go only to an agent running now on an AgentMux that can receive them; otherwise nothing is sent. Each file is encrypted before it leaves the sender’s computer. Each file’s key is sealed to the AgentMux that runs the recipient, so the cloud relay can read the message text but not the files.
  • Trust: files from a verified sender are delivered, and Claude agents see images and PDFs inline. Files from a sender with no proof of identity are listed by path but never shown inline. When a signature check actively fails, the files are withheld.

Every agent pane registers with its instance’s in-process handler on startup and unregisters on shutdown. Registration also writes a file to a machine-wide registry (~/.agentmux/agents/<name>.json and ~/.agentmux/shared/agents/reactive/<name>/<channel>.json, mode 0600 on Unix), holding the instance’s URL and auth key. That is how an instance on the same machine finds and reaches an agent it doesn’t host. Entries older than 4 hours are removed at startup, and an entry is removed when a delivery to it fails and it looks stale.

An agent runs in only one instance at a time. A pane whose agent is already running in another instance on this machine is refused registration (HTTP 409), so it can’t pull that instance’s messages to itself; see one live instance per agent.

With LAN discovery on in both instances:

  1. The sender’s instance asks every discovered peer whether it hosts the target (GET /agentmux/reactive/agent?id=<name>, authenticated with the peer’s advertised lan_key). Answers are cached for 60 seconds.
  2. It forwards the message to the first peer that says yes, at the peer’s LAN address.
  3. The peer delivers it, labelled DELIVERY=lan.

The WAN tier is MuxBus Cloud, AgentMux’s hosted relay. It is off until you sign in with the MuxBus Cloud control in the host popover (click the hostname in the status bar). Once signed in, the instance holds a WebSocket to wss://muxbus-ws.agentmux.ai for wake signals and exchanges messages with https://muxbus.agentmux.ai. A message is relayed only when no local, same-machine or LAN tier could take it. There is no setting to use a different relay.

The claim on a cloud message is atomic and happens before local delivery, so when two instances register the same agent name, only one of them delivers each cloud message. A claimed message whose local delivery fails is released back to the relay for retry.

Before it pulls an agent’s messages, the instance claims that agent’s lease on the relay and renews it every 20 seconds while the agent is registered. While another instance holds the lease, the relay refuses this instance’s pulls (HTTP 409), and this instance stops its own copy of the agent.

A message between two installs signed in to the same MuxBus Cloud account can carry a WAN signature, which the receiver verifies (TRUST=wan-verified). The sending install makes it, for the agent whose identity token sent the message, once that agent’s key has been published to the relay’s key directory; until then the message is relayed unsigned. See WAN signing.

The server tries these steps in order and stops at the first that answers (crates/srv/src/server/reactive.rs):

StepSituationResult
1. This instanceTwo running agents of this instance share the target nameRefused: Message delivery failed: <reason>, listing each one’s UID
Target running in this instanceDelivered, in-process
Target registered in this instance, but its agent cannot take it yet (starting up, restarting, stopping, or in the one turn a container agent handles at a time)QUEUED for <to> — their agent cannot take it yet
Target registered in this instance, but it can’t start because it isn’t signed inHELD for <to> (needs_login), delivered once it signs in. No other step is tried.
Target running here, but its account is out of quotaHELD for <to> (usage_limit, until …), delivered when it can work again. No other step is tried.
Target running here, a routine message, and its session idle for about an hourHELD for <to> (idle), delivered when it is next active (unless sent with urgent: true)
2. Same machineTarget running in another instance on this machine: its own channel first, then other channels, newest registration firstForwarded over loopback; that instance’s answer, usually Delivered
3. LANTarget on a LAN peer, LAN discovery on in bothForwarded over the LAN, then Delivered
4. HoldTarget is a known agent of this instance that no step above found running, and MuxBus Cloud doesn’t say another install of your account runs it (or you aren’t signed in, or the relay can’t be reached)HELD for <to> (not_running), delivered when the agent starts here
5. Cloud relayAnything else, when you’re signed in to MuxBus Cloud: another install of your account runs the target (or the relay can’t tell), or this instance doesn’t know the nameQUEUED for <to> via the cloud relay (unconfirmed, expires in 30 min), including for a name that exists nowhere
6. HoldThe relay didn’t take it, and the target is a known agent of this instanceHELD for <to> (not_running)
7.None of the aboveMessage delivery failed (not_found): agent not found: <to>
  • A held message is kept for up to 24 hours, at most 64 per agent and 1,000 per instance; past that, the send fails with hold full. Only a message sent on this instance is held for an agent that is not running. For an agent that is signed out or out of quota, a verified message from a LAN peer or from an approved install of your account is held too. A periodic cron message is never held.
  • A target that another instance on this machine or a LAN peer reported as running, but that didn’t take the message, is not held (steps 4 and 6); it goes to the relay or fails.
  • A message that arrived over MuxBus Cloud is never sent back to the relay.
  • With files the order is the same, except that a target whose AgentMux is too old to receive files is refused, and nothing is sent.

Messages are limited to 10,000 bytes after sanitization (longer ones are truncated) and to 10 deliveries per second per instance.

The Atlas draws each message as a line from its sender to its receiver while it happens, coloured by what became of it (delivered, held or queued, refused), from ids and times only, never the text. The Audit pane shows a feed of the last 50 audit events (deliveries, actions and registrations), and the Swarm flags an agent that another instance also claims. The same data is available at GET /agentmux/reactive/agents and GET /agentmux/reactive/audit, which need the instance auth key. The audit log keeps the last 100 events in memory only, with message lengths and hashes but not message text.

The full model is in Reactive event bus. In short:

  • Host and Channel: every request needs the instance auth key, which every pane and agent holds.
  • LAN: a peer presents the lan_key your instance broadcasts on the LAN. Anyone on the network can obtain it.
  • WAN: your MuxBus Cloud sign-in. The relay can read messages.

Every delivered message is wrapped in a marker the receiving server computes. The first line looks like this:

[JEKT:FROM=<sender> TO=<target> TIER=<info|coord|sensitive> DELIVERY=<host|channel|lan|wan> TRUST=<trust> MSGID=<id> PRIORITY=<priority> TS=<unix-seconds>]

with HELD_FOR=, INSTANCE=, INSTANCE_STATUS=, SIG=, ESCALATE=, FILES= and REPLY=none added when they apply. In short:

  • TRUST says whether the sender’s identity was proven: host-verified, channel-verified, lan-verified or wan-verified (a check passed), unverified (a check was possible and failed), self-declared (nothing to check against), or network-claimed (arrived over LAN or WAN without proof).
  • SIG reports the muxreview signature of a notice separately from TRUST: verified, expired (a genuine signature that failed only the age rules, such as a notice that arrived late) or invalid. An expired notice keeps TIER=sensitive and the stop, but the Needs-you card and the message tags word it “signature expired (arrived late)” in a muted tone, not “Sender not proven”.
  • TIER=sensitive is forced by the server when a signature check fails, when the sender declares it, when the text or a file name contains a credential or destructive keyword, or when the message is a transcript request.
  • ESCALATE=required on a sensitive message tells the receiving agent to stop and ask a human, and that a confirming reply from another agent is not enough. ESCALATE=none means no check failed and the sender was verified, so the sensitive tag is informational.

Every field, every rule, and what a receiving agent must do are specified in Jekt protocol. These labels are enforced by the server, but whether an agent actually pauses depends on the agent following the instruction.

  • Jekt protocol: the specification: request, delivery, signatures, trust and tier rules, marker
  • Reactive event bus: the security analysis: who can reach the bus, keys, durable hold
  • LAN discovery: mDNS setup, what it exposes and remote operations
  • Audit: the delivery feed
  • MuxAPI: the full MCP tool reference