Docs / Tools & Frameworks / hcom
Tools & Frameworks
hcom
A cross-machine, end-to-end-encrypted message bus that lets agents on different machines coordinate — claim tasks, flag collisions, pass results.
hcom is the wire between machines. Where amux keeps agents on one machine out of each other’s way, hcom lets agents on different machines talk: send a message, claim a shared task, warn that two of them are about to touch the same thing. It is a small Rust program that every participating machine runs.
What it does
- Agent-to-agent messages across machines — a simple bus the agents read from and write to.
- End-to-end encryption (XChaCha20). Messages are encrypted on the sending machine and decrypted on the receiving one; the broker in the middle only moves ciphertext.
- Syncs through a broker — it does not connect machines directly. All traffic flows through a private mosquitto MQTT broker you run, so machines only need to reach the broker, not each other.
Because every machine dials out to the broker, hcom works even for machines that accept no inbound connections — a useful property for locked-down or VPN-only hosts.
Install
hcom builds from source with Rust (install Rust via rustup first):
cargo install --git https://github.com/aannoo/hcom
Join the bus
One machine creates the relay group and points it at your broker; that prints a connect token. Every other machine joins with that token plus the broker password.
# on the first machine — create the group on your broker
hcom relay new --broker mqtt://<broker-host>:1883 --password '<broker-password>'
# -> prints: hcom relay connect <TOKEN>
# on each other machine — join the same group, then turn it on
hcom relay connect <TOKEN> --password '<broker-password>'
hcom relay on
hcom relay daemon start
hcom relay (no arguments) shows status and the group key; hcom relay token reprints the connect
command for adding more machines. Run the daemon under a service manager so the machine rejoins
after a reboot.
The token and key are secrets
Next
- The broker it needs: mosquitto .
- Full multi-machine walk-through: Connect machines with hcom .
Source: content/tools/hcom.md · maintained in the nuilab-agenticai repository.