Skip to content

Repository files navigation

sts2-cli-agent

An AI agent that plays Slay the Spire 2 via the sts2-cli headless engine.

Setup

  1. Clone and set up sts2-cli first
  2. 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

Usage

HTTP Bridge

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}}'

Claude Code Agent

Use the /play slash command in Claude Code to have the LLM play a full game:

/play Ironclad
/play Silent

Files

FileDescription
sts2_bridge.pyHTTP bridge to headless game engine
auto_play.pyHeuristic auto player
combat_helper.pyCombat decision helper
validate_learning.pyLearning file validator
bug.mdKnown simulator bugs
learning/Per-character strategy notes (EN/CN)

Configuration

Set STS2_CLI_DIR to point to your sts2-cli checkout. Defaults to ../sts2-cli/.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages