Command Palette
Search for a command to run...
AgenticSTS: 장기적 LLM 에이전트를 위한 제한된 메모리 테스트베드
AgenticSTS: 장기적 LLM 에이전트를 위한 제한된 메모리 테스트베드
Xiangchen Cheng Yunwei Jiang Jianwen Sun Zizhen Li Chuanhao Li Xiangcheng Cao Yihao Liu Fanrui Zhang Li Jin Kaipeng Zhang
초록
장기적 LLM 에이전트의 메모리는 각 미래의 결정이 무엇을 볼 수 있는지에 대한 계약이다. 가장 단순한 계약은 과거의 관찰, 도구 호출, 성찰을 모든 프롬프트에 추가하는 것으로, 이는 이전 맥락에 쉽게 접근할 수 있게 하지만 동시에 개별 메모리 구성 요소의 효과를 분리하기 어려운 뒤섞인 혼합물로 만든다. 우리는 대안적인 제한된 계약을 도입하고 도구화한다: 모든 결정은 유형화된 검색으로 구성된 새로운 사용자 메시지로부터 이루어지며, 가공되지 않은 결정 간 대화 기록은 추가되지 않는다. 따라서 프롬프트는 실행 길이에 관계없이 제한된 상태를 유지하며, 어떤 단일 계층도 독립적으로 제거될 수 있다. 우리는 이 계약을 닫힌 규칙의 확률적 덱 빌딩 게임인 Slay the Spire 2에서 구현한다. 이 게임의 실행은 보통의 인간이 45분 동안 50번 이상의 결정을 필요로 하며, 승률은 대략 10%이다. 마르코프 기준선은 0승을 거두었다. 제한된 작업 중에서, 단기-계획 기술 계층은 우리의 하네스 내에서 활성화될 때 가장 큰 관찰된 차이를 보여준다: 저장소 없는 기준선은 3/10 게임을 승리하고, 기술 계층을 추가하면 6/10을 승리한다. 이 표본 크기에서 비교는 통계적으로 결정적이기보다는 방향성을 제시한다(Fisher 정확 검정 p ≈ 0.37). 교차 백본 탐침과 공개 누적 맥락 기준선은 계약 변수 자체에 대한 통제된 테스트가 아닌 운영적 비교로서 보고된다. 우리는 조건 태그, 고정된 메모리/기술 스냅샷, 프롬프트 기록, 분석 스크립트가 포함된 298개의 완료된 궤적을 갖춘 재현 가능한 테스트베드를 공개한다. 이는 명시적 메모리 계층이 장기적 LLM 에이전트 결정을 어떻게 형성하는지 연구하기 위한 에이전트 설계와 검증된 재사용 가능한 방법론이다.
One-sentence Summary
A team from Alaya Lab, Shanghai Jiao Tong University, et al. introduces AgenticSTS, a bounded-memory testbed where LLM agents receive fresh prompts via typed retrieval rather than accumulating transcripts, allowing isolated ablation of memory layers, and their ablations in the game Slay the Spire 2 show that triggered strategic skills improve win rate from 103 to 106, demonstrating a reproducible methodology for studying long-horizon agent memory.
Key Contributions
- A bounded-memory contract is introduced where each decision prompt is assembled from typed retrieval without appending a raw cross-decision transcript, keeping prompts bounded across runs and enabling independent ablation of memory layers; the contract is instantiated in the stochastic deck-building game Slay the Spire 2.
- Ablation experiments with a fixed-A0 configuration show that adding a triggered strategic skill layer (L5) to a no-store baseline increases the win rate from 3/10 to 6/10 games, providing directional evidence for the impact of explicit skill memory although the comparison is not statistically decisive (Fisher exact p ≈ 0.37).
- A reproducible testbed of 298 completed trajectories with condition tags, frozen memory and skill snapshots, prompt records, and analysis scripts is released, forming an agent design and validated methodology for studying how typed memory layers shape decisions in long-horizon LLM agents.
Introduction
Long-horizon LLM agents must decide what prior experience to surface in each decision prompt, yet typical designs either append full transcripts that balloon context windows or retrieve unstructured pieces, making the memory interface opaque and hard to audit. The authors target this gap by formalizing memory as a bounded, typed contract and instantiating it in the unsolved roguelike game Slay the Spire 2, where frontier models currently fail to win. Their agent, AgenticSTS, replaces raw transcript accumulation with five per-decision slots (protocol, state, retrieved rules, episodic summaries, and triggered skills), transforming memory from a growing history into a set of inspectable and individually ablatable components. This architecture lets researchers isolate which memory type matters most, and the authors release 298 condition-tagged trajectories, frozen slot snapshots, and analysis scripts to support reproducible comparisons of long-horizon agent memory design.
Dataset
The authors release a dataset of 298 complete game trajectories from the roguelike deck-builder Slay the Spire 2, collected under a bounded-memory LLM-agent interface. The data serves as a reusable evaluation surface for long-horizon planning and memory in language models.
-
Composition and sources: each trajectory records the full text-based game state, the agent’s decisions, and metadata – target and reached Ascension level, outcome (victory/defeat), wall-clock duration, LLM-call counts, condition tag, and the active memory/scaffold setting. The runs were generated by LLM agents using the experimental framework described in the paper.
-
Subset breakdown:
-
Fixed‑Ascension 0 (A₀) balanced subset: 50 runs, 10 per experimental condition under a frozen configuration. Used as the primary head-to-head ablation benchmark.
-
Cross‑backbone probes: additional trajectories that compare different underlying LLMs under otherwise identical settings.
-
Auto‑mode ascension ladder: runs where the agent automatically advances to the next Ascension level after a victory or retries after a defeat, covering the full 11‑level ladder (A₀–A₁₀).
-
Data usage: no training split exists; the dataset is purely for evaluation. The fixed‑A₀ subset isolates component effects at a single difficulty, while the auto‑mode runs track the agent’s ability to climb the ordinal difficulty ladder. The cross‑backbone trajectories support robustness checks across models.
-
Processing and metadata: the raw trajectories are preserved as frozen stores (with long‑term memory layers L₄ and L₅ included) and per‑condition tags. For scoring, a derived analysis score is computed from the run outcome, floor reached, and number of act bosses cleared (full mapping in the appendix): 100 points for a victory; otherwise floor + (52/3) × bosses. This score is recalculated from trajectory fields, not copied from the game’s native archive, and serves as a secondary metric alongside win‑rate.
Method
The authors replace the conventional prompt-history interface with a bounded, typed retrieval contract. Instead of accumulating raw message turns over time, each decision prompt is composed on the fly from five knowledge layers. This design caps context size regardless of run length and makes the memory architecture itself a controlled variable for ablation.
For decision d at state sd, the engine retrieves relevant items from the five layers and constructs a fresh user message ud=π(L1,L2(sd),L3(sd),L4(sd),L5(sd)) which is sent to the LLM together with a static system prompt. The context budget is O(∣sys∣+sthread+∑iki⋅si), where ki and si are retrieval caps and item sizes. Consequently, per-decision token cost does not grow with the number of decisions, unlike a transcript interface whose worst-case growth is Ω(d⋅sˉ).
The five layers are separated by mutability and role:
- L1 operator prompts: immutable role and protocol templates for each state type.
- L2 state-typed prompts: immutable schemas for combat, deckbuilding, map, event, and intermission decisions, including legal action formats.
- L3 game knowledge: enumerable rule data (cards, relics, events, enemies, intents) refreshed by game patches.
- L4 episodic memory: postrun summaries indexed by character, ascension, act, and enemy class, providing case-based recall.
- L5 skill library: triggered strategic guides distilled from logs, each with an explicit trigger, a prose policy, and a four-level write gate. Retrieval is triggered by condition matching rather than raw log similarity.
Only L4 and L5 can be written to after a run, constraining what information persists across decisions.
To further bound LLM usage, a dispatcher routes decisions to four model tiers: fast (trivial combat plans), strategic (ordinary decisions), analysis (postrun memory extraction), and evolution (skill distillation). Combat, the most frequent decision type, uses a local conversation object limited to at most three messages per round (combat_start, ok, and the latest state); earlier rounds are summarized into the typed state rather than appended. Together with fast-tier routing and mechanical handlers, this yields a median of 67 strategic LLM calls per run instead of one per in-game action.
Skill discovery populates L5 in two modes. In mistake-driven self-evolve, combat losses relative to per-enemy baselines trigger a pre-write A/B resample check (strict 2/3 agreement with zero harmful decisions), followed by a four-level write gate that applies cosine and Jaccard similarity filters, an LLM judge, and optional pruning. Most candidates are rejected or merged rather than added as new skills. In Mode B, a stub-template-filled authoring process fills five character-parametric templates for combat, boss, deckbuilding, map, and intermission decisions, with namespace isolation, a library lock, and warn-only validators. Mode B reaches parity with a human-authored seed library, allowing evaluation to separate the existence of a skill layer from the specific prose source.
Because context reaches the model through named slots, the architecture enables clean ablation: prompt strictness, rule retrieval, episodes, and strategic skills can be toggled independently. This bounded typed contract turns memory interface design into an evaluation object, decoupling it from an ever-growing transcript and allowing performance gains to be traced to specific layers.
Experiment
The evaluation setup decomposes performance at a fixed difficulty into five conditions, probes cross-backbone transfer of a frozen skill/episodic stack, and uses an auto-mode ladder to measure climb ceiling. The L₅ skill layer drives the largest observed gain, while episodic L₄ saturates at the single difficulty but enables longer-horizon climbing when postrun writes are active. Transfer of the frozen stack is backbone-sensitive, and a direct comparison with open-source accumulating-context agents shows that the bounded typed-retrieval contract wins more runs while consuming orders of magnitude fewer tokens, establishing the memory interface as an isolable and measurable design object.
A bounded typed-memory contract keeps the per-decision context flat (median ~5k tokens), whereas transcript-based replay agents see prompts grow from ~9k to 500k tokens in a single run. When evaluated on the same backbone, character, and ascension, the two publicly available transcript-accumulating agents require one to two orders of magnitude more tokens per unit of game progress and fall below even a no-store bounded baseline. This demonstrates the memory interface as an evaluable design object, with typed slots enabling layer-specific attribution and decoupling memory from accumulating state. Transcript-based agents’ per-call prompts swell from ~9k to 500k tokens within a run, while the bounded typed contract holds the strategic message flat at a ~5k median. The transcript-accumulating agents consume one to two orders of magnitude more tokens per point of game progress than even a no-store bounded baseline, falling far below it.
Skill-scaffolded agents consistently outperformed unscaffolded ones in this fixed ablation, with all three scaffolded configurations winning 6 of 10 games compared to 3 or 4 wins without scaffolding. The L5 skill layer accounted for the largest observed within-harness improvement, adding two wins over the prompt-only baseline. The bounded contract kept the strategic prompt size stable at around 5k tokens, contrasting sharply with transcript-accumulating approaches that grew to hundreds of thousands of tokens per call. Unscaffolded and prompt-only conditions achieved at most 4 wins out of 10 games, while every skill-scaffolded condition reached 6 wins. Adding the L5 skill layer produced a +2/10 win increase over the prompt-only baseline under identical prompt strictness. The bounded contract maintained a flat strategic message size of about 5k tokens, whereas external accumulating-context agents consumed one to two orders of magnitude more tokens per point of progress. The gap between unscaffolded and skill-scaffolded cells is directional only; Fisher exact tests with the available sample size do not yield statistical significance.
Cross-backbone transfer of a frozen Gemini-trained skill stack produces divergent results: Qwen's mean score improves substantially, while DeepSeek's declines, with neither backbone winning any matches. The transferred frozen skills remain competitive with hand-authored ones, demonstrating that skill stacks are backbone-sensitive and transfer is an empirical property rather than a guarantee. The same Gemini-trained L4+L5 stack lifts Qwen's mean score by a large relative margin but leaves its win count unchanged at zero. Applying the stack to DeepSeek reduces its mean score, showing that frozen skill transfer can hurt performance on certain backbones. Frozen template-filled skills achieve the same win estimate as hand-authored skills, confirming competitiveness inside the shared interface. The L4 layer does not alter the A0 win point estimate, indicating saturation there, though it continues to support longer-horizon ladder tasks.
The experiments compare bounded typed-memory contracts against transcript-accumulating agents, ablate skill scaffolding, and test frozen skill stack transfer across backbones. Transcript-based agents suffer extreme prompt inflation and require orders of magnitude more tokens per game progress, whereas the bounded contract keeps strategic prompts stable at about 5k tokens, demonstrating the memory interface as a critical design lever. Skill-scaffolded agents consistently outperform unscaffolded baselines, with the L5 layer driving the largest win-rate improvement, though differences are not statistically significant, and cross-backbone transfer shows that frozen skill stacks remain competitive but produce backbone-dependent outcomes, sometimes boosting mean score without gaining wins and sometimes degrading performance.