Skip to content

Add registering-an-erc-8004-agent-on-base skill#38

Open
xam-dev-ux wants to merge 3 commits into
base:masterfrom
xam-dev-ux:add-erc-8004-identity-skill
Open

Add registering-an-erc-8004-agent-on-base skill#38
xam-dev-ux wants to merge 3 commits into
base:masterfrom
xam-dev-ux:add-erc-8004-identity-skill

Conversation

@xam-dev-ux
Copy link
Copy Markdown

Closes #36

Summary

Adds registering-an-erc-8004-agent-on-base skill — a behavioral, phase-based registration flow for the ERC-8004 Identity Registry on Base Mainnet and Sepolia, following the same agent-behavioral pattern as registering-agent-base-dev.

Motivation

AI coding agents consistently produce wrong information about ERC-8004: stale contract addresses, treating the three registries as one contract, confusing agentId (an ERC-721 tokenId) with wallet addresses. A skill with the canonical addresses and a "you MUST load this skill" signal in the description fixes this at the routing layer before a wrong call gets made.

ERC-8004 is co-authored by Erik Reppel (Coinbase), Marco De Rossi (MetaMask), Davide Crapis (EF), and Jordan Ellis (Google). The Identity Registry is live on Base Mainnet with >256,000 agents registered. Contracts verified on-chain (version 2.0.0, "AgentIdentity" ERC-721) before opening this PR.

registering-agent-base-dev covers ERC-8021 (builder-code attribution) — a completely different standard. Zero overlap.

This was tested live on Base Sepolia before opening this PR

Full end-to-end flow executed against 0x8004A818BFB912233c491871b3d84c89A494BD9e:

  • balanceOf pre-flight check → 0 (no prior registration)
  • register() with no URI → agentId 6199 (from Registered event)
  • Built registration file JSON with real agentId, encoded as data:application/json;base64,...
  • setAgentURI(6199, dataURI) → confirmed on-chain
  • ownerOf(6199), tokenURI(6199) (decoded JSON), getAgentWallet(6199) — all read back correctly
  • balanceOf post-registration → 1

The EIP-712 typed data for setAgentWallet was verified against the contract source: AgentWalletSet(uint256 agentId, address newWallet, address owner, uint256 deadline) — the owner field is required and frequently missing from third-party documentation.

Scope

  • Pre-flight check before registering
  • Agent registration file schema (per ERC8004SPEC.md)
  • IPFS / HTTPS / data-URI hosting
  • register() overloads in viem + cast one-liners for both networks
  • setAgentURI() for post-mint URI updates
  • setAgentWallet() with correct EIP-712 typed data (EOA + ERC-1271)
  • Read paths: ownerOf, tokenURI, getAgentWallet
  • Key facts and out-of-scope notice

Out of scope

  • Reputation Registry — reserved for a sibling skill
  • Validation Registry — spec authors flag it as under active TEE community revision
  • x402 payment integration

Checklist

  • Scope approved in Proposal: add registering-an-erc-8004-agent-on-base skill #36
  • Frontmatter and structure match existing skills; behavioral pattern follows registering-agent-base-dev
  • Description optimised for skill triggering with "MUST load" signal
  • Contract addresses verified on-chain and against erc-8004/erc-8004-contracts README
  • Registration file schema verified against ERC8004SPEC.md
  • EIP-712 type hash verified against contract source
  • Full registration flow tested live on Base Sepolia (agentId 6199)
  • README "Available Skills" table updated
  • Single skill, single commit, no overlap with existing skills

@cb-heimdall
Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposal: add registering-an-erc-8004-agent-on-base skill

2 participants