How nidheeshgit/ai-adventure-game works
AI Adventure Game is a terminal-based, text fantasy adventure. The player enters an action; the CLI initializes and displays the persistent game world, while LangGraph classifies each turn, dispatches it to a story, combat, inventory, or status handler, and returns a narrated response. Specialist agents use tools to update shared game state; the Game Master narrates the result. The README documents the main routing flow and capabilities; some wiring is supported by excerpts, while internal details of unsampled modules are not independently verified.
Main entry points: workflow.py Turn Workflow · game_tools.py Game Tools · main.py Terminal Game Loop · game_master.py Game Master
Components 12
Player Interface
- Terminal Game Loop
app/main.py
Turn Orchestration
- Turn Workflow
app/graph/workflow.py - Turn State
app/graph/state.py - Status Handler
app/graph/workflow.py
Adventure Agents
- Game Master
app/agents/game_master.py - Story Agent
app/agents/story_agent.py - Combat Agent
app/agents/combat_agent.py - Inventory Agent
app/agents/inventory_agent.py
Game World
- Game Tools
app/tools/game_tools.py - Game State
app/models/game_state.py
Other components
- Player
- Groq LLM
Connections 21
- Player → Terminal Game Loop: enters actions
README.md - Terminal Game Loop → Game Tools: initializes world
app/main.py - Terminal Game Loop → Turn Workflow: invokes turn
app/main.py - Turn Workflow → Turn State: uses schema
app/graph/workflow.py - Turn Workflow → Game Master: classifies action
README.md - Turn Workflow → Story Agent: routes story
app/graph/workflow.py - Turn Workflow → Combat Agent: routes combat
app/graph/workflow.py - Turn Workflow → Inventory Agent: routes inventory
app/graph/workflow.py - Turn Workflow → Status Handler: routes status
app/graph/workflow.py - Story Agent → Game Tools: calls tools
app/agents/story_agent.py - Combat Agent → Game Tools: calls tools
app/agents/combat_agent.py - Inventory Agent → Game Tools: calls tools
app/agents/inventory_agent.py - Game Tools → Game State: updates world
app/tools/game_tools.py - Game Master → Groq LLM: requests classification
app/agents/game_master.py - Game Master → Groq LLM: requests narration
app/agents/game_master.py - Story Agent → Groq LLM: requests decisions
README.md - Combat Agent → Groq LLM: requests decisions
app/agents/combat_agent.py - Inventory Agent → Groq LLM: requests decisions
app/agents/inventory_agent.py - Turn Workflow → Game Master: returns for narration
app/graph/workflow.py - Turn Workflow → Terminal Game Loop: returns response
app/main.py - Terminal Game Loop → Game Tools: reads current state
README.md