ERC-8004 explained โ on-chain agent identity
0x8004A169FB4a3325136EB29fA0ceB6D2e539a432.
Why does an AI agent need on-chain identity?
Off-chain identity systems assume a stable URL or a corporate registrar โ neither holds up for autonomous agents. Agents move between operators, get cloned, get retired, get re-keyed. A domain expires; a startup pivots; a wallet gets compromised and rotated. ERC-8004 anchors a long-lived identity to a numeric ID that survives all of those events. Reputation accumulates across the agent's lifetime, attached to the ID rather than to any single key, domain or company.
What does the standard actually define?
- Registry contract โ singleton per chain.
register(metadataURI)mints an Agent ID.updateMetadata(id, newURI)rotates the off-chain document. - Agent ID โ monotonically increasing uint256. AsterPay is ID 16850 on Base.
- Address binding โ one or more EVM addresses can be bound to an Agent ID via signed messages. This is how reputation survives key rotation.
- Attestations โ third parties can attach EAS-style signed claims to an Agent ID: "this agent has KYB", "this agent passed sanctions screening", "this agent has a posted bond of X USDC". Attestations are public, verifiable and revocable.
- Metadata URI โ the off-chain document, conventionally an
agent.jsonhosted at/.well-known/agent.json. Includes capabilities, supported chains, payment endpoints.
How does ERC-8004 relate to KYA?
ERC-8004 is the identity layer; KYA is the trust-scoring layer. KYA uses ERC-8004 registration as one of its seven components (worth 15 points). An agent without ERC-8004 caps out at 85 KYA points โ enough for production use, but the enterprise tier (80-100) effectively requires on-chain identity. AsterPay also publishes its own ERC-8004 attestations to vouch for KYB-completed operators, so any third-party facilitator can use AsterPay's attestation as evidence in their own scoring.
How is AsterPay registered?
AsterPay's ERC-8004 registration on Base:
{
"agentId": 16850,
"registry": "0x8004A169FB4a3325136EB29fA0ceB6D2e539a432",
"chain": "base",
"boundAddresses": ["0xd5f8481D8F25d3966d2010DBf9B47fFbdf745A9E"],
"metadataURI": "https://asterpay.io/.well-known/agent.json",
"operator": "AELIRA LTD"
}
The same record is exposed in our /.well-known/agent.json under the identity.erc8004 field, so any compliant agent or facilitator can verify the binding without an RPC call.
How do I register my own agent?
Three options, in order of effort:
- MCP tool โ
npm install @asterpay/mcp-server. Theregister_erc8004_agenttool handles metadata upload, contract call and verification. ~30 seconds. - CLI โ
npx @asterpay/erc8004 register --metadata ./agent.json --rpc <base-rpc>. - Direct contract call โ call
register(string metadataURI)on the registry contract from any wallet. Gas is ~0.001 ETH on Base.
After registration, plug the returned Agent ID into your agent.json under identity.erc8004.agentId and AsterPay's KYA endpoint will start picking it up within a few minutes.