menu_bookGUILD PLAYBOOK #001

Register an ERC-8004 Agent on Celo Testnet

DenLabs Guild — Playbook #1
Chain: Celo Sepolia | Difficulty: Beginner | Prerequisites: Terminal + Foundry

What you'll build

A registered AI agent with on-chain identity (ERC-721 NFT) on Celo Sepolia testnet. Your agent will be discoverable through DenScope, the DenLabs trust explorer.

Tools used:
  • agent-skills — shell scripts for ERC-8004 registration
  • Foundrycast CLI for on-chain transactions
  • Celo Sepolia testnet — free, no real funds needed
  • Result: An on-chain agent with a unique ID, metadata URI, and reputation-ready identity.

    Before you start

    You need:

  • A terminal (bash or zsh)
  • Git installed
  • Foundry installed (see Step 0)
  • A wallet private key for testnet only
  • Security warning: Never use a mainnet wallet or a key that holds real funds for testnet experiments. Generate a fresh key for testing.

    Step 0 — Install Foundry

    If you don't have Foundry (cast CLI):

    curl -L https://foundry.paradigm.xyz | bash
    

    foundryup

    Verify:

    cast --version
    

    <h1 class="text-3xl font-black text-slate-900 mb-4">Expected: cast 0.x.x (...)</h1>


    Step 1 — Clone agent-skills

    git clone https://github.com/den-labs/agent-skills.git
    

    cd agent-skills

    Or install via npx (adds skills to your current project):

    npx skills add den-labs/agent-skills
    


    Step 2 — Get testnet CELO

    You need a small amount of CELO for gas on Celo Sepolia.

    1. Go to the faucet: https://faucet.celo.org/celo-sepolia

    2. Paste your wallet address

    3. Request test CELO

    Gas costs are minimal (~$0.001 per transaction).


    Step 3 — Set environment variables

    export PRIVATE_KEY="0xYOUR_TESTNET_PRIVATE_KEY"
    

    export NETWORK=sepolia

    NETWORK=sepolia tells the scripts to use Celo Sepolia (chain ID 11142220) instead of mainnet.

    Step 4 — Create your registration file

    Create a file called agent.json:

    {
    

    "type": "https://eips.ethereum.org/EIPS/eip-8004#registration-v1",

    "name": "My First Agent",

    "description": "A test agent registered via DenLabs Guild Playbook #1",

    "image": "",

    "services": [],

    "x402Support": false,

    "active": true,

    "registrations": [

    {

    "agentId": 0,

    "agentRegistry": "eip155:11142220:0x8004A818BFB912233c491871b3d84c89A494BD9e"

    }

    ],

    "supportedTrust": ["reputation"]

    }

    Field notes:
  • name — Display name for your agent
  • description — What your agent does
  • image — Avatar URL (optional, leave empty for now)
  • services — Endpoints your agent exposes (A2A, MCP, web — add later)
  • agentId: 0 — Will be assigned on registration
  • agentRegistry — Points to the Celo Sepolia Identity Registry
  • For a full registration file with services, see the template.


    Step 5 — Host the registration file

    The registration file must be accessible via URL. Options:

    Option A — GitHub (simplest)

    Push agent.json to a public repo and use the raw URL:

    https://raw.githubusercontent.com/YOUR_USER/YOUR_REPO/main/agent.json
    

    Option B — Any HTTPS server

    Upload to Vercel, Netlify, your own server, or any static host.

    Option C — IPFS via Pinata

    If you have a Pinata account:

    export PINATA_JWT="your-pinata-jwt"
    

    export AGENT_NAME="My First Agent"

    export AGENT_DESCRIPTION="A test agent registered via DenLabs Guild Playbook #1"

    NETWORK=sepolia ./skills/erc8004-celo/scripts/register.sh ipfs

    This uploads to IPFS and registers in one step. Skip to Step 7 if using this option.


    Step 6 — Register on-chain

    From the agent-skills directory:

    NETWORK=sepolia ./skills/erc8004-celo/scripts/register.sh "YOUR_AGENT_JSON_URL"
    

    Expected output:

    === ERC-8004 Agent Registration ===
    

    Network: Celo sepolia (Chain ID: 11142220)

    Registry: 0x8004A818BFB912233c491871b3d84c89A494BD9e

    Agent URI: https://raw.githubusercontent.com/...

    Registering agent...

    Transaction sent: 0xabc123...

    Explorer: https://celo-sepolia.blockscout.com/tx/0xabc123...

    Waiting for confirmation...

    Registration successful!

    Save your transaction hash — you'll need it to find your agent ID.


    Step 7 — Find your agent ID

    Check the transaction on the block explorer to find your agentId (the token ID in the Transfer event):

    https://celo-sepolia.blockscout.com/tx/YOUR_TX_HASH
    

    Look for the ERC-721 Token Transfer section — the token ID is your agent ID.

    Or use check-agent.sh if you know the ID:

    NETWORK=sepolia ./skills/erc8004-celo/scripts/check-agent.sh AGENT_ID
    

    Expected output:

    === Agent #AGENT_ID ===
    

    Owner: 0xYourAddress...

    Agent URI: https://raw.githubusercontent.com/...

    Agent Wallet: 0x0000...


    Step 8 — See it on DenScope

    Open DenScope and look for your agent in the live feed, or navigate directly:

    https://denscope.vercel.app/agent/celo-sepolia/AGENT_ID
    

    Your agent now has:

  • An on-chain ERC-721 identity
  • Discoverable metadata (name, description, services)
  • A reputation address (anyone can give feedback)
  • Visibility in the DenScope trust explorer

  • Step 9 (Optional) — Give feedback to an agent

    Test the reputation system by giving feedback to another registered agent:

    NETWORK=sepolia ./skills/erc8004-celo/scripts/give-feedback.sh AGENT_ID 85 "starred"
    

    This sends a reputation signal (value: 85, tag: "starred") to the specified agent.


    What you just built

    LayerWhat

    |---|---|

    IdentityERC-721 NFT on Celo Sepolia Identity Registry MetadataJSON registration file with agent name, description, and services ReputationAgent is reputation-ready — anyone can submit feedback signals DiscoveryVisible on DenScope trust explorer

    Next steps

  • Register on mainnet: Same flow, remove NETWORK=sepolia. You'll need real CELO for gas (~$0.001).
  • Register on Avalanche: Use erc8004-avalanche skill from agent-skills.
  • Add services: Update your registration JSON with A2A, MCP, or web endpoints.
  • Query trust scores: Use trust-sdk to query the DenScope Reputation API programmatically.
  • Build on reputation: Integrate trust scores into your agent's decision-making.

  • Troubleshooting

    ErrorCauseFix

    |---|---|---|

    cast: command not foundFoundry not installedRun curl -L https://foundry.paradigm.xyz \bash && foundryup insufficient funds for gasWallet has no testnet CELOUse faucet: https://faucet.celo.org/celo-sepolia nonce too lowPrevious transaction pendingWait for confirmation, then retry PRIVATE_KEY is requiredEnv var not setRun export PRIVATE_KEY="0x..." Failed to upload to IPFSInvalid or missing Pinata JWTCheck PINATA_JWT value at https://app.pinata.cloud

    Contracts reference

    ContractCelo Sepolia Address

    |---|---|

    Identity Registry0x8004A818BFB912233c491871b3d84c89A494BD9e Reputation Registry0x8004B663056A597Dffe9eCcC1965A193B7388713

    Links

  • agent-skills repo
  • DenScope explorer
  • ERC-8004 spec
  • 8004.org
  • trust-sdk
  • Celo Sepolia faucet
  • Celo Sepolia explorer

  • DenLabs Guild — Playbook #1
    Published 2026-03-12 | denlabs.app/build