Skip to content

Commit 6b50086

Browse files
authored
feat: add agent identity verification tool (ERC-8004) (#19)
## Summary Adds an agent identity and reputation verification tool using [ERC-8004](https://eips.ethereum.org/EIPS/eip-8004) on-chain identity registries. As agents interact with other agents (delegating tasks, purchasing services, sharing data), they need a way to verify who they're dealing with before transacting. This tool provides that trust layer. ## Tools **`verify_agent_identity`** — Full identity verification pipeline: 1. Queries the ERC-8004 registry for on-chain identity (ERC-721 token) 2. Checks reputation score against a configurable threshold 3. Verifies advertised capabilities match requirements 4. Detects revoked or expired identities 5. Returns a TRUST / REJECT / ERROR decision **`lookup_agent_reputation`** — Detailed reputation lookup: - Overall score and review counts - Category-level scores (accuracy, reliability, speed, cost) - Recent feedback entries with comments ## Pattern Same structure as `x402_payment_tool`: - `@register_function` with `FunctionBaseConfig` subclass - `nat.components` entry point registration - `react_agent` workflow config with NIM LLM - Mock server for e2e testing without blockchain access ## Testing Mock registry server includes 4 test agents: | Agent | Status | Reputation | |-------|--------|------------| | `0x1234...5678` | Registered | 87.5/100 | | `0xdead...beef` | Revoked | 12.0/100 | | `0xaaaa...aaaa` | Expired | N/A | | `0x0000...0000` | Not registered | N/A | ## Files ``` agent_identity_tool/ ├── README.md ├── pyproject.toml ├── .gitignore ├── scripts/ │ └── mock_registry_server.py └── src/nat_agent_identity/ ├── __init__.py ├── register.py └── configs/ └── identity-agent.example.yml ``` ## CI Pre-commit (yapf, ruff, uv-lock, markdown-link-check), Vale, and copyright checks all passing locally. ## Relationship to x402_payment_tool Pairs with the x402 payment tool for trust-then-transact workflows: verify an agent's identity and reputation first, then pay for their service. Authors: - AI Agent Economy (https://github.com/up2itnow0822) Approvers: - Will Killian (https://github.com/willkill07) URL: #19
1 parent f31dad6 commit 6b50086

8 files changed

Lines changed: 1047 additions & 0 deletions

File tree

ci/vale/styles/config/vocabularies/nemo-agent-toolkit-examples/accept.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
[Aa]gno
88
AIQ
99
API(s?)
10+
Arbitrum
1011
Arize
1112
arXiv
1213
[Aa]sync
@@ -23,6 +24,8 @@ arXiv
2324
[Cc]ategorizer
2425
[Cc]hatbot(s?)
2526
# clangd is never capitalized even at the start of a sentence https://clangd.llvm.org/
27+
[Bb]lockchain
28+
[Cc]ounterpart(y|ies)
2629
clangd
2730
CMake
2831
Coinbase
@@ -77,6 +80,7 @@ LangSmith
7780
libcudf
7881
LLM(s?)
7982
# https://github.com/logpai/loghub/
83+
[Ll]ookup(s?)
8084
Loghub
8185
Mem0
8286
matplotlib
@@ -96,6 +100,8 @@ NumPy
96100
openpyxl
97101
NVIDIA
98102
OAuth
103+
[Pp]ermissionless
104+
[Ss]ubtask(s?)
99105
URIs
100106
OTel
101107
onboarding
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Local config (copied from .example.yml)
2+
src/nat_agent_identity/configs/identity-agent.yml
3+
.venv/

0 commit comments

Comments
 (0)