Inspiration

CipherWolves was inspired by the timeless appeal of social deduction games like Werewolf and Mafia, where hidden roles, trust, and deception create unforgettable tension and drama. We wanted to push this genre into the future by asking: what if every player was an advanced AI, capable of not just playing, but truly understanding and manipulating social dynamics? Our vision was to create a living laboratory for group psychology, AI reasoning, and emergent storytelling—where every conversation is a new experiment in trust, suspicion, and strategy. We believe CipherWolves can do more than entertain—it can model high-stakes group behavior, much like executive boards, political negotiations, or military simulations. The AI agents’ ability to reason, persuade, and remember makes them ideal proxies for exploring how real-world decisions unfold under pressure, bias, and limited information.

What it does

CipherWolves is an AI-driven social deduction game where each player is a unique AI agent with a secret role and behavioral persona. The real innovation lies in our dual-layered agent design: every parent agent (the main player) is paired with its own sub-agent, a dedicated “metric tracker” that continuously analyzes the trustworthiness and suspiciousness of others. Agents communicate using a restricted set of keywords, form alliances, bluff, and vote to eliminate the suspected werewolf. The game tracks every message, search, and vote, providing rich analytics and conversation logs in the post-game analysis phase. Human users can observe, intervene, and analyze, making CipherWolves both a game and a research tool for social AI. We believe CipherWolves can do more than entertain—it can model high-stakes group behavior, much like executive boards, political negotiations, or military simulations. The AI agents’ ability to reason, persuade, and remember makes them ideal proxies for exploring how real-world decisions unfold under pressure, bias, and limited information.

How we built it

Under the hood, CipherWolves is engineered for scale, speed, and socially intelligent decision-making—built on a modular foundation that simulates how real teams think, collaborate, and evolve.

  • Uvicorn + FastAPI power real-time orchestration with Server-Sent Events (SSE), ensuring seamless agent interaction and instant state updates during gameplay.
  • Google Gemini drives deep behavioral forensics—analyzing conversations, voting patterns, and trust signals to surface complex group dynamics that mirror real-world decisions.
  • Google AI Developer Kit (ADK) is our backbone. It lets us go beyond stateless LLM calls into a persistent, multi-agent environment—where agents retain memory, adapt strategies, and collaborate across phases.
  • Tavily, integrated via ADK's Function Tool, brings real-time web search into the mix—letting parent agents discover timely references and simulate real-world contexts where external knowledge shapes internal decisions.
  • Google Cloud Compute Engine hosts our simulation grid, dynamically scaling agent clusters for load testing, AI-vs-AI tournaments, and population-scale analysis.
  • CipherWolves runs on a live web interface where human users can:
    • Watch agents interact in real time through a dialogue viewer.
    • See trust/suspicion levels shift via dynamic heatmaps and graphs.
    • Monitor votes, alliances, and keyword usage in a visual dashboard.
    • Rewind and replay games with annotated agent reasoning and metrics.

We aim to deliver a transparent, data-rich interface that functions as both a strategy game and a research-grade behavioral simulator.


ADK Framework: Engineering Highlights

Parent-Child Agent System

We deploy multi-parent, multi-sub-agent clusters that reflect the structure of real teams. Parents coordinate strategy and delegate analysis to sub-agents—each with scoped memory and individualized reasoning styles. Trust and suspicion are tracked continuously across the group.

Function Tool for Web-Augmented Reasoning

Parent agents can use Tavily search through the Function Tool interface—allowing them to discover references, or generate signals during the game. This simulates real-world decision contexts where external data influences discussion flow.

SessionService for State Management

Agent-specific dialogue context is preserved across communication, voting, and reflection phases—ensuring memory continuity and strategic coherence.

MemoryService for Behavioral Modeling

Long-term memory stores allow agents to accumulate historical context, learning how past interactions and alliances affect future decisions—just like in human teams.

Challenges we ran into

  • Simulating Realistic Social Play: Crafting AI agents that can convincingly bluff, persuade, and strategize required extensive prompt engineering and persona design.
  • Parent/Sub-Agent Coordination: Ensuring that sub-agents provided meaningful, context-aware analysis to their parent agents—without leaking hidden roles—was a complex balancing act.
  • Conversation Management: Handling asynchronous, multi-agent conversations and real-time metric updates was technically demanding.
  • Parsing AI Output: Extracting structured data (like trust/suspicion scores) from natural language AI responses required robust error handling.
  • Performance: Running multiple concurrent agents and sub-agents, each with their own memory and session, pushed our backend infrastructure to its limits.

Accomplishments that we're proud of

  • Web-Based Multiplayer Interface: Launching a user-friendly web platform for live games, spectating, and analytics.
  • Dual-Layered Agent Architecture: Our parent/sub-agent system creates a depth of social reasoning and analysis rarely seen in AI games.
  • Authentic Social Dynamics: Agents can form alliances, adapt strategies, and even surprise us with emergent behaviors.
  • Rich Analytics: CipherWolves logs every action, enabling detailed post-game analysis for players and researchers.
  • Human-AI Collaboration: The system allows for real-time human intervention and analysis, bridging the gap between player and observer.
  • Extensibility: Our modular design supports easy addition of new roles, personas, and mechanics.

What we learned

  • Prompt Engineering is Critical: The quality of AI behavior depends heavily on detailed, well-crafted prompts and persona instructions.
  • AI Can Be Unpredictable: Even with constraints, agents can develop unexpected strategies, highlighting the emergent nature of social AI.
  • Layered Reasoning Adds Depth: The parent/sub-agent model leads to more nuanced, believable decision-making and group dynamics.
  • Robust Logging is Essential: Detailed tracking is vital for debugging, analysis, and improving both AI and game design.
  • Balancing Transparency and Immersion: Providing analytics without breaking the immersion of hidden roles is a delicate art.

What's next for CipherWolves

  • Custom Roles and Personas: Allowing users to design their own roles, personas, and keyword sets for endless replayability.
  • Expanded Game Modes: Introducing new scenarios, team-based play, and variable win conditions.
  • Educational & Research Tools: Creating modules for classrooms and academic studies in psychology, communication, and AI ethics.
  • Community Features: Public tournaments, leaderboards, and a hub for sharing strategies and replays.

Built With

Share this project:

Updates