Back to all projects

AI / Full StackPrototype

AI Dungeon Master

An LLM storytelling experiment with separate campaign planning and live play

A small AI storytelling experiment that separates campaign planning from the live response loop instead of asking one model to invent everything at once.

My role
Full-Stack Developer
When
48 hours
Context
Hackathon project
01 / THE OVERVIEW

What I set out to build

Most simple AI storytelling demos ask one model to remember the world, plan the story, and answer the player at the same time. I wanted to see whether separating long-horizon campaign structure from the live response loop would make the experience more coherent.

My contribution

  • Designed the split between campaign planning and live storytelling.
  • Built the surrounding web/backend prototype.
  • Worked on what context should be stored, summarised, and passed to the model.
  • Experimented with keeping the system structured without making the story rigid.

Problem & approach

I split the application into a planning layer and a runtime storytelling layer. The planner maintains broader campaign context, while the live side responds to the player using that structure and current state. The project was mainly an experiment in context design and LLM application architecture.

How it works

  1. 01

    Plan

    Create or maintain campaign-level context.

  2. 02

    Remember

    Store the player/world state needed for the current session.

  3. 03

    Provide context

    Send relevant context plus the player action to the runtime model.

  4. 04

    Narrate

    Generate the next response while preserving the broader campaign structure.

Results & progress

48 hours
Hackathon build
Planner + narrator
AI workflow
  • Built a playable storytelling prototype with a Next.js interface and FastAPI endpoints.
  • Separated campaign planning, JSON persistence, and live narration.

Screenshots

Limits & lessons

Limitations

  • This was an experimental hackathon prototype with no formal narrative-quality evaluation.
  • Campaign plans are stored as local JSON; this is not a multi-user database or a complete tabletop rules engine.

What I learned

  • The project taught me that a lot of LLM application quality comes from context and system design rather than the prompt wording alone. Too little structure makes the story drift, while too much structure makes it feel scripted.

Next steps

  • Add more explicit state tracking.
  • Test summaries/memory strategies over longer sessions.
  • Compare a single-agent baseline with the separated architecture.
Another projectSwiftApply