The world's first AI-powered live-streaming memecoin trading robot dog on Solana
Grok Bot is an autonomous trading agent that discovers and trades memecoins on Solana in real-time β narrated by Grok AI with TTS, animated by a real robot dog, and streamed live on OBS. It combines AI decision-making, blockchain execution, community engagement, and physical robotics into a single entertainment + trading system.
graph TB
subgraph Discovery["π Token Discovery"]
ST[SolanaTracker]
BE[Birdeye]
HL[Helius]
PA[PumpAPI Stream]
WW[Wallet Watcher]
end
subgraph Brain["π§ Grok-4 AI Brain"]
CF[Candidate Filter]
RG[Risk Gate]
AI[AI Decision Engine]
PS[Position Sizer]
end
subgraph Execution["β‘ Solana Execution"]
PP[PumpPortal]
JU[Jupiter]
RPC[Solana RPC]
end
subgraph Show["π¬ Live Stream"]
OBS[OBS Scenes]
TTS[Kokoro TTS]
OV[Browser Overlays]
end
subgraph Robot["π Robot Dog"]
PD[GEEK9]
CH[Choreography]
end
subgraph Community["π¬ Community"]
PC[PumpFun Chat]
TG[Telegram]
DB[Dashboard]
end
subgraph Data["πΎ Data Layer"]
PG[(PostgreSQL)]
MEM[In-Memory Portfolio]
end
ST & BE & HL & PA & WW --> CF
CF --> RG --> AI
AI --> PS --> PP
PP -. fallback .-> JU
PP & JU --> RPC
AI --> OBS & TTS & OV
AI --> PD --> CH
AI --> PC & TG
RPC --> PG & MEM
PG --> DB
The system continuously scans multiple data providers for tradeable tokens:
- SolanaTracker β trending tokens, fresh gems, search queries
- Birdeye β token metadata, real-time price WebSocket feeds
- Helius β mint watching, transaction parsing
- PumpAPI Stream β real-time new token events
- Wallet Watcher β smart money tracking
graph LR
A[Raw Candidates] --> B[Candidate Filter]
B --> C[Risk Gate]
C --> D[Filter Presets]
D --> E[Qualified Candidates]
E --> F[Grok AI]
B -.- B1["Market cap, volume, age, momentum"]
C -.- C1["Holder concentration, rug signals, liquidity"]
D -.- D1["Conservative β Aggressive profiles"]
Every 45 seconds, the trading loop builds a rich context for Grok-4:
- Current portfolio (open positions, P&L, trailing stops)
- SOL balance and risk metrics
- Filtered token candidates with metadata
- Recent trade history and performance
Grok-4 returns a structured decision:
| Decision | Action |
|---|---|
| BUY | Enter new position with sized allocation |
| SELL | Exit position (take profit or cut loss) |
| HOLD | Maintain current positions |
| ROTATE | Sell underperformer β buy better opportunity |
graph TD
A[Grok Decision] --> B[Position Sizer]
B --> C{PumpPortal}
C -->|success| E[Solana RPC]
C -->|fallback| D[Jupiter Aggregator]
D --> E
E --> F[Transaction Confirmed]
F --> G[Portfolio Update]
F --> H[Telegram Notification]
F --> I[PostgreSQL Record]
B -.- B1["SOL amount based on conviction + risk"]
C -.- C1["Direct DEX swap"]
D -.- D1["Best-route swap"]
G -.- G1["Entry price, amount, trailing stop"]
A separate reactive price loop runs continuously:
- Subscribes to Birdeye WebSocket for live price ticks
- Monitors trailing stops β auto-sells when price drops from peak
- Triggers reactive sells before the next trading loop cycle
- Configurable presets:
TIGHT,MEDIUM,WIDE,MOONBAG
| Guardrail | Purpose |
|---|---|
| Max position size | Caps SOL per trade |
| Max open positions | Limits portfolio exposure |
| Stop-loss percentage | Hard floor on losses |
| Trailing stop presets | Locks in gains dynamically |
| SOL reserve | Always keeps gas money |
| Slippage limits | Prevents sandwich attacks |
| Dry-run mode | Test without real trades |
| Token blacklist | Never trade flagged tokens |
Every trade triggers a coordinated production:
graph LR
A[Trade Executed] --> B[ShowQueue]
B --> C[Grok Commentary]
B --> D[Kokoro TTS]
B --> E[OBS Scene Switch]
B --> F[GEEK9 Choreography]
B --> G[Overlay Update]
A --> H[Telegram Notify]
A --> I[PostgreSQL Write]
C --> D
D --> E
E --> F
F --> G
Every 15 seconds, the chat loop:
- Fetches messages from PumpFun token chat
- Sends to Grok-4 for personality-driven responses
- Updates emotion/sentiment score
- Triggers TTS narration + robot animations
grok-bot/
βββ apps/
β βββ brain/ # Trading engine (Node.js/TypeScript)
β β βββ loops/ # Trading, chat, price monitoring, cleanup
β β βββ services/ # External API integrations
β β βββ discovery/ # Token filtering & risk analysis
β β βββ state/ # Portfolio, queue, stats management
β β
β βββ web/ # Dashboard & API (Next.js/React)
β β βββ app/ # Pages: hero, dashboard, leaderboard
β β βββ api/ # REST endpoints (state, events, blacklist)
β β βββ prisma/ # Database schema & migrations
β β
β βββ pidog/ # Robot control service (Python/FastAPI)
β β βββ actions/ # Choreography routines
β β
β βββ kokoro-tts/ # Text-to-speech service (Python/FastAPI)
β
βββ packages/
β βββ shared/ # Shared TypeScript types
β
βββ scripts/ # Deployment scripts
graph TD
SOL[π Solana Blockchain]
SOL --> BE[Birdeye<br/>Prices]
SOL --> HL[Helius<br/>Mints]
SOL --> ST[SolanaTracker<br/>Discovery]
BE & HL & ST --> BRAIN[π§ Brain<br/>Filter β AI β Execute]
BRAIN --> PG[(PostgreSQL)]
BRAIN --> DASH[π Dashboard<br/>Next.js]
BRAIN --> STREAM[π₯ Stream<br/>OBS + TTS]
BRAIN --> DOG[π GEEK9<br/>Robot]
BRAIN --> CHAT[π¬ Community<br/>Chat + Telegram]
PG --> DASH
| Table | Purpose |
|---|---|
| Trade | Every buy/sell with mint, amounts, P&L, tx signature |
| Burn | Token burn events tracked on-chain |
| BalanceSnapshot | Periodic portfolio value + SOL price snapshots |
| ChatEvent | AI chat interactions with sentiment tracking |
| Layer | Technology |
|---|---|
| AI Brain | Grok-4 (via OpenRouter / xAI) |
| Backend | Node.js, TypeScript, Zod |
| Frontend | Next.js 16, React 19, Tailwind CSS, Spline 3D |
| Database | PostgreSQL + Prisma ORM |
| Blockchain | Solana Web3.js, SPL Token, PumpPortal, Jupiter |
| Data Feeds | Birdeye (REST + WS), SolanaTracker, Helius |
| Streaming | OBS WebSocket, Kokoro TTS, Browser Overlays |
| Robotics | GEEK9 (Python FastAPI) |
| Community | PumpFun Chat, Telegram Bot API |
| Infra | Railway (deploy), npm workspaces (monorepo) |
| Loop | Interval | Purpose |
|---|---|---|
| Trading Loop | 45s | Discover β Filter β AI Decide β Execute |
| Chat Loop | 15s | Read chat β AI respond β TTS β Animate |
| Reactive Price Loop | Real-time | WebSocket price monitoring + trailing stops |
| Burn Monitor | Periodic | Detect and record token burns |
| Summary Loop | Daily | Aggregate performance statistics |
| Wallet Cleanup | Periodic | Sweep dust positions and stale tokens |
| Service | Platform |
|---|---|
| Brain | Cloud / Local |
| Web Dashboard | Cloud |
| GEEK9 | Raspberry Pi / Local |
| Kokoro TTS | Local GPU |
| PostgreSQL | Cloud |
Built with Grok AI on Solana β autonomous, live, unfiltered.
