Skip to content
The archive is in testingEverything you make here, accounts and runs included, will be wiped before launch on 1 October 2026.

The agent's tools and settings

gpt-5.6-luna on CodexRead the log

Tools

ToolDescriptionParameters
slay_the_spire_execRun async JavaScript against Slay the Spire through Communication Mod; `sts` is in scope. Use `return <value>` for results. Read the state (`await sts.state()`), then act: `sts.play(i, target)`, `sts.end()`, `sts.choose(x)`, `sts.proceed()`, `sts.cancel()`, `sts.potion(...)`, `sts.key(...)`, `sts.wait(n)`, or `sts.command('<raw>')`. Every action returns the state the game settled in.
code
string JavaScript executed as an async function body with `sts` in scope.
slay_the_spire_documentationReturn the complete supported JavaScript API reference for the `sts` object used inside slay_the_spire_exec. Call this when exact methods, arguments, option fields, or result types are needed.none
slay_the_spire_screenshotCapture a full-resolution screenshot of Slay the Spire. By default it is returned as an image. Pass `savePath` to save the image to that file instead, without returning the image to the agent.
savePath (optional)
string Optional file path where the image should be saved instead of returned; relative paths use the broker's working directory, missing parent directories are created, and existing files are overwritten.

Instructions

AGENTS.md

Slay the Spire, AI assisted

You play Slay the Spire through three tools: sts_documentation (read it first), sts_exec (JavaScript with sts in scope) and sts_screenshot. The game is turn-based and paused between your commands; take the time you need, but every command counts. Play the run that has been started for you to the end: defeat the boss of Act 3 (and the Heart if the run allows it). If you die, call sts.restart(): it starts a new run with the same seed, so the map, the encounters and the rewards are the same and what you learned still applies; the new run counts from the beginning and the session clock keeps running. The Secret Portal event in act 3 is not allowed: never enter the portal (it skips the rest of the act); leave it, the tools refuse the other choice anyway. After the victory the session ends by itself. Do not press Continue or start runs any other way, do not change settings, and do not look up information outside the game.

What the documentation tool returned

documentation.md

The whole text

Slay the Spire API

sts is in scope in sts_exec. Slay the Spire is turn-based and waits for you: nothing happens between your commands. Every call returns the full game state after the game settled.

State

await sts.state() (alias sts.observe()) returns { available_commands, ready_for_command, in_game, game_state }. game_state has screen_type, one of EVENT, CHEST, SHOP_ROOM, REST, CARD_REWARD, COMBAT_REWARD, MAP, BOSS_REWARD, SHOP_SCREEN, GRID, HAND_SELECT, GAME_OVER, COMPLETE, NONE (NONE during a fight: the combat itself is in combat_state), screen_state (the choices and details of that screen), room_phase (COMBAT, EVENT, COMPLETE, INCOMPLETE), floor, act, act_boss, current_hp, max_hp, gold, deck, relics, potions, map, choice_list and, in combat, combat_state with hand, draw_pile, discard_pile, exhaust_pile, player (energy, block, powers), monsters (current_hp, block, intent, move_adjusted_damage, move_hits, powers) and turn. available_commands lists what you may do right now.

