Skip to content
    AI engineering roles via the DiamantAI Collective.See open roles
    CreativeGenAI Agents

    Murder Mystery Game

    This tutorial demonstrates how to create a game environment featuring autonomous LLM agents that take part in the game, using LangGraph, a framework for creating workflows with language models. The project produces a game that can be played by either a human or an LLM Agent.

    Creating autonomous agents that interact with a game environment has always been a topic of great interest, and now, we can utilize LLMs as the agents. This kind of work is also interesting from a robotics perspective.

    What you'll learn

    • 1
      State Management: Utilizes GenerateGameState, ConversationState classes to manage the game state and the textual conversation state
    • 2
      Language Model: Employs ChatOpenAI (GPT-4o) for the backstory generation, interactable characters, and (optionally) the LLM investigator protagonist agent
    • 3
      Gameplay Features:
    • 4
      LLM generated character backstory and story
    • 5
      Talk with LLM Agent characters (Human/Sherlock LLM Agent)
    • 6
      Pick the killer

    About this tutorial

    This hands-on Jupyter notebook is part of GenAI Agents, a free open-source repository by Nir Diamant covering ai agents techniques with runnable code examples and detailed explanations.

    Free and open-sourceRunnable Jupyter notebookActive community support
    Go deeper · Amazon Bestseller in Generative AI

    RAG Made Simple

    Nir Diamant's complete visual guide to Retrieval-Augmented Generation — essential for any GenAI engineer building systems that retrieve and ground responses on real data.

    Get it on Amazon

    ⭐ 4.4 stars · 1,500+ readers · Kindle $9.99 · Paperback $24.99 · Free with Kindle Unlimited

    More Creative tutorials

    More from GenAI Agents