AIP-80: REACH (reach/v1): messages, asks, adapters, routes, and receipts for reaching the human

Specifies the contract between a host and the ways it reaches its human: one message shape (summary, sections, links, attachments) with an envelope (intent tell or ask, principal, urgency, dedupeKey, expiry, source), an ask that names what the answer is for (an AIP-7 approval id, a permission id, a question id), adapters with declared capabilities, host-configured routes, strict per-attempt receipts (delivered, deferred, deduped, undelivered, failed), dedupe, a non-bypassable floor for asks, close, and the inbound half: an adapter's answer applied to the judge of the primitive, never decided by the adapter. Rendering, quiet hours, and platform quirks stay out of the standard.

FieldValue
AIP80
TitleREACH (reach/v1): messages, asks, adapters, routes, and receipts for reaching the human
AuthorJeremy André <[email protected]>
StatusDraft
TypeSchema
RequiresAIP-1 (process), AIP-7 (GOVERNANCE: the approval requests whose transport and decision channels this AIP composes with)
Composes withAIP-53 (APP: link tokens that open an approval page from an adapter), AIP-76 (EVENT: the observability an undelivered ask feeds), AIP-77 (MCP-GATEWAY: elicitation is one transport an adapter MAY front)
Created2026-11-30
Packages (ref-impl)@agentproto/reach, @agentproto/reach-telegram, @agentproto/runtime (reach)
Adjacent specsMCP elicitation (a transport, never an authority); AIP-DELIVERY-TRIAGE (producer to session inbox, a different stage)

Abstract

A host that runs agents keeps needing the same thing: to get a message to its human, and sometimes to get an answer back. Every product reimplements this per platform, and each implementation quietly grows its own way of announcing pending approvals, its own dedupe, its own retry, its own delivery state.

REACH fixes the contract once: a message (content plus envelope) goes in, an adapter is one way out, a route is the ordered list of adapter instances for one principal, a receipt is what an adapter answers per attempt, and an answer is what comes back from a human on an ask. An ask names what the answer is for (an AIP-7 approval id, a permission id, a question id); REACH carries the answer, it never holds the authority: the host applies it to the judge of the primitive the ask named, and an adapter's answer counts only when the surface it speaks as is also a declared channel for that request.

Motivation

  • Announcing is duplicated per platform. A host that reaches its human over more than one environment carries one announcement path per environment, each with its own retry, its own dedupe, and its own half-maintained delivery state. The contract is the same every time: hand over a message, get a receipt.
  • Announcing and deciding are confused. A pending approval needs two different things: someone told it waits (transport), and someone allowed to decide it (an AIP-7 channel). When one mechanism tries to be both, adding an environment means changing the decision engine, and the engine fills with the names of environments.
  • Silent loss is the failure nobody sees. An ask that reaches nobody, on a host whose human assumes it was told, is worse than no ask at all: the agent waits forever on a human who was never reached. REACH makes every attempt a kept receipt and gives asks a non-bypassable floor.
  • The contract already exists in code. The reference implementation ships @agentproto/reach (message, ask, adapters, capabilities, strict receipts, dedupe, a conformance suite for webhook receivers) and a runtime router with the floor and the inbound answer path. This AIP writes down what is implemented, plus the inbound half as a named deliverable.

Scope

  • In: the message shape, the ask, adapter declarations and capabilities, routes as host configuration, receipts and their strict parsing, dedupe, routing rules, the ask floor, close, and the inbound answer applied to the judge of its subject.
  • Out: rendering, markup dialect, size caps beyond a capability declaration, button layout and labels, quiet-hours values, grouping, tone, credentials, and every platform quirk. Those belong to adapters. Also out: who may decide an approval (AIP-7), how an approval page is opened from an adapter (AIP-53 link tokens), and triage between a producer and a session inbox (AIP-DELIVERY-TRIAGE, a different stage of a different hop).

