AIToday

AI agent wins Slay the Spire 2 by replacing growing chat logs with structured memory

THE DECODER2h ago
AI agent wins Slay the Spire 2 by replacing growing chat logs with structured memory

Key takeaway

Researchers demonstrated that structuring an AI agent's memory into five organized layers—instead of appending every past observation to the prompt—cuts token costs by 66 to 90 times and reduces inference time by four times compared to traditional growing-transcript agents. The agent won 6 out of 10 games at the lowest difficulty level of Slay the Spire 2, while frontier models used in AGI-Eval testing failed to win any games, suggesting that explicit memory architecture unlocks better decision-making without ballooning computational expense.

Summaries like this, in your inbox every morning.

Sign up free →

3 Key Points

  • What happened

    Researchers built AgenticSTS, an AI agent that organizes memory into five fixed layers instead of appending every past observation to the prompt. On the lowest difficulty (A0), it won 6 out of 10 games when equipped with a skill library; frontier models used in AGI-Eval testing won zero games across five setups.

  • Why it matters

    The typical approach—where prompts grow with every decision until context overflows—makes AI agents slower, more expensive, and less accurate. AgenticSTS uses 66 to 90 times fewer tokens per decision than two publicly available Slay the Spire 2 agents following the traditional growing-transcript pattern, and runs four times faster, with 96 percent of the time gain coming from reduced model latency rather than control software.

  • What to watch

    The team is publishing 298 complete game runs, frozen memory snapshots, and evaluation scripts on Hugging Face so other researchers can test alternative memory architectures. The authors acknowledge they have not yet run a clean comparison of accumulating context within the same codebase, and testing remains limited to one character (Silent) on a single game version.

Context & Analysis

The core problem AgenticSTS addresses is 'context rot'—the growing cost and degradation in model accuracy when prompts swell with every new decision. Traditional agentic frameworks like ReAct and Reflexion append observations and reflections linearly, which works for short tasks but becomes prohibitively expensive for long, complex sequences. Slay the Spire 2 is an ideal test bed because a single playthrough involves hundreds of decisions across card selection, combat, route planning, and item purchases, with high randomness and rules that translate fully into text. Frontier models failed outright, suggesting the game's length and open-endedness expose architectural weaknesses. AgenticSTS's layered approach—separating protocol, state, retrieval, episodic memory, and learned skills—allows researchers to isolate which component drives which behavior. The token-cost comparison is particularly telling: a single call near the end of a game in competitor STS2MCP hit about 527,000 tokens because the entire game history gets resent with every decision, whereas AgenticSTS holds steady around 5,000 tokens. This efficiency gap reflects not just the memory architecture but the broader challenge of managing context in long-horizon tasks. The team's own acknowledgment that they have not yet run a clean ablation study within the same codebase suggests the performance gap versus public agents partly reflects current state-of-the-art differences in routing and decision batching rather than isolated proof of the memory concept. Other research groups (Anthropic, the GAM framework, Mastra) are tackling context efficiency through different mechanisms—automated stripping of outdated results, multi-agent archiving, and condensing conversations into external notes—indicating this is an active frontier as AI systems scale to longer horizons.

FAQ

How does AgenticSTS keep prompts short during long games?
It rebuilds the prompt for each decision from five fixed memory layers: fixed protocol instructions (L1), current valid actions (L2), retrieved game rules (L3), summaries of previous runs (L4), and strategy skills for specific situations (L5). Anything the agent wants to carry over must be written into one of these layers first, keeping actual user text around 5,000 tokens regardless of game length.
Did memory accumulated by one model transfer to other models?
No. When researchers froze a memory stack from Gemini 3.1 Pro and passed it to two other models, Qwen 3.6-27B's score rose by 84.5 percent but Deepseek V4-Pro's score dropped by 18.1 percent. Neither model won a game, indicating the memory contents are tied to the model that created them and do not transfer well.
What happens when the agent learns between runs?
Without memory that updates between runs, the agent stalls at difficulty levels A2 through A4. With active memory that updates between runs, it reaches levels A6 through A8.

Discussion

No comments yet. Be the first to share your thoughts!

Log in to join the discussion

Related Articles

Stay ahead with AI news

Get curated AI news from 200+ sources delivered daily to your inbox. Free to use.

Get Started Free

Free · takes 30 seconds · unsubscribe anytime

1 minute a day. The AI essentials.

200+ sources · Email / LINE / Slack

Get it free →