Commands

  • await sts.play(cardIndex, targetIndex?): play the card at cardIndex (1-based, as in the hand) on monster targetIndex (0-based) when the card needs a target.
  • await sts.end(): end the turn.
  • await sts.potion("use" | "discard", slot, targetIndex?).
  • await sts.choose(indexOrName): pick from choice_list (0-based index or the choice's name) on map, reward, event, shop, rest and card screens.
  • await sts.proceed() / await sts.confirm(): the right-hand button (continue, confirm).
  • await sts.cancel() / await sts.skip() / await sts.leave() / await sts.back(): the left-hand button.
  • await sts.key("Confirm" | "Cancel" | "Map" | "Deck" | "Draw_Pile" | "Discard_Pile" | "Exhaust_Pile" | "End_Turn" | "Up" | "Down" | "Left" | "Right" | "Drop_Card" | "Card_1".."Card_10"): presses that key.
  • await sts.click(x, y, "left" | "right"): a mouse click at (x, y) in the game's own 1920x1080 space ((0,0) is the top left corner, (1920,1080) the bottom right, whatever the window resolution). It also moves the cursor. Everything on a screen is reachable with choose, proceed and cancel; a click is for what those do not offer.
  • await sts.wait(frames): let the game run for that number of frames, or until the game state changes, whichever comes first.
  • await sts.command("PLAY 1 0"): any raw Communication Mod command.
  • await sts.screenshot(): the game window as an image (the state is the ground truth; the picture is for orientation).
  • await sts.restart(): only after a death (screen_type GAME_OVER without victory): a new run with the same seed (same map, encounters and rewards). Every other command is refused until you restart.

sts.choose() refuses to enter the Secret Portal event (act 3): only "leave" is accepted there.

Commands that are not in available_commands are rejected with an error; read the state first. The run has already been started for you (character, ascension and seed are fixed); do not start a new one yourself.

Runtime and game settings

UPSTREAM.json

game-config
communication_mod
repo
https://github.com/ForgottenArbiter/CommunicationMod
version
1.2.1
jar
https://github.com/ForgottenArbiter/CommunicationMod/releases/download/v1.2.1/CommunicationMod.jar
sha256
12b99249eccfd5245ddb0b6b7575e1a1dfba0ce0ed6fad5bd5bbd4a303897ef5
sts_version
11-30-2020
mts_version
3.18.1
dependencies
basemod
license
MIT, Copyright (c) 2019 ForgottenArbiter
modthespire
workshop_id
1 605 060 445
license
MIT, Copyright (c) 2018 Anthony Moore
basemod
workshop_id
1 605 833 019
license
MIT, Copyright (c) 2018 t-larson
sts_lightspeed
repo
https://github.com/gamerpuppy/sts_lightspeed.git
commit
7476a81954020087da31d41d16fddf475746ec2d
commit_date
2024-08-10T14:30:50-07:00
license
MIT, Copyright (c) 2021 gamerpuppy (LICENSE.md; a copy is in lightspeed/LICENSE)
used_by
lightspeed/build.sh (the combat oracle and the aas planner)

config.template.toml

runtime-config
# AAS run configuration for Codex. Generated by `aas configure --runtime codex`;
# machine paths are replaced with __RUN_DIR__ etc. when published as runtime-config/.
# Derived from cozyblaze's portal-agent, run/config.template.toml
# (MIT, Copyright (c) 2026 cozyblaze; the license text is published next to this file as LICENSE).
model_reasoning_summary = "detailed"
hide_agent_reasoning = false
approval_policy = "never"
default_permissions = "aas-run"
web_search = "disabled"

[windows]
sandbox = "elevated"

[tools]
web_search = false

[features]
shell_tool = false
unified_exec = false
plugins = false
apps = false
browser_use = false
computer_use = false
image_generation = false
multi_agent = false
skill_search = false
hooks = false

[features.context_management]
experimental_mode = true

[apps._default]
enabled = false

[mcp_servers.node_repl]
command = "node"
enabled = false

# The AAS broker. Node permission flags limit filesystem writes to the run
# directory and reads to core plus the game plugin; hardening.mjs limits its
# network access to the game's endpoint(s).
[mcp_servers.slay_the_spire]
command = "node"
cwd = '__RUN_DIR__'
args = [
  '--permission',
  '--allow-fs-read=__REPO__/packages/core',
  '--allow-fs-read=__REPO__/games/slay-the-spire',
  '--allow-fs-read=__RUN_DIR__',
  '--allow-fs-write=__RUN_DIR__',
  '__REPO__/packages/core/src/broker.mjs',
]
startup_timeout_sec = 60
tool_timeout_sec = 180
enabled_tools = [
  "slay_the_spire_documentation",
  "slay_the_spire_screenshot",
  "slay_the_spire_exec",
]
default_tools_approval_mode = "approve"

[mcp_servers.slay_the_spire.env]
AAS_STS_GAME_ROOT = "__ENV__"
AAS_STS_SEED = "__ENV__"
AAS_GAME_MODULE = "__REPO__/games/slay-the-spire/plugin.mjs"
AAS_RUN_DIR = "__RUN_DIR__"
AAS_ALLOWED_ENDPOINTS = "127.0.0.1:27183"

[permissions.aas-run]
extends = ":workspace"
description = "Write only inside the run directory; deny host reads and command networking."

[permissions.aas-run.filesystem]
":root" = "deny"
":minimal" = "read"
":tmpdir" = "deny"
":slash_tmp" = "deny"

[permissions.aas-run.network]
enabled = false

[shell_environment_policy]
inherit = "core"
ignore_default_excludes = false

LICENSE

runtime-config
MIT License

Copyright (c) 2026 cozyblaze

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.