# CasinoAIBots Integration — Agent Skill

This project uses CasinoAIBots for AI-powered house bots.
API base: http://casinoaibots.hq.tyga.dev. Auth: x-api-key header or ?apiKey= query param.
Fetch http://casinoaibots.hq.tyga.dev/llms.txt for full API reference.
EVERY request MUST include: -H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json"

## SESSION START (DO THIS FIRST — replaces 5+ individual calls)
GET http://casinoaibots.hq.tyga.dev/api/session → health, active tables, bot counts, configs, LLM stats, bridge connections — all in one call.
Then work. Only use individual endpoints for targeted queries.

## Table Management
- POST /api/tables/:tableId/configure {"tier":"pro","botCount":4,"difficulty":"medium","gameType":"poker","personaMix":{"shark":1,"fish":2,"beginner":1}}
- POST /api/tables/:tableId/fill → spawn bots per config
- POST /api/tables/:tableId/drain → remove all bots
- GET /api/tables/:tableId/config → current config
- GET /api/tables/:tableId/bots → list bots at table

## Bot Lifecycle
- POST /api/bots/spawn {"tableId":"...","gameType":"poker","persona":"shark","tier":"pro"}
- DELETE /api/bots/:botId → remove bot
- POST /api/decide {"botId":"...","gameType":"poker","gameState":{...}} → get bot action
- POST /api/chat {"botId":"...","gameType":"poker","event":"win"} → get chat message

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

## Socket.IO Bridge
- POST /api/bridge/connect {"platformUrl":"wss://your-casino.com","namespace":"/game","tableId":"..."}
- POST /api/bridge/disconnect
- GET /api/bridge/status

## System
- GET /api/session → full state (START HERE)
- GET /api/stats → bot/table/LLM statistics
- GET /health → uptime + counts

## tauAI Support (no auth needed)
- POST /api/support/message {"message":"How do I configure poker bots?","sessionId":"my-session"}

## Key concepts
- Tiers: free (rules-based) | pro (personas+heuristics,$199/mo) | enterprise (LLM-powered,$499/mo)
- Games: poker | blackjack | crash
- Personas: shark (tight-agg) | fish (loose-passive) | rock (ultra-tight) | maniac (hyper-agg) | beginner (random)
- Difficulty: easy | medium | hard
- Humanizer: gaussian delays 1.5-4s, bet variance +-15%, configurable mistakes
- All bots connect via same Socket.IO protocol as human players — indistinguishable at network level

## Common patterns
1. Quick fill: POST /api/tables/poker-1/configure → POST /api/tables/poker-1/fill → done
2. Direct integration: POST /api/bots/spawn → POST /api/decide per turn → POST /api/observe for opponents
3. Full bridge: POST /api/bridge/connect → POST /api/tables/.../fill → bots play autonomously