Inspiration
Role-play character cards often ship an entire world: cities, factions, history, laws. Chat models lose it within a few dozen turns. A brothel unique to the capital shows up in a desert outpost, a forbidden act goes unpunished, a wuxia hero pulls out a phone. Players call this drift, and it is the most common complaint in long-form AI fiction. We wanted the world itself to become a first-class, persistent object the model is held to.
What it does
- World Builder: on card import, every setting the card states is extracted into a structured world bible with eight sections (geography, factions, social system, tech and supernatural limits, economy, customs, taboos, era and feel). Long lore entries are split rather than truncated; character personas and author instructions are filtered out.
- Gap filling, never overriding: Nemotron Ultra adds only what the card leaves open, tagged "inferred". A card entry always wins.
- Grounded research: a Nemotron planner decides whether the setting is historical, an analog of a real era (for example a wuxia world that feels Song or Ming), or pure fantasy. For the first two it writes historian-style queries, runs Tavily advanced search, and every inferred entry cites its sources (R1-R8), clickable in the UI. Pure fantasy skips the search.
- World Skeleton: a compact, location-aware slice of the bible (world-wide rules plus entries for the current region) goes into every narrator prompt, so the world's layout never falls out of context.
- World Check: each player turn, Nemotron Super judges the action as allowed, allowed with a cost, or out of world, names the rule that fired, and gives the narrator a concrete hint. The verdict appears on each reply.
- Editable canon: players can view, edit, lock or rebuild the bible. Locked entries are canon for both the narrator and World Check.
How we built it
Threadloom is a Python runtime for long-form role-play with layered memory (canon, state, persona, threads, archive) and a vanilla JS web UI. For this hackathon we added a Nebius Token Factory provider (OpenAI-compatible endpoint) and routed new roles to Nemotron:
- nvidia/Nemotron-3-Ultra-550b-a55b builds the world bible (about $0.01-0.02 per card).
- Nemotron Super 120B plans research (thinking off), runs World Check every turn (a fraction of a cent), and narrates in the demo.
- Tavily Search API is called at runtime during bible builds, with era-term and domain filtering so results stay on topic. The demo runs as a Docker service on Render, seeded with a demo card on start.
Challenges we ran into
- Real cards are messy. A complex wuxia card mixed world lore with NPC secrets, trigger locks, scene rules aimed at the model, and character sheets. Early versions turned "cannot" in a description into a world law, or put an author instruction into "era and feel". We rewrote extraction to keep only explicit prohibitions, add the faction a rule belongs to, and drop persona and instruction blocks.
- Smaller models cited the wrong rules in World Check, so we moved it from Nano to Super and kept prompts compact.
- Keeping prompt size bounded: the full bible can be large, so the narrator gets a 1,000-character skeleton chosen by region, not the whole thing.
Accomplishments that we're proud of
- On a 25,000-character card, the bible keeps every world setting the card states, with its source entry visible, and nothing invented overrides it.
- Research is cited, not hallucinated: each inferred entry links to the Tavily sources it used.
- The whole pipeline costs cents per card and well under a cent per turn.
What we learned
Separating what the author said from what the model inferred matters more than model size. Once that boundary is explicit and visible, both the narrator and the checker behave far more consistently.
What's next
- A Character Check that compares each draft reply with the on-stage NPC's persona and knowledge, to catch forgotten traits and leaked secrets.
- Per-user API keys so every account on a public instance can build its own worlds.
- Region maps generated from the geography section.
Built With
- javascript
- nebius
- nvidia-nemotron
- python
- tavily
Log in or sign up for Devpost to join the conversation.