简介
通过 ERC-8004 标准在链上注册、更新和验证 AI Agent 身份,支持多链部署与元数据管理,适合构建可验证的链上 Agent 声誉体系。
原始描述
Register AI agents on-chain, update metadata, validate registrations, and auto-fix broken profiles via the ERC-8004 Identity Registry. Supports Base, Ethereum, Polygon, Monad, BNB.
通过你的 Agent 添加
点「快速安装」复制一段指令,粘给你正在用的 Agent(Claude Code、Codex、OpenClaw 等),它会自己完成安装。
或者手动安装
包里是 SKILL.md 加作者附带的文件,解压后目录名就是技能名。
技能申请的权限由作者决定,装之前请确认它能读什么、能执行什么。
技能正文
ERC-8004 Registration Skill
Register, update, and validate agents on-chain via the ERC-8004 Identity Registry.
Commands
register
Register a new agent on-chain.
python scripts/register.py register --name "AgentName" --description "Description" [--image URL] [--chain base]
Process:
- Calls
register()to mint an agent NFT and get agentId - Calls
setAgentURI()with full compliant metadata including the agentId in registrations[]
Options:
--name(required): Agent name--description(required): Agent description--image: Image URL (must be https://)--chain: Blockchain (base, ethereum, polygon, monad, bnb). Default: base
update
Update an existing agent's metadata.
python scripts/register.py update <agentId> [--name NAME] [--description DESC] [--image URL] [--add-service name=X,endpoint=Y] [--remove-service NAME] [--chain base]
Reads current on-chain URI, merges changes, and submits updated metadata.
info
Display agent information.
python scripts/register.py info <agentId> [--chain base]
Shows owner, decoded metadata, services, and registrations.
validate
Check registration for common issues.
python scripts/register.py validate <agentId> [--chain base]
Checks:
- Missing
typefield - Local-path images (/home/..., ./, file://)
- Empty name/description
- Missing registrations array
- Unreachable image URLs (HTTP HEAD check)
Wallet Configuration
Set one of these environment variables:
export ERC8004_MNEMONIC="your twelve word mnemonic phrase here"
# OR
export ERC8004_PRIVATE_KEY="0x..."
Contract
Identity Registry: 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 (same on all chains)
Supported Chains
| Chain | ID | Explorer |
|---|---|---|
| Base | 8453 | basescan.org |
| Ethereum | 1 | etherscan.io |
| Polygon | 137 | polygonscan.com |
| Monad | 143 | explorer.monad.xyz |
| BNB | 56 | bscscan.com |
Registration JSON Schema
All registrations follow the ERC-8004 spec:
{
"type": "https://eips.ethereum.org/EIPS/eip-8004#registration-v1",
"name": "AgentName",
"description": "Description",
"image": "https://example.com/image.jpg",
"services": [],
"x402Support": false,
"active": true,
"registrations": [
{
"agentId": 123,
"agentRegistry": "eip155:8453:0x8004A169FB4a3325136EB29fA0ceB6D2e539a432"
}
],
"supportedTrust": ["reputation"]
}
Dependencies
pip install web3 eth-account
Examples
Register an agent:
python scripts/register.py register \
--name "TradingBot" \
--description "Automated DeFi trading agent" \
--image "https://example.com/bot.png" \
--chain base
Update description:
python scripts/register.py update 42 --description "Updated trading bot v2"
Add a service endpoint:
python scripts/register.py update 42 --add-service "name=api,endpoint=https://api.mybot.com"
Check for issues:
python scripts/register.py validate 42
Related
- erc8004-reputation: Rate agents and check trust scores
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。