Source-linked AI summary
AgenticSTS: A Bounded-Memory Testbed for Long-Horizon LLM Agents
Xiangchen Cheng, Yunwei Jiang, Jianwen Sun, Zizhen Li, Chuanhao Li, Xiangcheng Cao, Yihao Liu, Fanrui Zhang, Li Jin, Kaipeng Zhang
TL;DR
Long-horizon agents need memory interfaces that make each decision’s available evidence bounded and inspectable. This paper builds a typed-retrieval testbed without raw transcript growth and finds that the largest fixed-A0 difference occurs with triggered skills enabled, rising from 3/10 to 6/10 wins.
Problem
Long-horizon agent research lacks bounded, inspectable, reusable memory interfaces that isolate how individual memory components shape decisions.
Method
The paper evaluates a bounded contract that assembles each decision from typed retrieval while disallowing unbounded cross-decision transcripts.
Results
3/10 baseline wins versus 6/10 with triggered L5 skills in the fixed-A0 matrix, although the difference is directional rather than statistically decisive.
Takeaways & Limitations
Explicit typed memory contracts make long-horizon agent behavior easier to audit, reproduce, and ablate.
Takeaways & Limitations
The evaluation is training-free and single-game, targeting turn-based decision settings rather than continuous control, visual input, or cross-game transfer.
Abstract
from arXiv · showhide
Memory for a long-horizon LLM agent is a contract about what each future decision is allowed to see. The simplest contract appends past observations, tool calls, and reflections to every prompt, which makes prior context easy to access but also turns it into a jumbled mixture in which the effect of any single memory component is hard to isolate. We introduce and instrument an alternative bounded contract: every decision is made from a fresh user message assembled by typed retrieval, with no raw cross-decision transcript appended. The prompt thus stays bounded across runs of any length, and any single layer can be ablated in isolation. We instantiate the contract in Slay the Spire 2, a closed-rule stochastic deck-building game whose runs require hundreds of tactical and strategic decisions. A public online benchmark of frontier LLMs on the same game reports zero wins at the lowest difficulty across five configurations, and the developer-reported human win rate at the same difficulty is 16%; the task is hard but not saturated. Within our harness, a fixed-A0 ablation shows the largest observed difference when triggered strategic skills are enabled: the no-store baseline wins 3/10 games and adding the skill layer 6/10. At this sample size the comparison is directional rather than statistically decisive (Fisher exact p\approx0.37); a cross-backbone probe and public accumulating-context baselines are reported as operational comparisons rather than controlled tests of the contract variable itself. We release a reproducible testbed: 298 completed trajectories with condition tags, frozen memory/skill snapshots, prompt records, and analysis scripts -- an agent design and a validated, reusable methodology for studying how explicit memory layers shape long-horizon LLM-agent decisions.
1 Introduction
AgenticSTS treats long-horizon memory as a bounded, typed contract that selects evidence for each decision rather than appending raw transcripts. In Slay the Spire 2, this contract enables layer ablations, directional evidence for triggered skills, high-difficulty ladder probes, and reproducible re-analysis.
- Slay the Spire 2 provides a closed, text-readable, stochastic deck-building environment requiring hundreds of local and long-range decisions under delayed consequences and random events.Its non-saturated difficulty makes it a testbed for long-horizon strategic agents.
- AgenticSTS composes each decision from five typed slots—fixed instructions, schemas, rules, episodic summaries, and strategic skills—without appending raw cross-decision transcripts.Layers L1–L2 are fixed; L3 can be filtered; L4–L5 can be disabled, frozen, or made writable between runs.
- 3/10 baseline wins versus 6/10 with triggered L5 skills at fixed A0, the largest observed difference, but the result is directional rather than statistically decisive (Fisher exact p ≈0.37).The five typed slots remain individually ablatable, and the 6/10 result applies to each scaffolded cell.
- Across 298 completed trajectories, the testbed supports fixed-A0 memory comparisons, cross-backbone probes, and ladder experiments reaching high-difficulty A6–A8.The cross-backbone probe swaps Gemini, Qwen, and DeepSeek, while the frozen stack is backbone-sensitive.
- The released archive contains condition-tagged trajectories, SHA-anchored memory snapshots, decision-time prompts, and Wilson/bootstrap scripts for re-aggregation and cross-condition analysis.The archive supports recomputing the headline fixed-A0 cells and slicing trajectories by condition tag.
2 Related Work
Prior work spans prompt-visible histories, externalized memory, skill libraries, and stochastic game testbeds, but does not isolate which prior experience enters each decision. AgenticSTS combines these threads in a bounded-memory contract that enables matched comparisons of alternative memory routes under one harness.
- Positioning: The paper targets a shared gap across four research threads: identifying which slice of prior experience enters each decision and ablating that route.The threads are prompt-history agents, externalized memory, skill libraries, and long-horizon game testbeds.
- Loop and context engineering: Appending transcripts and tool logs causes context growth, while token-poor loops require explicit memory stores; this work isolates that memory-and-context policy axis.Loop engineering specifies goals, tools, termination, memory, and context for control loops spanning hundreds of steps and multiple sessions [15].
- Typed and structured memory: Externalized-memory systems move information from raw history into stores, whereas this work role-types slots by mutability and retrieval source for action policies in stochastic environments.Prior typed-memory evaluations mostly use dialogue or QA settings, while this setting feeds retrieval into an action policy.
- Self-evolving skill libraries: External skill libraries extend long-horizon agent design, with this work’s L5 guides corresponding to context and policy components selected by triggers for the next decision.Voyager pioneered agent-written skills, followed by SkillsBench, SkillOS, Memento-Skills, SAGE/SkillRL, SkillWeaver, ExpEL, and DyStIL [36] [49].
- LLM agents on games: Existing Slay the Spire 2 agents do not report matched ablations over prompt strictness, episodic memory, and triggered skills, motivating a shared bounded-memory contract for future comparisons.Broader game benchmarks provide stochastic testbeds, while prior card-game work includes policy networks, draft models, cross-game evaluation, and simplified-rule Slay the Spire play [12, 19, 26, 14, 33, 48, 40, 45, 4, 38, 3, 8].
3 The Slay the Spire 2 Testbed
The testbed uses Slay the Spire 2, a text-representable but long-horizon stochastic deck-building game requiring sustained planning across contingent decisions. It combines fixed-A0 component isolation with an auto-mode Ascension ladder and releases 298 fully recorded trajectories under a bounded-memory decision protocol.
- Testbed rationale: Slay the Spire 2 provides a text-readable, long-horizon testbed in which agents build decks, fight stochastic battles, choose routes and rewards, and make many contingent decisions.Rules, cards, relics, enemies, events, legal actions, and state transitions can be represented as text records, while typical runs last a median ∼80 minutes and contain 67 LLM strategic calls.
- Evaluation protocol: The 11-level Ascension ladder supports both fixed-A0 component isolation and auto-mode progression after victories and retries after defeats.Higher Ascensions stack modifiers that change strategic priorities, so progression is not merely repeating A0 with larger numbers.
- Released benchmark: The released archive contains 298 completed independent trajectories spanning fixed-A0 ablations, cross-backbone probes, and auto-mode Ascension runs.Each trajectory records the target and reached Ascension, outcome, duration, LLM-call counts, condition tag, and active memory/scaffold setting; the headline fixed-A0 comparison uses the first ten games per condition in a balanced 50-game subset.
- Benchmark interface: The game interface is paired with a bounded-memory decision protocol, making the trajectories a reusable evaluation surface beyond the game alone.Public implementations enable LLM action, while independently evaluated AGI-Eval configurations report no listed victory.
- Context audit: Figure 3 audits context-growth mechanics across ten fixed-A0 runs, contrasting bounded-memory prompts with a transcript-appending counterfactual exhibiting naive O(c^2) growth.The audit uses two runs per cell and is not a win-rate comparison.
4 Architecture: Per-Decision Typed Retrieval
AgenticSTS replaces unbounded transcript accumulation with fresh decision prompts assembled from five typed retrieval layers, preserving bounded context while making memory components independently controllable. The architecture separates immutable prompts and game knowledge from episodic memories and triggered strategic skills, enabling layer-specific evaluation.
- Per-decision interface: Fresh prompts retrieve from five typed layers instead of appending raw cross-decision transcripts, while bounded stores preserve information across decisions.Only L4 episodic memory and L5 skill discovery can write back in the experiments.
- Bounded context: Capped retrieval budgets keep configured prompt size O(|sys| + sthread + ∑i ki · si), whereas transcript interfaces can grow as Ω(d · ¯s) across d decisions.The released fixed-A0 runs include a per-cell linearity audit with N=2 runs per cell and 10 runs total.
- Ablatable layers: Named slots allow prompt strictness, rule retrieval, episodes, and strategic skills to be toggled independently, exposing which layer changes behavior.Condition tags on runs, stores, prompts, and scripts support reuse across evaluations.
- Typed substrates: The five substrates comprise immutable role and state schemas, patch-refreshable game rules, case-based episodic summaries, and trigger-indexed strategic guides.Raw logs are not used as similarity RAG because nearby-looking states can differ strategically; the system retrieves summaries and triggered guides instead.
- Layer comparison: In the fixed-A0 matrix, full-frozen with L4 and mode-a without L4 each win 6/10, leaving L5 associated with the headline lift.L4 remains part of the longer-horizon substrate used in auto-mode streams attempting A6–A8.
5 Experimental Methodology
The evaluation separates fixed-difficulty layer ablations, cross-backbone transfer, and post-victory Ascension climbing under a bounded-memory contract. It uses balanced per-condition sampling, interval estimates matched to metric types, and a reproducible archive of runs, prompts, and frozen artifacts.
- Experimental questions: The study asks which prompt and memory layers matter at one difficulty, whether a frozen L4+L5 stack transfers across backbones, and how far postrun writing climbs the Ascension ladder.The fixed-A0 matrix measures reliability at one difficulty, whereas the auto-mode stream measures the observed climb endpoint.
- Fixed-A0 ablation: The fixed-A0 experiment is a five-cell ablation spanning baseline-strict, prompt-only, human-seeded L5, template-filled L5, and full-frozen L4+L5 conditions.Figure 4 cautions that adjacent cells do not always isolate a single mechanism; baseline-strict to prompt-only changes a prompt-package/strictness group.
- Cross-backbone probe: The frozen L4+L5 stack, derived from Gemini 3.1 Pro trajectories, is probed by comparing baseline-strict and full-frozen at A0 on Qwen 3.6 27B, DeepSeek V4 Pro, and Gemini 3.1 Pro.The Qwen and DeepSeek probe adds N=5 completed games per backbone-cell, while Gemini reuses the corresponding fixed-A0 cells as anchors.
- Analysis protocol: The headline fixed-A0 comparison uses the first ten completed games per condition by start time, yielding a balanced 50-game comparison with Wilson 95% confidence intervals.Continuous scores use 5,000-bootstrap 95% intervals, while the descriptive pooled scaffolded row uses an exact Clopper–Pearson interval.
- Reproducibility: The release contains completed runs, condition tags, analysis scripts, frozen memory and skill snapshots, and representative prompt records for recomputing reported win rates.The same archive supports a matched accumulating-context experiment using the same codebase, run protocol, and scoring scripts.
6 Results
Within the balanced fixed-A0 matrix, triggered skills show the largest observed lift, but the small-sample comparison is directional rather than statistically decisive. Complementary ladder, mode-transfer, and cross-backbone results show that performance depends on horizon, skill construction, and backbone.
- 6.1 Difficulty calibration: 3/10 baseline-strict wins, with Wilson 95% CI [10.8, 60.3] and mean score 70.4, placing the task in a hard but non-saturated regime.Public comparisons report zero listed A0 victories across five frontier-model configurations, while Mega Crit reports a 16% player-side A0 win rate across 240M community runs; these are not matched baselines.
- 6.3 Auto-mode ladder: Postrun-active streams attempt A6–A8, whereas no-postrun streams stop at A2–A4, showing the highest difficulty reached when stores can be updated after runs.This ladder complements the fixed-A0 matrix by measuring horizon under store updates rather than isolating component lift at fixed difficulty.
- 6.4 Skill construction: Mode-b-frozen matches mode-a’s 60% A0 win estimate, with score-diff CI [−18.6, +24.8], indicating template-filled skills are competitive with the seed library.The comparison uses mode B without hand-authored skill prose.
- 6.5 Cross-backbone transfer: +84.5% mean score for Qwen but −18.1% for DeepSeek after transferring the Gemini-trained full-frozen L4+L5 stack; both remain at 0/5 wins, showing backbone-sensitive transfer.Table 3 reports N=5 per non-Gemini cell and N=10 for Gemini; the ∆% values are score-only signals for Qwen and DeepSeek.
- 6.6 L4 analysis: At A0, mode-a without L4 and full-frozen with L4 have the same win point estimate, although L4 remains the longer-horizon substrate in ladder streams.The score-difference CI is [−21.7, +14.9].
7 Comparison with Open-Source Accumulating-Context Agents
A same-testbed operational comparison found that two faithfully replicated transcript-accumulating StS2 agents performed far below the bounded-memory agents while requiring substantially more time and fresh LLM tokens. The comparison is directional rather than a controlled ablation: it evaluates shipped community systems, including interface failures, not whether accumulating context can ever succeed.
- Faithful replication: The comparison used author-intended configurations, author-owned mod builds and MCP servers, original skill documents, fresh Silent A0 runs, and an audit confirming no project content entered competitor contexts.Exactly one mod was loaded at a time, with only minimal load-compatibility patches and no agent-logic changes.
- Effect: 6/10 wins for our full-frozen bounded-contract cell versus 0/5 for both STS2MCP and CharTyr at A0, with mean score 82.1 for the full-frozen cell.STS2MCP reached mean floor 17.6, while CharTyr reached mean floor 5.6; CharTyr’s frequent invalid_action errors contributed to early deaths.
- Speed: 9.9 / 8.5 versus 2.3 minutes per floor reached, so the accumulating agents required approximately 4× more wall-clock time.Provider-reported LLM latency accounted for 96% of competitor wall-clock time, so the gap was not primarily caused by harness pacing.
- Cost: 66–90× more fresh non-cached LLM tokens per score point were required by the accumulating agents, exceeding 450× under raw ingested context.Even pricing every recorded action of the bounded agent as a full strategic call remained an intentionally absurd upper bound.
- What this comparison does and does not show: These results show that the two publicly available transcript-accumulating agents fell below even the no-store bounded baseline, but do not establish that accumulating context can never win StS2.The systems were community projects rather than tuned baselines, and CharTyr’s losses were partly attributable to interface errors.
8 Discussion
The discussion frames the bounded typed memory interface as an evaluable design object rather than a prompting convention. It supports auditable attribution and bounded online context for closed-rule agent loops, while broader applicability to open-ended production systems remains untested.
- Interpretation and scope: The bounded typed contract makes memory-interface effects evaluable, supports fixed-A0 wins, and isolates the largest within-harness difference at the L5 skill layer.The L5 result is directional at the reported sample size, and fixed-difficulty performance remains distinct from ladder endpoints.
- Implications: Typed memory slots make attribution tractable by tracing gains to specific layers instead of to undifferentiated “more context.”This separation is presented as a basis for broader applicability.
- Implications for loop engineering: Per-decision typed retrieval keeps online context bounded, typed stores make updates auditable, and postrun writes expose learning as explicit artifacts.The contract is proposed as a measurable memory-stage design for closed-rule, turn-based agent loops; its suitability for open-ended production loops is untested.
9 Conclusion
AgenticSTS provides a bounded, typed, and ablatable resource for studying long-horizon LLM-agent memory at decision time. Its aligned archive preserves the logs, frozen stores, prompts, and scripts needed to evaluate future memory-interface changes, while the fixed-A0 result remains directional rather than statistically decisive.
- 9 Conclusion: The fixed-A0 matrix shows its largest observed difference when triggered L5 skills are enabled, but the result is directional rather than statistically decisive.The conclusion qualifies this finding by noting the sample-size limitation.
- 9 Conclusion: AgenticSTS releases a long-horizon LLM-agent resource with bounded, typed, and ablatable memory at decision time.The resource is designed to isolate memory-interface effects during decisions.
- 9 Conclusion: The 298-trajectory archive includes aligned logs, frozen stores, prompts, and scripts for future memory-interface studies.The release keeps the game, denominators, stores, and prompts aligned.
Limitations · Appendix
The release bounds its claims by using a 50-game headline subset, single-character coverage, and a training-free single-game design, while providing artifacts for future direct comparisons and re-analysis. Several broader evaluations—including matched human inference, cross-character coverage, and continuous or cross-game settings—remain outside the present resource.
- Limitations: 50 games form the balanced headline fixed-A0 subset, while smaller cross-backbone and ladder streams remain separate diagnostics rather than pooled results.The sample size is at or above that typical for recent LLM-agent game benchmarks [36].
- Limitations: The release enables a same-codebase accumulating-context row as a direct comparison with the bounded contract.It provides condition tags, scoring scripts, frozen stores, run protocols, prompt records, and analysis scripts for that comparison.
- Limitations: Headline runs cover only the Silent character and the present game version, with tagged trajectories enabling version-stratified re-analysis.Cross-character runs require repopulating the typed L3/L4/L5 substrate for each new character.
- Limitations: Matched human inference is outside the present resource because it requires a separately designed user study with controlled denominators.Mega Crit, Spiracle, and AGI-Eval are used only for difficulty and ecosystem context, with cached snapshots released alongside the artifact.
- Limitations: The architectural evaluation is training-free and single-game, targeting turn-based Slay the Spire 2 decision settings rather than broader control regimes.Continuous or streaming control, visual input, multiagent play, online human correction, model-internal fine-tuning, and cross-game transfer are deliberate non-targets.
- Limitations: Author-curated stub templates and expert seed skills limit the release’s scope, while Mode B reports within-interface template filling as one operating point.These design choices are part of the stated architectural scope rather than broad claims about unconstrained agent construction.
A Evaluation archive and aggregation rule
The evaluation archive makes reported win rates and scores reproducible from completed-run records, while preserving condition-specific streams and explicit aggregation rules. It documents interval estimation for win rates and scores, including the treatment of pooled scaffolded results.
- Archive and aggregation: Each reported win rate is recomputable from one record per trajectory, condition tags, frozen snapshots, prompt records, and analysis scripts.A cell’s win rate is victories divided by completed games in that cell.
- Archive and aggregation: Only the balanced fixed-A0 subset enters the headline ablation, and evaluation streams are never pooled.The denominator map specifies which runs contribute to the headline comparison.
- Score aggregation: Derived scores assign bosses as 0 below floor 18, 1 below floor 34, 2 otherwise, and 3 for victories.Per-cell floor and boss-clear counts reproduce the reported mean scores.
- Uncertainty estimation: Win-rate intervals use Wilson 95% intervals [43], while score intervals use 5,000-resample percentile bootstrap 95% intervals [9].The descriptive pooled scaffolded row instead uses an exact Clopper–Pearson interval and is labeled accordingly.
B Memory contract: five typed layers · C Concrete prompt and learning examples
The agent uses a five-layer typed memory contract with controlled mutability and no raw cross-decision transcript. Each decision assembles a fixed-order prompt, while concrete skills encode state-conditioned rules rather than retrieved logs.
- B Memory contract: five typed layers: Five typed stores provide the memory contract, with fixed L1/L2, filterable L3, and selectively disabled, frozen, or writable L4/L5.Table 6 defines the contract as typed slices received at each decision; raw cross-decision transcript is not appended.
- C Concrete prompt and learning examples: Decision prompts retrieve fired L5 skills, L4 episodes, L3 game facts, the L2 state prompt, and valid-action schema hints in a fixed order.This ordering is shared across non-combat decision states.
- C Concrete prompt and learning examples: Combat is the sole intra-fight stateful container, retaining only combat start, an acknowledgement, and the latest user state per round.Earlier combat rounds are not copied into the bounded message list.
- C Concrete prompt and learning examples: The prompt instantiates retrieved expert knowledge as compact rules, including early reward priorities that solve damage before block, draw, and energy.The supplied example labels this content as a silent draft and shop rule.
- C Concrete prompt and learning examples: Card-specific and game-mechanics stores distinguish strategic insights from concrete facts, exemplified by DodgeAndRoll’s delayed block and Slice’s zero-cost damage.The mechanics example also records DodgeAndRoll’s upgrade as +2 and Slice’s upgrade as Damage +3.
- C Concrete prompt and learning examples: The concrete prompt includes explicit game state, such as HP, gold, act, and floor, alongside a decision-format schema listing valid reward actions.The example state is HP 57/57, gold 55, Act 1, Floor 7, with choose_reward_card and choose_reward_alternative as valid actions.
- C Concrete prompt and learning examples: A representative L5 skill encodes Boolean-triggered rules for a boss exhausting attacks and skills on turns 2, 5, 8, and 11.It instructs the agent to preserve core scaling cards and prefer powers or natively exhausting cards, rather than retrieving raw logs.
D External calibration and source boundaries · E Full decision-time prompt exhibits
External Slay the Spire 2 statistics calibrate difficulty and ecosystem context, with cached source snapshots released for reproducibility. The decision-time exhibits show how typed substrates assemble bounded prompts for combat and shop planning, including schemas, rules, retrieved knowledge, current state, and structured actions.
- D External calibration and source boundaries: External statistics serve only to calibrate difficulty and ecosystem context, with source snapshots released so the calibration rows can be reproduced.Table 7 explicitly limits the role of external numbers to calibration rather than agent-performance evaluation.
- E Full decision-time prompt exhibits: The prompt exhibits print verbatim model-facing system and user content assembled from typed substrates, while annotations identify the L1–L5 layers.The layers cover protocol/schema, current state and action space, rules and mechanics, episodic notes, and strategic skills.
- E.1 Combat decision: The combat exhibit is the longest example, combining shared instructions, setup context, retrieved skills, episodic notes, game rules, and the current round state.It demonstrates the full decision-time interface rather than a shortened prompt summary.
- E.1 Combat decision: Combat decisions require valid JSON in a decision tag, with reasoning required and plan actions executed in the specified order.The schema and execution-order requirements make the model output directly actionable by the harness.
- E.1 Combat decision: Combat prompts combine tactical mechanics with strategic and episodic guidance, including energy and hand-reset rules, HP conservation, retrieved combat principles, and prior encounter knowledge.The supplied combat context includes both general rules and situation-specific guidance such as reading enemy intents, preserving HP, and using draw effects immediately.
- E.1 Combat decision: The combat exhibit ends with a structured plan using Powdered Demise, Neutralize+, Mind Blast, Backflip+, Infinite Blades, and Survivor before ending the turn.This concrete response shows how the assembled prompt is converted into an executable multi-action decision.
- E.2 Shop-planning decision: The shop exhibit reuses the interface while adding shop-specific deckbuilding guidance, including damage, defense, draw, energy, and two-phase foundation-versus-commitment reasoning.It omits repeated shared role and generic schema content, and focuses on shop-specific additions and the shop user prompt.
- E.2 Shop-planning decision: The shop response buys Blade Dance, Leg Sweep, Mind Blast, and Swift Potion while skipping other affordable items with item-level reasons.This provides the concrete shop-planning output corresponding to the shop-specific prompt exhibit.