This is the community repo for Dramamancer, an experimental AI-powered interactive storytelling app.
Follow the instructions below to run the app locally. All that's needed is an Anthropic API key.
Dramamancer is an interactive narrative system that bridges authorial intent and audience input with natural language-based interactions powered by large language models (LLMs). Authors describe story settings in natural language and select accompanying images visualizing thse settings. Players then experience these authored stories by inputting character actions in natural language, while the system adaptively generates visually-aligned story texts. LLMs serve as a narrative engine, dynamically incorporating both the authors’ intent and the player’s actions to flexibly generate stories at their intersections. Dramamancer aims to lower the authorial burden of creating interactive narratives while facilitating flexible player responses beyond predefined choices. For more details, see the following papers:
Wang, Tiffany, et al. Dramamancer: Interactive Narratives with LLM-powered Storylets. Adjunct Proceedings of the 38th Annual ACM Symposium on User Interface Software and Technology. 2025.
Wang, Tiffany, et al. Design Techniques for LLM-Powered Interactive Storytelling: A Case Study of the Dramamancer System. Wordplay @ EMNLP 2025.
-
Install dependencies
npm install
-
Configure environment variables
Copy
.env.exampleto.envand set your Anthropic API key:cp .env.example .env
Edit
.envand add your API key:ANTHROPIC_API_KEY=your-anthropic-api-keyGet your key at https://console.anthropic.com/. The API key is required for playing and quickstart-authoring storygames.
Optional: Override the database directory (default:
data):DATA_DIR=./data
npm run devThe app runs at http://localhost:3001.
The app uses SQLite for data storage. The database file is automatically created at data/dramamancer.db when the app starts. The data directory is created if it doesn't exist. To use a different directory, set DATA_DIR in .env (e.g. DATA_DIR=./data).
