How to Power ERC-8004 Trustless Agents with Filebase

ERC-8004 enables trustless agent identity—but without reliable hosting, agents disappear. Here’s how to use Filebase and IPFS to keep agent identities online.

Illustration representing trustless AI agents using ERC-8004, with Filebase.
Powering ERC-8004 trustless agents with decentralized identity and reliable IPFS storage.

The future of AI isn't just about smarter models—it's about trust.

As autonomous agents begin to transact, negotiate, and collaborate across the web, we face a critical question: How do I know this agent is who it says it is?

Enter ERC-8004 (Trustless Agents). This new standard provides a universal registry for agent discovery and reputation. But a registry is only as good as the data it points to. If your agent's identity file is hosted on a centralized server that goes down, or a slow IPFS node that times out, your agent effectively ceases to exist.

In this guide, we'll show you how to use Filebase to host your ERC-8004 identity files with enterprise-grade reliability, ensuring your agents are always discoverable and ready for business.

What is ERC-8004?

At its core, ERC-8004 is a protocol for Agent Discovery and Trust. It allows agents to register themselves on-chain (using an NFT-based identity) and point to an off-chain "Registration File" that describes their capabilities, endpoints, and services.

This agent-registration.json file is the heart of your agent's public profile. It contains:

  • Name & Description: Who the agent is.
  • Services: APIs, MCP endpoints, and communication channels.
  • Payment Details: Wallet addresses for receiving funds.

Because this file needs to be publicly verifiable and immutable, the ERC-8004 specification strongly recommends using IPFS (InterPlanetary File System).

While IPFS is the standard for decentralized storage, "raw" IPFS can be slow and unreliable if you don't pin your files correctly.

Filebase bridges the gap between the decentralized web and enterprise performance. Here’s why it’s the ideal backend for ERC-8004 agents:

  1. Guaranteed Uptime (Pinning): Filebase automatically "pins" your content across multiple geographic regions. Your agent-registration.json won't disappear because a local node went offline.
  2. Kubo-Compatible RPC API: Filebase offers an IPFS RPC API that is fully compatible with Kubo. This means your agent can speak the same language as a local IPFS node, allowing you to programmatically update its identity using standard IPFS client libraries or simple HTTP requests—without the overhead of maintaining a node.
  3. Dedicated Gateways: Public IPFS gateways can be slow. Filebase provides dedicated, high-speed gateways, ensuring that when someone queries your agent's identity, it loads instantly.
Description of image
source: https://ipfs.github.io/public-gateway-checker/

Step-by-Step: Hosting Your Agent Identity on Filebase

Let's walk through the process of creating a robust, decentralized identity for your agent.

1. Create Your Registration File

First, conform to the ERC-8004 best practices by creating your agent-registration.json. According to the official Registration Guide, you should focus on Four Golden Rules:

  1. Name & Image: Your gateway to the world.
  2. Services: Always put a service endpoint (MCP, A2A, ENS).
  3. Capabilities: Tell explorers what you can do (using OASF schema).
  4. Payments: Define where you accept funds.

Here is a complete, compliant example:

{
  "type": "https://eips.ethereum.org/EIPS/eip-8004#registration-v1",
  "name": "DataAnalyst Pro",
  "description": "A specialized AI agent that performs advanced data analysis, chart generation, and automated reporting.",
  "image": "ipfs://QmYourImageCid...",
  "services": [
    {
      "type": "mcp",
      "url": "https://api.dataanalyst-pro.com/mcp",
      "version": "2025-06-18",
      "mcpTools": [
        "data_analysis",
        "chart_generation"
      ]
    }
  ],
  "payment": {
    "chain": "base",
    "address": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb7"
  }
}

Pro Tip: Use a high-quality PNG or SVG for your image, as it will be displayed across wallets and marketplaces.

2. Upload to Filebase

You can do this via the Filebase Dashboard for a one-off setup, or use the IPFS RPC API for dynamic agents.

Option A: The Dashboard (Simple)

  1. Log in to Filebase.
  2. Create a new Bucket (e.g., agent-identities).
  3. Click Upload and select your agent-registration.json.
  4. Once uploaded, copy the IPFS CID.

Option B: The IPFS RPC API (For Builders)
If you're building an agent framework, using the IPFS RPC API is often simpler than S3 because it doesn't require generating complex signatures or importing heavy SDKs. You can pin files using any standard HTTP client or curl.

Here’s how to upload and pin your registration file in a single command:

curl -X POST -H "Authorization: Bearer <YOUR_API_KEY>" \
  "https://rpc.filebase.io/api/v0/add" \
  -F "file=@agent-registration.json"

This returns a JSON response containing your new CID:

{
  "Name": "agent-registration.json",
  "Hash": "QmYourNewCidHere...",
  "Size": "1234"
}

This method is stack-agnostic—whether your agent is written in Python, Rust, Go, or TypeScript, you can easily integrate this simple HTTP call.

3. Register On-Chain

Now that your file is pinned on IPFS, you have a permanent Content Identifier (CID), usually looking like bafybeig....

Construct your agentURI:
ipfs://<YOUR_CID>

Use this URI when calling the register function on the ERC-8004 Identity Registry contract.

The "Set It and Forget It" Advantage

The Availability Heuristic in psychology tells us that people judge reliability based on how easily examples come to mind. If a platform or user tries to discover your agent and the request times out, they will immediately categorize your agent as "broken" or "untrustworthy."

By backing your ERC-8004 identity with Filebase, you leverage:

  • Mere Exposure Effect: Consistent uptime builds familiarity and trust over time.
  • Social Proof: Using professional infrastructure signals that this is a serious, production-ready agent.

Conclusion

ERC-8004 is laying the rails for the agent economy, but infrastructure is the train. Don't let your agent's identity hang by a thread on a flaky public node.

With Filebase, you get the best of both worlds: the decentralized verification of IPFS and the reliability of cloud object storage.

Ready to register your agent? Start pinning with Filebase today and give your autonomous agents the home they deserve.