Design principles

  1. Transport, never authority. REACH moves messages and answers. Every decision stays with the judge of the primitive an ask names. An adapter never decides.
  2. Channel is a reserved word. A channel is an AIP-7 concept: who may decide. A way out is an adapter. The two registries never merge, and no identifier means both.
  3. A refusal is a receipt. An adapter never throws to refuse; a throw is read as failed. A receiver never acknowledges with a status code; acknowledging is a receipt.
  4. Every attempt is kept. One receipt per attempt, append-only, next to the subject. A host can always answer "who was told, when, and what did the receiver say".
  5. An ask is never silently dropped. The floor is non-bypassable.
  6. Configuration over code. A route is host configuration. Adding an environment is adding an adapter package plus a route entry; the host core does not change.

Specification

Vocabulary

TermMeaning
messageWhat a producer hands over: content plus an envelope.
adapterOne way out. kind names the code, id names the configured instance.
routeThe ordered list of adapter instances for one principal. Host configuration, never part of a message.
receiptWhat an adapter answers per attempt.
answerWhat comes back from a human on an ask.
channelReserved for AIP-7: who may decide. Never a way out.
subjectWhat a message is about: the approval, permission, or question named by an ask.

The message

A message is content (what the human reads) plus an envelope (how it travels).

interface ReachSection {
  title: string
  text: string
}

interface ReachLink {
  label: string
  url: string // always https
}

interface ReachAttachment {
  name: string // a bare file name: never a path, never a separator
}

interface ReachContent {
  summary: string            // one line, the only required field
  sections?: ReachSection[]
  links?: ReachLink[]
  attachments?: ReachAttachment[]
}

interface ReachSource {
  kind: string              // what produced the message, e.g. an approval kind
  appId?: string
  sessionId?: string
  label?: string
}

interface ReachAsk {
  ref: string               // an AIP-7 approval id, a permission id, a question id
  options: string[]
}

interface ReachEnvelope {
  intent: "tell" | "ask"
  to: string                // a principal the host knows how to reach
  urgency: "now" | "normal" | "digest"
  dedupeKey: string
  expiresAt?: string        // ISO timestamp after which the message is moot
  source: ReachSource
  ask?: ReachAsk            // present on an ask
}

type ReachMessage = ReachContent & ReachEnvelope

Content is the approval preview convention, unchanged. summary is one line. sections are titled text blocks. links are labeled https URLs. attachments are bare file names. When a host derives content from an AIP-7 approval preview, it MUST apply the one parsing rule the reference implementation ships:

  1. summary is the preview's summary when it is a non-empty string, else a fallback the host supplies (the record title).
  2. sections keeps the entries whose title and text are both strings; the rest are dropped.
  3. links keeps the entries whose label is a string and whose url is an https URL; anything else is dropped.
  4. attachments keeps bare file names only: a string, or an object whose name, filename, or fileName is a non-empty bare file name. A name with a path separator, ., or .. is dropped.
  5. Every other key is dropped from the content. It stays on the record for the approval page; it is never treated as what was approved.

Envelope rules:

  • to names a principal the host knows how to reach. owner is the one standard principal; a host MAY define others.
  • urgency is now, normal, or digest. now MAY break quiet hours; digest MAY be grouped. now MUST be set by producer code or host configuration, never by a model-callable parameter.
  • dedupeKey scopes deduplication (below).
  • expiresAt, when present, is the ISO timestamp after which the message is moot; a delivery after it is worthless.

The ask

An ask is a message whose envelope carries ask. ask.ref names what the answer is for: an AIP-7 approval id, a permission id, or a question id. ask.options are the options offered to the human, in the producer's vocabulary (approve and deny for an approval; the driver's options for a permission).

REACH carries the answer; it never holds the authority. An adapter that shows an ask and receives a human's choice has transported a choice; the decision happens in the judge of the subject (see Answers).

Adapters and capabilities

An adapter is one way out. kind names the code (a package a host loads), id names the configured instance (an entry in a route).

