Inspiration

Modern game AI systems are largely scripted and deterministic. NPCs follow predefined logic, and world states rarely evolve beyond static branching paths. We wanted to explore how multi-agent AI systems could create emergent storytelling instead of fixed narratives.

The inspiration was to build a system where a world is not predefined — but dynamically generated and governed by autonomous agents.

What it does

Autonomous Multi-Agent RAG Game Master is a dynamic simulation engine that:

Generates a complete game world from a user prompt

Creates multiple NPC agents with independent goals

Uses memory retrieval to maintain context

Employs a Game Master agent to resolve conflicts

Evolves world tension dynamically over time

Instead of scripted gameplay, the system enables autonomous, evolving storytelling driven by agent reasoning.

How we built it

We designed a modular multi-agent architecture:

World Builder Agent generates structured world state at runtime

NPC Agents reason independently based on goals, tension, and memory

Game Master Agent arbitrates outcomes and ensures consistency

RAG-based Memory System stores and retrieves prior events

FastAPI backend handles orchestration and API flow

React + Material UI frontend provides interactive visualization

The backend manages dynamic world state, while the frontend presents structured reasoning and outcomes clearly.

Challenges we ran into

Ensuring structured output from LLMs without strict JSON

Maintaining logical consistency between multiple agents

Handling dynamic parsing of AI-generated world data

Managing CORS and API communication between frontend and backend

Preventing world state corruption during runtime updates

Balancing autonomy with coherence was one of the biggest design challenges.

Accomplishments that we're proud of

Successfully implementing a working multi-agent reasoning loop

Dynamic world generation at runtime

Conflict resolution via a centralized Game Master

Memory-augmented agent reasoning

Clean interactive dashboard for simulation visualization

We moved beyond a chatbot demo and built a structured autonomous simulation engine.

What we learned

Multi-agent orchestration requires clear responsibility separation

Prompt design directly impacts system stability

Memory retrieval significantly improves narrative continuity

UI clarity strongly affects perceived intelligence of AI systems

Dynamic systems require robust parsing and validation logic

We also learned how to balance creativity and control in generative systems.

What's next for Autonomous Multi-Agent RAG Game Master

Persistent database-backed world storage

Multi-level progression and campaign systems

Hierarchical agent coordination

Personality-driven NPC modeling

Multiplayer interaction support

Fine-grained world simulation rules

Our long-term vision is to evolve this into a scalable autonomous simulation platform for dynamic storytelling.

Built With

Share this project:

Updates