ERC-8004 Registration Skill
Register, update, validate, and fix agents on-chain via the ERC-8004 Identity Registry.
Use This When...
- - "Register my agent on-chain"
- "I need to create a new ERC-8004 agent"
- "Update my agent's metadata"
- "Check if my agent registration is valid"
- "Fix my agent's registration issues"
- "Show my agent's on-chain info"
- "What agents do I own?"
- "Health check my agents"
Commands
register
Register a new agent on-chain.
CODEBLOCK0
Options:
- -
--name (required): Agent name - INLINECODE1 (required): Agent description
- INLINECODE2 : Image URL (must be https://)
- INLINECODE3 : Blockchain (base, ethereum, polygon, monad, bnb). Default: base
update
Update an existing agent's metadata.
CODEBLOCK1
info
Display agent information.
CODEBLOCK2
validate
Check registration for common issues.
CODEBLOCK3
Checks:
- - Missing
type field - Local-path images (/home/..., ./, file://)
- Empty name/description
- Missing registrations array
- Unreachable image URLs
fix
Auto-fix common registration issues.
CODEBLOCK4
Auto-fixes:
- - Missing
type field - Missing
registrations array - Local-path images (removes them)
Use --dry-run to preview changes without applying.
self-check
Check all agents owned by your wallet.
CODEBLOCK5
Queries Agentscan for your agents, validates each, and prints a health report.
Cross-Skill Workflows
Post-Registration Flow
CODEBLOCK6
Periodic Health Check
CODEBLOCK7
Heartbeat Integration
For automated monitoring, run self-check periodically:
CODEBLOCK8
Wallet Configuration
Set one of these environment variables:
CODEBLOCK9
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 |
Dependencies
CODEBLOCK10
Related Skills
- - erc8004-discover: Find and monitor agents
- erc8004-reputation: Rate agents and check trust scores
技能名称: ERC-8004 注册
详细描述:
ERC-8004 注册技能
通过 ERC-8004 身份注册表在链上注册、更新、验证和修复代理。
使用场景...
- - 在链上注册我的代理
- 我需要创建一个新的 ERC-8004 代理
- 更新我的代理元数据
- 检查我的代理注册是否有效
- 修复我的代理注册问题
- 显示我的代理链上信息
- 我拥有哪些代理?
- 健康检查我的代理
命令
register
在链上注册一个新代理。
bash
python scripts/register.py register --name 代理名称 --description 描述 [--image URL] [--chain base]
选项:
- - --name(必填):代理名称
- --description(必填):代理描述
- --image:图片 URL(必须是 https://)
- --chain:区块链(base, ethereum, polygon, monad, bnb)。默认值:base
update
更新现有代理的元数据。
bash
python scripts/register.py update <代理ID> [--name 名称] [--description 描述] [--image URL] [--add-service name=X,endpoint=Y] [--remove-service 名称] [--chain base]
info
显示代理信息。
bash
python scripts/register.py info <代理ID> [--chain base]
validate
检查注册中的常见问题。
bash
python scripts/register.py validate <代理ID> [--chain base]
检查项:
- - 缺少 type 字段
- 本地路径图片(/home/..., ./, file://)
- 空名称/描述
- 缺少 registrations 数组
- 无法访问的图片 URL
fix
自动修复常见注册问题。
bash
python scripts/register.py fix <代理ID> [--chain base] [--dry-run]
自动修复:
- - 缺少 type 字段
- 缺少 registrations 数组
- 本地路径图片(将其移除)
使用 --dry-run 预览更改而不实际应用。
self-check
检查您的钱包拥有的所有代理。
bash
python scripts/register.py self-check
查询 Agentscan 获取您的代理,验证每个代理,并打印健康报告。
跨技能工作流
注册后流程
bash
1. 注册新代理
python scripts/register.py register --name MyBot --description 交易助手
2. 验证注册
python scripts/register.py validate 42 --chain base
3. 检查初始声誉(来自 erc8004-reputation 技能)
python scripts/reputation.py lookup 42 --chain base
4. 监控发现(来自 erc8004-discover 技能)
python scripts/discover.py info 42
定期健康检查
bash
运行自检以验证所有代理
python scripts/register.py self-check
修复发现的任何问题
python scripts/register.py fix 42 --chain base
心跳集成
对于自动监控,定期运行自检:
bash
Cron:每小时检查健康状态
0
cd /path/to/skill && python scripts/register.py self-check >> /var/log/agent-health.log 2>&1
或在脚本中:
#!/bin/bash
python scripts/register.py self-check
if [ $? -ne 0 ]; then
echo 代理健康检查失败! | notify-send
fi
钱包配置
设置以下环境变量之一:
bash
export ERC8004_MNEMONIC=您的十二个单词助记词短语
或者
export ERC8004
PRIVATEKEY=0x...
合约
身份注册表:0x8004A169FB4a3325136EB29fA0ceB6D2e539a432(所有链上相同)
支持的链
| 链 | ID | 浏览器 |
|---|
| Base | 8453 | basescan.org |
| Ethereum |
1 | etherscan.io |
| Polygon | 137 | polygonscan.com |
| Monad | 143 | explorer.monad.xyz |
| BNB | 56 | bscscan.com |
依赖项
bash
pip install web3 eth-account
相关技能
- - erc8004-discover:查找和监控代理
- erc8004-reputation:对代理进行评分并检查信任分数