Skip to content

Sperax/erc8004-agents

Repository files navigation


🧐 What Is ERC-8004?

ERC-8004 gives AI agents a portable, on-chain identity — like a passport for the agent economy.

It's a standard for discovering, choosing, and interacting with agents across organizational boundaries without pre-existing trust. No API keys. No vendor lock-in. Just smart contracts.

In plain English: Your AI agent gets an NFT (ERC-721) that says who it is, what it can do, and where to reach it. Anyone can verify it on-chain. Forever.

New to Web3? Start with our What Is ERC-8004? guide — written in plain English.

Why ERC-8004?

Problem Solution
Agents can't prove who they are On-chain identity via ERC-721 NFT
No standard way to discover agents Three registries — Identity, Reputation, Validation
Trust requires centralized directories Trustless verification on any EVM chain
Agent metadata disappears when hosts go down Immutable on-chain storage (base64 data URIs)
No interoperability between agent protocols Multi-protocol — A2A, MCP, OASF, ENS, DID

⚡ Quick Start

Option 1: Just use it (recommended)

Visit erc8004.agency → Connect wallet → Select chain → Create agent → Done.

Option 2: Run locally

git clone https://github.com/sperax/erc8004-agent-creator.git
cd erc8004-agent-creator
open index.html
# That's literally it. No npm. No build. No config.

Option 3: Self-host

Drop index.html on Vercel, Netlify, GitHub Pages, IPFS, or any static host. One file.

📚 Full setup guide: Getting Started


✨ Features

🔗 Multi-Chain & Wallet Support

  • 22 EVM chains — BSC, Ethereum, Base, Arbitrum, Optimism, Polygon, Avalanche, Linea, Scroll, zkSync Era, Mantle, Fantom, Gnosis, Celo, Moonbeam
  • Beautiful chain selector with family grouping & search
  • EIP-6963 multi-wallet detection (MetaMask, Coinbase, Rainbow, Rabby, Brave)
  • Testnet & mainnet with safety warnings
  • One-click network switching

🧙 Step-by-Step Wizard

  • Agent identity (name, description, image)
  • Multi-service endpoints (A2A, MCP, OASF, ENS, DID)
  • Trust model configuration
  • x402 payment configuration
  • Review & deploy with gas estimate
  • On-chain metadata key-value editor with presets

📦 Storage & Export Options

  • On-chain URI (base64 data URI — no hosting)
  • IPFS and HTTPS support
  • Export as raw JSON
  • Export as .well-known/agent-card.json
  • Copy CLI registration command
  • Generate embeddable HTML badge

📊 Agent Dashboard & Analytics

  • View all registered agents per chain
  • Agent analytics (total agents, services, x402 status)
  • Click-through agent detail modal
  • Update agent URI (setURI flow)
  • Direct block explorer links

🔍 Search & Discovery

  • Search agents by ID, name, or address
  • Filter by service type (A2A, MCP, OASF, x402)
  • View agent details with full metadata
  • Browse agents registered on any chain

⭐ Reputation System

  • View reputation scores for any agent
  • Submit star ratings (1-5) with comments
  • Reputation history timeline
  • Average score & approval percentage

📋 Agent Templates

  • 6 pre-built templates — DeFi Trading, Customer Support, Code Review, Data Analysis, Content Creator, Research Assistant
  • One-click auto-fill with sensible defaults
  • Template gallery with descriptions
  • Instant customization after applying

🚀 Batch Registration

  • Register multiple agents in one session
  • CSV and JSON file import
  • Drag-and-drop file upload
  • Progress tracker with per-agent status
  • Format guide with examples

📱 QR Code & Identity

  • Generate QR code for any agent's on-chain identity
  • Scannable link to block explorer
  • Downloadable PNG
  • Shareable agent links

🎨 UI & UX

  • Dark/Light mode toggle with persistent preference
  • Responsive design for mobile & desktop
  • Collapsible sections for progressive disclosure
  • Transaction history with local storage
  • Professional, uncluttered interface

💳 x402 Payment Support

  • Configure x402 micropayment endpoints
  • Set price per request
  • Configure accepted tokens
  • x402 badge on enabled agents

📜 Transaction History

  • All past registrations & updates
  • Per-chain filtering
  • Block explorer links
  • Gas usage tracking
  • Timestamps & agent names

🌐 Supported Chains

Testnets

Chain Chain ID Native Token Faucet
BSC Testnet 97 tBNB bnbchain.org
Ethereum Sepolia 11155111 ETH sepoliafaucet.com
Base Sepolia 84532 ETH coinbase.com
Arbitrum Sepolia 421614 ETH
Optimism Sepolia 11155420 ETH
Polygon Amoy 80002 POL faucet.polygon.technology
Avalanche Fuji 43113 AVAX faucet.avax.network

Mainnets

Chain Chain ID Native Token Explorer
BSC Mainnet 56 BNB bscscan.com
Ethereum 1 ETH etherscan.io
Base 8453 ETH basescan.org
Arbitrum One 42161 ETH arbiscan.io
Optimism 10 ETH optimistic.etherscan.io
Polygon 137 POL polygonscan.com
Avalanche C-Chain 43114 AVAX snowtrace.io
Linea 59144 ETH lineascan.build
Scroll 534352 ETH scrollscan.com
zkSync Era 324 ETH explorer.zksync.io
Mantle 5000 MNT explorer.mantle.xyz
Fantom 250 FTM ftmscan.com
Gnosis 100 xDAI gnosisscan.io
Celo 42220 CELO celoscan.io
Moonbeam 1284 GLMR moonbeam.moonscan.io

