← Back to Blog

How Our AI Dungeon Master Works

engineering AI

The heart of TumbleKeep is the AI Dungeon Master — a system that uses Claude to run dynamic, rules-aware D&D sessions. Here is a peek behind the curtain.

Context is everything

A good DM remembers what happened three sessions ago. Our system maintains a structured context window that includes your character sheet, recent narrative history, active quests, NPC relationships, and the current environment. This context is compressed and prioritized so Claude always has the most relevant information.

Rules integration

We do not just ask Claude to tell a story. Our engine handles dice rolls, ability checks, saving throws, and combat mechanics according to 5e rules. Claude narrates the outcomes, but the math is deterministic and fair.

Branching narratives

Every decision you make is tracked and influences future encounters. Side with the thieves' guild? The city guard remembers. Spare the dragon? It might return the favor. The AI builds on your choices to create a story that feels genuinely responsive.


Ready to start your own adventure?

Try TumbleKeep Free