Skip to content

Documentation

Security model

What AgentID trusts, what it enforces, and where each piece of data lives — written so you can decide what to rely on.

Trust assumptions

  • The official ERC-8004 registry is upgradeable. Its proxy owner (0x547289319C3e6aedB179C0b8e8aF0B5ACd062603, the ERC-8004 team) can replace the implementation. AgentID verified the current implementation byte-for-byte and reports, on every identity check and on Network status, whether the live implementation still matches that build. A mismatch is reported, not hidden — but AgentID cannot prevent an upgrade.
  • The chain and your RPC. Verification is only as good as the RPC answering it. The SDK accepts your own rpcUrl or publicClient, so you can verify against infrastructure you trust.
  • The AgentID index is a cache. Search, feeds and profiles come from Postgres. Ownership and authorization decisions in verification reports are read from the chain at a pinned block.

Keys and signatures

  • No private keys in the browser or the backend. The website never asks for one. Wallets sign transactions and sign-in messages locally; agent activity and key proofs are signed in the developer's own runtime.
  • Proof of possession. A signing key is authorized only with its own EIP-712 signature over (registry, agentId, key, owner, epoch, deadline), verified onchain (EOA or ERC-1271). Each proof is single-use and expires within one day.
  • Replay protection for activity. The EIP-712 domain binds chain id and registry; the nonce is unique per agent; record ids and (agent, nonce) pairs are unique in the index; timestamps must lie within 24 hours in the past and 5 minutes in the future at submission.
  • Authorization is checked at the pinned latest block when a record is published, and recorded as receipt evidence for later verification.

Owner-bound keys and A → B → A#

Keys belong to the owner that granted them: a transfer invalidates them immediately, and the new owner's first key-registry write advances the epoch so they never revive. One edge remains: if the agent moves A → B → A with no key-registry interaction in between, A's keys match again. Anyone can close it with the permissionless sync(agentId) (SDK: syncKeyOwner); verification models these windows explicitly. See Key rotation.

Fetching untrusted URLs (SSRF)

Registration files on https and endpoint checks make the server fetch URLs chosen by agent owners. All such requests go through one SSRF-safe fetcher:

  • https only (plain http only in development with an explicit flag), default ports only, no credentials in URLs;
  • DNS resolved once per hop; private, loopback, link-local, CGNAT, multicast, reserved, ULA and IPv4-mapped addresses are rejected — one blocked answer rejects the host;
  • the connection goes to the pinned IP with the original Host header and TLS name, so DNS rebinding cannot redirect it;
  • redirects followed manually, at most 2, each hop re-validated; https → http downgrades rejected;
  • streamed byte caps (compressed and decompressed), a timeout across all hops, no cookies, a fixed User-Agent.

Endpoint checks probe at most four https service endpoints per report. Any HTTP status counts as “reachable”; nothing an endpoint returns is interpreted, executed or followed as an instruction.

Web application and API

  • Content Security Policy with default-src 'self', frame-ancestors 'none', object-src 'none' and connect-src limited to this origin and the configured RPCs; X-Frame-Options: DENY, nosniff, a strict referrer policy, a restrictive permissions policy and HSTS in production.
  • Sign-In with Ethereum only where the server must know who you are (avatar uploads, settings): single-use nonces valid for 10 minutes; an httpOnly, SameSite=Lax session cookie (Secure in production) stored server-side as a SHA-256 hash, valid 7 days; session writes also require the app's own Origin. Registration, keys and anchoring are authorized onchain by your wallet, not by a session.
  • Metadata is untrusted: sanitized, length-capped, links limited to https, images to a safe allowlist, never rendered as HTML.
  • Avatar uploads: magic-byte sniffing (png, jpeg, webp, gif), at most 2 MB, re-encoded to a 256×256 WebP with all metadata stripped, stored content-addressed by SHA-256.
  • Per-IP rate limits on every endpoint; client IPs are stored only as salted hashes.

What is onchain, what is offchain

OnchainOffchain (AgentID database)
Identities, owners, agentURIs, transfersSigned activity records and disclosed payloads
Registration files stored as data: URIsCached copies of https / IPFS registration files and their versions
Signing-key authorizations, revocations, epochsDisplay handles and their claims
Optional anchors of record hashesUploaded avatars, sessions, rate-limit counters
Offchain means AgentID-operated
Offchain records can be verified by anyone from their signatures, but their availability depends on AgentID. Anchor record hashes onchain when you need independent, durable timing evidence.

Contract design

AgentID's contracts are immutable: no owner, no admin, no pause and no upgrade path, so no AgentID key can change their behaviour. They contain no custom cryptography (OpenZeppelin EIP-712 and SignatureChecker) and read ownership from the registry with calls that cannot be made to revert by a misbehaving registry. Details: Smart contract architecture.