EZ-Path + Coinbase AgentKit Integration
May 19, 2026 · View on GitHub
Quick Setup
-
Copy
swap-action.tsto your AgentKit project -
Import and register:
import { createEZPathSwapAction } from './swap-action'; const action = createEZPathSwapAction(privateKey); agent.registerAction(action); -
Your agent now handles:
"swap 100 USDC for WETH at institutional tier" "get a quote for 50 DAI to USDC using resilient routing"
Response Format
{
"status": "ok",
"buyAmount": "47102700693525789",
"price": "0.471...",
"routingEngine": "0x",
"sources": ["0x", "ParaSwap", "Aerodrome"],
"tier": "basic",
"requestId": "req-abc123",
"expiresAt": 1726524915000
}
Features
- ✅ Best-execution DEX routing (10+ venues)
- ✅ Three execution tiers (basic/$0.03, resilient/$0.10, institutional/$0.50)
- ✅ Zero gas overhead (USDC only)
- ✅ Hardcoded toll address validation (agent safety)
- ✅ x402 v2 payment protocol