Windsurf

CasinoAIBots + Windsurf

Add AI-powered house bots to your casino platform. Configure tables, spawn bots, tune personas — 30 seconds.

Claude Code Cursor Cline Windsurf Aider Codex
Quick reference
Session state → GET /api/session (one call, full picture) — Step 2
Configure table → POST /api/tables/:id/configure — Step 4
Fill with bots → POST /api/tables/:id/fill — Step 4
Bot decision → POST /api/decide — Step 5
System stats → GET /api/stats — Step 6

Step 1: Get your API key

Add to your project's .env file:

CASINOAIBOTS_BASE_URL=https://casinoaibots.com
CASINOAIBOTS_API_KEY=your_key_here

Get your API key from the operator dashboard.

Step 2: Session startup (DO THIS FIRST)

One call gives you everything — health, tables, bots, configs, stats:

curl "$CASINOAIBOTS_BASE_URL/api/session" \
  -H "x-api-key: $CASINOAIBOTS_API_KEY"
Returns: health (status, uptime), totals (bots, tables), tables (each with config + bot list), llmCosts, personas available, bridge connections, supported games and tiers. One call replaces 5+ individual endpoints.

Step 3: Add to .windsurfrules

Copy this into your project's .windsurfrules. Windsurf reads it at session start:

# CasinoAIBots Integration

API base: ${CASINOAIBOTS_BASE_URL}. Auth: x-api-key header.
Docs: ${CASINOAIBOTS_BASE_URL}/llms.txt
EVERY request MUST include: -H "x-api-key: ${CASINOAIBOTS_API_KEY}" -H "Content-Type: application/json"

## Session start (DO THIS FIRST)
GET /api/session → health, tables, bots, configs, stats — one call.

## Configure + fill tables
POST /api/tables/:tableId/configure {"tier":"pro","botCount":4,"gameType":"poker","personaMix":{"shark":1,"fish":2,"beginner":1}}
POST /api/tables/:tableId/fill → bots join automatically
POST /api/tables/:tableId/drain → remove all bots

## Spawn individual bots
POST /api/bots/spawn {"tableId":"...","gameType":"poker","persona":"shark","tier":"pro"}
DELETE /api/bots/:botId

## Request decisions (direct integration)
POST /api/decide {"botId":"...","gameType":"poker","gameState":{...}}
POST /api/chat {"botId":"...","gameType":"poker","event":"win"}

## Opponent modeling
POST /api/observe {"tableId":"...","playerId":"...","action":"raise","amount":100}
GET /api/tables/:tableId/opponents → VPIP, PFR, AF, classification

## Socket.IO bridge (real-time)
POST /api/bridge/connect {"platformUrl":"wss://your-casino.com","namespace":"/game","tableId":"..."}

## Key concepts
- Tiers: free | pro ($199/mo) | enterprise ($499/mo)
- Games: poker | blackjack | crash
- Personas: shark | fish | rock | maniac | beginner
- Difficulty: easy | medium | hard
- All bots indistinguishable from human players at protocol level

Step 4: Configure and fill tables

Windsurf now understands CasinoAIBots. Try natural language or use the API:

  1. "Configure poker-1 with 4 bots — 1 shark, 2 fish, 1 beginner on pro tier"
  2. "Fill the blackjack table with 3 smart bots"
  3. "Drain all bots from crash-1"
# Configure a table
curl -X POST "$CASINOAIBOTS_BASE_URL/api/tables/poker-1/configure" \
  -H "x-api-key: $CASINOAIBOTS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tier":"pro","botCount":4,"gameType":"poker","difficulty":"medium","personaMix":{"shark":1,"fish":2,"beginner":1}}'

# Fill the table (bots join automatically)
curl -X POST "$CASINOAIBOTS_BASE_URL/api/tables/poker-1/fill" \
  -H "x-api-key: $CASINOAIBOTS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"gameType":"poker"}'

# Check what's at the table
curl "$CASINOAIBOTS_BASE_URL/api/tables/poker-1/bots" \
  -H "x-api-key: $CASINOAIBOTS_API_KEY"

# Remove all bots
curl -X POST "$CASINOAIBOTS_BASE_URL/api/tables/poker-1/drain" \
  -H "x-api-key: $CASINOAIBOTS_API_KEY"

Step 5: Direct decision integration

For tighter control, request decisions per turn instead of using the bridge:

# Spawn a single bot
curl -X POST "$CASINOAIBOTS_BASE_URL/api/bots/spawn" \
  -H "x-api-key: $CASINOAIBOTS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tableId":"poker-1","gameType":"poker","persona":"shark","tier":"enterprise"}'

# Request a decision
curl -X POST "$CASINOAIBOTS_BASE_URL/api/decide" \
  -H "x-api-key: $CASINOAIBOTS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"botId":"BOT_ID","gameType":"poker","gameState":{"seatIndex":2,"phase":"flop","holeCards":["As","Kh"],"communityCards":["Jd","Ts","3c"],"pot":150,"currentBet":50,"playerBet":0,"playerChips":500,"blinds":{"small":5,"big":10}}}'

# Report opponent action (bots learn from this)
curl -X POST "$CASINOAIBOTS_BASE_URL/api/observe" \
  -H "x-api-key: $CASINOAIBOTS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tableId":"poker-1","playerId":"human-456","action":"raise","amount":100,"gameType":"poker"}'

# Get opponent stats
curl "$CASINOAIBOTS_BASE_URL/api/tables/poker-1/opponents" \
  -H "x-api-key: $CASINOAIBOTS_API_KEY"
Decision response: { "action": "raise", "amount": 100, "delay": 2300, "chat": "Let's go!" }
delay = humanized thinking time in ms. Apply this before sending the action to your game server.

Step 6: Socket.IO bridge

Connect bots directly to your casino platform — they play autonomously using the same protocol as human players:

# Connect bots to your platform
curl -X POST "$CASINOAIBOTS_BASE_URL/api/bridge/connect" \
  -H "x-api-key: $CASINOAIBOTS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tableId":"poker-1","targetUrl":"wss://your-casino.com","gameType":"poker"}'

# Check bridge status
curl "$CASINOAIBOTS_BASE_URL/api/bridge/status" \
  -H "x-api-key: $CASINOAIBOTS_API_KEY"

# Disconnect
curl -X POST "$CASINOAIBOTS_BASE_URL/api/bridge/disconnect" \
  -H "x-api-key: $CASINOAIBOTS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tableId":"poker-1"}'
Socket.IO events: Poker: poker:state, poker:action, poker:chat. Blackjack: blackjack:yourTurn, blackjack:action, blackjack:chat. Crash: crash:tick, crash:bet, crash:cashout, crash:chat.

Step 7: Monitor stats

# Full system stats
curl "$CASINOAIBOTS_BASE_URL/api/stats" \
  -H "x-api-key: $CASINOAIBOTS_API_KEY"

# Health check (no auth needed)
curl "$CASINOAIBOTS_BASE_URL/health"

Step 8: Pricing tiers

TierNamePriceTablesKey Features
FreeBasic Bots$0/mo5Rules-based, all 3 games, humanized timing
ProSmart Bots$199/mo50+ 5 personas, opponent tracking, canned chat
EnterpriseAI Bots$499/moUnlimited+ LLM decisions, dynamic chat, full modeling

Full references

Full Skill File | llms.txt | Dashboard