Skip to content

feat: add agent identity verification tool (ERC-8004)#19

Open
up2itnow0822 wants to merge 2 commits intoNVIDIA:mainfrom
up2itnow0822:feat/agent-identity-tool
Open

feat: add agent identity verification tool (ERC-8004)#19
up2itnow0822 wants to merge 2 commits intoNVIDIA:mainfrom
up2itnow0822:feat/agent-identity-tool

Conversation

@up2itnow0822
Copy link
Copy Markdown
Contributor

Summary

Adds an agent identity and reputation verification tool using ERC-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.

Adds an agent identity and reputation verification tool for NeMo Agent
Toolkit using ERC-8004 on-chain identity registries.

Before an agent transacts with or delegates to another agent, this tool:
- Queries the ERC-8004 registry for on-chain identity (ERC-721 token)
- Checks reputation score against a configurable threshold
- Verifies advertised capabilities match requirements
- Detects revoked or expired identities
- Returns a TRUST/REJECT/ERROR decision

Two tools registered via @register_function:
- verify_agent_identity: Full identity + reputation + trust decision
- lookup_agent_reputation: Detailed scores and feedback history

Includes mock registry server with 4 test agents (trusted, revoked,
expired, unknown) for e2e testing without blockchain access.

Pairs with the x402_payment_tool for trust-then-transact workflows:
verify identity first, then pay for services.

Also adds blockchain, subtask, permissionless, counterparty, and lookup
to Vale's accept.txt for Web3/agent terminology.

Signed-off-by: up2itnow0822 <up2itnow0822@users.noreply.github.com>
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented Mar 21, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@up2itnow0822
Copy link
Copy Markdown
Contributor Author

Quick update: PR #17 (agent-wallet-sdk payment tools) has been merged and is working well in production. This PR (#19) extends that foundation with MCP-native payment capabilities. Happy to address any feedback from maintainers — let me know if there's anything needed to move this forward.

@willkill07 willkill07 added external This issue was filed by someone outside of the NeMo Agent toolkit team feature request New feature or request non-breaking Non-breaking change labels Mar 31, 2026
Comment thread examples/agent_identity_tool/README.md Outdated
Comment on lines +150 to +166
```
> Verify whether agent 0x1234567890abcdef1234567890abcdef12345678 is trustworthy
```

Expected: TRUST decision with 87.5 reputation score and market-data capabilities.

```
> Check the reputation of 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef
```

Expected: REJECT decision with 12.0 reputation and revoked identity.

```
> Is 0x0000000000000000000000000000000000000000 a registered agent?
```

Expected: REJECT with "No on-chain identity found."
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please include exact input and expected output running NeMo Agent Toolkit. This also helps show that you have validated that the agent runs e2e.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Will. Good call. I'll update the README to include the exact NeMo Agent Toolkit input, expected output, and the command flow used to validate the example end to end against the mock registry. That will make it clear the example was run and verified. Let me know if you need anything else.

@up2itnow0822 up2itnow0822 requested a review from a team as a code owner April 21, 2026 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external This issue was filed by someone outside of the NeMo Agent toolkit team feature request New feature or request non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants