This package contains art, text, or software code produced using generative AI.
RPGX AI Librarian – Turn Your Foundry World into an Actual Brain 🧠
Tired of your “AI assistant” knowing everything except the stuff that actually matters in your campaign?
RPGX AI Librarian is the missing piece: it ingests your journals, actor sheets, and world items into a searchable knowledge base so your AI can finally answer questions using your lore, your rules, your NPCs, and your hand-crafted chaos.
This module is built to work hand-in-hand with your RPGX AI Assistant working nicely in the background doing the unsexy heavy lifting: structuring your world and feeding it to the machine. It's like SkyNet, but for your TTRPG's... But, in a good way.

What RPGX AI Librarian Does
At a high level, RPGX AI Librarian:
-
Scans your Foundry VTT world (Journals, Actors, Items).
-
Extracts relevant text: lore, bios, abilities, stats, inventory, spells, item descriptions, etc.
-
Sends those documents to your RAG server (/ingest), where they’re chunked and indexed.
-
Lets your AI assistant use that indexed data to answer player/GM questions in-context.
Result:
Ask your AI, “What’s Rami Treenuts’ backstory again?”, “What conditions does this cursed ring inflict?”, or “Who hired the party in this arc?” — and it can answer using your actual campaign data, not generic SRD nonsense.

Feature Rundown
Here’s what you actually get under the hood.
🔍 World Ingestion (Journals, Actors, Items)
RPGX AI Librarian collects and converts your Foundry content into clean text docs for the RAG server:
-
Journals
-
Supports modern multi-page journals (v10+).
-
Reads text pages (HTML/Markdown), strips formatting to clean text.
-
Also supports legacy single-content journals.
-
Each journal becomes a “doc” with id, title, and content.
-
-
Actors (PCs & NPCs)
Extracts a ton of useful info, especially for D&D 5e and similar systems:-
Basic info: Classes, levels, species/race, background, alignment, size, HP, hit dice.
-
Abilities: STR/DEX/CON/INT/WIS/CHA with scores, mods, saves.
-
Skills: Skill totals and modifiers.
-
Proficiency bonus.
-
Movement: walk/fly/swim/climb/burrow, including hover.
-
Money/currency (pp/gp/ep/sp/cp).
-
Senses: darkvision, blindsight, tremorsense, truesight, special senses.
-
Defenses:
-
Armor Class.
-
Damage immunities, resistances, vulnerabilities.
-
Condition immunities.
-
-
Armor & Weapons:
-
Armor pieces with AC, type, equipped/unequipped.
-
Weapons with attack bonus and damage formulas.
-
-
Features & Feats:
-
Class features
-
Species/race features
-
Background features
-
Feats
-
-
Proficiencies:
-
Weapon, armor, tool proficiencies (including custom text).
-
-
Inventory:
-
Non-class, non-spell items with names and quantities.
-
-
Spells:
-
Spell names grouped by level (Cantrips, 1st, 2nd, etc.).
-
-
Personal details:
-
Gender, age, height, weight, eyes, hair, skin, faith, appearance.
-
Personality traits, ideals, bonds, flaws.
-
-
Biography:
-
Bio fields extracted and flattened to plain text.
-
All of this is formatted into a single, readable document per actor so the AI can reason about characters as complete entities, not just stat blocks.
-
-
Items
For world-level items (not compendium-only), Librarian extracts:-
Name and type.
-
Rarity.
-
Attunement status (yes/no/required/optional when present).
-
Subtype/type value.
-
Cost/price.
-
Damage/armor if applicable.
-
Description stripped to clean, plain text.
-
Perfect for letting your AI answer, “What does the Wand of the Dust King actually do again?” using your actual homebrew.
🧷 Ingest Control Panel (GM-Only)
The RPGX AI Librarian Control Panel (in Game Settings) gives you a central place to manage ingestion:
-
Shows counts for:
-
Journals in world
-
Actors/NPCs in world
-
Items in world
-
-
Action buttons:
-
Ingest All Journals, Actors & Items
-
Sends everything to your RAG server for indexing in one shot.
-
-
Wipe Knowledge Base
-
Calls your RAG server’s /wipe endpoint (with fallback methods) to clear all previously ingested docs.
-
Protected with a confirmation dialog so you don’t nuke your KB by accident.
-
-
Ping Server
-
Simple /ping call to confirm the RAG server is up and responding, and shows reported LLM/Embed model in a Foundry notification.
-
-
Close Panel
-
Closes the librarian panel like a civilized app.
-
-
📝 Per-Journal Upload Button (Coming Soon)
For when you just tweaked one journal and don’t want to reindex the entire world:
-
On Journal Sheets, RPGX AI Librarian adds a header button:
-
An upload icon in the journal window header.
-
Click it to:
-
Extract that single journal’s content.
-
Send it to /ingest with your chunk settings.
-
Get feedback: "Uploaded "<Journal Title>" (X chunks)."
-
-
This makes it painless to keep the KB updated session to session.
⚙️ Configurable Chunking for RAG
In Game Settings → Configure Settings → RPGX AI Librarian, you get:
-
RAG Server Base URL
-
Example: http://XXX.0.0.1:3033
-
This is the endpoint your RAG server exposes (/ingest, /ping, /wipe, etc.).
-
-
Chunk Size
-
Default: 1200
-
Controls how large each text chunk is when indexing.
-
Larger chunks: more context per chunk, slightly less granular.
-
Smaller chunks: more precise retrieval, more chunks.
-
-
Chunk Overlap
-
Default: 200
-
Overlap between chunks to help maintain continuity across boundaries (important for things like long journal entries or bios).
-
These are passed straight through to your RAG server so you can tune behavior for your specific model and context window.
🔒 GM-Only, Local-First Design
-
All ingestion actions are GM-only.
-
The module talks only to the RAG server you configure (usually on your local network or host).
-
No automatic calls to random external APIs baked in.
-
You stay in control of:
-
What content is indexed.
-
Where it goes.
-
When it’s wiped.
-
How to Install & Set Up RPGX AI Librarian
1. Requirements
You’ll need:
-
Foundry VTT (v10+ recommended, works great with v13+).
-
A RAG server reachable from your Foundry host, e.g.:
-
Your own Node-based RAG API pointing at Ollama or another LLM.
-
The same RAG server you’re using with the RPGX AI Assistant module.
-
-
Optional but recommended:
-
RPGX AI Assistant module to actually ask questions against this knowledge base in-game.
-
Librarian doesn’t care which LLM you’re using as long as the RAG server implements:
-
POST /ingest
-
POST or DELETE /wipe
-
GET /ping (returns something sensible)
2. How to Get the Module (Pricing & Access)
You’ve got two ways in:
🔹 Option A — One-Time Purchase ($3)
-
Pay a one-time $3 to unlock the RPGX AI Librarian module.
-
You get the current version of the module.
-
This is perfect if you:
-
Just want the tool.
-
Don’t care much about future updates/feature additions.
-
Prefer a simple, cheap buy-once model.
-
Note: Ongoing updates are not guaranteed with the standalone one-time purchase. You keep the version you bought.
🔸 Option B — Silver Tier (or Higher) Subscription
-
If you’re a Silver tier or higher Patreon subscriber, RPGX AI Librarian is included.
-
You get:
-
Access to current and future updates of the module.
-
Bug fixes, improvements, and new features as they’re released.
-
Other RPGX tools and goodies that come with your tier.
-
If you want to stay on the bleeding edge and get updates automatically, the subscription route is the smart play.
3. Installing the Module in Foundry
Once you have access (either via one-time purchase or subscription), you’ll get either:
-
A manifest URL, or
-
A downloadable ZIP of the module.
Then:
-
In Foundry’s Setup screen, go to Add-on Modules.
-
Click Install Module:
-
If you have a manifest URL, paste it into the “Manifest URL” field and click Install.
-
If you have a ZIP, place it in your Data/modules folder and refresh.
-
-
After installation, go to your World, open it, then:
-
Go to Game Settings → Manage Modules.
-
Enable RPGX AI Librarian.
-
Click Save Module Settings.
-
4. Basic Configuration
Inside your world:
-
Open Game Settings → Configure Settings.
-
Under the Module Settings tab, find RPGX AI Librarian.
You’ll see:
-
RAG Server Base URL
-
Set this to your RAG server, e.g.:
-
http://XXX.0.0.1:3033
-
http://192.168.0.XXX:3033
-
-
Must be reachable from wherever Foundry is running.
-
-
Chunk Size and Chunk Overlap
-
Leave defaults if you’re not sure:
-
Chunk Size: 1200
-
Chunk Overlap: 200
-
-
You can tune later if your RAG server suggests specific values.
-
Click Save Settings when done.
5. Using the Control Panel
To actually feed your world to the machine:
-
Open Game Settings → Configure Settings again.
-
Under Module Settings, look for RPGX AI Librarian and click the “Open Control Panel” button (thanks to the registered menu).
-
In the panel, you’ll see:
-
RAG Server URL.
-
Journals in World.
-
Actors / NPCs in World.
-
Items in World.
-
Buttons:
-
Ingest All Journals, Actors & Items
-
Click this to send everything to your RAG server in one go.
-
A notification will show progress and completion, including how many chunks/docs were ingested.
-
-
Wipe Knowledge Base
-
Click this if you want to completely reset the indexed data on your RAG server.
-
Confirm in the dialog box.
-
Useful when:
-
You’ve massively restructured your campaign.
-
You want to start fresh after a big refactor.
-
Run multiple unique worlds but intend to run them all off of a single RAG server, you will need to wipe and re-ingest between sessions so that your data context doesn't bleed together.
-
-
-
Ping Server
-
Confirms that your RAG server is online and responding.
-
Shows diagnostic info like which LLM and embedding model it reports.
-
-
Close
-
Closes the panel.
-
How It Plays with RPGX AI Assistant
On its own, Librarian is the indexer — the quiet archivist.
Paired with RPGX AI Assistant, it becomes a full AI co-DM that actually knows your world:
-
Librarian ingests and structures what exists in Foundry.
-
Your RAG + LLM stack turns questions into answers using those documents.
-
RPGX AI Assistant becomes your front-end:
-
Ask rules, lore, NPC details, quest reminders.
-
Get answers grounded in your world’s data, not generic templates.
-
You get the vibe of “My game has its own lore AI” instead of “I asked Clippy to run my campaign.”
TL;DR
RPGX AI Librarian is:
-
A world-to-RAG bridge for Foundry VTT.
-
It ingests Journals, Actors, and Items into a structured knowledge base.
-
Provides:
-
A GM-only control panel (ingest all, wipe, ping).
-
A per-journal upload button.
-
Configurable chunk size & overlap for RAG tuning.
-
-
Works perfectly with your local/self-hosted AI stack and modules like RPGX AI Assistant.
-
Available as:
-
$3 one-time purchase (current version), or
-
Included with Silver tier+ subscription, which also gets you ongoing updates.
-
If you want your AI tools to stop pretending they know your campaign and actually remember what the hell is going on, this is the module that makes it happen.