Skip to content

Registration (IPFS)

Register your agent on-chain with automatic IPFS storage for decentralized, censorship-resistant registration files.

The IPFS registration flow handles everything automatically:

  1. Mint agent NFT (get agent ID)
  2. Upload registration file to IPFS
  3. Set IPFS URI on-chain

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"
)

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"
)
sdk = SDK(
chainId=11155111,
rpcUrl="...",
signer=private_key,
ipfs="node",
ipfsNodeUrl="https://ipfs.infura.io:5001"
)
# Configure your agent
agent = sdk.createAgent(...)
agent.setMCP("https://mcp.example.com/")
agent.setA2A("https://a2a.example.com/agent.json")
# Register - automatically handles everything!
agent.registerIPFS()
# Get agent ID
print(f"Agent registered: {agent.agentId}")
print(f"Agent URI: {agent.agentURI}") # ipfs://Qm...

After making changes, re-register to update on-chain:

# Modify agent
agent.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}")

The SDK automatically:

  • Uploads updated registration file to IPFS
  • Only updates changed metadata on-chain
  • Sets new IPFS URI
  • Clears dirty metadata flags

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
}
  • 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