Underline-1024/loom-engine
A terminal text RPG where an LLM writes the story and manages your stats live
Loom Engine is a Rust-based, terminal-only game engine that plugs into LLMs like OpenAI, Anthropic, or Ollama to generate a world and run a text RPG on the fly. Players type actions in plain natural language, and the LLM interprets intent, advances the narrative, and updates game state such as stats and inventory in real time. It runs in a text-based terminal interface showing stat panels, inventory, and dialogue history, with save and load support.
What it does
- Built-in numeric stats, tag-based traits, and an inventory system that the LLM can read and write directly through a set of tool functions, instead of just generating flavor text
- Players enter free-form natural language commands rather than fixed menu choices; the LLM parses intent, moves the story forward, and syncs the underlying stats and inventory automatically
- Works natively with OpenAI, Anthropic, and Ollama, plus any local or third-party platform compatible with the OpenAI or Anthropic API format
- Settings let users pick a Provider and Model, and optionally an Embedding Model (a model that turns text into vectors for meaning-based search) when dynamic tool calling is enabled
- Roadmap items still pending include streaming output, a plugin extension system, and local vector database integration
Why it matters
Instead of a chatbot that only exchanges text, this engine lets the LLM directly manipulate game state (stats, inventory) via tool calls, making it a working reference for anyone designing agentic tool-calling systems or interactive LLM-driven content. It's also built provider-agnostic, so it's a useful example of not locking into a single LLM vendor.
Terms in this repo
- LLM · Large Language Model, an AI trained to generate and understand text
- TUI · Terminal User Interface, a keyboard-driven text-based screen interface run inside a terminal
- tool function · A function an LLM can call to perform real program actions like changing state, instead of just outputting text
- Embedding Model · A model that converts text into numeric vectors to enable meaning-based search or comparison
- Ollama · A tool for running LLMs locally on your own machine
Repository description (English)
🧵 A terminal-native narrative engine & text RPG in Rust 🦀. Play with any LLM: OpenAI, Anthropic, local models & more.
Open on GitHubTrending repos
- vorssaint/vorssaint-utilsOne free menu bar app replaces a dozen paid Mac utilities
- Alishahryar1/free-claude-codeA local proxy that lets coding AI agents run on 49 free or cheap model providers instead of one paid service
- freestylefly/awesome-gpt-image-2A library of 532 reverse-engineered prompts that turn GPT-Image2 into a predictable image-making tool
- block/buzzAn open-source workspace where humans and AI agents chat, code, and review in the same rooms
- NousResearch/hermes-agentNous Research's Hermes is an AI agent that gets smarter the more you use it
- virgiliojr94/book-to-skillA tool that turns technical book PDFs into on-demand reference skills for AI coding agents
- VoltAgent/awesome-agent-skillsA single hub collecting over 1000 'how-to' manuals that make AI coding assistants act like experts
- anthropics/claude-plugins-communityA shared shelf where anyone's Claude add-ons get listed for install