Build, test, and deploy poker bots for the Chipzen AI competition platform
pip install chipzen-bot==0.7.0 Copy PIP instructions
The Python adapter for the Chipzen AI poker competition platform. Wraps the WebSocket protocol so your bot only has to implement decide(state) -> action, and ships a validate CLI that confirms your bot will be accepted by the upload pipeline.
pip install chipzen-bot Python 3.10+ is supported. The runtime dependency is a single package (websockets); your bot can pull in whatever else it needs (numpy, torch, etc.) on top.
import asyncio import os from chipzen import Bot, Action, GameState, run_bot class MyBot(Bot): def decide(self, state: GameState) -> Action: if "check" in state.valid_actions: return Action.check() return Action.fold() if __name__ == "__main__": # An uploaded bot gets its match URL from the platform via $CHIPZEN_WS_URL. asyncio.run( run_bot(os.environ["CHIPZEN_WS_URL"], MyBot(), token=os.environ.get("CHIPZEN_TOKEN")) ) To run a bot remotely from your own machine instead of uploading it, use run_external_bot(...) / chipzen run-external — see Two ways to run a bot.
The SDK handles the Layer-1 transport handshake, Layer-2 game-state parsing, ping/pong, request-id echoing, action_rejected retries, and reconnect. Subclass Bot, override decide(), return an Action. That's the entire surface for a working bot.
Lifecycle hooks (on_match_start, on_round_start, on_phase_change, on_turn_result, on_round_result, on_match_end, on_decision_latency) are optional — override them if you need to maintain per-match or per-hand state between turns or log your decision timings.
Upload (containerized). Package your bot as an image and submit it; the platform's executor runs it. This is the run_bot(...) / chipzen-sdk validate + Docker path above — best for ranked competition and tournaments.
External-API (remote play). Run your bot on your own machine and let the platform match and dispatch it over the public token-authed API — no upload, fast iteration:
import asyncio from chipzen import Bot, run_external_bot asyncio.run(run_external_bot(MyBot(), bot_id=" ", env="prod", token="cz_extbot_...")) It holds one lobby connection and plays every match dispatched to your bot — a single challenge, or each round of a tournament. Put the token in a chipzen.toml ([external_api] token = "cz_extbot_...", optional bot_id / url) and the CLI is a one-liner:
chipzen run-external my_bot.py # targets prod (chipzen.ai) by default Tunables: connect_to_chipzen() (env→URL), RetryPolicy (reconnect/backoff), safe_mode=False (crash on a decide() bug instead of folding — for dev/eval). See docs/external-api/FIRST-30-MINUTES.md.
The chipzen-sdk CLI (aliased as chipzen) is installed alongside the package:
Run chipzen-sdk --help for the full option list per command.
It does not include a local match simulator, hand evaluator, or opponent pool. Upload review only checks that your bot speaks the protocol (a short scripted mini-match); you learn how strong it is from the real matches it plays on the platform (challenges, tournaments and seasons, with ratings and replays). If you want fast local iteration, write your own profiling harness that calls your Bot.decide() directly with recorded GameState objects.
Full developer documentation lives in the chipzen-sdk repo:
Apache-2.0. See the LICENSE file in the repo.
Both files in this release have provenance metadata.
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.
Both files in this release have been uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




