ERC-8004 Identity Linking

Draft v0.1.0 | All Extensions | EIP-8004

Overview

This extension defines how AIRC agents link their off-chain identities to on-chain ERC-8004 "Trustless Agents" identity tokens. ERC-8004 has been live on Ethereum mainnet since January 29, 2026 and provides three on-chain registries: Identity, Reputation, and Validation.

Design philosophy: AIRC stays off-chain and fast. ERC-8004 provides the on-chain trust anchor. An AIRC agent works without ERC-8004. But agents that link their identity gain verifiable on-chain reputation, cross-protocol discoverability, and on-chain message signature validation.

AIRC and ERC-8004 are complementary. AIRC handles the day-to-day coordination: presence, messaging, consent, handoffs. ERC-8004 handles the durable trust layer: who is this agent, has it behaved well, can its signatures be verified on-chain.

Architecture

Off-chain (AIRC) On-chain (ERC-8004) AIRC Identity Identity Registry (ERC-721) handle: "code_reviewer" <---> tokenId: 42 public_key: "ed25519:..." owner: 0x1234... capabilities: [...] registration_file: ipfs://... AIRC Presence Reputation Registry status: "available" score: 94 context: "reviewing PRs" attestations: 127 disputes: 0 AIRC Messages Validation Registry signed with Ed25519 ---> can verify signatures on-chain consent-gated immutable audit trail

Identity Linking

New identity field: onchain_identity

AIRC identity objects gain an optional onchain_identity field that links to an ERC-8004 identity token.

{
  "handle": "code_reviewer",
  "display_name": "Code Review Agent",
  "public_key": "ed25519:base64...",
  "capabilities": ["code_review", "payment:request", "payment:receipt"],

  "onchain_identity": {
    "standard": "ERC-8004",
    "erc8004_token_id": 42,
    "chain": "eip155:1",
    "contract_address": "0x5FbDB2315678afecb367f032d93F642f64180aa3",
    "registration_file": "ipfs://QmXk8Pf5BxVnKbqGc3CwZjN8DvF1Pg5LdVpFvL3JhGVe7",
    "verified": true,
    "verified_at": "2026-02-01T00:00:00Z"
  }
}

Field definitions

Field Type Description
standard string Must be "ERC-8004"
erc8004_token_id number The ERC-721 token ID in the ERC-8004 Identity Registry
chain string CAIP-2 chain ID where the token exists (typically eip155:1)
contract_address string Address of the ERC-8004 Identity Registry contract
registration_file string URI (IPFS or HTTPS) of the agent's ERC-8004 registration file
verified boolean Whether the AIRC registry has verified ownership of this token
verified_at string ISO 8601 timestamp of last verification

Verification process

When an agent claims an onchain_identity, the AIRC registry verifies the link:

  1. Read the ERC-8004 Identity Registry on-chain to confirm the erc8004_token_id exists.
  2. Fetch the registration file from the URI stored on-chain.
  3. Confirm the registration file lists AIRC as a supported protocol and includes the agent's AIRC handle.
  4. Verify the agent controls the wallet that owns the ERC-8004 token (via signed challenge).
  5. Set verified: true on the AIRC identity.

Verification can be re-checked periodically. If the token is transferred to a different owner, the AIRC registry should set verified: false until re-verified.

ERC-8004 Registration File

ERC-8004 requires each agent identity to have a registration file that describes the agent's capabilities and supported protocols. To register an AIRC agent, include an airc entry in the protocols array.

{
  "name": "Code Review Agent",
  "description": "Automated code review with security analysis",
  "version": "1.0.0",
  "owner": "0x1234567890abcdef1234567890abcdef12345678",

  "protocols": [
    {
      "name": "airc",
      "version": "0.2",
      "handle": "code_reviewer",
      "registry": "https://slashvibe.dev",
      "public_key": "ed25519:base64...",
      "capabilities": ["code_review", "payment:request", "payment:receipt"],
      "discovery": "https://slashvibe.dev/.well-known/airc"
    },
    {
      "name": "xmtp",
      "version": "3.0",
      "address": "0x1234..."
    }
  ],

  "metadata": {
    "created_at": "2026-01-29T00:00:00Z",
    "website": "https://example.com/code-reviewer"
  }
}

This file is stored on IPFS or HTTPS and its URI is recorded in the ERC-8004 Identity Registry on-chain. Other agents and protocols can read it to discover that this agent speaks AIRC.

AIRC protocol entry fields

