AI agent stack that combines A2A messaging + x402 micropayments + ERC‑8004 identity(trustless agent).
x402-erc8004-agent is an early-stage TypeScript project in the AI payments / x402 ecosystem, focused on 8004, a2a, agent, erc. It currently has 12 GitHub stars and 2 forks, and sits alongside related tools like x402-erc8004-agent, x402-erc8004-agent, machi, ProwlFi, lucid-agents, AgenticDeFi-Trainer.
Production-ready agent application that combines:
/a2a JSON-RPC endpoint and discovery cardx402-express middleware/a2a with payment verification$0.001 per requestnpm install
cp .env.example .env
Required:
OPENAI_API_KEYX402_PAYEE_ADDRESSPRIVATE_KEY (for ERC-8004 registration)PINATA_JWTOptional:
DISABLE_X402=true (development)X402_PRICE (default $0.001)PORT (default 3000)npm run register
This uploads registration.json to IPFS, registers on ERC-8004, and updates the file with agentId. You'll need Base Sepolia ETH for gas.
npm run verify
Checks environment variables, required files, dependencies, and ERC-8004 registration status.
npm run start:a2a
Endpoints:
http://localhost:3000/.well-known/agent-card.jsonhttp://localhost:3000/a2acd frontend
npm install
npm run dev
Frontend: http://localhost:5173
See frontend/README.md for detailed frontend setup.
curl http://localhost:3000/.well-known/agent-card.json
curl -X POST http://localhost:3000/a2a \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "message/send",
"params": {
"message": {
"role": "user",
"parts": [{"type": "text", "text": "Hello, agent!"}]
}
},
"id": 1
}'
Note: when x402 is enabled, /a2a requires valid payment headers.
message/sendtasks/gettasks/cancel.
├── src/
│ ├── a2a-server.ts # A2A server with x402 middleware
│ ├── agent.ts # LLM agent logic
│ ├── register.ts # ERC-8004 registration script
│ └── verify-setup.ts # Setup verification
├── frontend/ # React UI
│ ├── src/
│ │ ├── components/ # UI components
│ │ ├── services/ # API clients
│ │ └── App.tsx # Main app
│ └── package.json
├── .well-known/
│ └── agent-card.json # Agent discovery card
├── registration.json # ERC-8004 metadata
├── package.json
├── tsconfig.json
└── README.md
Update src/a2a-server.ts to change:
process.env.X402_PRICE || '$0.001''base-sepolia' or 'base''https://x402.org/facilitator'Disable payments for dev:
DISABLE_X402=true npm run start:a2a
Update src/register.ts:
84532)0x8004AA63c570c570eBF15376c0dB199918BFe9FbUpdate src/agent.ts:
gpt-4o-mininpm run build
MIT
AI agent stack that combines A2A messaging + x402 micropayments + ERC‑8004 identity(trustless agent).
AI agent stack that combines A2A messaging + x402 micropayments + ERC‑8004 identity(trustless agent).
Agent behavior that compiles
The world's first privacy layer for AI agents on Solana — stealth addresses + x402 payments. Every payment lands at a fresh, unlinkable address.
Lucid Agents Commerce SDK. Bootstrap AI agents in 60 seconds that can pay, sell, and participate in agentic commerce supply chains. Our protocol agnostic SDK provides CLI-generated templates and drop-in adapters for Hono, Express, Next.js, and TanStack, giving you instant access to crypto/fiat payment rails (AP2, A2A, x402, ERC8004).
Autonomous AI Agent Swarm framework with x402 self-executing wallets. Empowers LLM-driven agents to trade, bridge, and manage crypto treasuries without human intervention. The ultimate Agentic DeFi toolkit for 2026.
Open Source AI trading agent that operates autonomously across 1000+ markets - Polymarket, Kalshi, Binance, Hyperliquid, Solana DEXs, 5 EVM chains. Scans for edge, executes instantly, manages risk while you sleep. Agent commerce protocol for machine-to-machine payments. Self-hosted. Built on Claude.
Drop-in OpenAI Python client with transparent x402 payment support.
TypeScript Interface for Machine Payments Protocol
Drop-in OpenAI Typescript client with transparent x402 payment support.
Production-ready x402 facilitator server.
Rust SDK for the x402 payment protocol.