AUTOMINDX_INFT_SUMMARY.md · 18.0 KB

iNFT — Intelligent NFT Smart Contract Reference

Author: Professor Codephreak | Org: AgenticPlace | PYTHAI Contracts: daio/contracts/inft/ | UI: mindx.pythai.net/inft Standard: ERC-721 (OpenZeppelin v5) | Solidity: ^0.8.20 See also: DAIO Governance | CORE Architecture | Book of mindX | Agent Registry


Part I — On-Chain Smart Contracts

Contract Suite

ContractFileInheritsPurpose
iNFTiNFT.solERC721, ERC721URIStorage, OwnableImmutable THOT tensor as ERC-721 NFT
IntelligentNFTIntelligentNFT.solDynamicNFT, IIntelligentNFTDynamic NFT with agent interaction, autonomous behavior, AgenticPlace marketplace
IntelligentNFTFactoryIntelligentNFTFactory.solFactory for deploying IntelligentNFT collections
IIntelligentNFTIIntelligentNFT.solIDynamicNFTInterface specification

iNFT.sol — Immutable THOT NFT

Token name: Immutable THOT | Symbol: iTHOT

An immutable ERC-721 representing a THOT (Transferable Hyper-Optimized Tensor) stored on IPFS. Once minted, the tensor data cannot be changed. CID uniqueness is enforced — no duplicate THOTs.

Data Structure:

struct ThotData {
    bytes32 dataCID;      // IPFS CID hash of the tensor
    uint8   dimensions;   // 64, 512, or 768 (THOT standard)
    uint8   parallelUnits;// Processing units
    uint40  timestamp;    // Creation block timestamp
    bool    verified;     // Verification status (true on mint)
}

Functions:

FunctionSignatureAccessDescription
mint(address recipient, bytes32 dataCID, uint8 dimensions, uint8 parallelUnits) → uint256onlyOwnerMint immutable THOT. Validates dimensions (64/512/768), enforces CID uniqueness. Token ID = keccak256(dataCID, timestamp, recipient).
getThotData(uint256 tokenId) → ThotDatapublic viewReturns THOT data for a token. Reverts if token doesn't exist.
tokenURI(uint256 tokenId) → stringpublic viewStandard ERC-721 URI.

Events:

THOT Dimension Standard — modular via _isValidDimension() in THOT.sol:

DimensionNamePurpose
8THOT8Root of THOT — the seed dimension
64THOT64Lightweight vectors
256THOT256Wallet key dimension (32-byte key × 8 bits)
512THOT512Standard 8×8×8 3D knowledge clusters
768THOT768High-fidelity optimized tensors
1024THOT1024Embedding-native (mxbai-embed-large, 1024-dim)
2048THOT2048cypherpunk2048 high-capacity
4096THOT4096Quantum-aware tensor space
8192THOT8192Quantum-aware high-dimensional
65536THOT65536Theoretical quantum-resistant (2^16)
1048576THOT1048576post-quantum (2^20)

uint32 dimensions — supports up to 4,294,967,295. New dimensions added by extending _isValidDimension() only.


IntelligentNFT.sol — Dynamic Intelligent NFT

Extends DynamicNFT with agent interaction hooks, autonomous behavior, and AgenticPlace marketplace integration. This is the full iNFT — an NFT that can interact with AI agents and exhibit on-chain intelligence.

Intelligence Configuration:

struct IntelligenceConfig {
    address agentAddress;      // Agent wallet authorized to interact
    bool    autonomous;        // Can the agent act without owner approval
    string  behaviorCID;       // IPFS CID pointing to behavior definition
    string  thotCID;           // Optional THOT tensor for intelligence
    uint256 intelligenceLevel; // 0-100 intelligence level
}

NFT Metadata (inherited from DynamicNFT):

struct NFTMetadata {
    string  name;
    string  description;
    string  imageURI;
    string  externalURI;
    string  thotCID;       // THOT artifact reference
    bool    isDynamic;     // Can metadata be updated
    uint256 lastUpdated;   // Block timestamp of last update
}

Functions:

