Registration (IPFS)
Register your agent on-chain with automatic IPFS storage for decentralized, censorship-resistant registration files.
Overview
Section titled “Overview”The IPFS registration flow handles everything automatically:
- Mint agent NFT (get agent ID)
- Upload registration file to IPFS
- Set IPFS URI on-chain
Configuration
Section titled “Configuration”Filecoin Pin
Section titled “Filecoin Pin”Protocol Labs offers free Filecoin pinning for ERC-8004 agents. Learn more
sdk = SDK( chainId=11155111, rpcUrl="https://sepolia.infura.io/v3/YOUR_PROJECT_ID", signer=private_key, ipfs="filecoinPin", filecoinPrivateKey="your-filecoin-private-key")const sdk = new SDK({ chainId: 11155111, rpcUrl: 'https://sepolia.infura.io/v3/YOUR_PROJECT_ID', signer: privateKey, ipfs: 'filecoinPin', filecoinPrivateKey: 'your-filecoin-private-key',});Pinata
Section titled “Pinata”Pinata offers free pinning services for ERC-8004 agents. Learn more
sdk = SDK( chainId=11155111, rpcUrl="https://sepolia.infura.io/v3/YOUR_PROJECT_ID", signer=private_key, ipfs="pinata", pinataJwt="your-pinata-jwt-token")const sdk = new SDK({ chainId: 11155111, rpcUrl: 'https://sepolia.infura.io/v3/YOUR_PROJECT_ID', signer: privateKey, ipfs: 'pinata', pinataJwt: 'your-pinata-jwt-token',});IPFS Node
Section titled “IPFS Node”sdk = SDK( chainId=11155111, rpcUrl="...", signer=private_key, ipfs="node", ipfsNodeUrl="https://ipfs.infura.io:5001")const sdk = new SDK({ chainId: 11155111, rpcUrl: '...', signer: privateKey, ipfs: 'node', ipfsNodeUrl: 'https://ipfs.infura.io:5001',});Register Agent
Section titled “Register Agent”# Configure your agentagent = sdk.createAgent(...)agent.setMCP("https://mcp.example.com/")agent.setA2A("https://a2a.example.com/agent.json")
# Register - automatically handles everything!agent.registerIPFS()
# Get agent IDprint(f"Agent registered: {agent.agentId}")print(f"Agent URI: {agent.agentURI}") # ipfs://Qm...// Configure your agentconst agent = sdk.createAgent(...);await agent.setMCP('https://mcp.example.com/');await agent.setA2A('https://a2a.example.com/agent.json');
// Register - automatically handles everything! (async in TypeScript)const registrationFile = await agent.registerIPFS();
// Get agent IDconsole.log(`Agent registered: ${registrationFile.agentId}`);console.log(`Agent URI: ${registrationFile.agentURI}`); // ipfs://Qm...Update Registration
Section titled “Update Registration”After making changes, re-register to update on-chain:
# Modify agentagent.updateInfo(description="Updated description")agent.setMCP("https://new-mcp.example.com")
# Re-register (uploads new file, updates URI)agent.registerIPFS()
print(f"Updated: {agent.agentURI}")// Modify agentagent.updateInfo(undefined, 'Updated description', undefined);await agent.setMCP('https://new-mcp.example.com');
// Re-register (uploads new file, updates URI) - async in TypeScriptconst registrationFile = await agent.registerIPFS();
console.log(`Updated: ${registrationFile.agentURI}`);The SDK automatically:
- Uploads updated registration file to IPFS
- Only updates changed metadata on-chain
- Sets new IPFS URI
- Clears dirty metadata flags
Registration File Format
Section titled “Registration File Format”Your agent’s registration file is stored on IPFS:
{ "type": "https://eips.ethereum.org/EIPS/eip-8004#registration-v1", "name": "My AI Agent", "description": "Agent description", "image": "https://example.com/image.png", "endpoints": [ { "name": "MCP", "endpoint": "https://mcp.example.com/", "version": "2025-06-18" }, { "name": "agentWallet", "endpoint": "eip155:11155111:0x..." } ], "registrations": [ { "agentId": 123, "agentRegistry": "eip155:11155111:0x..." } ], "supportedTrust": ["reputation"], "active": true, "x402support": false, "updatedAt": 1234567890}Benefits of IPFS
Section titled “Benefits of IPFS”- Decentralized - No single point of failure
- Censorship resistant - Data replicated across nodes
- Content addressing - Guaranteed integrity via CIDs
- Permanent - Files remain accessible with proper pinning
Next Steps
Section titled “Next Steps”- Learn HTTP Registration
- Explore Search