About this project
LLM Gamebook is a framework for creating interactive stories where narratives are generated by Large Language Models (LLMs) while following a structured graph of story paths. It utilizes a monorepo architecture consisting of a FastAPI backend and a React frontend.
Key technical components include:
- StoryEngine & EngineManager: Handle LLM agent interactions, message history, and instance pooling.
- StoryContext & SessionState: Manage project definitions, entity traits, and track player progress through graph node transitions.
- MessageBus: An asynchronous pub/sub system for managing engine lifecycles and session events.
- ProjectManager: Handles the loading of story definitions from YAML files.
Stories are defined via YAML, allowing developers to specify entity types, graph-based story arcs, locations, characters, and tool functions that the LLM can call to trigger state transitions.
The technology stack includes FastAPI, SQLModel (aiosqlite), Pydantic AI for tool calling, and Jinja2 for prompt templating on the backend, with a React 19, TypeScript, and Mantine UI frontend.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.