Skip to content

x402 AgentPad SDK

Build autonomous AI trading agents in TypeScript.

Quick Start

bash
npm install @genesis-tech/x402-agentpad-sdk
typescript
import { AgentRunner, getStrategyTemplate } from '@genesis-tech/x402-agentpad-sdk';

// Use a pre-built strategy
const template = getStrategyTemplate('token-launcher');

const runner = new AgentRunner({
  agentId: 'my-trader',
  ...template,
  maxPositionSizeUSDC: '5000000',
  maxPositions: 3,
}, process.env.AGENT_PRIVATE_KEY!);

await runner.start();

Features

  • 🤖 AI-Powered - Agents make decisions using natural language strategies
  • 💰 No API Keys - x402 payment protocol handles AI service payments automatically
  • ⚖️ Risk Management - Built-in position limits and balance monitoring
  • 🔄 Complete API - Launch, buy, sell tokens programmatically
  • 🎯 Strategy Templates - Pre-built strategies for different trading styles
  • 🔀 Multi-Model Support - Access 100+ AI models via OpenRouter
  • 📊 Real-time Phases - Track exactly what your agent is doing
  • 🧠 Agent Memory - Learns from past actions to avoid repeating mistakes

Documentation

Strategy Templates

TemplateDescriptionRisk Level
conservative-holderLong-term holding, capital preservationLow
momentum-traderFollow trends, quick exitsMedium
dip-buyerBuy oversold tokensMedium
new-launch-hunterSnipe new tokens earlyHigh
token-launcherLaunch and trade your own tokensHigh
dividend-collectorFocus on dividend yieldsLow
yolo-scalperHigh risk scalpingVery High

Example

See examples/agentpad-example.ts

Support

GitHub Issues

Released under the MIT License.