get-agent-identity

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Getting 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 status
If the wallet is not authenticated, refer to the
authenticate-wallet
skill.
bash
npx agnic@latest status
如果钱包未认证,请参考
authenticate-wallet
技能。

Check Agent Identity

检查Agent身份

bash
npx agnic@latest agent-identity --json
This 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:
FeatureDescription
On-chain identityAn ERC-721 NFT representing the agent on the Identity Registry
Reputation scoreTrust score (0-100) based on on-chain transaction history
KYA credentialsSD-JWT verifiable credentials for identity verification
DelegationSpending 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

合约地址

ContractNetworkAddress
Identity RegistryBase Mainnet
0x8004A169FB4a3325136EB29fA0ceB6D2e539a432
Identity RegistryBase Sepolia
0x8004A818BFB912233c491871b3d84c89A494BD9e
ReputationBase Mainnet
0x8004BAa17C55a88189AE136b182e5fdA19dE9b63
ReputationBase Sepolia
0x8004B663056A597Dffe9eCcC1965A193B7388713
合约网络地址
身份注册表Base主网
0x8004A169FB4a3325136EB29fA0ceB6D2e539a432
身份注册表Base Sepolia测试网
0x8004A818BFB912233c491871b3d84c89A494BD9e
声誉合约Base主网
0x8004BAa17C55a88189AE136b182e5fdA19dE9b63
声誉合约Base Sepolia测试网
0x8004B663056A597Dffe9eCcC1965A193B7388713

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 (
    npx agnic@latest status
    to check)
  • Agent identity is automatically created during AgnicPay sign-up
  • 必须已完成认证(使用
    npx agnic@latest status
    检查)
  • Agent身份会在AgnicPay注册过程中自动创建

Error Handling

错误处理

Common errors:
  • "Not authenticated" — Run
    npx agnic@latest auth login
    first
  • "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的委托权限可能已被撤销;请联系支持团队