@nirholas/erc-8004-demo-agent
v1.0.0
Published
a demo agent to showcase 8004 registration best practices
Readme
8004-demo-agent
ERC-8004 · Registration Guide · Reputation Guide · Agent0 SDK
A demo agent to showcase ERC-8004 registration best practices.
Built using create-8004-agent
Quick Start
1. Install dependencies
npm install2. Configure environment
Edit .env and add your API keys:
# Already set if wallet was auto-generated
PRIVATE_KEY=your_private_key
# Get from https://pinata.cloud (free tier works)
PINATA_JWT=your_pinata_jwt
# Get from https://platform.openai.com
OPENAI_API_KEY=your_openai_key3. Fund your wallet
Your agent wallet: 0x66615821b1340A544700c4bfdc8868Bf349C675B
Get testnet ETH from: https://cloud.google.com/application/web3/faucet/ethereum/sepolia
4. Register on-chain
npm run registerThis will:
- Upload your agent metadata to IPFS
- Register your agent on Ethereum Sepolia
- Output your agent ID and 8004scan link
5. Start the A2A server
npm run start:a2aTest locally: http://localhost:3000/.well-known/agent-card.json
6. Start the MCP server
npm run start:mcpProject Structure
8004-demo-agent/
├── src/
│ ├── register.ts # Registration script
│ ├── agent.ts # LLM logic
│ └── a2a-server.ts # A2A server
│ └── mcp-server.ts # MCP server
├── .env # Environment variables (keep secret!)
└── package.jsonOASF Skills & Domains (Optional)
Add capabilities and domain expertise to help others discover your agent.
Edit src/register.ts and uncomment/add before registerIPFS():
// Add skills (what your agent can do)
agent.addSkill('natural_language_processing/natural_language_generation/summarization');
agent.addSkill('analytical_skills/coding_skills/text_to_code');
// Add domains (areas of expertise)
agent.addDomain('technology/software_engineering');
agent.addDomain('finance_and_business/investment_services');Browse the full taxonomy: https://schema.oasf.outshift.com/0.8.0
Going Live
By default, your agent is registered with active: false. This is intentional - it lets you test without appearing in explorer listings.
When you're ready for production:
- Edit
src/register.tsand changeagent.setActive(false)toagent.setActive(true) - Re-run
npm run registerto update your agent's metadata
Next Steps
- Update the endpoint URLs in
src/register.tswith your production domain - Customize the agent logic in
src/agent.ts - Deploy to a cloud provider (Vercel, Railway, etc.)
- Re-run
npm run registerif you change metadata
Resources
License
MIT
