LLM Text Adventure is an interactive text adventure game with LLM-powered storytelling and image generation capabilities.
The project is on early stages of development and is meant to be used as a reference.
- Multi-agent architecture: Different tasks performed by different AI agents, making it possible to use best matching model for every task.
- Memory System: The adventure remembers your choices and builds a coherent narrative
- Node.js v18+ and npm
- ComfyUI for image generation
- An OpenRouter API key for accessing language models
git clone https://github.com/ArcticFox8515/LLMTextAdventure.git
cd LLMTextAdventurenpm installCopy the example environment file and update it with your settings:
cp .env.example .envEdit the .env file and update the following variables:
OPENROUTER_API_KEY=your_openrouter_api_key
OPENROUTER_MODEL=your_preferred_model
OPENROUTER_MODEL_MEMORY_FETCH=your_preferred_memory_model
OPENROUTER_MODEL_NARRATIVE=your_preferred_narrative_model
Available models and their capabilities can be found on OpenRouter's website.
Create prompts/story/story-parameters.yaml and fill up with story starting parameters. You can use one of example files:
prompts/story/story-parameters.eldoria.yamlprompts/story/story-parameters.cyberpunk.yamlor write your own story
Run both the client and server in development mode:
npm run build
npm run devThis will:
- Build the server
- Start the client development server
- Start the backend server
You can then open http://127.0.0.1:3001/ in your browser
MCP Adventure uses ComfyUI for image generation. Make sure ComfyUI is running and accessible at the URL specified in your .env file (default: http://127.0.0.1:8190). Make sure the checkpoint from story-parameters.xml is present in the model.
You can edit image generator prompt located in prompts/image-generator-prompt.json