WAR ROOM — AI Crisis Simulation Platform

WAR ROOM is an immersive, multi-agent AI crisis simulation platform powered by Gemini Live. Users take on the role of the "Chairman" or "Director," navigating high-stakes, dynamically generated scenarios by orchestrating a team of specialized AI advisors through real-time voice and multimodal intelligence.


💡 Inspiration

Real-world crises aren't solved by typing prompts into a single chat window; they are solved in war rooms filled with experts debating conflicting priorities. We wanted to move beyond basic chatbot wrappers and build a true "Event-Driven" simulation where AI agents act independently, the environment escalates dynamically, and the user must lead via voice and text command under pressure.


WAR ROOM relies heavily on Event-Driven Architecture (EDA) paired with Gemini’s Multimodal Live API to maintain an immersive illusion of simultaneous agent presence. The backend acts as a single source of truth, generating state changes using autonomous background AI reasoning loops, which are then eagerly synced to the UI via WebSockets.


🤖 Meet Your AI Crisis Team (What the Agents Do)

WAR ROOM is powered by a team of specialized AI agents that act as your advisors. Here is how they work together:

1. The Scenario Analyst (The Architect)

Built with Gemini 2.5 Flash/Lite, the Analyst acts like a casting director. It analyzes the initial crisis and decides exactly which experts need to be in the room—automatically creating sub-agents with unique names, roles, and skills (e.g., Legal, PR, or Engineering).

2. The Specialist Advisors (Your War Council)

These sub-agents operate independently through the Gemini Multimodal Live API. They listen to the Chairman, analyze the crisis from their professional viewpoint (Legal vs. PR), and take action by debating or updating the shared "Crisis Board."

3. The World Agent (The Game Master)

Acts as the unpredictable outside world, periodically injecting twists like "Breaking News" or "Whistleblower leaks" to force the team to adapt in real-time.

4. The Observer Agent (The Scorekeeper)

Quietly evaluates the entire conversation, scoring metrics like "public trust" and "stability" to ensure every decision has real consequences.


🛠️ How we built it

The platform is built on a decoupled architecture designed for high-bandwidth synchronization:

  • Frontend: A Next.js (App Router) SPA that handles complex state hydration via REST and reacts to live updates via WebSockets.
  • Backend Gateway: A Python FastAPI server orchestrating the simulation and routing multimodal streams.
  • AI Engine (Google Gemini): * Gemini 2.5 Pro/Flash for high-speed text reasoning and scenario generation.
  • Gemini Multimodal Live API for real-time bidirectional voice and intent reasoning.

  • State Management: Google Cloud Firestore for strict memory isolation; each agent has its own private collection to prevent cross-agent hallucinations.

  • Audio Pipeline: Integrated LiveKit (WebRTC) and the Google GenAI SDK for low latency voice streams.


🚧 Challenges we ran into

  • Voice Leakage: Multi-agent environments lead to chaotic overlaps. We solved this with "Active Speaker Gating"—a backend mechanism that emits turn-based tokens to ensure the UI only mutes/unmutes the correct components.
  • Memory Isolation vs. Shared Context: To maintain distinct agent personalities, we architected isolated reasoning loops where agents interact only through specific tool calls to the shared "Crisis Board."

🏆 Accomplishments that we're proud of

  • Real-time Synchronization: Built a WebSocket Event Bus that pushes trust scores and board updates without any client-side polling.
  • After-Action Reporting: Automated generation of a final resolution score and key moment summary when the simulation ends.

🎓 What we learned

Building a multi-agent system is about data infrastructure, not just prompt engineering. Treating AI agents as discrete microservices that communicate via a shared database and tool calls leads to far more reliable simulation behavior than a single giant LLM chain.


⏭️ What's next for WAR ROOM

Multiplayer support! We want to allow multiple human users to join a single War Room, taking on different leadership roles while debating the AI council together.


📡 Frontend-Backend Interaction & Data Flow

1. RESTful Pre-Fetching and State Hydration

Next.js queries the FastAPI Gateway to populate dashboards, fetch agent rosters, and initialize session parameters via POST /api/sessions.

2. The WebSocket Event Bus (The Nervous System)

Provides full-duplex sync. When agents take action or the World Agent injects news, the backend broadcasts events to the UI, triggering dynamic React context updates.

3. The Multimodal Voice Pipeline

The core of the experience:

  • Chairman Input: Raw audio is streamed from the browser to the backend via WebSockets.
  • Gemini Live Processing: Audio is piped to the Gemini Multimodal Live API for immediate intent detection and reasoning.
  • Active Speaker Gating: Prevents audio collisions by using turn-based locks, ensuring the immersive experience of a real "War Council" debate.

🧩 Architectural Breakdown

The Frontend (Next.js)

  • /src/app & /src/components: Server and client components utilizing custom hooks for WebSocket stability and audio buffering.
  • Audio Manager: Specialized local AudioContext handler for decoding and playing agent responses sequentially.

The Backend (FastAPI + Gemini Agents)

  • /backend/agents: Isolated classes inheriting from BaseCrisisAgent, each managing their own prompt memory and Google GenAI SDK connection.
  • State Store: Centralized Firestore ledger for real-time recovery and observability.

Built With

Share this project:

Updates

Submission history