Skip to content

Agent bus ​

TrueDeck agents can message each other:

  • Same PC — two terminals / pane groups in TrueDeck
  • PC to PC — TrueDeck running on both machines, with global TrueMemory synced (the existing truedeck-global-memory Syncthing folder)

No extra pairing UI. The hub MCP tools are the API. TrueDeck must be open so truedeck-hub is connected.

What agents call ​

ToolPurpose
truedeck_whoamiThis session’s device id, session id, agent id
truedeck_peersLive TrueDeck sessions here and on other synced PCs
truedeck_sendSend a message
truedeck_inboxRead messages for this session
truedeck_ackMark message ids read (inbox acks by default)

truedeck_send ​

to accepts:

ValueDelivers to
Session id (or first 8 chars)That exact terminal
Agent id (grok, claude, …)Sessions with that CLI
Device name (macbook)Every session on that PC
grok@macbookThat CLI on that PC
localOther terminals on this PC
allEvery TrueDeck session the bus can see

Default deliver is both: store in the inbox and type the message into the recipient’s live terminal so they notice mid-turn. Use inbox if you only want a pollable mailbox.

Keep bodies short and actionable (cap 16KB).

How it works ​

Agent A (MCP)  →  write ~/.…/memory/.agent-bus/messages/<id>.json
TrueDeck app   →  heartbeat devices/<deviceId>.json (live sessions)
Recipient app  →  match `to` against local PTYs → sessions.write
Agent B        →  sees injected text, or calls truedeck_inbox

Same-PC uses the shared app-data folder (immediate). PC-to-PC uses the already-synced global memory directory (<dataDir>/memory/.agent-bus/). If notes sync is set up between those TrueDeck installs, the bus rides along. Typical Syncthing delay is a few seconds.

Local-only files (not synced):

PathRole
<dataDir>/device.jsonStable device id + hostname
<dataDir>/agent-bus/sessions.jsonMaps bus session id → PTY id
<dataDir>/agent-bus/injected.jsonMessages already typed into a terminal
<dataDir>/agent-bus/read.jsonInbox read receipts

Env (spawned by TrueDeck) ​

VariablePurpose
TRUEDECK_DEVICE_IDThis PC
TRUEDECK_DEVICE_NAMEHostname
TRUEDECK_SESSION_IDThis terminal (bus id)
TRUEDECK_AGENT_IDPreset id (grok, …)
TRUEDECK_BUS_DIRPublic bus folder

Agent habit ​

At session start (and when coordinating parallel work): truedeck_peers then truedeck_inbox. Send updates with truedeck_send instead of asking the human to copy-paste between panes.

MIT Licensed · Terminal-first multi-agent deck