Agentometric Trust Protocol — AGTP/0.1
AGTP lets anyone check, with public keys and no account, who an AI agent acts for, what it may ask, and whether this particular call or message is one the brand actually sent. Sure91 is the first registry and Guard built on it; a regulator or industry body can run its own registry on the same objects.
Status: working draft. The reference implementation (agtp/ in the Sure91 repository) is shared with pilot partners,
regulators and bank security teams on request. The conformance vectors are public: vectors.json.
1. Signatures
Every AGTP object is a JSON document with a proof:
proof = { type: "Ed25519Signature2020", created, verification_method: "<did>#<key>", proof_value: base64url(sig) }
The signature is Ed25519 over the RFC 8785 (JCS) canonical form of the document without proof. Keys are
published as Ed25519VerificationKey2020 (raw 32-byte public key, base64url) in the signer's DID document; the
registry's own key is at /.well-known/did.json. Every public registry response also carries an AGTP-Signature
header (Ed25519 over the canonical body).
2. Objects
| Object | Signed by | What it says |
|---|---|---|
PrincipalCredential |
Registry | This legal entity was verified (level, methods, regulator). |
AgentPassport |
Principal (the brand) | This agent acts for me: name, provider, its public key, the channels it uses (cli:+91…, waba:+91…, hdr:AX-…, domain:…), its disclosure text. |
MandateCredential |
Principal, countersigned by the registry | What the agent may do (purposes, allowed) and must never ask (forbidden: OTP, PIN, CVV, password, remote access, payment to a personal account, beneficiary change). |
DelegationCredential |
Delegator | A bounded hand-off to another agent (capabilities, constraints, depth). |
InteractionCredential |
Agent | This call or message: principal, hashed recipient, action and purpose, channel binding, a validity window (15 minutes for a call, 72 hours for a message), nonce, and the short consumer code (DEMO-7F3K-2Q) printed in the message. |
EvidenceReceipt |
Registry (verifier) | What happened: verdict, hashes of the passport, mandate and interaction, requests observed, mandate violations, a hash chain to the previous event, and a consumer receipt ID (RCPT-XXXX-XXXX). |
Revocation |
Principal or registry | Withdraws an agent, a channel or a principal, effective immediately. |
Recipients are never in clear: the sending platform puts hmac256:<hex> — HMAC-SHA256 of the canonical
identifier (E.164 number, or lower-cased email) under a per-partner key — in the interaction.
Brands choose key custody. Self-held: the brand generates its Ed25519 key (HSM, key file or the Sure91 CLI), registers the public half with a proof of possession, and signs each passport and mandate itself; the registry can publish but not alter or forge them. Hosted (pilots): the registry holds a dedicated key for the brand.
3. Status
Each credential carries status: {url, list_index} pointing into a Bitstring Status List (one bit per credential,
1 = revoked), published as static JSON and cached by verifiers for a bounded time.
4. Verifying an interaction
A verifier runs ordered gates and reports each as PASS / FAIL / WARN / SKIP: agent identity (passport and interaction signatures), principal credential, channel binding (the sender actually used is one the passport lists), mandate (signature and validity), delegation chain, scope (action within mandate), audience, expiry, replay (nonce), and credential status. The result is one of:
| Verdict | Shown to the customer as |
|---|---|
VERIFIED |
Registered Agent (green) |
VERIFIED_WITH_RESTRICTIONS, CHALLENGE |
Genuine Agent, Wrong Ask (amber) — a real agent asked for something its mandate forbids, or the brand requires confirmation in its own app |
REVOKED, SUSPICIOUS, BLOCKED, or a code that a registered agent never issued |
Not Registered (red) |
UNVERIFIED with no agent behind it |
Not in the Registry (grey) — never shown as red |
5. Asks: prevented first, witnessed after — never heard
Sure91 never receives a call's audio or words. What an agent asks is handled in two layers.
The Gateway (prevention). Before an agent asks for anything sensitive, its platform calls
POST /v1/interactions/{id}/authorize {request} (e.g. request_otp). The answer comes from the brand's signed
mandate and is itself signed (GatewayDecision: decision allow | deny, reason, mandate id, time). On deny the
agent does not ask and says the returned say_instead line. A prevented ask is not a wrong ask: the code stays green.
Witnesses (detection). If a forbidden ask happens anyway, any of three witnesses can report it, as request codes only:
| Witness | How | Endpoint |
|---|---|---|
| The sending platform | live, as the agent speaks | POST /v1/interactions/{id}/observe {request} |
| The brand | its own audit of its own recordings | POST /v1/principals/me/audit {items:[{consumer_code, requests}]} |
| The customer | one tap on the verify page or in the bank's app | POST /v1/witness {code, asked} |
A forbidden ask reported by the sending platform or the brand turns the code amber (VERIFIED_WITH_RESTRICTIONS),
alerts the brand (webhook interaction.wrong_ask, email), and records whether the Gateway was asked first:
allowed, not_checked or denied_then_asked. The last two are bypasses, visible to the brand. A customer's report
alerts the brand (webhook interaction.customer_report) but never changes the public verdict or counts toward
quarantine, since anyone holding a code could send one; /v1/witness answers the same whether or not a code exists
and rate-limits every attempt. Automatic quarantine counts only live and receipt evidence within a rolling hour, from
the agent's last reinstatement. In production (REQUIRE_REQUEST_CODES), text
(utterances, transcripts) is refused outright.
Red-team certification. Before go-live, each agent gets adversarial test calls built from its mandate (a pushy or confused "customer" offering an OTP, a PIN, a screen-share). Pass means the agent refused every one; the result is on its public passport.
6. Impersonation: the brand decides what is red
Sure91 never guesses who owns a number. A sender is red only when (a) it claims a registered brand from outside
that brand's signed list where the claim is visible (an SMS naming the brand), (b) the brand has withdrawn it, (c) enough
customers have reported it (never for TRAI commercial series), or (d) the brand has said it is not theirs. Customers
report what a caller claimed ("they said they were from
7. Public endpoints (Sure91 registry)
| Endpoint | Returns |
|---|---|
GET /v1/verify/code/{code}?lang=en\|hi |
verdict, brand, agent, mandate summary, channel, A2P declaration, wrong ask (if any) |
GET /v1/agent/{ta_id} |
the agent's public passport summary — registration status only, never a verdict |
GET /v1/passport/{ta_id}, GET /v1/mandate/{ta_id} |
the signed documents |
GET /v1/receipts/{id}, GET /v1/receipts/{id}/kit |
the signed receipt, and a file the customer keeps and can check offline |
POST /v1/witness |
the customer's one-tap report of what an agent asked |
POST /v1/report |
a customer's report of a caller, with the brand it claimed to be |
GET /v1/registry/denials |
every live "not ours", by brand, senders masked |
GET /.well-known/did.json |
the registry's public keys |
The Guard profile below specifies how a phone checks a caller or sender before it rings, without sending the number anywhere.
AGTP Guard profile — agtp-guard/0.1
The Guard is the half of Sure91 that lives on the consumer's phone. It answers one question before an incoming call rings or when an SMS lands: is this sender a registered agent, a reported impersonator, or unknown? — without the number, the consumer's contacts, call log, message text or any device identifier leaving the phone.
Delivery model: the Guard ships as an SDK inside apps already on the phone (bank apps, dialers); the first-party Android app is a reference build on an internal track, not a consumer product.
This document is the contract between the server (ta_platform/guard_service.py), the Android SDK
(guard/sdk-android), the TypeScript SDK (guard/sdk-ts) and any future Swift implementation. The
reference is agtp/guard.py; guard/vectors.json is the conformance file every implementation must pass.
1. Sender normalisation
normalise(sender, channel) — channel ∈ voice | sms | messaging.
| Input | Channel | Output |
|---|---|---|
+91 1600 123 456, 1600123456, 01600123456, cli:+911600123456 |
voice | +911600123456 |
0091 7800020144 |
voice | +917800020144 |
waba:+919876543210 |
messaging | +919876543210 |
ad-demobk, AD-DEMOBK, hdr:AX-DEMOBK-S |
sms | AD-DEMOBK, AD-DEMOBK, AX-DEMOBK-S |
DEMOBK (alphanumeric, no DLT prefix) |
sms | DEMOBK |
9876543210 |
sms | +919876543210 |
Rules: strip registry prefixes (cli: waba: rcs: hdr: sms: tel:); an SMS sender matching
^[A-Z]{2}-[A-Z0-9]{3,11}(-[PSTG])?$ or a non-numeric alphanumeric id is upper-cased and returned; otherwise
keep digits and +; 00 → +; 10 digits → +91 + digits; 0 + 10 digits → +91 + 10 digits; result must be
7–15 digits or the input is invalid. The default country code is a deployment setting (91 for India).
2. Hash
message = "agtp-guard/0.1" + "|" + channel + "|" + normalised (UTF-8)
h = hex( HMAC-SHA256( guard_key, message ) ) (64 lower-case hex chars)
prefix = h[0:5] (20 bits) suffix = h[5:64]
guard_key is 32 bytes published by the deployment at GET /v1/guard/key as base64url (no padding) with a
key_id. It is not a secret. Its purpose is domain separation (a second AGTP operator's hashes are
different) and rotation by key_id. What protects the consumer is §3, not the key.
3. Privacy model — what is claimed and what is not
- The device never sends the full hash. It sends the 20-bit prefix and matches the suffix locally (k-anonymity, as in HIBP). For India's ~10¹⁰ number space the server learns "one of ~10,000 numbers".
- Registered (green) and reported (red) entries ship as a daily snapshot, so the common case — a registered agent calling — resolves offline and the server sees nothing.
- No contacts, call log, message bodies, IMEI, advertising id or account. The app key identifies the app build, not the person. Reports carry the hash of the reported sender, never the consumer's number.
- Not claimed: that a full hash is irreversible (the number space is small; a full hash is not sent for that reason), or that "not registered" means "fraud" (see §6).
4. Endpoints (all public, rate-limited per app key, CDN-cacheable, response signed with AGTP-Signature)
| Endpoint | Returns |
|---|---|
GET /v1/guard/key |
{profile, key_id, key_b64url, previous?: {key_id, key_b64url}, default_cc} |
GET /v1/guard/snapshot |
{key_id, generated_at, version, entries:[Entry…], brands:[Brand…]} — all VERIFIED / REVOKED / SUSPICIOUS entries with full hashes |
GET /v1/guard/lookup?p=<5 hex> |
{key_id, prefix, entries:[Entry…], ttl} — every entry whose hash starts with p |
GET /v1/guard/brands |
{brands:[Brand…]} |
POST /v1/guard/report |
body {h, channel, hashes?: {voice, messaging, sms}, claimed_slug?, observed_request?, reason?, reporter_token} → {reference, reports_on_sender, state}. For a phone number the device sends its hash on all three phone channels (the server cannot derive them from one hash), so a number reported from a call is red for WhatsApp and SMS as well. Idempotent per reporter_token. |
Entry = { s: suffix | h: hash, c: channel, v: "VERIFIED"|"REVOKED"|"SUSPICIOUS",
principal?: legal_name, slug?: "DEMO", agent_name?, ta_id?, level?: 0-5,
claimed_slug?: slug, reports?: n, never_ask?: ["OTP","PIN",…], helpline?: string,
copy: { en:{title, advice}, hi:{title, advice} } }
Brand = { slug, legal_name, display_names:[…], helpline?, regulator? }
lookup returns s (suffix) — the device already knows the prefix. snapshot returns h (full hash).
5. Verdict algorithm (device)
5.1 Algorithm
check(sender, channel, ctx{claimedBrand?, callerDisplayName?, text?})
n = normalise(sender, channel); h = hash(key, channel, n)
cs = commercialSeries(n) // §5.4
e = online ? lookup(prefix(h)).match(suffix(h)) ?: (timeout ? cache.byHash(h) : null) : cache.byHash(h) // live registry wins
if e.v == VERIFIED and ctx.text and neverAsk(ctx.text) ∩ e.forbid: // §5.5, on the device
return WRONG_ASK (amber, "Asked for <the ask> — don't share")
if e and not (cs and e.v == SUSPICIOUS):
return e.v as VERIFIED (green) | REVOKED (red) | SUSPICIOUS (red)
if cs: return UNKNOWN (grey, "Not in the Registry · TRAI commercial number")
claim = ctx.claimedBrand ?: brandDetector.detect(ctx.callerDisplayName)
if claim is a registered brand: return IMPERSONATION_SUSPECTED (red, "Not Registered · <brand> says this isn't theirs")
return UNKNOWN (grey)
5.2 States
States, colours, what the consumer reads:
| State | Colour | English title |
|---|---|---|
| VERIFIED | green | Registered Agent · Principal |
| WRONG_ASK | amber | Asked for the ask — don't share · Principal |
| REVOKED | red | Not Registered · Principal has withdrawn this agent |
| SUSPICIOUS | red | Not Registered · reported n times as Brand |
| IMPERSONATION_SUSPECTED | red | Not Registered · Brand says this isn't theirs |
| UNKNOWN | grey | Not in the Registry |
Four answers for the consumer, the same words on the website, the verify page, the Guard and the console: Registered Agent (green) · Asked for … — don't share (amber: names the forbidden ask, e.g. “Asked for your OTP”) · Not Registered (red) · Not in the Registry (grey).
Freshness: online, every check looks the sender up (the 5-hex prefix) and a lookup is reused for at most 60 s, so a revoked agent turns red on phones within a minute. The daily snapshot is the offline fallback, and the fallback on a lookup timeout.
5.3 Timing
Timing budget: Android gives a CallScreeningService ~5 s. Target: cache hit < 50 ms, network lookup < 600 ms
(hard timeout 2.5 s, then fall back to offline evaluation). A timeout is never a false green: it yields
UNKNOWN or IMPERSONATION_SUSPECTED, never VERIFIED.
5.4 TRAI commercial series (TCCCPR Third Amendment, 2026)
The Telecom Regulatory Authority of India's TCCCPR Third Amendment Regulations, 2026 (press release 119/2026, 18 Sep 2026) bar call-management and spam-identification apps from blanket-blocking or spam-tagging the commercial number series the regulator has designated for transactional, service and promotional calls. An implementation therefore:
- computes
commercialSeries(n)on the normalised sender: for+91followed by exactly ten digits, the national number's prefix1600,160or140(longest match first); otherwise none.vectors.json→commercial. - never returns SUSPICIOUS or IMPERSONATION_SUSPECTED for a commercial-series sender. A registered agent on such a number is still VERIFIED (green), and a revoked one still REVOKED (red): those come from the bank, not from reports or a claim. Otherwise the verdict is UNKNOWN (grey) with the copy "TRAI commercial number · not in the Sure91 registry".
- sends
commercial: truewith a report of such a sender; the server records it (for the brand's alerts) but never counts it toward the red threshold, and never auto-rejects the call.
The same amendment requires apps that offer spam reporting to route reports to the access providers. Sure91 never
holds the number (§3), so the device offers the customer a complaint to 1909 from their own SIM, prefilled
Unsolicited call/SMS from <number> on <dd-mm-yyyy hh:mm>, which they review and send; the report then carries
telco_filed: true and the server records the route (user_1909). Reports a person types into sure91.in in clear text
are forwarded to the access provider's complaint platform once one is connected (telco_route).
POST /v1/guard/report additionally accepts commercial?: bool and telco_filed?: bool and returns
telco: {route: "user_1909"|"hash_only", short_code: "1909", note}; a commercial-series report returns state
RECORDED_COMMERCIAL. Voice entries in snapshot/lookup may carry a2p: bool — the bank's A2P declaration of that
CLI to its access provider is on record.
5.5 Asked for a forbidden thing (amber)
A registered agent that asks for something its signed mandate forbids (OTP, PIN, CVV, password, remote access, a payment to a personal account, a beneficiary change) is genuine but must not be trusted on that request. Two routes reach the customer, and neither sends anything about the customer to Sure91:
- Messages, on the device.
check(sender, channel, ctx{text})reads the message body locally. For a VERIFIED entry it removes negated mentions ("we will never ask for your OTP", "OTP साझा न करें") and matches the rest against the entry'sforbidlist (the mandate's signedforbiddenrequest types). A match returns WRONG_ASK (amber). The text never leaves the phone. Rules:NEVER_ASK_PATTERNS/NEGATED_CLAUSESin agtp/guard.py, generated into both SDKs; conformance:vectors.json→never_ask. - Calls, through the bank's app. The phone cannot hear the call. The vendor reports what its agent asks in real time
(
POST /v1/interactions/{id}/observe); a forbidden ask turns that interaction's code amber at once, emails the brand's security contact and fires theinteraction.wrong_askwebhook (interaction id, code, recipient hash, campaign). The bank's backend maps it to its customer and pushes to its own app, which rendersguard.wrongAsk(...).
Entry gains forbid?: [request type…]. Report a WRONG_ASK like any verdict (one tap, hash only) to tell the brand.
5.6 Brand denials ("Not ours") and agencies
A brand may state that a sender customers reported as claiming to be it is not theirs. The registry publishes that
sender as an entry {v: "REVOKED", denied: true, claimed_slug, principal, copy} on every phone channel it applies to.
Devices treat it like any REVOKED entry: red, with the brand's wording ("Not Registered ·
Safeguards (server side):
- A brand can deny only a sender that at least MIN_REPORTERS_TO_DENY (default 3) different customers reported as
claiming that brand. Distinct customers are counted by server-derived address, never by a client token, and reports
from the brand's own address do not count.
- A denial never applies to a sender registered to any brand, on any channel, whatever that brand's status. A later
registration always wins.
- A denial of a TRAI commercial number (1600, 140) waits for operator review before it turns red.
- Each denial is signed and listed publicly (GET /v1/registry/denials, senders masked, no hashes). The brand can
withdraw it and the operator can remove it.
- The web check (/v1/verify/lookup) resolves exactly as a phone does, so the two always agree.
An agent run by an agency or vendor for a brand carries operated_by. Its VERIFIED entry reads
"Registered Agent ·
6. Copy discipline (binding on every implementation)
- Grey is the default. "Not in the registry" is not "fraud" while registry coverage is low.
- Red requires one of: a registered brand claimed by an unregistered sender; ≥ 3 corroborated reports; a revoked registered agent. Never red for an unknown number with no claim and no reports, and never red on reports or a claim for a TRAI commercial-series number (§5.4).
- Never the word "scam" in a verdict. "Suspected impersonation", "reported", "not registered".
- Every red verdict carries the brand's real helpline and 1930 when money may be involved.
7. Platform capabilities
| Android | iOS | ||
|---|---|---|---|
| Calls before ring | CallScreeningService with ROLE_CALL_SCREENING (Android 10+); verdict as heads-up / full-screen notification; optional overlay; optional auto-reject for SUSPICIOUS |
Call Directory extension (label list from snapshot) · Live Caller ID Lookup (iOS 18+, prefix-style PIR) — label only | none |
| SMS | RECEIVE_SMS under Play's caller-ID & spam protection exception (declaration form); brand-claim detection on device; notification; folding only if default SMS app |
SMS Filter extension (unknown senders only) | none — the Sure91 code in the message + Registry lookup |
| Offline | snapshot | snapshot via extension | — |
8. Conformance
guard/vectors.json: 15 normalisation + hash vectors, 3 invalid inputs, 8 commercial-series cases (§5.4) and 17
never-ask cases (§5.5). An implementation passes when every normalised, hash, prefix and suffix matches, every
invalid input raises, every commercial case yields its series (or none), and every never_ask text yields exactly
its requests. Regenerate with make guard-vectors (also syncs the SDK pattern tables).
Runners: pytest tests/test_guard.py (Python) · node guard/sdk-ts/test.mjs (TypeScript) ·
javac … && java GuardHashRef (JVM reference, same javax.crypto calls the Kotlin SDK makes) ·
gradle :sdk-android:test (Kotlin, on a machine with the Android SDK).