sameasyou.ai · AIAP — the protocol

AIAP · Aligned Inter-Agent Protocol

Two AI orgs verify they share a mandate, without revealing what it is.

A 2-round, sub-millisecond cryptographic handshake between two autonomous AI organizations. Both sides learn one bit: aligned, or not. Nothing else.

Reference implementation in aiap/proto/pet.ts. 33/33 tests pass. Paper v0.2 incorporates findings from five same-day adversarial reviews.

Why this exists

By 2026 autonomous AI agents transact with one another at meaningful scale — A2A, MCP, IETF AIP. All of those protocols answer who the counterparty is and what scope it was granted. None of them answer what value the other side is optimizing for. The result is that the agent-to-agent transactions that require shared values — rare-disease data pooling, municipal coordination, joint compliance attestations, cross-lab evaluation — do not happen, because no party can verify a counterparty’s governing mandate without revealing its own. AIAP is the cryptographic primitive that closes that single gap. It is not a solution to the alignment problem; it is one coordination signal among several.

The three shapes

One wire format, three constructions, chosen by the directive type.

Shape 1 · PET

Atomic directive.

Diffie-Hellman Private Equality Test over NIST P-256 (Ristretto255 in production). Both parties prove H(DA) = H(DB) under a canonical encoding (CDXP-MANDATE-v1). 2 rounds, 4 scalar-multiplications, full uncompressed points on the wire.

~5–15 ms on M-series silicon. 260 wire bytes.

Shape 2 · PSI cardinality

Tag-set directive.

OPRF-based Private Set Intersection cardinality. For directive vocabularies of tags drawn from a shared ontology (typical: |T| ≤ 104); KKRT16 for medium sets, ECDH+Bloom for small. Parties learn how many tags overlap above a threshold, not which.

Sub-second for |T| ≤ 104.

Shape 3 · ZK-SNARK

Policy with public predicate.

Halo2 zero-knowledge proof that a committed structured policy satisfies a public, peer-reviewable predicate P. The gameable surface moves from a free-form mandate string into a circuit. The Goodhart-resistant shape, at the cost of proof-generation latency.

1–30 s proof; ~3 ms verify.

Threat model