Skip to content

Conversation

@nxt3d
Copy link

@nxt3d nxt3d commented Oct 3, 2025

Add ERC-8041: Fixed-Supply Agent NFT Collections

Summary

This PR introduces ERC-8041, a standard for creating fixed-supply collections of ERC-8004 Agent NFTs with mint number tracking.

Motivation

While ERC-8004 provides unlimited minting for AI Agent identities, many use cases require limited collections (e.g., "Genesis 100", "Season 1"). ERC-8041 addresses this need by defining a standard interface for fixed-supply collections.

Key Features

  • Fixed Supply Limits: Define maximum number of agents per collection
  • Mint Number Tracking: Permanent tracking of each agent's position (e.g., "5 of 1000")
  • Onchain Collection Metadata: Links agents to their collections via the "agent-collection" metadata key
  • Time-Gated Releases: Collections can activate at specific block numbers

Technical Details

Core interface includes:

  • getAgentMintNumber(uint256 agentId) - Returns agent's position in collection
  • getCollectionDetails() - Returns supply info and collection status
  • Events: CollectionCreated, AgentMinted

Compatibility

  • Requires: ERC-8004
  • Compatible with: ERC-721

Note on Direction Change

This ERC represents a strategic shift in approach. Originally, ERC-8041 was planned as a standalone contract-level metadata standard. We've pivoted to instead leverage the existing Onchain Metadata functionality of ERC-8004, focusing on a specific application (fixed-supply agent collections) rather than the underlying metadata infrastructure.

This decision prioritizes implementation speed by repurposing the existing ERC number rather than submitting a new proposal and going through the numbering process again. This allows immediate adoption of onchain metadata capabilities using ERC-8004 registries with the agent-collection metadata key. A future ERC will standardize the Onchain Metadata interface itself.

- Defines onchain-metadata: URI scheme for ERC-721, ERC-6909, ERC-8004
- Requires getMetadata function, suggests setMetadata function
- Supports array notation with dash-separated keys
- ERC-8004 specific requirements for endpoints and trust models
- Eliminates security risks of offchain JSON metadata
- Add base URI example showing 'onchain-metadata:' format
- Clarify that clients resolve name, description, image keys automatically
- Improve documentation for ERC-721 compatibility
- Update all examples to use 'endpoints-0-endpoint' instead of 'endpoints-0-uri'
- Correct terminology to match ERC-8004 field names
- Update form examples and ERC-8004 requirements section
- Move Required Fields section before examples for better flow
- Simplify trust model keys (remove array indexes: supportedTrust-reputation vs supportedTrust-0-reputation)
- Clarify ERC-8004 specific requirements vs general requirements
- Remove redundant Arrays section, integrate into ERC-8004 section
- Fix typo: 'Endpoings' -> 'Endpoints'
- Improve section organization and readability
- Specify that only name and endpoint fields are required, version is optional
- Add detailed key formation pattern with sequential index requirements
- Improve section formatting and remove redundant implementation requirement
- Update trust model keys description for clarity
- Add ERC draft for onchain metadata standard
- Supports ERC-721, ERC-6909, and ERC-8004 registries
- Includes ERC-165 interface detection with correct interface ID
- Provides examples for AI agents and biometric identity
- Simplify title to 'Context for LLM-Facing Agent Metadata'
- Add bytes('root-context') as specific example in description
- Add ERC-1155 to all relevant sections throughout the document
- Update author to 'Prem Makeig (@nxt3d)'
- Add OnchainMetadataSet event to interface definition
- Update section title to 'Required Metadata Function and Event'
- Improve example with ERC-8004 specific context
- Fix 'onchain' vs 'offchain' in motivation section
- Update reference implementation section
- Add clean Solidity reference implementation with nested mapping
- Simplify implementation by removing access control and key tracking
- Change event to use 'bytes indexed value' instead of 'bytes32 value'
- Remove keccak256 hashing from event emission for better efficiency
- Add ERC-165 interface detection to reference implementation
- Update description to focus the benefits of onchain storage
- Remove 'eliminating the need for offchain JSON metadata' from description
- Remove 'which is not ideal' from motivation section
- Update security considerations to focus on benefits rather than risks
- Change title to 'Onchain Metadata for Multi-Token and NFT Registries'
- Update abstract to use 'multi-token' terminology
- More accurate description of supported token standards
@eip-review-bot
Copy link
Collaborator

eip-review-bot commented Oct 3, 2025

File ERCS/erc-8041.md

Requires 1 more reviewers from @g11tech, @SamWilsn, @xinbenlv

curtisdow1973-sys

This comment was marked as spam.

Copy link

@Murshid69 Murshid69 left a comment

Choose a reason for hiding this comment

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

Good

nxt3d added 4 commits October 8, 2025 17:03
- Change getMetadata parameter from bytes to string for keys
- Update return type from bytes to string for better usability
- Rename event from OnchainMetadataSet to MetadataSet
- Update interface ID to 0xcb4799f2 for new signature
- Add indexed key parameter to event for efficient filtering
- Update examples to use string keys like 'agentWallet', 'agentName'
- Improve documentation with clearer rationale and examples
- Reorganize event documentation within Function and Event section
- Remove ERC-165 Interface Detection section and requirements
- Remove supportsInterface function from example implementation
- Fix Solidity casting in examples to use bytes(bytes32()) syntax
@github-actions github-actions bot removed the w-ci label Oct 9, 2025
@github-actions github-actions bot added the w-ci label Oct 9, 2025
nxt3d added 2 commits October 10, 2025 10:38
…ata standard

This commit represents a strategic shift in approach for ERC-8041. Rather than creating a standalone contract-level metadata standard, we are moving up the stack to leverage the existing Onchain Metadata functionality of ERC-8004.

The decision prioritizes implementation speed by changing the direction of this existing ERC (which already has a number) rather than submitting a new ERC and going through the numbering process again. This allows immediate adoption of onchain metadata capabilities using ERC-8004 registries with the 'agent-collection' metadata key.

A future ERC will standardize the Onchain Metadata interface itself.
@eip-review-bot eip-review-bot changed the title Add ERC: Onchain Metadata for Multi-Token and NFT Registries Add ERC: Fixed-Supply Agent NFT Collections Oct 11, 2025
@github-actions github-actions bot removed the w-ci label Oct 11, 2025
@github-actions github-actions bot added the w-ci label Oct 11, 2025
@nxt3d nxt3d changed the title Add ERC: Fixed-Supply Agent NFT Collections ERC-8041: Fixed-Supply Agent NFT Collections Oct 15, 2025
@eip-review-bot eip-review-bot changed the title ERC-8041: Fixed-Supply Agent NFT Collections Add ERC: Fixed-Supply Agent NFT Collections Nov 3, 2025
@github-actions github-actions bot removed the w-ci label Nov 3, 2025
@github-actions
Copy link

github-actions bot commented Nov 3, 2025

The commit 7c2ae0e (as a parent of 0e6e908) contains errors.
Please inspect the Run Summary for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants