OHAN protocol v1: how two people's agents meet, talk and stop

OHAN-01. the overview that ties the documents together. status: draft for v1, revised sun 25 oct 2026 after structured review passes from the angles of a w3c credentials editor, a nostr relay developer and a nostr user, and code review passes on cryptography, storage and consistency; to be published at ohan.live/spec on tue 27 oct 2026. the documents it binds: OHAN-02 card, OHAN-03 envelope, OHAN-04 relay, OHAN-05 gate, OHAN-06 security. field names are frozen where the documents say so; anything named as coming later may change.

a v1 draft. it describes what runs today on a network that is invite only, and it will change. every change is recorded, and a breaking one bumps the wire id (OHAN-00 §5).

0. in one paragraph

a person makes a key on their own device and claims a handle. the handle resolves to a signed card: keys, relays, what they chose to show. to reach someone you resolve their card, pin their key and send a sealed envelope to the relays on their card. their agent fetches it, verifies it, and if you are not yet a contact tells them only that you want to reach them. they say yes, and from then on messages flow both ways, each one signed by its sender, sealed to its recipient, held by relays that cannot read it, and shown to a person only after their own code checked it. agents draft, read and propose. people decide.

what OHAN is, and is not. OHAN carries intents, connects people and holds the yes. it does not converse. a message is the first intent it carries, and a plain hello, reply and thread between two people stay on the network for good. screening and ranking by your own rules, drafts in your voice, the call itself and the rules of a group belong to the products built on it, openDM first.

1. the objects

objectwhat it iswho signs itwhere it lives
handle@name, lowercase letters, digits and dashes, 1 to 31; an agent is @name.agentnobody; it is a nameon a card, in a did (did:web:ohan.live:name)
keyed25519 to sign, x25519 to receive sealed mailselfthe person's device, encrypted at rest
cardthe signed public record of a handle: keys, relays, listed flag, chosen profile fields, proofthe holderany box, mirrored anywhere, derived into a did document
pin{handle, sign, enc, relays} of someone you addednobody; it is a local factthe person's contacts file
envelopeohan.envelope.1: id, from, to, sender (key, card hash, via if switched on), intent, urgency, content, proofs, thread, policy, signaturethe sendersealed inside an event; both parties' thread files after
eventohan.event.1: the sealed envelope as a relay holds it: the recipient's signing key, the seal version, expiry, a stamp (the reference client stamps every event), padded ciphertext, id, signaturethe senderrelays, until delivered or 30 days
allowthe recipient's signed list of sender keys it accepted, posted to its own relays, so a relay can tell a contact from a stranger without reading anythingthe recipienteach of the recipient's relays
threada chain of envelopes with one ideach message by its senderboth parties' thread files
ackan envelope with intent ack, the recipient's signed yes to a knock. sealed like any message, so no box can see it; the allow list is what the relay seesthe recipientthe sender's thread file

later versions add agents, structured items and own domains; each publishes with its code.

2. the lifecycle

join ──► resolve ──► pin ──► knock ──► accept ──► exchange ──► record
  │                                                   │
  └────── rotate / export / lapse                     └── unpin / block / revoke
  1. join. the client makes the keys, shows the card it would publish, the person says yes in a dialog, the card is stamped and registered. the handle is resolvable and unlisted. an export of the identity is offered.
  2. resolve. @maya → GET /v0/resolve/@maya on a box (handles on your own domain come later). the client verifies the card's proof against the key inside the card. the box is a courier, not an authority.
  3. pin. after a yes in the window (y1: a pinned handle's messages skip the gate), the client stores her handle, both keys and her relays and posts allow for her key to its own relays. pinning is unilateral and silent; she learns nothing.
  4. knock. the first envelope to someone who has not pinned you, sent after your yes in the window. it is a full sealed message like any other, carrying a stamp of the published stranger difficulty (18 bits), which the reference client puts on every event, because you are not on her allow list at her relays. your client remembers the handle and key you knocked for 30 days. her gate holds it and shows her only your handle.
  5. accept. she says yes in her dialog. her client pins you, shows the message, sends a signed ack envelope back through your relays, and posts allow with your key to her own relays. your client sees the ack from exactly the handle and key it knocked, pins her, posts allow for her key and tells you "@maya accepted you" (OHAN-05 g11). both sides now pass each other's gates, and your events land in her contact lane without stamps.
  6. exchange. envelopes in a thread. each is signed, sealed, padded, delivered to every relay on the recipient's card, fetched with a signed request, verified, deduplicated, written to the thread file and only then marked delivered to the relay. a reply names the message it answers. each envelope carries the hash of the sender's current card, so a rotation is noticed on the next message.
  7. record. both sides keep every verified envelope in their own thread files. there is no copy anywhere else.
  8. stop. unpin, block (and unblock), rotate, export and import to another device, or let the handle lapse (it is deactivated, never given away). see OHAN-06 §9.

3. the handshake, step by step

what each side knows at each step, which is the point of the design.

stepsender doesrecipient's client doesthe recipient knowsthe sender knows
1resolves @maya, verifies, pins, shows the fingerprintnothingnothingher keys and relays
2drafts; the dialog shows "send to a stranger, @maya: …"; yes; sign, pad, seal, stamp, publishnothing yetnothingthe relays accepted it
3fetches with a signed request, verifies, sees an unpinned sender, holds it"@sam wants to reach you"nothing
4aignorethe same line staysnothing, ever
4bblocknothing more, evernothing, ever
4caccept: pin, show, send ack, post allowthe messagethat she accepted
5fetches the ack from the handle and key it knocked, pins her, posts allow (g11)

properties: no step before 4c sends anything to the sender. a stranger cannot learn whether their message was read, held or dropped. a recipient cannot be made to see a body by sending many messages (one line per stranger, at most ten new strangers shown a day, no counts). pins are mutual only after 4c, and either side can undo their own half at any time. the yes at step 2 and at 4c is a window on the screen or the host's own prompt, never a word in the chat. one signal leaks at the relay: a sender who keeps writing after a block or a removal can infer it is not on the recipient's allow list, because the relay holds at most 3 undelivered events from a stranger and 500 from a contact (OHAN-06 r1b).

4. data exchange

v1: text. one intent, message, with content.body up to 16 kb of plain text or markdown, urgency (low, med, high, critical; the recipient's agent may downgrade), thread.id and thread.reply_to, and policy (retention, shareable_with). ack closes a knock or an offer. attachments, proofs and context items are empty in v1.

policy is a social contract with provenance. a recipient's client should honour shareable_with and retention; it cannot be forced to. every envelope carries its sender's signature, so a copy that leaks names where it came from. that is what email never had.

later versions add structured items. each publishes with its code. the rule stays "ask, don't dump": an agent sends what the other side needs to decide, not what it knows.

what may travel between two people is decided by rules enforced in code on each side; the full rules publish later.

5. how an agent understands it

OHAN does not ask the model to understand a protocol. it asks the model to understand a sentence, and gives the code everything else.

6. context

the site's first line is about where our agents and our context live. OHAN's answer in v1 is deliberately small and is the foundation of the larger one.

7. addressing and resolution

8. versioning and extension

9. how this differs from the nearest protocols

protocolstarts fromdiscoverydelivery when offlineconsent at the recipientwhere the gate runswhat OHAN leaves
OHAN v1the person, with keysa handle on a boxrelays holding sealed events, 30 daysa MUST: held, shown as a knock, nothing lands without a yesthe person's own device, in code
Principal Agent Protocol (baur, ietf draft)the person's device bound key, mandates that narrowa federation registry, opt innone: both sessions must be openaccept or reject of a token, no per contact gatethe implementerthe six phase handshake with ephemeral session dids; didcomm as the transport
Personal Agent Protocol ("poppy", meta and sierra, draft 0.1)a business letting a person's agent in, over oauth/.well-known/poppy.jsonn/athe business's termsthe businesseverything person to person; it has none
Agent Messaging Protocol (23blocks, draft 0.1.2)the agent, under a provider and tenantthe address agent@tenant.providerprovider queues, polling or websockettrust level annotations; no gatethe provideragents as subjects, no end to end encryption, no revocation
didcomm v2 (dif)a did, any methodout of band invitationsmediators holding messagesnone specifiedthe agentjwe and jws envelopes, the mediator coordination protocol; consider a binding after the pilots
nostr nip-17a secp256k1 keynip-05 names, relay listsrelays, kind 1059 gift wrapsnone; clients filter after the factthe clientthe nsec experience, broadcast relays, no gate
A2A 1.0an agent at a domainagent cards at well known urlstasks on a servernonethe serveridentity of the person behind the agent
MCPa toolconfigured by the personn/athe host's own approvalsthe hostnothing; it is the way in
xmtpa wallet key, mls groupsthe wallet addressthe network's nodesconsent states (unknown, allowed, denied) and a message requests view that apps are told to buildthe client appwallets as identity, and no person required behind an agent
aweb (awebai, mit licence, 2026)the agent, under a dns namespace and a team controllerdomain/name addresses in its registrydurable mail on federated servers; hosted mail is readable by the server"controlled delivery": verified first contact, or team members and contactsthe serveragents as the subjects; a server that can read mail
NANDA index (mit media lab and project nanda, ietf individual draft, jul 2026)an identifier resolved through a registryan ai catalog pointing at an a2a card, an mcp descriptor or a gateway; personal agents keyed to an email with identity provider proofn/a: resolution onlyout of its scopen/athe email as the key to a person; it lists semantic search as a non-goal
x401 (proof) and agentid (agentmail), 2026an agent bound to a verified human through an issuer: identity proofing, or an openid connect providerthe issuern/athe website or app checks the claimthe serviceone issuer as everyone's gate
chain of trust (godaddy, infoblox, google, cloudflare; a demonstration, oct 2026)an organisation's agent, found through dns and an agent name servicedns lookupn/athe merchant checks a signed, scoped mandatethe merchant and the payment providercommerce as the only use; certificate authorities as the root

the one sentence: the pieces are being drafted, several now tie an agent to a human through an issuer, and some networks are live. xmtp holds strangers in a requests view and seals mail end to end, but asks for no person behind an agent; moltbook claims a person behind every agent, on a platform that can read the messages. none requires a person behind every agent, holds a stranger unread on the person's own device and seals what travels, all at once, and none puts an agent on both sides of a human thing. OHAN puts those pieces together for people, in the open.

10. not in v1, on purpose

agents with their own keys; attachments, proofs and context items on the wire; listing and profile fields; own domain handles; hiding the sender from the relay; rules the person writes for the gate; presence (a product's own service, never the box's); receipts; selective disclosure; groups; payments; any index; chatgpt on the web and claude on the web (both need a hosted connector holding a scoped key, which needs grants first).