interface ReachCapabilities {
  maxChars: number     // longest text it shows
  actions: number      // how many options it can show as actions; 0 = none
  files: boolean       // can send files
  link: boolean        // can open a page
  defers: boolean      // may hold a message (quiet hours) and answer deferred
  retracts: boolean    // can close what it showed
  identity: boolean    // verifies who answers
}

interface ReachAdapter {
  id: string
  kind: string
  capabilities: ReachCapabilities
  send(message: ReachMessage): Promise<ReachReceipt>
  close?(dedupeKey: string, outcome: string): Promise<void>
}
  • Capabilities are declared per instance, not per kind: two instances of one kind may differ.
  • send never throws to refuse: a refusal is a receipt, and a throw is read as failed. close is best effort.
  • identity: true means the adapter can verify and name the human who answers. It does not make the adapter a channel: that is declared per request (see Answers).

Routes

A route is the ordered list of adapter instances for one principal. Routes are host configuration, never part of a message. The reference kinds: an in-process messaging bot (telegram), a signed HTTP receiver (webhook), and a chat-SDK messenger (chat-sdk, outbound tells only). A host MAY add kinds by loading adapter packages; a route entry of a kind whose package is absent is skipped with a fixed reason, never an error.

Receipts

One receipt per attempt. A receipt is one of five statuses:

StatusFieldsMeaning
deliveredA human-visible surface now shows the message.
deferreduntilHeld by the receiver (for example quiet hours); until is the ISO timestamp it will go out.
dedupedThe receiver already showed this dedupeKey.
undeliveredreasonRefused or not carried; the receiver is telling, not failing.
failedreasonThe attempt broke (a throw, a timeout, a bad response).

Strict parsing. A receiver's answer is trusted only when it is a well-formed receipt: an empty body, a bare ok, an unknown status, or a deferred without a valid until is refused, so a receiver can never acknowledge by accident. Unknown keys are ignored, not refused (a receiver MAY add its own fields, such as a message id); the kept receipt carries only the known fields. A signature check failure, a timeout, or an unreadable body is failed, never undelivered: undelivered is a receiver's own statement.

