When we ran our reproducible 2026 10-App AI Story Benchmark (open data at Harvard Dataverse DOI 10.7910/DVN/YEBHQR and preprint at CERN Zenodo DOI 10.5281/zenodo.24549412), one engineering failure dominated every pure chatbot architecture: state drift by Turn 15.
Plant a concrete detail on Turn 2 ("My cat's name is Marmalade") and ask for it unprompted on Turn 15:
- Open-ended persona chatbots routinely drop or hallucinate the detail once rolling summary compression or system-prompt recency crowds it out.
- Structured story engines keep canonical state outside raw chat history as an explicit, branch-isolated ledger.
Three-Layer Architecture for Stateful Interactive Fiction
- Authored Story Frame: Fixed cast, stakes, setting, and pacing targets pinned at the top of context so every branch preserves tone and plot direction.
- Branch-Scoped Memory Ledger: Structured fact extraction (
add/update/retract) scoped strictly to active-branch ancestor turns so rewinding or branching never leaks alternate-timeline facts. - Reader-Steered Turn Interface: Both curated choice points and custom free-text moves feed the same canonical state transition before rendering the next prose scene.
Open-Source Tooling (MIT)
We extracted the minimal engine and Model Context Protocol server so any developer can test stateful branching narratives locally:
-
branching-story-kit(GitHub / PyPI / JSR): https://github.com/ouba-studio/branching-story-kit -
branching-story-mcp(Official MCP Registryio.github.ouba-studio/branching-story-mcp): https://github.com/ouba-studio/branching-story-mcp - Live Interactive Benchmark Explorer: https://www.ouba.art/tools/benchmark-explorer
- Try Reader-First Interactive Fiction Free (25 guest turns, no signup): https://www.ouba.art/
- Video Walkthrough — How AI Interactive Fiction Actually Works: https://youtu.be/0zoFRkxFpZ8