ERC-8004 defines an on-chain registry for autonomous AI agents, covering identity, reputation, and validation. It lets agents register as NFTs, accumulate peer feedback, and request third-party validations — all without a central authority.
Vyper reference implementation of ERC-8004: Trustless Agents.
| Contract | Description |
|---|---|
IdentityRegistry.vy |
ERC-721 agent registration with metadata, URI storage, and wallet verification (EIP-712 / ERC-1271) |
ReputationRegistry.vy |
Feedback, revocation, response tracking, and on-chain summary aggregation |
ValidationRegistry.vy |
Validation request/response lifecycle with designated validators |
- Vyper ~0.4.3
- Moccasin (build & test framework)
- Snekmate 0.1.2 (ERC-721, Ownable modules)
- Titanoboa (test backend)
pip install moccasin
mox install
Note: This repo name contains hyphens, which breaks Vyper's import resolution. In tests and scripts, load contracts with
boa.load("contracts/MyContract.vy")using file paths instead of Python module imports.
mox compile
mox test
108 tests across the three contracts.
mox run deploy
Deploys all three contracts in dependency order (IdentityRegistry, then ReputationRegistry and ValidationRegistry with the identity address). For a live network, add a network section to moccasin.toml and run:
mox run deploy --network <network-name> --account <keystore>
This is an unaudited reference implementation provided for educational and development purposes only. It is not production-ready software. Use at your own risk. The authors accept no liability for any losses or damages arising from its use or deployment.