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:cast CLI for on-chain transactionsBefore you start
You need:
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 agentdescription — What your agent doesimage — Avatar URL (optional, leave empty for now)services — Endpoints your agent exposes (A2A, MCP, web — add later)agentId: 0 — Will be assigned on registrationagentRegistry — Points to the Celo Sepolia Identity RegistryFor 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 PinataIf 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:
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
|---|---|
Next steps
NETWORK=sepolia. You'll need real CELO for gas (~$0.001).erc8004-avalanche skill from agent-skills.Troubleshooting
|---|---|---|
cast: command not foundcurl -L https://foundry.paradigm.xyz \insufficient funds for gasnonce too lowPRIVATE_KEY is requiredexport PRIVATE_KEY="0x..."Failed to upload to IPFSContracts reference
|---|---|
0x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B7388713Links
DenLabs Guild — Playbook #1
Published 2026-03-12 | denlabs.app/build