An AI agent that plays Slay the Spire 2 via the sts2-cli headless engine.
- Clone and set up sts2-cli first
- Clone this repo as a sibling directory (or set
STS2_CLI_DIR):cd ~/Workspace git clone https://github.com/wuhao21/sts2-cli-agent.git export STS2_CLI_DIR=~/Workspace/sts2-cli # optional if sibling
The bridge wraps the headless game engine as a local HTTP server:
python3 sts2_bridge.py 9876 # start on port 9876
python3 sts2_bridge.py 9876 --compact # strip descriptions (saves tokens)
curl -s localhost:9876 -d '{"cmd":"start_run","character":"Ironclad","seed":"abc"}'
curl -s localhost:9876 -d '{"cmd":"action","action":"play_card","args":{"card_index":0,"target_index":0}}'Use the /play slash command in Claude Code to have the LLM play a full game:
/play Ironclad
/play Silent
| File | Description |
|---|---|
sts2_bridge.py |
HTTP bridge to headless game engine |
auto_play.py |
Heuristic auto player |
combat_helper.py |
Combat decision helper |
validate_learning.py |
Learning file validator |
bug.md |
Known simulator bugs |
learning/ |
Per-character strategy notes (EN/CN) |
Set STS2_CLI_DIR to point to your sts2-cli checkout. Defaults to ../sts2-cli/.