What it is
Leehow's GitHub repository describes AiChatTrpg as an open-source AI Game Master for running tabletop RPGs (TRPG). You bring your own LLM (large language model, an AI that reads and writes text), point it at a ruleset PDF and an adventure module, and play. The AI acts as the Game Master and runs the whole session. The README says the project is pre-alpha and under active development, with local self-hosting as the default. The README does not list supported operating systems. The project uses zero function calling. Game state changes come from text markers parsed at the end of each turn.
Highlights:
- An LLM acts as Game Master through a three-phase pipeline (preprocess, generate, postprocess) with streaming output
- Dual memory: structured JSON state (scenes, NPCs, plot threads) plus a compressed narrative of older turns
- Pre-rolled dice pools with a deterministic outcome record for fair, auditable checks
- Multiple LLM providers: OpenAI-compatible (OpenAI, DeepSeek, Kimi, GLM, Doubao, Qwen, Grok), Gemini and Claude
How to use:
- First, in the backend folder create a virtual environment and install the requirements, set `DATABASE_URL`, copy auth.example.json to auth.json, then run `python run.py`. The backend is at http://localhost:8013.
- Then in the frontend folder run `npm install` and `npm run dev`. The frontend is at http://localhost:3013.
- Finally, connect your own LLM, point at a ruleset PDF and an adventure module, and play.
Who it's for:
Players who like tabletop RPGs, want an AI to be the Game Master and are willing to host it themselves.
Before you start:
- You need Python 3.11 or later, PostgreSQL and npm.
- You need to bring your own LLM.
- There is an invite-only public test deployment at test.aichattrpg.com, which is experimental and meant for trying registration, login, private rooms and the current single-player game flow. The README asks you not to upload sensitive personal data, private campaign archives, API keys or copyrighted books there.
- If you use these features, weigh the safety risks yourself. AI Inspiration World is not responsible for any consequences. Only use material you have the rights to; you are responsible for compliance.
- The project itself is free and open source. For the cost of the LLM service you use, see that provider.
- License: Apache-2.0. The README notes that the default PDF text-extraction library, PyMuPDF, is AGPL-3.0. If you plan to ship AiChatTrpg commercially without releasing your modifications, you need to replace PyMuPDF.
Based on the project's public documentation. Not tested by AI Inspiration World.
