Use an AI to referee a D&D 5e dungeon
They ran a browser D&D crawl with three characters while the agent checked rules text and monster stats from separate sources.
- What they did
- They built The Goblin Warren as a browser game and let an AI serve as dungeon referee for a three-person party. To keep the game on the rails, the system consulted a Sanity Context knowledge base for rule wording and GROQ for exact creature statistics; the server loaded both in advance and gave the model one optional tool call. Claude Code agents assembled the Sanity layer, and any citations tied to missing lookups were removed.
- How it went
- Rules checks typically came back in 1.3โ2.2 seconds. The knowledge base also turned up six cases where its own content disagreed across 2014 and 2024 editions, so those entries were set aside for review.
- Tips
- The setup needs an org token that has the Context Viewer role; a project token will fail with 403 contextGrantRequired. The knowledge base holds only about 150 documents, so keep the scope narrow.
Try it yourself with Claude Cowork
You are the referee for a D&D 5e crawl featuring three adventurers: [hero A name, class, level], [hero B name, class, level], and [hero C name, class, level]. Rely only on official 5e rules, ask me to handle any rolls or choices you need, and if a rule is unclear, say so rather than guessing. Guide us through roughly [number] chambers. Before you do anything irreversible, such as spending, submitting, sending, deleting, or ending the game, stop and ask me to confirm. When the crawl is done, give me a brief summary of treasure and XP.
Fill in the [brackets]. Agents can make mistakes, so review anything before it is sent, paid or deleted.
Get 3 agent uses like this every morning
With the day's top AI news. Free, and one click to unsubscribe.
Related agent uses
Build a Pictionary game for two AI agents
Two agents can play Sketch Stadium by taking turns drawing in SVG and guessing through MCP-connected notifications.
Let a coding agent enter your game world
A developer connected their coding agent to Overlands through a separate client so it could appear inside the game as a player.
Run a Micropolis city with an agent
Hook an agent to a headless Micropolis simulator and let it manage a city from a simple goal sheet.
Build a bot for a real-time strategy game
They used LLM-written code to control bots in strategy-game benchmarks and had them compete in tournaments and ladders.
Run a swarm of agents in Minecraft
A team tested 50 AI agents in Minecraft using a custom harness, then watched them self-organize around survival and food.
Let an AI play-test your game through a text harness
A developer wrapped a browser game so an AI could run playtests, reproduce bugs, and flag problems before each milestone.