AI agents win at Slay the Spire 2 after researchers replace growing chat logs with structured memory
Summary
The AgenticSTS project, developed by Alaya Lab and Shanghai Jiao Tong University, introduces a novel memory architecture for AI agents, enabling them to succeed in the digital card game Slay the Spire 2 where frontier models previously failed. Instead of appending to an ever-growing chat log, AgenticSTS rebuilds each decision from five organized memory layers: fixed protocol instructions (L1), state schemas (L2), retrieved game rules (L3), summaries of previous runs (L4), and strategy skills (L5). This approach significantly improved performance; activating the L5 skill library doubled the win rate from 3 out of 10 to 6 out of 10 games at A0 difficulty. Furthermore, AgenticSTS demonstrated superior efficiency against public agents STS2MCP and CharTyr, winning 6 of 10 games compared to their 0 of 5, while using 66 to 90 times fewer tokens per point. Its prompt size remained constant at approximately 5,000 tokens, contrasting with competitors' prompts that grew to 527,000 tokens.
Key takeaway
For Machine Learning Engineers designing AI agents for complex, multi-step environments, you should prioritize structured, fixed-size memory architectures over traditional growing chat logs. This approach dramatically improves agent performance and reduces token costs by preventing "context rot." Implement distinct memory layers for protocols, state, rules, run summaries, and skills to enhance decision-making and efficiency. Your agent's accumulated knowledge might be model-specific, so test transferability carefully.
Key insights
Structured, fixed-size memory layers significantly enhance AI agent performance and efficiency over growing conversational logs.
Principles
- Fixed-size, layered memory prevents context rot and improves agent performance.
- Separating memory layers allows pinpointing specific drivers of agent behavior.
- Knowledge accumulated by one model may not transfer effectively to others.
Method
Rebuild each agent decision prompt from five distinct memory layers: fixed protocol instructions (L1), state schemas (L2), retrieved game rules (L3), summaries of previous runs (L4), and situation-specific strategy skills (L5).
In practice
- Implement a fixed-size, layered memory architecture for complex agent tasks.
- Store tactical rules in a dedicated skill library for recurring situations.
- Publish datasets of agent runs and memory snapshots for comparative research.
Topics
- AI Agents
- Structured Memory
- Context Management
- Slay the Spire 2
- Token Efficiency
- Large Language Models
Code references
Best for: Research Scientist, AI Engineer, NLP Engineer, AI Scientist, Machine Learning Engineer, AI Architect
Related on AIssential
See Counsel's argued verdicts on the open AI decisions leaders are weighing →
Editorial summary, takeaway, and curation by AIssential. Original article published by The Decoder.