Ariadne: The Dungeon Master Agent

Open source. Local-first. AI narrates. Engine runs the game.

I experimented with running RPGs inside AI agents and quickly learned the common pitfalls: no forward-planning, forgetting things, doing math wrong. But I couldn't find any purpose-built solutions that were also open source and under the end-user's control. So I built Ariadne DM, the first open source agent purpose-built for RPGs.

Coming Soon Why Ariadne?

How It Works

1
You type what your character does.
2
The AI receives the scene, your input, and the available tools.
3
It picks a tool: attack, cast a spell, persuade, rest, search.
4
The engine validates it. Rolls the dice. Applies the effects.
5
The AI narrates what happened.
6
State updates. Campaign progresses. Loop repeats.

The AI writes the words. The engine runs the game. Neither crosses into the other's territory.

Architecture

You type an action
The AI sees: scene context + your input + available tools
The AI picks a tool ("attack," "cast spell," "rest")
The engine validates it (sandboxed expression evaluator, no eval())
The engine executes it (dice, damage, state mutation)
The engine checks for triggers (HP zero → death procedure)
The AI narrates the result
State saves to disk (JSON + changelog for crash recovery)

Features

State Tracking That Remembers

HP, conditions, inventory, quests, NPC relationships, spell slots. All persisted in a structured state store that survives between sessions. Close the app. Come back next week. The goblin is still dead. The antlers are still sold to Kell. Yuffie still doesn't know about the hamster thing.

The AI never touches state directly. Every write is validated against a schema. If the AI tries to set HP above max, the engine blocks it.

Campaigns That Plan Ahead

Before you roll initiative, Ariadne interviews you. Nine questions about setting, style, focus, boundaries. Then it generates a full campaign plan: acts, sessions, scenes, NPCs with motivations, encounters with purpose, quests with branches.

This isn't a writing prompt. It's a game plan. The engine uses it to scope context, trigger scenes, and detect when things go off-script. If you wander somewhere the plan didn't account for, Ariadne pauses and asks: improvise, steer, or new direction?

Rulesets You Control

Ariadne ships with Cairn 2e, a lightweight fantasy RPG. The engine is ruleset-agnostic. Every mechanic (attacks, saves, initiative, death rules) lives in a YAML file. Swap the file to run a different system. Same engine, different game.

Want to run 5e? Write the YAML. Want an overpowered isekai MC system? Write the YAML. Your DM won't call it cringe.

Your Models, Your Choice

Ollama: local models, zero cost, full privacy. OpenRouter: cloud models, pay-per-token. OpenCode Go: cloud models. Any OpenAI-compatible API: bring your own key.

Desktop App

Single-file HTML app. Open it in any browser. Configure your API key in Settings. Pick from three themes (Slate, Purple, Dark Ariadne). Dice overlay, resizable sidebar, locked top and bottom bars. No install, no build step, no dependency.

Open Source From Day One

Apache 2.0. No dual licensing. No subscription trap. No walled garden.

Fork it and make your own version
Write and share rulesets as YAML files
Build campaign packs for any setting
Contribute code, docs, or ideas

Everything is data. Nothing is hardcoded. The repo is yours.

Coming Soon

Important to Note

This is not intended as a replacement for IRL RPG sessions. A single player session with a DM Agent will not replicate the high-energy, social experience of playing in person with friends.

What this does do is open a whole new way to enjoy TTRPGs. Make a campaign about anything, about anyone, with whatever characters you want. You can ask for an overpowered MC Isekai and your DM won't call it cringe.

What's Next

Now (v0.1)

AI DM loop, combat, state tracking, Cairn 2e, desktop UI

Next (v0.2 - v0.3)

D&D 5e SRD ruleset, TTS narration, multi-character parties, IM bridge (play through Signal or Telegram)

Later (v0.4+)

Multi-agent NPCs, voice input, visual support, community ruleset marketplace, DM assistance mode for live sessions