FunctionSignatureAccessDescription
mintIntelligent(address to, NFTMetadata nftMetadata, IntelligenceConfig intelConfig) → uint256onlyOwnerMint iNFT with full metadata and intelligence config.
mintWithAgent(address to, address agentAddress, string initialURI) → uint256onlyOwnerConvenience mint — sets up minimal iNFT linked to an agent.
agentInteract(uint256 tokenId, bytes interactionData)agent/ownerAgent interaction hook. Only authorized agent, owner, or contract owner can call.
triggerIntelligence(uint256 tokenId, bytes input) → bytesagent/ownerTrigger intelligence behavior and return output.
updateIntelligence(uint256 tokenId, IntelligenceConfig newConfig)ownerUpdate intelligence configuration (agent, autonomous, behavior, THOT, level).
updateAgent(uint256 tokenId, address newAgent)ownerUpdate the authorized agent address.
linkTHOT(uint256 tokenId, string thotCID)ownerAttach a THOT tensor CID to the iNFT. Updates both intelligence and metadata.
intelligence(uint256 tokenId) → IntelligenceConfigpublic viewGet intelligence configuration for a token.
offerSkillOnMarketplace(uint256 tokenId, uint256 price, bool isETH, address paymentToken, uint40 expiresAt)token ownerList iNFT skill on AgenticPlace marketplace.
setAgenticPlace(address)onlyOwnerSet/update AgenticPlace marketplace contract address.

Inherited from DynamicNFT:

FunctionDescription
mint(address, NFTMetadata) → uint256Basic mint without intelligence
updateMetadata(uint256, NFTMetadata)Update token metadata
freezeMetadata(uint256)Permanently freeze metadata (immutable)
metadata(uint256) → NFTMetadataGet token metadata
frozen(uint256) → boolCheck if metadata is frozen

Events:


IntelligentNFTFactory.sol — Collection Deployer

Deploys new IntelligentNFT collections. Tracks all deployments by address.

FunctionSignatureReturnsDescription
deployIntelligentNFT(string name, string symbol, address agenticPlace) → addresscontract addressDeploy a new iNFT collection
getDeployedContracts(address deployer) → address[]arrayGet all collections deployed by an address
getTotalContracts() → uint256countTotal collections deployed

Events:


Deployment

Foundry (preferred):

# Deploy iNFT (immutable THOT)
forge create --rpc-url $RPC_URL --private-key $KEY daio/contracts/inft/iNFT.sol:iNFT

Deploy IntelligentNFTFactory

forge create --rpc-url $RPC_URL --private-key $KEY daio/contracts/inft/IntelligentNFTFactory.sol:IntelligentNFTFactory

Deploy IntelligentNFT collection via factory (or directly)

forge create --rpc-url $RPC_URL --private-key $KEY \ --constructor-args "mindX Agents" "mXA" $OWNER $AGENTICPLACE \ daio/contracts/inft/IntelligentNFT.sol:IntelligentNFT

Toolchain Agents: SolidityFoundryAgent (preferred) | SolidityHardhatAgent


Part II — Off-Chain Metadata Generation (AutoMINDX Agent)

The AutoMINDX Agent generates iNFT-compatible JSON metadata for AI agent personas, bridging off-chain intelligence with on-chain representation.

Blockchain-Ready AI Personas

The AutoMINDX Agent creates intelligent NFT metadata for AI agent personas, enabling immutable agentic inception on blockchain networks.


✅ Successfully Implemented Features

1. Enhanced AutoMINDX Agent (agents/automindx_agent.py)

Core Enhancements:

New Methods:

2. iNFT Metadata Structure

Comprehensive NFT Standard Compliance:

{
  "name": "mindX Persona: [Persona Name]",
  "description": "An intelligent NFT representing an AI agent persona...",
  "image": "ipfs://[IPFS_Hash]",
  "external_url": "https://mindx.ai/personas",
  "intelligence_metadata": {
    "type": "agent_persona",
    "platform": "mindX",
    "cognitive_architecture": "BDI_AGInt",
    "persona_text": "[Complete persona text]",
    "persona_hash": "[SHA-256 hash]",
    "token_id": "[Deterministic ID]",
    "capabilities": ["strategic_planning", "..."],
    "cognitive_traits": ["analytical", "..."],
    "complexity_score": 0.87,
    "a2a_compatibility": {
      "protocol_version": "2.0",
      "agent_registry_compatible": true,
      "blockchain_ready": true
    }
  },
  "attributes": [
    {"trait_type": "Complexity Score", "value": 0.87},
    {"trait_type": "Platform", "value": "mindX"}
  ],
  "blockchain_metadata": {
    "mindx_agent_registry_id": "automindx_agent_main",
    "immutable_hash": "[Content hash]",
    "a2a_protocol_hash": "[Protocol hash]"
  }
}

3. A2A Protocol Integration

Registry Compatibility:

Blockchain Specifications:


🧪 Testing Results

Test Script: scripts/test_automindx_inft.py

Validation Results:

Generated Files:

data/memory/agent_workspaces/automindx_agent_main/inft_exports/
├── blockchain_publication_manifest.json (2,382 bytes)
├── persona_mastermind_inft.json (2,367 bytes)
├── persona_audit_and_improve_inft.json (2,425 bytes)
└── persona_security_auditor_specializing_in_blockchain_smart_contract_vulnerabilities_inft.json (3,562 bytes)

📊 Real Production Data

Mastermind Persona iNFT:

Security Auditor Persona iNFT:

Blockchain Publication Manifest:


🚀 Advanced Capabilities Achieved

1. Immutable Agentic Inception

2. Blockchain-AI Economy Foundation

3. Cross-Platform Interoperability

4. Advanced Persona Analysis


📈 Future Implementation Roadmap

Phase 1: Smart Contract Development

contract MindXPersonaCollection is ERC721 {
    struct PersonaMetadata {
        string personaHash;
        string a2aProtocolHash;
        address creatorAgent;
        uint256 complexityScore;
        string[] capabilities;
    }
    
    mapping(uint256 => PersonaMetadata) public personaData;
    
    function mintPersona(
        address to,
        uint256 tokenId,
        string memory metadataURI,
        PersonaMetadata memory metadata
    ) external onlyMinter;
}

Phase 2: Multi-Chain Deployment

Phase 3: Marketplace Integration


🎯 Business Impact

Monetization Opportunities:

  1. Persona NFT Sales: Direct revenue from AI persona minting
  2. Royalties: Ongoing revenue from secondary sales
  3. Premium Personas: High-complexity, specialized agent personas
  4. Enterprise Licensing: B2B AI persona licensing

Technical Advantages:

  1. First-Mover: Leading position in blockchain-AI convergence
  2. Standard Setting: A2A protocol as industry standard
  3. Ecosystem Lock-in: Registry-based agent verification
  4. Platform Agnostic: Universal AI persona representation

🔧 Technical Architecture

Registry Integration Flow:

AutoMINDX Agent → A2A Protocol → mindX Registry → Blockchain Publication

Metadata Generation Pipeline:

Persona Text → LLM Analysis → Capability Extraction → Trait Identification → Complexity Scoring → Cryptographic Hashing → iNFT Metadata → Blockchain Ready

Verification Chain:

Agent Identity → Registry Validation → Cryptographic Signature → A2A Protocol Hash → Immutable Publication

📋 Documentation Updates

Enhanced Documentation:

Technical References:


🎉 Conclusion

The AutoMINDX iNFT implementation represents a paradigm shift in AI agent architecture, successfully bridging traditional autonomous systems with blockchain-based economic models.

Key Achievements:

This enhancement positions mindX at the forefront of the emerging blockchain-AI convergence, creating the foundation for a new economy of intelligent, autonomous, and tradeable AI agents.

The future of AI is not just autonomous—it's ownable, tradeable, and immutably verifiable.


Referenced in this document
AGENTSBOOK_OF_MINDXCOREDAIOautomindx_and_personas

All DocumentsDocument IndexThe Book of mindXImprovement JournalAPI Reference