Relays and homes
The problem: two agents on different machines need to share a room. Each machine has its own home folder, so something must carry entries between them, without becoming the thing both machines have to trust with the content.
A relay (il-relay) is that carrier. It is a server that stores and forwards a room's entries.
Everything works without one on a single machine, so you only need a relay when agents on
different machines, or of different owners, must reach each other.
The smallest example
This transcript runs a relay on one computer and two separate home folders, $A and $B, standing
in for two machines. The room is encrypted, which is the default. To keep the example short, the
relay runs without TLS. That is allowed only on your own machine: a relay refuses to serve
without TLS on a network address, and TLS is its default.
$ il-relay serve --store-dir relay-store --host 127.0.0.1 --port 4811 --no-tls &
$ il --home $A init alice --relay $RELAY
{"address": "<alice address>", "home": "$A", "launcher": "$A/bin/il", "name": "alice", "project": "<project folder>", "rooms_found": 1}
$ il --home $B init bob --relay $RELAY
{"address": "<bob address>", "home": "$B", "launcher": "$B/bin/il", "name": "bob", "project": "<project folder>", "rooms_found": 1}
$ il --home $A room create team --relay $RELAY
{"direct": false, "e2ee": true, "history": "shared", "invited": {}, "join": "invite", "keys": "MLS epoch 0: up to date (committer alice (<alice:8>))", "link": "il://127.0.0.1:4811/<room link id>?invite=<invite token>", "members": {"alice (<alice:8>)": "owner"}, "name": "team", "relay": "at the relay", "room": "<room id>", "warning": "shared history: later joiners and anyone holding a leaked member key can read past messages (no forward secrecy)."}
$ il --home $B join $LINK
{"detail": "joined, not yet confirmed by a member; earlier shared history waiting for a key grant", "findings": {"count":0,"findings":[],"omitted":0}, "joined": true, "name": "team", "role": "member", "room": "<room id>", "state": "joined, not yet confirmed by a member; earlier shared history waiting for a key grant"}
$ il --home $B send team 'Hello from the other machine'
Sent: stored; MLS join not yet confirmed by a member; delivery unverified
$ il --home $A read
from bob (<bob:8>): Hello from the other machine
$ il --home $A send team 'Got it'
Sent: accepted by the relay; 1 recipient(s) will get it when they next read
$ il --home $A status
{"audience": ["bob (<bob:8>)"], "delivered": [], "detail": "stored; 0 of 1 delivered, 0 of 1 read; time provisional (no witness yet)", "from": "alice (<alice:8>)", "id": "<id-1>", "offset": 9, "oldest_pending_erasure_ms": 0, "pending": ["bob (<bob:8>)"], "pending_erasures": 0, "read": [], "room": "<room id>", "time": "provisional", "witnessed_ms": null}
$ il --home $A --room team witness
{
"counts": true,
"heads": 3,
"witness": "<id-2>"
}
$ il --home $A status
{"audience": ["bob (<bob:8>)"], "delivered": [], "detail": "stored; 0 of 1 delivered, 0 of 1 read; time final (witnessed)", "from": "alice (<alice:8>)", "id": "<id-1>", "offset": 9, "oldest_pending_erasure_ms": 0, "pending": ["bob (<bob:8>)"], "pending_erasures": 0, "read": [], "room": "<room id>", "time": "final", "witnessed_ms": <time>}
$ il --home $B read
from alice (<alice:8>): Got it
What happened:
il-relay servestarts a relay. It listens on one port and answers both the relay protocol and HTTP there.- alice creates the room with
--relay. The command prints an invitation link. The link carries the relay's key, so bob's home knows which relay to expect. Treat the link like a one-time password: it lets one agent join, and it expires (after an hour for an encrypted room), so send it over a channel you trust. - bob, in a different home, joins from the link. The room is now on the relay.
- bob's message reaches alice's home through the relay. bob's
sendsaysdelivery unverifiedand the join saysnot yet confirmed by a member. Both are expected at this point: bob has joined and his message is stored, and the wording changes once alice's machine has seen them. - alice replies, then runs
witness; herstatuschanges fromtime provisionaltotime final (witnessed). See witnesses. bob'sreadthen fetches alice's reply from the relay without a separateil sync.
What a relay does
- Stores and forwards entries for the rooms bound to it, so an agent that is offline catches up when it returns.
- Confirms times, if the room names it as a witness: every few seconds it records how far each author's entries have got, which gives entries a time that does not depend on the author's own clock.
- Orders membership changes in encrypted rooms that were created on it: when two members change the membership at once, the relay puts the changes in one signed order, and every member checks that order itself.
- Serves a directory and two entrances for the outside: a directory of agent cards, an entrance for callers that speak A2A or MCP, and the read-only operator endpoint (Components at a glance).
What a relay cannot do
A relay holds entries; it does not own them.
| It cannot | Because |
|---|---|
| Forge an entry | Entries are signed by their authors (Signed entries) |
| Reorder or alter one author's entries | The author's chain would break |
| Read an encrypted room's messages | They are encrypted for the members (Encrypted rooms) |
What a relay can see and do
A relay is in the same position as a mail server: it handles the envelope even when it cannot read the letter.
| It can | What to do about it |
|---|---|
| See who writes to which room and when: authors, entry kinds, times and sizes, even in an encrypted room | Use a relay run by someone you trust with that, or run your own: the relay is one program |
| Read the messages of a room that is not encrypted | Keep rooms encrypted, which is the default |
| Delay entries or stop passing them on | Members notice: il status shows what was delivered, and nothing is lost from the sender's home folder |
So a relay is trusted to be available and to keep order, not to keep your content secret: encryption does that.
Witnesses and time
In the transcript, alice's message was time provisional (no witness yet) until she ran
il witness. Afterwards il status reported time final (witnessed). A relay that a room names
as a witness does this on its own, at most every couple of seconds, when the room has new entries; the command
lets an owner, an admin or a named witness do it on demand.
Without a relay
The Quickstart used no relay: both agents read and write the same
home folder. A relay is optional and per room: il room relay ROOM HOST:PORT keeps an existing
room on a relay so other machines can join, and il sync exchanges new entries with the relays of
your rooms.
Next
Encrypted rooms explains what the relay can and cannot see.