SentientSands
DEPENDENCIES:
RE_Kenshi https://github.com/BFrizzleFoShizzle/RE_Kenshi/releases
KenshiLib https://github.com/KenshiReclaimer/KenshiLib/releases
For AI Backend:
Player2 https://player2.game/
or
Your choice of OpenAI API Compatable Provider
Sentient Sands AI Kenshi AI Mod
This mod completely overhauls Kenshi’s dialogue system by hooking the game into a Large Language Model. It enhances the world with real-time, context-aware interactions for every single NPC in the game. You can type directly to any character, and they will respond based on who they are, what faction they belong to, how healthy they are, and what is happening in the world around them. NPCs also talk to each other without any player input.
Core Features
Meaningful NPC Interactions Talk to anyone about anything. Every conversation is generated in real time based on Kenshi’s lore, the NPC’s unique data, and the current state of the world. The AI can also act on what you say — it can recruit, attack, trade, change political relations, or even imprison your character based on how dialogue plays out.
Voice Modes
Talk – Normal volume. Other nearby characters overhear the conversation and silently update their memory of events.
Whisper – Private, one-on-one only. No one else can hear.
Yell – Address a crowd. Multiple different NPCs may respond at once, each on their own line.
Persistent NPC Memory The moment you first talk to an NPC, the server generates a unique name, backstory, and personality for them, saved permanently to your campaign folder. Run into them days later in a different town and they’ll remember who you are, what you said, and how that went.
Every NPC Gets a Name Generic NPCs – Dust Bandits, Hungry Vagrants, Shop Guards – are automatically renamed with unique, lore-appropriate names on your first visit. The name pool contains over 5,000 names with title combinations for overflow (e.g., Takao the Bold, Mad Kaelen).
Sensory Awareness NPCs process what is happening around them. They can see the health, hunger, and equipped gear of everyone nearby and will react accordingly.
Ambient Banter The world is never silent when you are not talking. Nearby NPCs will start conversations with each other, reacting to hunger, a nearby fight, the local biome, the weather, or your squad walking by.
World Rumors & Living History The mod tracks major events – battles, killings, healings, raids, town conquests. These are periodically synthesized into rumors that spread through the world’s NPCs. Talk to a barkeep and they might mention the assault you launched on a town three days ago.
Multiple Campaigns Run separate AI campaigns isolated from each other. Each campaign has its own NPC memories, world history, and rumor logs. Switch between them from the in-game hub without losing any data.
Verbal Bartering & Recruitment You can negotiate trades in dialogue. You can also try to convince NPCs to join your squad verbally but members of major factions like the Holy Nation or United Cities will refuse unless you have massive reputation, have saved their life, or have an extremely compelling argument.
In-Game Hub (F8 Menu) Press F8 to open the AI hub. From here you can:
Change your AI provider or model on the fly
Browse the Dialogue Library to read every conversation any NPC has ever had in your campaign
Read the current World Rumours – a live feed of synthesized world events
Create or switch between Campaigns
Test your connection and configure settings
How It Works
The mod uses a C++ plugin that hooks into the game and communicates with a background Python server. The server launches automatically when Kenshi starts and shuts itself down cleanly when you close the game. No setup required beyond configuring your AI provider.
The mod ships pre-configured for the Player2 AI backend for ease of use, but is compatible with any OpenAI-compatible provider. Providers and models are configured through simple JSON files in the mod’s server folder.
-DISCLAIMER-
This mod was made with the assistance of LLM coding agents
-INSTALLATION GUIDE-
Step 1: Install RE_Kenshi https://github.com/BFrizzleFoShizzle/RE_Kenshi/releases
Download the latest release of RE_Kenshi.
Extract the contents (RE_Kenshi.exe,RE_Kenshi.dll, etc.) directly into your root Kenshi folder
RunRE_Kenshi_v0.3.0.exe and follow the installation steps.
Step 2: Install KenshiLib https://github.com/KenshiReclaimer/KenshiLib/releases
Download the latest release of KenshiLib.
Extract the KenshiLib folder into your root Kenshi folder.
Step 3: Install Sentient Sands
Subscribe to SentientSands in the steam workshop
Expected path: …steamappsworkshopcontent2338603675880187
(Manual installs go to: KenshimodsSentientSands)
Step 4: Setup AI Backend
Navigate to your Sentient Sands mod folder’sserverconfig directory.
Manual/Nexus installs: KenshimodsSentientSandsserverconfig
Steam Workshop: …workshopcontent2338603675880187serverconfig
Open providers.json and add your API keys (e.g., OpenRouter) or local server URLs (Ollama, LM Studio, etc.).
Configure your models in models.json to link them to your providers.
Step 5: Launching the Game
CRITICAL: You must launch the game using RE_Kenshi.exe. If you launch the game using the standard Kenshi launcher or through Steam directly (without pointing it to RE_Kenshi), the mod will fail to load, and the AI server will not start.
Ensure both Sentient Sands is checked in the Kenshi mod launcher.
If you have any bugs to report or questions about the mod, please join our discord
https://discord.gg/7WCPjmcm2C
I will also answer questions in the steam Q&A