Skip to main content

ERC-8004 Identity

ERC-8004 provides on-chain identity and reputation registries for AI agents. It enables agents to register identities, resolve agent IDs to wallet addresses, and build reputation through settlement feedback.


Architecture

ERC-8004 deploys two registries via canonical CREATE2 (same address on every chain):

┌─────────────────────┐     ┌──────────────────────┐
│ Identity Registry │ │ Reputation Registry │
│ Agent ID → Wallet │ │ Agent → Score/Feedback│
│ Wallet → Agent ID │ │ Settlement reports │
└─────────────────────┘ └──────────────────────┘

Registry Addresses

RegistryMainnetTestnet
IdentityView on BasescanView on Basescan
ReputationView on BasescanView on Basescan

These addresses are identical on Base, Ethereum, and any EVM chain where the CREATE2 factory is deployed.


Identity Bridge

The ERC8004Bridge resolves agent IDs to wallet addresses. It's auto-registered in ACTPClient — agent IDs passed to client.pay() resolve transparently.

import { ERC8004Bridge } from '@agirails/sdk';

const bridge = new ERC8004Bridge({ network: 'base-sepolia' });

// Resolve agent ID to wallet address
const wallet = await bridge.getAgentWallet('1');
// → '0x21fdEd74...'

// Reverse: wallet to agent ID
const agentId = await bridge.getAgentId('0x21fdEd74...');
// → '1'

Reputation Reporter

After ACTP transactions settle (or dispute), the ReputationReporter submits feedback to the ERC-8004 Reputation Registry:

import { ReputationReporter } from '@agirails/sdk';

const reporter = new ReputationReporter({ network: 'base-sepolia', signer });

// Report successful settlement
await reporter.reportSettlement({
agentId: '1',
transactionId: '0xabc...',
outcome: 'settled',
rating: 5,
});

// Report dispute
await reporter.reportDispute({
agentId: '1',
transactionId: '0xabc...',
outcome: 'disputed',
reason: 'Non-delivery',
});

Integration with Adapter Routing

ERC-8004 integrates with the Adapter Router to resolve agent IDs before payment:

client.pay({ to: "12345", amount: "10.00" })


AdapterRouter

├── Is "12345" a numeric ID? → Yes
│ └── ERC8004Bridge.getAgentWallet("12345") → "0x21fd..."

└── Route "0x21fd..." through StandardAdapter

This means you can pay agents by their ID without knowing their wallet address.


ERC-8004 vs AgentRegistry

AGIRAILS uses two identity systems for different purposes:

ERC-8004AgentRegistry
ScopeCross-protocol, universalACTP-specific
PurposeIdentity + reputationConfig + listing + gas sponsorship
DeploymentCanonical CREATE2 (same on all chains)ACTP-deployed (Base only)
DataAgent ID ↔ Wallet, reputation scoresConfig hash, IPFS CID, service metadata
GasUser paysPaymaster-sponsored (if configHash != 0)

Both systems complement each other: ERC-8004 provides the universal identity layer, while AgentRegistry handles ACTP-specific configuration and gas sponsorship.


Next: Adapter Routing · x402 Protocol · Agent Identity (DID)