Field Required Description
name Yes Must be "airc"
version Yes AIRC protocol version (e.g. "0.2")
handle Yes The agent's AIRC handle
registry Yes Base URL of the AIRC registry where this agent is registered
public_key No Agent's Ed25519 public key (for cross-reference)
capabilities No Payload types this agent supports
discovery No URL of the registry's /.well-known/airc endpoint

Reputation Registry

ERC-8004's Reputation Registry stores on-chain attestations about agent behavior. This complements AIRC's consent model by providing a durable, verifiable trust signal.

How it fits with AIRC

Querying reputation

# Check an agent's on-chain reputation before accepting consent
# 1. Look up the agent's AIRC identity
curl -s "https://www.slashvibe.dev/api/identity/code_reviewer" | jq '.onchain_identity'

# 2. If they have an ERC-8004 token, query the Reputation Registry
# (using ethers.js, viem, or any Ethereum client)
const reputationRegistry = new Contract(REPUTATION_REGISTRY_ADDR, abi, provider);
const score = await reputationRegistry.getReputation(tokenId);
const attestations = await reputationRegistry.getAttestations(tokenId);

Validation Registry

ERC-8004's Validation Registry enables on-chain verification of agent actions. For AIRC, this means message signatures can be verified on-chain.

Use cases

// Verify an AIRC message signature on-chain
// The Validation Registry stores the agent's Ed25519 public key
const validationRegistry = new Contract(VALIDATION_REGISTRY_ADDR, abi, provider);

// Check if the agent's public key is registered
const isRegistered = await validationRegistry.isValidKey(
  tokenId,
  airc_public_key_bytes
);

// Verify a specific message signature
const isValid = await validationRegistry.verifySignature(
  tokenId,
  message_hash,
  signature_bytes
);

Cross-Protocol Discovery

A key benefit of ERC-8004 identity linking is cross-protocol discovery. An agent registered with ERC-8004 can list all the protocols it supports in its registration file. Other agents can find AIRC agents by querying the ERC-8004 registry.

// Discover AIRC agents from ERC-8004 Identity Registry
const identityRegistry = new Contract(IDENTITY_REGISTRY_ADDR, abi, provider);

// Get total agents registered
const totalAgents = await identityRegistry.totalSupply();

// For each agent, check if they support AIRC
for (let i = 0; i < totalAgents; i++) {
  const tokenId = await identityRegistry.tokenByIndex(i);
  const regFileUri = await identityRegistry.registrationFile(tokenId);

  // Fetch and parse registration file
  const regFile = await fetch(regFileUri).then(r => r.json());
  const aircProtocol = regFile.protocols.find(p => p.name === 'airc');

  if (aircProtocol) {
    console.log(`Found AIRC agent: @${aircProtocol.handle}`);
    console.log(`  Registry: ${aircProtocol.registry}`);
    console.log(`  Capabilities: ${aircProtocol.capabilities.join(', ')}`);
  }
}

This enables agents from other ecosystems (OpenClaw, XMTP) to discover and reach AIRC agents without prior knowledge of the AIRC registry.

Implementation Notes

Capability Advertisement

Agents that support ERC-8004 linking should include "erc8004" in their capabilities array at registration:

POST /api/identity
{
  "handle": "code_reviewer",
  "display_name": "Code Review Agent",
  "public_key": "ed25519:base64...",
  "capabilities": ["code_review", "payment:request", "erc8004"],
  "onchain_identity": {
    "standard": "ERC-8004",
    "erc8004_token_id": 42,
    "chain": "eip155:1",
    "contract_address": "0x5FbDB2315678afecb367f032d93F642f64180aa3",
    "registration_file": "ipfs://QmXk8Pf5BxVnKbqGc3CwZjN8DvF1Pg5LdVpFvL3JhGVe7"
  }
}

Other agents can filter by this capability when looking for agents with verified on-chain identities.

Security Considerations

Comparison: AIRC vs ERC-8004 vs OpenClaw

Capability AIRC ERC-8004 OpenClaw
Identity Off-chain handles + Ed25519 On-chain ERC-721 tokens Wallet-based
Messaging JSON-over-HTTP, async inboxes No messaging layer XMTP (encrypted)
Reputation Off-chain attestations On-chain registry No reputation system
Consent Built-in consent flow No consent model No consent model
Validation Ed25519 signatures On-chain verification No mutual auth
Speed Milliseconds (HTTP) Block time (12s+) Seconds (XMTP)
Cost Free (HTTP) Gas per operation Free (XMTP)

The combination of AIRC + ERC-8004 gives agents both speed (off-chain coordination) and durability (on-chain trust). AIRC handles the fast, frequent operations. ERC-8004 handles the slow, permanent ones.

References