Diverge — A Storyteller That Listens First
Inspiration
Most interactive stories today treat the user like a player navigating a branching tree. I wanted to explore a different idea: what if the storyteller listened first?
Diverge began with a simple question:
What if a story could understand what you’re carrying emotionally — and reflect it back through narrative?
The inspiration came from two places:
Interactive storytelling like Black Mirror: Bandersnatch, where choices shape the narrative path.
The timeless storytelling dynamic found in traditions like Vikram and Betal, where a narrator draws out the listener’s inner conflict through story.
Instead of building a game, I wanted to build something closer to a guided narrative experience — a story that responds to the emotional state of the listener and evolves around the tensions in their life.
The result is Diverge, an AI-powered storytelling experience, where instead of choosing a genre or setting, the experience begins with a simple question:
“What has been on your mind lately?”
From that moment, the system crafts a personalized illustrated story shaped by the user’s emotional tension and the choices they make along the way.
What It Does
Diverge begins by asking a single question:
“What has been on your mind lately?”
From that moment onward, the system builds a personalized story:
- The user shares a thought or concern via voice or text.
- An AI agent analyzes the emotional tension behind the response.
- A narrative arc is generated using the Hero’s Journey framework.
- The story unfolds through illustrated scenes with narration.
- At key moments, the user faces meaningful choices that shape the outcome.
Each story is structured around five anchor scenes, with two decision points that influence the emotional direction of the story and lead to one of four endings.
The experience is delivered like a motion-comic narrative: illustrated panels, narration, cinematic pacing, and quiet moments where the user must decide what kind of person they want to be inside the story.
How I Built It
Diverge is powered by a multi‑agent storytelling pipeline built using Google’s Agent Development Kit (ADK) and Gemini models.
Instead of one large prompt generating everything, the system divides storytelling into specialized roles.
Multi-Agent Story Engine
The system includes eight agents, each responsible for a specific storytelling task:
- Emotional Cartographer – interprets the user’s emotional state
- Story Architect – builds the narrative arc using Hero’s Journey
- Choice Designer – creates meaningful choices
- Scene Director – generates illustrated story scenes
- Visual Motion Director – ensures visual consistency
- Voice & Sound Designer – produces narration and audio cues
- Continuity Editor – ensures narrative coherence
- Showrunner Orchestrator – coordinates the full pipeline
A key challenge requirement for the Creative Storyteller track was Gemini’s interleaved multimodal output. So, instead of generating text and images separately, the Scene Director agent uses a Gemini image-capable model to generate narration text and illustrations in a single model response.
This means each scene is produced as a sequence of alternating text and image outputs in one model call — allowing narrative and visual storytelling to remain tightly connected. The audio of the narration was generated using Gemini Pro TTS.
Product Design Philosophy
I approached Diverge as a story experience, not an AI demo. Some key principles guided the design:
- The story is the interface.
- Voice-first interaction, with text as fallback.
- Emotion before genre — the narrative emerges from the user’s tension.
- Meaningful choices, not trivial branching.
Rather than presenting a complex UI, the product uses a dark, cinematic interface designed to feel like entering a story world rather than using a tool.
Challenges I ran into
Building a generative storytelling system in a hackathon timeframe came with several challenges:
Maintaining Story Quality Early prototypes generated vague or overly abstract narratives. I solved this by redesigning prompts and introducing agent-level validation so that weak outputs are rejected and regenerated before reaching the user.
Multimodal Latency Generating text and images together can be slow. Our original design used 3–5 panels per scene, but for the MVP I temporarily reduced scenes to a single panel to keep the experience responsive while still using Gemini’s interleaved output.
Consistent Characters and Visual Style AI image generation often causes character drift across scenes. To address this, I created a character bible system where visual traits are generated once and reused across scenes, ensuring visual consistency.
Making Choices Feel Meaningful Many interactive stories suffer from “fake choices.” I designed choices as value conflicts — decisions that protect one value while sacrificing another, such as truth versus loyalty or control versus trust. This ensures the story reflects real human choices rather than simple branching.
What I Learned
Building Diverge reinforced several lessons about AI storytelling:
- Narrative structure matters more than model power.
- Multi-agent systems can dramatically improve output quality.
- Emotional alignment makes AI experiences feel meaningful.
- The hardest part of AI storytelling is not generation — it’s coherence and pacing.
Accomplishments I am proud of
I built a multi-agent storytelling engine that turns a single user thought into a personalized illustrated narrative with narration and meaningful choices — generated in real time using Gemini’s interleaved multimodal output.
Building a Structured Multi-Agent Storytelling Pipeline
Instead of generating stories with one large prompt, I designed a multi-agent storytelling system where each agent performs a distinct creative role: emotional interpretation, narrative planning, choice design, scene writing, visual direction, audio narration, and narrative validation.
Each agent produces typed JSON outputs that are validated before passing to the next stage, allowing the pipeline to maintain story structure and coherence across scenes while still generating content dynamically.
Implementing True Interleaved Multimodal Story Generation
A key requirement of the Creative Storyteller challenge was using Gemini’s interleaved multimodal output.
Diverge generates story narration and illustrated panels together in a single Gemini call, returning alternating text and image outputs. This keeps visuals tightly synchronized with the narrative and produces a much more cohesive storytelling experience than generating images and text separately.
Solving Real-World LLM Output Issues
While building the system I encountered several subtle model-behavior challenges:
- Gemini streams output across multiple response events, which initially caused missing narration in scenes.
- Reasoning models sometimes leaked internal “thinking” text into responses when running on Vertex AI.
I solved these by implementing:
- aggregation of parts across all streaming events
- filtering of reasoning parts and sanitizing narration text
- model configuration adjustments to reduce reasoning leakage
These fixes ensured that the generated story remains clean and coherent for the user.
Building AI Voice Narration with Graceful Fallbacks
I implemented server-side narration generation using Gemini TTS, producing audio files for story panels that are streamed to the frontend.
To keep the experience resilient, the frontend automatically falls back to browser speech synthesis to text only if server-generated narration fails — ensuring the story remains playable even under degraded conditions.
Maintaining Character Consistency in AI-Generated Art
AI-generated characters often change appearance between scenes. To solve this I created a character bible system that defines visual traits for each character (age, hair, clothing, build, etc.).
These traits are injected into scene generation prompts so the protagonist and other characters remain visually consistent throughout the story.
Making AI Storytelling Feel Seamless
Generative storytelling introduces unavoidable latency.
To keep the experience smooth, I implemented background prefetching of upcoming scenes so that the next part of the story is generated while the current one is playing. This significantly reduces perceived waiting time during the interactive demo.
Delivering a Full End-to-End Experience
Within the hackathon timeframe I built a complete working system that includes:
- emotional story intake
- structured narrative generation
- illustrated scenes
- AI voice narration
- branching moral choices
- a cinematic story player
All orchestrated through Gemini models and deployed on Google Cloud Run.
What’s Next for Diverge
After the hackathon, I want to expand Diverge into a richer storytelling platform:
- Multi-panel illustrated scenes
- Animated panels or short video generation
- Replayable story paths
- Persistent story memories
- Personalized storytelling styles
The ultimate goal is to build a system where every user can step into a story that feels uniquely theirs and reflects the moment in life they are in.
Closing Thought
Stories have always helped people make sense of their lives. Diverge explores what happens when AI becomes a storyteller that listens first. Instead of asking users to adapt to a story, the story adapts to them.
Log in or sign up for Devpost to join the conversation.