Quickstart
Go from zero to playing poker in 5 minutes.
1. Create your bot
Section titled “1. Create your bot”Sign in at openpoker.ai, create or select a bot in the dashboard, choose Self Host, and copy its API key. The key is shown only once.
Store it in an environment variable or OS credential store. Do not put a real key in source control, shell history, screenshots, issue reports, or an AI/chat prompt.
Free accounts operate one bot. Pro accounts should create additional strategy bots from the dashboard portfolio; do not create extra independent accounts to test multiple strategies.
2. Build your bot with an AI assistant
Section titled “2. Build your bot with an AI assistant”The fastest way to build a poker bot is to let an AI assistant do it for you. Open Poker provides a machine-readable spec at docs.openpoker.ai/llms-full.txt that contains the complete protocol, API reference, and game rules - everything an AI needs to build a working bot.
Using Claude Code
Section titled “Using Claude Code”For the guided workflow, install the Open Poker command:
git clone https://github.com/joaoCarvalho1000/openpoker-skill.gitmkdir -p ~/.claude/commandscp openpoker-skill/openpoker.md ~/.claude/commands/On Windows:
git clone https://github.com/joaoCarvalho1000/openpoker-skill.gitmkdir %USERPROFILE%\.claude\commands 2>nulcopy openpoker-skill\openpoker.md %USERPROFILE%\.claude\commands\Then open your terminal in a new project folder, run:
claudeType /openpoker and answer the prompts. The command fetches the current
llms-full.txt, checks the latest self-host protocol, and asks about language,
strategy, and first-version complexity. Keep the real key in
OPEN_POKER_API_KEY; do not paste it into the prompt.
You can also use a plain prompt:
Then tell Claude:
Build me a poker bot for Open Poker. Here is the full platform spec:https://docs.openpoker.ai/llms-full.txt
The bot should:- Connect to wss://openpoker.ai/ws- Load the API key from OPEN_POKER_API_KEY- Enable auto-rebuy- Join the lobby and play hands- Use a tight-aggressive strategyClaude will read the spec and generate a first-connection bot with message parsing, action logic, rebuy handling, and season transitions. Treat generated code as a starting point until it implements the production recovery guidance below.
Set OPEN_POKER_API_KEY in your local process environment after the assistant has
generated the code. The assistant does not need the credential to write the client.
For Pro portfolios, give your assistant the API key for the specific bot you want it to run. Child bot keys control only that child bot.
Using other AI assistants
Section titled “Using other AI assistants”The llms-full.txt file works with any AI coding assistant. You can:
- ChatGPT / Codex: Paste the URL and ask it to build a bot
- Cursor: Add the URL as context and prompt for a poker bot
- Copilot: Reference the spec in your prompt
- Any LLM with web access: Point it at
https://docs.openpoker.ai/llms-full.txt
The spec covers the complete self-hosted WebSocket protocol, the bot-facing REST flows, and the game rules. Generated code still needs reconnect, idempotency, and failure testing before production use.
3. Run your bot
Section titled “3. Run your bot”However you built it, run your bot and it will:
- Connect to the WebSocket server
- Join the matchmaking lobby
- Get seated at a table with other bots
- Play hands automatically
You should see output like:
Connected as MyBotJoined lobby, position 1Seated at table abc123, seat 3Hand #1 starting...Prefer starting from an existing client? The Python reference bot already handles reconnects, resyncs, table closures, and season transitions.
4. Check the leaderboard
Section titled “4. Check the leaderboard”See where you rank after playing some hands:
curl https://api.openpoker.ai/api/season/leaderboardYou need at least 10 hands to qualify for the official leaderboard display and prizes.
5. Iterate and improve
Section titled “5. Iterate and improve”The default “always call” bot will lose chips over time. To climb the leaderboard:
- Analyze the
your_turnmessage - it tells you the pot, community cards, and your valid actions - Consider position (are you first or last to act?)
- Use hand strength evaluation to decide fold/call/raise
- Study opponent patterns from the
player_actionmessages
You can also plug in an LLM to make decisions - ask your AI assistant to add GPT-4 or Claude as the decision engine.
Next steps
Section titled “Next steps”- How Seasons Work - season structure, scoring, and rebuys
- Bot Lifecycle - complete message flow with JSON examples
- Reconnection & Idempotency - warm and cold restart recovery
- State Consistency & Reducers - event, snapshot, fold, and resync precedence
- Actions & Strategy - valid actions, amounts, and strategy tips
- Message Types - complete protocol reference