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