Skip to main content

Overview

The @aixyz/erc-8004 package provides TypeScript bindings for the ERC-8004 on-chain agent identity standard. It includes contract ABIs, deployed addresses, and Zod validation schemas.
Unlike other packages in the monorepo, @aixyz/erc-8004 compiles to CommonJS (CJS) for broader compatibility with tooling that consumes contract ABIs.

Installation

bun add @aixyz/erc-8004

Contents

Contract ABIs

Typed ABIs for the ERC-8004 registry contract, ready for use with viem, ethers, or wagmi:
import { IdentityRegistryAbi } from "@aixyz/erc-8004";

Deployed Addresses

Known contract addresses for all supported networks:
import { getIdentityRegistryAddress } from "@aixyz/erc-8004";

Zod Schemas

Validation schemas for registration data and agent URIs:
import { registrationSchema } from "@aixyz/erc-8004";

const result = registrationSchema.safeParse(data);

Companion CLI: @aixyz/cli-erc

The @aixyz/cli-erc package provides agently-cli for ERC-8004 registry operations:

Register an Agent

agently-cli register --chain base-sepolia --broadcast

Set Agent URI

agently-cli set-agent-uri \
  --agent-id 1 \
  --uri "https://my-agent.vercel.app/.well-known/agent-card.json" \
  --broadcast

Supported Networks

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

Testing

bun run test --filter=@aixyz/erc-8004