AEGIS by ProtoworksDevelopers
Menu

8.4 · Agents and walletsWorking

Mediators and relays: why they exist

A phone cannot be reached directly: it has no stable address and is often switched off. A mediator is an always-reachable agent that accepts messages for it, holds them, and passes them on when the phone collects them. The sender wraps the message in an outer envelope addressed to the mediator; the mediator opens only that envelope, and finds inside an instruction naming the next recipient. A relay passes messages on without opening anything.

An analogy

A post-office box.

Where it breaks:

  • The sender must know the box exists and wrap for it, so the mediator is a named hop, not a hidden one.
  • A box shared by many recipients hides each among the others.
Precisely

A mediator is a participant in agent-to-agent message delivery that must be modeled by the sender. It has its own keys and will deliver messages only after decrypting an outer envelope to reveal a forward request.

ARIES-RFC-0046 §1

The messaging protocol is, in its own words,

Message-Based, Asynchronous, and Simplex

DIDCOMM-2.0 §1.3

How the sender wraps a message for forwarding DIDCOMM-2.0 §9.4.6, and what the mediator does with it DIDCOMM-2.0 §9.4.7. Relays and mediators are distinguished through a series of scenarios ARIES-RFC-0046 §3.1.

Diagram
SenderMediatorPhoneSenderwraps twiceMediatorholds until askedPhonecollects, decryptsforwardpickup
The sender wraps an encrypted message in a forward envelope addressed to the mediator. The mediator opens the outer envelope, reads the next recipient, and holds the still-encrypted message until the phone collects it.
Who can see what
What this does not do
  • A mediator does not make a message private; the encryption for the recipient does.
Verified against
  • ARIES-RFC-0046 Aries RFC 0046: Mediators and Relays version 0046, checked 2026-10-28
  • DIDCOMM-2.0 DIDComm Messaging v2.0 version 2.0, checked 2026-10-28

Last reviewed 2026-10-28. Next review 2027-04-28. Every quotation is checked against the text it quotes, at the version named, before the page is published.