Skip to main content

Overview

ERC-8004 defines an on-chain identity standard for AI agents. It allows agents to register their identity on a blockchain, providing verifiable, decentralized identity for agent-to-agent and agent-to-user interactions. aixyz supports ERC-8004 through two packages:
Packagenpm NameDescription
aixyz-erc-8004@aixyz/erc-8004Contract ABIs, deployed addresses, and Zod schemas
aixyz-cli-erc@aixyz/cli-ercCLI for registry operations (agently-cli)

Supported Networks

Mainnets: Ethereum, Base, Polygon, Scroll, Monad, BSC, Gnosis Testnets: Sepolia, Base Sepolia, Polygon Amoy, Scroll Sepolia, Monad Testnet, BSC Testnet

Register an Agent

Use agently-cli to register your agent on the IdentityRegistry:
agently-cli register --chain base-sepolia --broadcast
FlagDescription
--uriMetadata URI or local JSON file path
--chainmainnet, sepolia, base-sepolia, localhost
--rpc-urlCustom RPC endpoint
--keystoreEncrypted keystore file
--browserUse browser wallet (EIP-6963)
--broadcastSend transaction (default is dry-run)

Set Agent URI

Point your on-chain identity to your deployed agent’s discovery endpoint:
agently-cli set-agent-uri \
  --agent-id 1 \
  --uri "https://my-agent.vercel.app/.well-known/agent-card.json" \
  --broadcast

Programmatic Usage

Use the @aixyz/erc-8004 package to interact with the registry from code:
import { IdentityRegistryAbi, getIdentityRegistryAddress } from "@aixyz/erc-8004";
The package provides:
  • Contract ABIs — TypeScript-typed ABIs for use with viem, ethers, or wagmi
  • Deployed addresses — Known contract addresses across supported networks
  • Zod schemas — Validation schemas for registration data and agent URIs

Integration with aixyz

ERC-8004 identity complements the other protocols:
  • A2A — The agent card can reference an on-chain identity for verification
  • x402 — Payment gating tied to verified on-chain agent identities
  • MCP — Tool discovery backed by verifiable identity