Inspiration

Most AI storytelling tools feel like improvisation without memory. You can write something beautiful — then one edit later, the world forgets what came before.

The inspiration for Living Storybook came from a simple question:

What if stories worked like source code — with history, branches, and consequences?

I wanted a system where changing the past doesn’t erase it, but creates a new timeline, and where characters remember the worlds they lived through. That idea became a Massively Multiplayer Online Role-Playing Storyteller (MMORPS) — a living narrative multiverse co-authored by humans and AI.

What it does

Living Storybook lets users co-create persistent, branching narratives with AI.

  • Stories exist as parallel timelines, not linear text
  • Editing history triggers forks, not overwrites
  • AI characters persist as Manifested Souls with memory and evolution
  • Published content is temporally locked to preserve canon
  • Every choice has causal consequences across chapters and universes Readers don’t just consume stories — they navigate and shape a multiverse.

How we built it

Living Storybook is a decoupled full-stack system:

  • Frontend: Angular + NgRx for real-time multiverse navigation and optimistic updates
  • Backend: FastAPI with a stateful LangGraph Narrative Brain
  • AI: Gemini 3 Flash, orchestrated as specialized agents
  • Storage: Firestore for persistent narrative state and causal history
  • Infra: Google Cloud Run, Firebase Auth & Hosting

Instead of a single prompt, the system uses a multi-agent loop:

  • A Planner creates chapter blueprints
  • A Chronicler writes prose
  • A Guardian enforces canon, style, and continuity
  • An Intelligence node updates world state and generates future choices Narrative truth is backward-linked, allowing any timeline to be reconstructed in O(depth) time.

Challenges we ran into

  • Designing long-term narrative memory without unbounded context growth
  • Preventing infinite loops and contradictory story states
  • Balancing creative freedom with canonical consistency
  • Keeping multi-agent latency under acceptable UX thresholds
  • Modeling branching narratives in Firestore without graph-database recursion

Accomplishments that we're proud of

  • Built a fully working MMORPS with real branching timelines
  • Implemented canon-safe temporal locking
  • Reduced multi-agent latency from 120s+ to ~40–60s per turn
  • Created persistent AI characters that evolve across forks
  • Delivered a production-grade hackathon build end-to-end
  • Designed a mock physical publishing pipeline where canonized story timelines can be rendered into print-ready editions without breaking narrative integrity.

What we learned

  • Stateless generation breaks down for any long-form creative system
  • Narrative consistency is a systems problem, not a prompt problem
  • LangGraph excels at orchestrating reasoning roles, not just chaining calls
  • Firestore can model DAG-like structures efficiently with the right invariants
  • Users care deeply about history preservation, even in fiction

What's next for Living Storybook

  • Real-time multi-user collaboration with conflict markers
  • Vector-based long-term thematic memory
  • Community remixing and shared story universes
  • Visual and audio generation tied to narrative state
  • Public publishing of canonical editions
  • Integrate real print-on-demand services for canonized story editions
  • Enable readers to collect physical artifacts from specific timelines Living Storybook is an experiment in persistent digital storytelling — where stories don’t reset, and worlds remember.

Built With

Share this project:

Updates