Kept by the host. Receipts are append-only and stored next to the subject (the reference stores them in the approval's directory). A restart MUST NOT lose them, and a restart MUST NOT re-announce: before sending, the host reads the kept receipts; an acknowledging receipt for the same dedupeKey means the subject was already handed over.

Dedupe

One dedupeKey gives at most one human-visible message per adapter. Adapters MUST be idempotent on it: a second send with the same key answers deduped (or the same receipt as before) and shows nothing new. The reference subject keys are approval:<id> and permission:<id>.

Routing and the floor

The host walks the principal's route in order and stops at the first acknowledging receipt (delivered, deferred, or deduped). Every attempt is kept.

  • A deferred whose until is already past, or later than the message's expiresAt, counts as undelivered (reference reasons: deferred-past-due, deferred-past-expiry) and the route goes on: a hold that cannot end in time is not a delivery.
  • The floor (MUST). Every ask ends with a delivered or deferred receipt, or the host emits a reach:undelivered event on its event bus. A host MUST NOT drop an ask silently. A tell has no floor.
  • A host MAY re-attempt (sweep) a pending ask that carries no acknowledging receipt after a configured delay, through the last adapter of the route that can carry it, once per run; the floor still applies.

Close

When a subject leaves the state its message announced (it was decided, it expired, or it was cancelled by its producer), the host calls close(dedupeKey, outcome) on the adapter that acknowledged, when that adapter has one, so what the human sees stops looking actionable. Outcomes are the subject's vocabulary; the reference outcomes are approved, denied, expired, and, once the AIP-7 cancellation amendment is implemented, cancelled. close is best effort: a missing or failed close changes nothing about the subject.

Answers: the inbound half

What comes back from a human on an ask is an answer:

interface ReachAnswer {
  dedupeKey: string
  option: string
  actor: { kind: string; id: string; verifiedBy: string }
}

The dedupeKey names the subject (approval:<id>, permission:<id>); actor records who answered and what proved them. The host applies the answer to the judge of the subject:

  • an approval is decided by the approvals engine, as the channel of the answering surface, ONLY when that channel is declared on the request; same actor proof, same AIP-7 signature, same single consumption as any other decide;
  • a parked permission is resolved by the permission judge with the option the ask offered, fail-closed on anything unrecognized;
  • a question is resolved by its question judge.

The rule that has no exception: an adapter never decides by itself. An adapter's answer counts only when the surface it speaks as is a declared channel for that request. The engine re-checks this on the decide; checking at the answer path keeps the refusal observable to the adapter (which closes its message either way; the subject stays pending). An answer for a judge the host does not have fails closed (no_judge); it is never dropped into another judge.

Named refusals. Every refusal leaves the subject exactly as it was: pending, awaiting its human.

RefusalMeaning
unknown_subjectThe key names no subject the host knows.
no_judgeThe host has no judge for that kind of subject.
channel_not_declaredThe answering surface's channel is not declared on the request.
unknown_optionThe option is not one the ask offered.
not_pendingThe subject is no longer awaiting an answer.
apply_failedThe judge refused to apply the answer.

This is the one path an adapter's "the human said yes" takes, whatever the adapter is. It is the prerequisite of the unified ask: a permission and an approval ride the same route, and adapters gain a way to hand an answer back without each growing its own decide path.

Conformance

A host conforms to reach/v1 when:

  1. Every message it sends is a ReachMessage: content with the four content keys, an envelope with intent, principal, urgency, dedupeKey, and source.
  2. It walks routes in order, stops at the first acknowledging receipt, and keeps every receipt append-only next to the subject, surviving a restart without re-announcing.
  3. Its adapters never throw to refuse; every refusal is a receipt, and a deferred past due or past expiry is read as undelivered.
  4. Its receivers' answers are parsed strictly: an answer that is not a well-formed receipt never acknowledges.
  5. One dedupeKey produces at most one human-visible message per adapter; adapters are idempotent on it.
  6. Every ask ends with delivered or deferred, or a reach:undelivered event is emitted; nothing else counts as the floor being met.
  7. An answer from an adapter is applied to the judge of its subject, only through a channel the request declared, and every refusal is one of the named refusals, leaving the subject pending.
  8. A host that registers further adapter kinds does so by configuration and adapter packages; no adapter kind or instance identifier is hardcoded in the decision engine.

Rationale

Why a new AIP, and what it is not. REACH is not an extension of AIP-DELIVERY-TRIAGE (a different hop: producer to session inbox, which explicitly adds no channel), not of AIP-7 (who has authority, not how a message reaches a person), and not of MCP elicitation (a transport a host MAY front with an adapter, never an authority). The gap is real: no AIP specifies how a host reaches its human, and every environment that grows its own bridge re-implements dedupe, retry, receipts, and announce-state. The overlap with each is cited because the default position is extend, not fork: REACH extends none of them and composes with all three.

Why the channel/adapter split is normative. The failure that forced this design: an approval engine grew the names of a messaging platform (a closed channel list, per-platform decide methods, per-platform card state), so enabling a new environment meant editing the engine, and announcing and deciding shared one identifier. Splitting them costs one indirection and buys the property this AIP is about: the engine knows surfaces by id; the adapter knows the platform; the two meet exactly once, at the answer, and only through a declared channel.

Why receipts are strict and kept. A receiver that can acknowledge with a status code will acknowledge by accident (an empty 200 after a crash). A receipt that is not parsed is a story, not a fact. Keeping every attempt next to the subject makes the two questions an operator actually asks answerable from the record: who was told, and what did the receiver say. The restart rule (no re-announce from an acknowledging receipt) follows: the receipt IS the announce state.

Why the floor is a MUST. The alternative (best effort, log on failure) is exactly the silent loss the Motivation names: an agent blocks on a human who was never reached, and nothing anywhere is red. An event on failure is the minimum that makes loss visible to something that can escalate.

Why answers route to judges, not into REACH. A transport that applies its own answers becomes an authority; then two transports mean two authorities, and the guarantees (pinned payload, AIP-7 signature, single consume) fork per platform. Routing every answer to the judge of its subject keeps one authority per primitive and makes the unified ask possible without changing any judge.

Why now is not model-callable. An agent that can set now can interrupt its human on loop. Urgency is a producer-code or host-configuration decision; a model-callable parameter would make the floor an amplification channel.

Reference Implementation

@agentproto/reach (the contract: types.ts for message, ask, adapters, capabilities, receipts; receipt.ts for strict parsing; preview.ts for the one preview parsing rule; conformance.ts for the webhook receiver suite), @agentproto/reach-telegram (the messaging adapter, including the approval and permission bridges), and the runtime router (packages/runtime/src/reach: router.ts for the route walk, the floor, and the sweep; message.ts for the one approval message; answer.ts for the inbound half and its named refusals).

Security Considerations

  • An adapter is untrusted for decisions. Everything an adapter reports (a delivery, an answer, an actor) is transport evidence. The decision checks the channel declaration, the actor proof, and the subject state; a compromised adapter can at worst produce a refused answer (channel_not_declared, unknown_option, not_pending).
  • Dedupe is a denial-of-service surface. An attacker who can guess dedupeKey values cannot suppress delivery through dedupe: keys are host-generated per subject (approval:<id> with unguessable ids), and only the receiving adapter's idempotency is in play.
  • Webhook receivers MUST verify signatures. The webhook kind signs with Standard Webhooks HMAC-SHA256 keyed by a whsec_ secret. The secret is never echoed, never logged, never carried in a message.
  • Receipts carry no secrets. A receipt is a status, a reason, an adapter id, and a timestamp. Adapter credentials never travel in messages, receipts, or answers.
  • Answers carry actor evidence, not authority. The actor of an answer is recorded (who, and what proved them) and reaches the decision as evidence; it substitutes for no AIP-7 channel check.
  • The link capability is where AIP-53 link tokens belong. An adapter that opens a page MUST open it through a token whose exchange proves the opener (AIP-53 link tokens); a bare URL with an embedded credential is non-conforming.

See also

  • AIP-7: GOVERNANCE, the approval requests REACH transports and whose channels decide what an adapter's answer counts for
  • AIP-53: APP, the link tokens that open an approval page from an adapter
  • AIP-76: EVENT, the bus a reach:undelivered floor event fires on
  • AIP-77: MCP-GATEWAY, whose elicitation is one transport an adapter MAY front (an accept never decides)
  • AIP-DELIVERY-TRIAGE: the producer-to-inbox hop REACH explicitly does not cover

AIP-79: COLLECT (collect/v1): collecting public items and their counters with provenance

Specifies a source-agnostic format and engine contract for collecting public items (articles, posts, threads, submissions, reviews, videos) and their metrics with provenance: the collection recipe (collect.recipe/v1: sources, queries with subject labels, window, sampling bands with quota, per-domain cap and seed, caps, workers, lookahead), the collected item, the append-only observation (a missing counter is never zero, the displayed value is kept), the actor with dated audience readings (karma is not audience, an unknown audience carries a reason), the pickup (kind, method, verified rule), the connector contract (a deterministic plan, a network-only fetch, a pure replayable parse, plus a declaration of counters, access, capabilities and pace), the transport contract (api, http, browser, with the failures that escalate and the browser challenge hard stop), dedup at three levels, and run provenance (content-addressed raw bodies, a task log, deterministic resume). It fixes no source: platforms appear only as non-normative examples. A collected item can be imported as an AIP-10 knowledge source.

AIP-XXXX: DELIVERY-TRIAGE (delivery-triage/v1): triage, ledger and batching between producers and the inbox

Defines the session-delivery stage between any producer and the AIP-46 inbox: deterministic wake, fyi and drop decisions with a non-bypassable always-wake floor, an append-only JSONL triage ledger that never carries payloads, replace-in-place digest batching as ContextSlot N1, silent no-op acknowledgements, and observation-only rollout.