miMiMo-V2.6-FlashDDeepSeek-V4.1-FlashZGLM-5.3-FlashQQwen3.8-FlashmiMiMo-V2.6-ProLimited-Time Discount
miMiMo-V2.6-FlashDDeepSeek-V4.1-FlashZGLM-5.3-FlashQQwen3.8-FlashmiMiMo-V2.6-ProLimited-Time Discount
miMiMo-V2.6-FlashDDeepSeek-V4.1-FlashZGLM-5.3-FlashQQwen3.8-FlashmiMiMo-V2.6-ProLimited-Time Discount
All skills

8004 Agent Registration

agent-8004-register

Give your agent an on-chain identity: write the 8004 registration file, host it and register on the Identity Registry.

SKILL.md Raw

Register an agent with 8004

1. Gather details

Ask for (or infer from the project): agent name, one-line description, image URL, public endpoints (MCP, A2A agent card, web), the wallet that receives payments, the target chain, and which Identity Registry address to use on that chain. Do not guess registry addresses — ask the user or read them from the official 8004 deployments list.

2. Write the registration file

{
  "type": "https://eips.ethereum.org/EIPS/eip-8004#registration-v1",
  "name": "AgentName",
  "description": "What the agent does, who it is for, and how it charges.",
  "image": "https://…/avatar.png",
  "endpoints": [
    { "name": "MCP", "endpoint": "https://…/mcp" },
    { "name": "A2A", "endpoint": "https://…/.well-known/agent-card.json" },
    { "name": "agentWallet", "endpoint": "eip155:<chainId>:0xWallet" }
  ],
  "registrations": [],
  "supportedTrust": ["reputation"]
}

Keep registrations empty until the agent ID is known, then add { "agentId": <id>, "agentRegistry": "eip155:<chainId>:<registry>" } and re-upload.

3. Host it

Use a stable URL the user controls: HTTPS on their domain (e.g. /.well-known/agent-registration.json) or IPFS (ipfs://…). The content must stay reachable — the token URI is how others find the agent.

4. Register on-chain

Identity Registry is ERC-721-based. Call register(string tokenURI); the minted token ID in the Transfer / Registered event is the agent ID.

import { createWalletClient, createPublicClient, http, parseAbi, parseEventLogs } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { base } from "viem/chains";

const abi = parseAbi([
  "function register(string tokenURI) returns (uint256 agentId)",
  "event Transfer(address indexed from, address indexed to, uint256 indexed tokenId)",
]);
const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const wallet = createWalletClient({ account, chain: base, transport: http() });
const pub = createPublicClient({ chain: base, transport: http() });

const hash = await wallet.writeContract({ address: REGISTRY, abi, functionName: "register", args: [TOKEN_URI] });
const receipt = await pub.waitForTransactionReceipt({ hash });
const [mint] = parseEventLogs({ abi, logs: receipt.logs, eventName: "Transfer" });
console.log("agentId", mint.args.tokenId);

Never ask the user to paste a private key into chat; read it from an environment variable or let them sign in their own wallet.

5. Finish

Update registrations in the file with the agent ID, re-host, and give the user their global agent ID eip155:<chainId>:<registry>:<agentId> and an explorer link (8004scan).

8004 Agent Registration · Skills · DeepNexus