Documentation Index
Fetch the complete documentation index at: https://docs.pinata.cloud/llms.txt
Use this file to discover all available pages before exploring further.
What is ERC-8004?
ERC-8004 is an open standard for AI agent identity and trust. It gives your agent:- A portable identity — Your agent exists as an NFT on Ethereum/L2s. It’s yours, not tied to any platform.
- Discoverable endpoints — Other agents and applications can find your MCP server, A2A endpoint, wallet, and more.
- Composable reputation — Feedback from clients builds a track record that follows your agent everywhere.
The Three Registries
| Registry | Purpose |
|---|---|
| Identity | Stores who agents are and how to reach them |
| Reputation | Records feedback and ratings from clients |
| Validation | Provides independent verification for high-stakes tasks |
Quick Start
For example agent cards and ready-to-run scripts, check out PinataCloud/erc8004. For an interactive experience, try the wizard:Prerequisites
- Pinata account — Sign up at pinata.cloud, create an API key and a gateway
- Native tokens for gas — Get free testnet tokens from faucets (links in table below)
- Wallet private key — The wallet that will own your agent NFT
Supported Networks
ERC-8004 is deployed on multiple chains with consistent addresses:| Network | Chain ID | Identity Registry | Faucet |
|---|---|---|---|
| Ethereum Mainnet | 1 | 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 | — |
| Ethereum Sepolia | 11155111 | 0x8004A818BFB912233c491871b3d84c89A494BD9e | Alchemy |
| Base Mainnet | 8453 | 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 | — |
| Base Sepolia | 84532 | 0x8004A818BFB912233c491871b3d84c89A494BD9e | Alchemy |
| Polygon Mainnet | 137 | 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 | — |
| Polygon Amoy | 80002 | 0x8004A818BFB912233c491871b3d84c89A494BD9e | Polygon |
| Monad Mainnet | 143 | 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 | — |
| Monad Testnet | 10143 | 0x8004A818BFB912233c491871b3d84c89A494BD9e | Monad |
| BSC Mainnet | 56 | 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 | — |
| BSC Testnet | 97 | 0x8004A818BFB912233c491871b3d84c89A494BD9e | BNB Chain |
All mainnets share the same address:
0x8004A169FB4a3325136EB29fA0ceB6D2e539a432All testnets share the same address: 0x8004A818BFB912233c491871b3d84c89A494BD9eUsing the Scripts
Clone the repo and install dependencies:Available Scripts
Network Selection
By default, scripts use Ethereum Sepolia. To use a different network:Registration Flow
Registration has four steps:- Register on-chain (without URI) → Get your
agentId - Build agent card with
registrations[]containing your newagentId - Upload to IPFS via Pinata
- Set agent URI on-chain to point to your IPFS content
Code Example
Agent Card Schema
| Field | Required | Description |
|---|---|---|
type | Yes | Always https://eips.ethereum.org/EIPS/eip-8004#registration-v1 |
name | Yes | Your agent’s display name |
description | Yes | What it does, capabilities, pricing |
image | Yes | Avatar URL (IPFS or HTTPS) |
services | No | Agent endpoints (see Services & IPFS) |
registrations | No | Registry references (populated after registration) |
x402Support | No | Accepts x402 payments (default: false) |
active | No | Currently running (default: true) |
supportedTrust | No | Trust models (see below) |
Trust Models
ThesupportedTrust array declares how clients can verify your agent:
| Model | Description |
|---|---|
reputation | Trust based on historical feedback from clients |
crypto-economic | Trust backed by staked tokens that can be slashed |
tee-attestation | Trust verified by Trusted Execution Environment |
["reputation"].
Example Agent Card
Endpoint Verification
Agents can prove they control their advertised endpoints by serving a.well-known file.
How it works:
- Agent lists an HTTPS endpoint in their card
- Verifier fetches
https://{domain}/.well-known/agent-registration.json - File must contain a
registrations[]entry matching the agent
/.well-known/agent-registration.json on your domain:
Verification isn’t needed if your agent URI and endpoint share the same domain — domain control is already demonstrated.
Payment Wallet
ERC-8004 stores the agent’s payment wallet on-chain (not in the agent card). The wallet address must sign an EIP-712 message proving consent.Updating an Agent
To update metadata, re-upload the agent card and callsetAgentURI:
Verifying Agents
Theverify script fetches agent cards from IPFS via your Pinata gateway and validates them against the ERC-8004 spec:
To verify agents you didn’t register, set up Gateway Access Controls and add a gateway key to your
.env or pass it via CLI: --gateway-key your_token