ERC-8004
Examples of registering agents on-chain with identity and reputation.
High-Level API
Using the unified regent-sdk package:
import { createRegentAgent } from 'regent-sdk';
const agent = await createRegentAgent({
name: 'My Agent',
description: 'An intelligent assistant',
version: '1.0.0',
http: { port: 3000 },
identity: {
chainId: 84532, // Base Sepolia
rpcUrl: 'https://sepolia.base.org',
ipfs: 'pinata',
ipfsConfig: { pinataJwt: process.env.PINATA_JWT },
},
trust: { reputation: true },
});
// Register on-chain
const { agentId, txHash } = await agent.registerOnchain();
console.log('Agent ID:', agentId); // e.g., "84532:42"
// Search for other agents
const agents = await agent.search({ mcp: true });
console.log('Found agents:', agents.length);Low-Level SDK
Using the ERC-8004 SDK directly:
Read-Only Discovery
Search and discover agents without a signer:
Giving Feedback
Multi-Chain Search
Loading Existing Agent
Endpoint Crawler
Automatically extract capabilities from MCP and A2A endpoints:
Complete Registration Example
Last updated