Everything K-culture — comebacks to K-beauty, straight to your inboxGet it in your inbox

METAL MEDIA

Underline-1024/loom-engine

8RustMIT

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

  1. 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
  2. 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
  3. Works natively with OpenAI, Anthropic, and Ollama, plus any local or third-party platform compatible with the OpenAI or Anthropic API format
  4. 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
  5. 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 GitHub

Trending repos

All repos →

Latest from METAL MEDIA