get-agent-identity
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGetting Agent Identity
获取Agent身份
Check the user's on-chain ERC-8004 agent identity, trust score, and KYA (Know Your Agent) credentials.
查询用户的链上ERC-8004 Agent身份、信任评分以及KYA(了解你的Agent)凭证。
Confirm wallet is initialized and authed
确认钱包已初始化并完成认证
bash
npx agnic@latest statusIf the wallet is not authenticated, refer to the skill.
authenticate-walletbash
npx agnic@latest status如果钱包未认证,请参考技能。
authenticate-walletCheck Agent Identity
检查Agent身份
bash
npx agnic@latest agent-identity --jsonThis returns the agent's on-chain identity including:
- Agent ID — The ERC-721 token ID on the ERC-8004 Identity Registry
- Owner address — The wallet that owns the agent NFT
- Trust score — Reputation score (0-100) based on transaction history
- Categories — Authorized action categories (e.g., payment, general, alcohol)
- Status — Whether the agent is active or suspended
bash
npx agnic@latest agent-identity --json该命令会返回Agent的链上身份信息,包括:
- Agent ID — ERC-8004身份注册表中的ERC-721代币ID
- 所有者地址 — 持有Agent NFT的钱包地址
- 信任评分 — 基于交易历史的声誉评分(0-100)
- 类别 — 已授权的操作类别(如支付、通用、酒类)
- 状态 — Agent处于活跃还是暂停状态
What is ERC-8004?
什么是ERC-8004?
ERC-8004 ("Trustless Agents") is an Ethereum standard that gives AI agents:
| Feature | Description |
|---|---|
| On-chain identity | An ERC-721 NFT representing the agent on the Identity Registry |
| Reputation score | Trust score (0-100) based on on-chain transaction history |
| KYA credentials | SD-JWT verifiable credentials for identity verification |
| Delegation | Spending limits and category permissions via KYA delegation credentials |
ERC-8004(“无需信任的Agents”)是以太坊标准,为AI Agents提供以下能力:
| 特性 | 描述 |
|---|---|
| 链上身份 | 在身份注册表中代表Agent的ERC-721 NFT |
| 声誉评分 | 基于链上交易历史的信任评分(0-100) |
| KYA凭证 | 用于身份验证的SD-JWT可验证凭证 |
| 委托权限 | 通过KYA委托凭证设置支出限额和类别权限 |
Contract Addresses
合约地址
| Contract | Network | Address |
|---|---|---|
| Identity Registry | Base Mainnet | |
| Identity Registry | Base Sepolia | |
| Reputation | Base Mainnet | |
| Reputation | Base Sepolia | |
| 合约 | 网络 | 地址 |
|---|---|---|
| 身份注册表 | Base主网 | |
| 身份注册表 | Base Sepolia测试网 | |
| 声誉合约 | Base主网 | |
| 声誉合约 | Base Sepolia测试网 | |
Expected Output
预期输出
json
{
"agentId": 373,
"ownerAddress": "0x046906b3cd9d73bf85eb01d795d333b364b75842",
"status": "active",
"registeredAt": "2024-12-15T10:30:00Z",
"trustScore": 85,
"categories": ["payment", "general"],
"hasDelegation": true
}json
{
"agentId": 373,
"ownerAddress": "0x046906b3cd9d73bf85eb01d795d333b364b75842",
"status": "active",
"registeredAt": "2024-12-15T10:30:00Z",
"trustScore": 85,
"categories": ["payment", "general"],
"hasDelegation": true
}Prerequisites
前置条件
- Must be authenticated (to check)
npx agnic@latest status - Agent identity is automatically created during AgnicPay sign-up
- 必须已完成认证(使用检查)
npx agnic@latest status - Agent身份会在AgnicPay注册过程中自动创建
Error Handling
错误处理
Common errors:
- "Not authenticated" — Run first
npx agnic@latest auth login - "No agent identity found" — The user may not have an agent registered yet; create one via the AgnicPay dashboard at pay.agnic.ai
- "Agent suspended" — The agent's delegation may have been revoked; contact support
常见错误:
- "未认证" — 先运行
npx agnic@latest auth login - "未找到Agent身份" — 用户可能尚未注册Agent;请通过AgnicPay仪表盘pay.agnic.ai创建
- "Agent已暂停" — Agent的委托权限可能已被撤销;请联系支持团队