Inspiration

I’ve always had a passion for creating worlds and telling stories, but I constantly struggled with the actual writing process—my imagination often outpaced my prose. That’s where the core idea for LorePack came from. I wanted to build a tool where an AI agent acts as a creative partner to bridge the gap between a creator's rough ideas and a fully fleshed-out narrative, allowing anyone to bring their own universes to life regardless of their writing skills.

What it does

LorePack is a collaborative platform for worldbuilding and story generation. It provides a guided "Story Studio" where users first conjure the foundational elements of their world—genre, era, protagonist traits, and plot sparks.

Once the world is set, it acts as a writing desk. As you provide high-level directions, the AI generates chapters while automatically extracting and saving key people, places, and events into a persistent "Lorebook". Later chapters use early lore as context (via RAG), keeping the story consistent. We also built a "Crossroads" hub, making it social—users can share their lorebooks or even propose character crossovers into other people's universes.

How we built it

The core orchestration relies on the Google ADK (Agent Development Kit) under the hood. We set up a multi-agent system consisting of several distinct roles:

  • A narrative_director to handle story progression and chapter generation.
  • A world_architect to manage the Lorebook, creating and validating database entries.
  • A visual_artist that hooks into Imagen to generate character portraits and inline scene illustrations.

Our backend is built with FastAPI, handling direct CRUD operations on Firestore and streaming the agent's responses to the client via Server-Sent Events (SSE). The frontend is built on React 19 and Vite, styled with a custom "Arcane Codex" aesthetic using CSS modules and Zustand for state management.

Challenges we ran into

The biggest hurdle was orchestrating the multi-agent system, specifically getting comfortable with the A2A (Agent-to-Agent) Protocol. Ensuring the narrative agent properly triggered the world-architect agent to update the Lorebook without interrupting the story flow took a lot of trial and error.

Additionally, deploying the entire setup to Vertex AI Agent Engine was a learning curve, as we had to ensure our custom callbacks and SSE streaming translated correctly to the hosted environment. Finally, tuning the Gemini prompts to maintain a specific literary tone while dynamically injecting RAG context (without hallucinating lore) required constant refinement.

Accomplishments that we're proud of

We are most proud of successfully taking LorePack from an idea to a fully functioning application that genuinely assists in the creative process. Beyond just being a single-player "AI writing tool," we managed to build the collaboration layer. Seeing the potential for users to not only create their own stories but also socialize and merge universes (the crossover feature) makes this feel like a living platform rather than just another wrapper wrapper.

What we learned

This project was a deep dive into modern agentic development. We learned how to move past simple chat-bot implementations and actually orchestrate multiple specialized agents using Google ADK. We also gained practical experience in designing robust SSE endpoints for real-time generative UI, and configuring automated deployments to Google Cloud using the Agent Starter Pack.

What's next for LorePack

Looking ahead, we want to expand the collaboration mechanics. We plan to introduce branchable story trees, where multiple users can write alternate timelines stemming from a single shared Lorebook. We also want to integrate community-driven "Lore Votes" for shared universes, and refine the visual generation to support consistent character persistence (so a generated protagonist looks identical across different chapters). Ultimately, we want LorePack to become the go-to hub for open-source, collaborative worldbuilding.

Built With

Share this project:

Updates