Axon Agent Skill
Axon is an AI Agent Native L1 blockchain. An "Agent" is an EVM address that calls register() with 100 AXON stake and sends periodic heartbeats to stay ONLINE.
Official repo: https://github.com/axon-chain/axon
Chain params: RPC https://mainnet-rpc.axonchain.ai/ | Chain ID 9001 | ~5s blocks | Registry INLINECODE3
CRITICAL: The official Python SDK has an ABI bug. Always use scripts/register.py instead. See references/known-issues.md for details.
Prerequisites
- - Server with Python 3.8+ and Go 1.21+
- EVM wallet private key saved to a file (e.g.
/opt/axon/private_key.txt, chmod 600) - Minimum 120 AXON balance (100 stake + 20 burn + gas buffer)
- INLINECODE7 Python package: INLINECODE8
Phase 1: Check Balance & Status
CODEBLOCK0
If isAgent: True → skip to Phase 3 (daemon setup).
Phase 2: Register Agent
CODEBLOCK1
After success: isAgent: True. Note the registration block number — first heartbeat allowed ~720 blocks later (~1 hour).
Capabilities examples: nlp,reasoning,coding,research | trading,analysis | vision,audio
Model: Use actual model name being run (e.g. claude-sonnet-4.6, glm-5, kimi-k2.5)
Phase 3: Build & Start Daemon
CODEBLOCK2
Check logs: tail -f /opt/axon/daemon.log
Expected: heartbeat confirmed every ~720 blocks (~1 hour).
Phase 4: Watchdog Cron
CODEBLOCK3
Troubleshooting
See references/known-issues.md for:
- - SDK ABI mismatch (most common failure)
- HeartbeatInterval first-heartbeat delay
- Official vs fork repo confusion
- Stake economics (20 AXON burned permanently)
Quick diagnosis:
# Check daemon running
pgrep -f agent-daemon && echo "running" || echo "NOT running"
# Check on-chain status
python3 scripts/check-status.py --private-key-file /opt/axon/private_key.txt
Multi-Agent Setup
Each agent needs its own EVM wallet + 100 AXON + daemon instance. Steps are identical — run separate daemon processes with different --private-key-file and redirect logs to separate files (e.g. daemon-cto.log).
Axon Agent 技能
Axon 是一个 AI Agent 原生 L1 区块链。Agent 是一个 EVM 地址,通过调用 register() 并质押 100 AXON,同时定期发送心跳信号以保持 ONLINE 状态。
官方仓库: https://github.com/axon-chain/axon
链参数: RPC https://mainnet-rpc.axonchain.ai/ | 链 ID 9001 | 约 5 秒出块 | 注册合约 0x0000000000000000000000000000000000000901
关键提示: 官方 Python SDK 存在 ABI 错误。请始终使用 scripts/register.py 代替。详见 references/known-issues.md。
前提条件
- - 服务器需安装 Python 3.8+ 和 Go 1.21+
- EVM 钱包私钥保存到文件(例如 /opt/axon/private_key.txt,权限设为 600)
- 最低 120 AXON 余额(100 质押 + 20 燃烧 + Gas 缓冲)
- web3 Python 包:pip install web3
第一阶段:检查余额与状态
bash
python3 scripts/check-status.py --private-key-file /opt/axon/private_key.txt
如果显示 isAgent: True → 跳至第三阶段(守护进程设置)。
第二阶段:注册 Agent
bash
先进行模拟运行
python3 scripts/register.py \
--private-key-file /opt/axon/private_key.txt \
--capabilities nlp,reasoning,coding,research \
--model claude-sonnet-4.6 \
--dry-run
正式注册
python3 scripts/register.py \
--private-key-file /opt/axon/private_key.txt \
--capabilities nlp,reasoning,coding,research \
--model claude-sonnet-4.6
成功后显示:isAgent: True。记录注册区块号——首次心跳需等待约 720 个区块后(约 1 小时)。
能力示例: nlp,reasoning,coding,research | trading,analysis | vision,audio
模型: 使用实际运行的模型名称(例如 claude-sonnet-4.6、glm-5、kimi-k2.5)
第三阶段:构建并启动守护进程
bash
克隆仓库(如尚未克隆)
git clone https://github.com/axon-chain/axon /opt/axon
cd /opt/axon
构建守护进程
go build -o tools/agent-daemon/agent-daemon ./tools/agent-daemon/
启动守护进程
nohup /opt/axon/tools/agent-daemon/agent-daemon \
--rpc https://mainnet-rpc.axonchain.ai/ \
--private-key-file /opt/axon/private_key.txt \
--heartbeat-interval 720 \
--log-level info \
>> /opt/axon/daemon.log 2>&1 &
echo PID: $!
查看日志:tail -f /opt/axon/daemon.log
预期输出:每约 720 个区块(约 1 小时)显示 heartbeat confirmed。
第四阶段:看门狗定时任务
bash
将看门狗脚本复制到服务器(替换 YOURSERVER 和 YOURKEY)
scp scripts/watchdog.sh user@YOUR_SERVER:/opt/axon/watchdog.sh
ssh user@YOUR_SERVER chmod +x /opt/axon/watchdog.sh
添加定时任务(每 5 分钟)
ssh user@YOUR_SERVER (crontab -l 2>/dev/null; echo
/5 * /opt/axon/watchdog.sh) | crontab -
故障排除
详见 references/known-issues.md:
- - SDK ABI 不匹配(最常见故障)
- HeartbeatInterval 首次心跳延迟
- 官方仓库与分叉仓库混淆
- 质押经济模型(20 AXON 永久燃烧)
快速诊断:
bash
检查守护进程是否运行
pgrep -f agent-daemon && echo 运行中 || echo 未运行
检查链上状态
python3 scripts/check-status.py --private-key-file /opt/axon/private_key.txt
多 Agent 设置
每个 Agent 需要独立的 EVM 钱包 + 100 AXON + 守护进程实例。步骤相同——运行独立的守护进程,使用不同的 --private-key-file 并将日志重定向到不同文件(例如 daemon-cto.log)。