📜 Contract Addresses

Testnet Contracts (Shared across all testnets)

Contract Address
IdentityRegistry 0x8004A818BFB912233c491871b3d84c89A494BD9e
ReputationRegistry 0x8004B663056A597Dffe9eCcC1965A193B7388713
ValidationRegistry 0x8004Cb1BF31DAf7788923b405b754f57acEB4272

Mainnet Contracts (Shared across all mainnets)

Contract Address
IdentityRegistry 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432
ReputationRegistry 0x8004BAa17C55a88189AE136b182e5fdA19dE9b63

All contracts use CREATE2 vanity deployment with 0x8004 prefix via the SAFE Singleton Factory, ensuring identical addresses across all chains.


🏗️ How It Works

┌──────────────────────────────────────────────────────────────┐
│                    ERC-8004 Agent Creator                     │
│                                                              │
│  ┌──────────┐  ┌──────────┐  ┌──────────┐  ┌──────────┐    │
│  │ 1. Agent  │→ │2. Service│→ │3. Config │→ │4. Deploy │    │
│  │ Identity  │  │Endpoints │  │  & Trust │  │ On-Chain │    │
│  └──────────┘  └──────────┘  └──────────┘  └──────────┘    │
│       │                                          │           │
│       ▼                                          ▼           │
│  Name, Desc,                              register() call    │
│  Image URL                                on IdentityRegistry│
│                                                │             │
│                                                ▼             │
│                                     ERC-721 NFT minted       │
│                                     to your wallet           │
│                                                              │
│  ┌─────────────────────────────────────────────────────┐     │
│  │ 22 EVM Chains · Templates · Batch · x402 · QR · ★  │     │
│  └─────────────────────────────────────────────────────┘     │
└──────────────────────────────────────────────────────────────┘
  1. Select chain — Choose from 22 EVM networks (testnets & mainnets)
  2. Connect wallet — MetaMask, Coinbase, Rainbow, Rabby, or any EIP-6963 wallet
  3. Fill in agent details — Or use a pre-built template
  4. Configure trust models — Reputation, crypto-economic, TEE attestation, x402 payments
  5. Deploy on-chain — Calls register() on the ERC-8004 IdentityRegistry
  6. Get your Agent ID — An ERC-721 NFT minted to your address, with QR code
📄 Example registration JSON — Click to expand
{
  "type": "https://eips.ethereum.org/EIPS/eip-8004#registration-v1",
  "name": "My AI Agent",
  "description": "An agent that does amazing things",
  "image": "https://example.com/avatar.png",
  "services": [
    {
      "name": "A2A",
      "endpoint": "https://agent.example/.well-known/agent-card.json",
      "version": "0.3.0"
    },
    {
      "name": "MCP",
      "endpoint": "https://mcp.agent.example/",
      "version": "2025-06-18"
    }
  ],
  "x402Support": true,
  "x402": {
    "paymentEndpoint": "https://pay.agent.example/x402",
    "pricePerRequest": "0.001",
    "acceptedTokens": ["USDC", "native"]
  },
  "active": true,
  "registrations": [
    {
      "agentId": 42,
      "agentRegistry": "eip155:97:0x8004A818BFB912233c491871b3d84c89A494BD9e"
    }
  ],
  "supportedTrust": ["reputation", "crypto-economic"]
}

🛠️ Tech Stack

Component Choice Why
Build system None Just open the file
Dependencies Zero Nothing to install or update
Framework Vanilla JS No React, Vue, or Angular
Blockchain Ethers.js v6 (CDN) Industry standard, loaded on demand
Fonts Inter + JetBrains Mono Google Fonts CDN
Styling CSS Custom Properties Dark/Light mode theming
File count 1 Single index.html — that's the whole app
Wallet detection EIP-6963 Auto-discovers all injected wallets
QR codes QR Server API No library needed

📖 Documentation

Guide For Description
What Is ERC-8004? Everyone Plain-English explainer
Getting Started Beginners 5-minute first agent
Architecture Developers Smart contract design
Contracts Developers All deployed addresses (22 chains)
Examples Everyone Beginner → advanced recipes
Tutorials Everyone Step-by-step guides
Integration Developers Embed, iframe, React hook
FAQ Everyone Common questions
Troubleshooting Everyone Problem solving

🔗 Links

▶ Live App erc8004.agency
📋 ERC-8004 Spec 8004.org
📦 Contracts Repo erc-8004/erc-8004-contracts
🌟 Awesome ERC-8004 awesome-erc8004
🧾 First Testnet TX BscScan ↗

🤝 Contributing

Contributions welcome! Whether it's a bug fix, new feature, or documentation improvement.

  1. Fork the repo
  2. Create your branch: git checkout -b feat/my-improvement
  3. Commit: git commit -m "✨ feat: add amazing feature"
  4. Push: git push origin feat/my-improvement
  5. Open a Pull Request

📄 License

Apache 2.0 © nirholas


Built with 🔶 for the agent economy
Zero deps · Single file · 22 chains · On-chain forever · ERC-8004 standard


Found this useful? Star the repo!
It helps others discover ERC-8004 and keeps development active

Star on GitHub

About

Create and register ERC-8004 trustless AI agents on any EVM chain — Ethereum, BNB Chain, Base, Arbitrum, Optimism, Polygon, and more. Zero-dependency standalone UI for on-chain agent identity registration, reputation, and validation. Mint ERC-721 NFT agent identities with metadata, service endpoints, A2A/MCP discovery, and x402 payment support.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors