Under the Hood
Everything that happens between you tapping Send and a character responding — explained without anyone needing an engineering degree.
The Big Picture
The TL;DR for the beautifully impatient.
Inkstone is a fully local AI roleplay companion. It connects to whatever AI provider you choose, wraps your characters and settings into carefully crafted instructions, and manages your conversations — all without a server. Everything lives on your device.
Your AI Provider
The service that generates responses
Your Characters
Who you're talking to
Your Persona
Who you are in the story
The Prompt Engine
How everything becomes AI instructions
Your Chats
Where conversations live and breathe
Five systems, zero servers. That's the whole philosophy in one sentence.
The AI Provider System
Inkstone doesn't ship with a brain. It lets you pick one.
Inkstone talks to whichever AI service you've set up, using the OpenAI API format — the industry standard most providers support. OpenRouter, DeepSeek, Z.AI, OpenAI, or any custom endpoint. Your API key is stored in your device's secure credential storage (the same system your phone uses for saved passwords). Never logged, never exposed.
Streaming
Watch responses appear word by word in real time. The parser is lenient — most providers work out of the box, even if they skip some metadata fields.
Error Handling
When something goes wrong, Inkstone extracts the most useful error it can. For streaming requests, it falls back to the HTTP status message. Always something actionable, never "Unknown error."
The Character System
More than a name and a greeting.
Characters are the heart of Inkstone. Each one is a structured card containing everything the AI needs to portray that role convincingly.
Anatomy of a Character Card
Used wherever {{char}} appears
Personality, appearance, background
Short, punchy personality summary
The world context for the story
Opening line when a chat starts
Sample exchanges showing how they speak
Character-specific AI instructions
Placed after chat history for extra influence
The Persona System
Not an existential question. Just a name and a description.
Your persona is who you are in the story. A name and a short description — that's it. It gets substituted wherever {{user}} appears in prompts and character cards.
One active persona applies across all your chats. Switch whenever you want, but the AI only sees the new one in messages that come after the switch.
Think of it as your nametag at a party. You can change it, but the people you already talked to will remember the old one.
The Prompt Engine
The most complex system you'll never have to think about.
Every time you send a message, Inkstone assembles your system prompt, character card, lorebook entries, and chat history into one coherent block that gets sent to the AI. Here's how.
Tokens
The chunks an AI processes text in. ~4 characters per token. "Roleplay" = 2 tokens. A paragraph = ~75.
Context Window
The AI's working memory. A desk with limited space. When it's full, something comes off the edge to make room.
Context Assembly Order
Every message you send, this stack gets built from top to bottom:
The post-history position carries the most weight. Instructions placed there are the last thing the AI reads before responding — they have the strongest influence.
System Prompt Modes
Three flavors. All delicious.
A system prompt tells the AI what role to play, how to write, and what's allowed. Writing a good one from scratch is genuinely hard. Inkstone offers three modes so you don't have to.
Evening-Truth
Carefully designed, lightweight, and character-driven. Five three-state toggles for content control (encouraged / allowed / forbidden).
Marinara
Highly structured with six configurable settings. For those who want granular control over narration style.
Custom
Two text fields — pre-history and post-history — that you fill however you want. Full macro support. Import SillyTavern presets here.
The SFW switch in both Evening-Truth and Marinara doesn't guarantee SFW-only content — it stops the model from being pushed toward NSFW. For strictest protection, use Evening-Truth with all categories set to "forbidden."
The Macro System
{{char}} walks into a bar...
Macros are placeholders in double curly braces. Write a prompt once with {{char}} and it stays accurate across every character and conversation. Inkstone resolves them at the last possible moment, right before the request is sent.
Character & User Macros
{{char}}Character's name
{{user}}Your persona's name
{{description}}Character description
{{personality}}Personality summary
{{scenario}}Scenario field
{{persona}}Your full description
{{mesExamples}}Example dialogs
Dynamic Macros
{{time}}Current time
{{date}}Today's date
{{weekday}}Day of the week
{{lastMessage}}Most recent message
{{lastUserMessage}}Your last message
{{lastCharMessage}}Character's last reply
{{random::a::b::c}}Random from your list
Macro Playground
Type macros below and watch them resolve in real time. Try {{char}}, {{user}}, {{date}}, or any from the list above.
Dear Ibara, it's Monday and I, Adventurer, want to tell you something...
Legacy SillyTavern shorthand (<USER>, <BOT>, <CHAR>) also works for compatibility with imported content.
The Lorebook System
A filing cabinet next to the AI's desk.
A lorebook is a collection of facts, lore, or instructions that get added to the context automatically — but only when they're relevant. Most of the time the drawers stay closed. When something in the conversation matches a keyword on a folder, that folder gets pulled out and placed on the desk.
Keyword Matching
Inkstone scans the last 2 messages (by default) for keywords. Matched entries get injected before or after the character card.
Budget Management
Default budget: 2500 tokens. Entries sorted by priority. When the budget's full, lower-priority entries sit this round out.
Constant
Always included. No keyword needed.
Selective
Needs primary + secondary keyword match.
Recursive
Matched entries trigger more matches. Use carefully.
You can see what lore is currently active in any chat via the Active Lore Entries panel in the chat options menu. It shows each entry and its remaining TTL turns.
The Chat System
Messages in, stories out.
Chats are where everything comes together. Each one pairs a character and a persona, holds the full history of your conversation, and stores every message locally the moment it's created.
Alternatives
Every response can have multiple versions. Regenerate and swipe between them — nothing gets overwritten.
Regenerate
Creates a new alternative for the last character message using the same context. Different roll, same setup.
Edit
Change the content of any message directly. Saved immediately, token count updated on the spot.
SillyTavern Import
We accept your preset baggage.
SillyTavern is the most popular AI roleplay desktop app. Inkstone can import its system prompt presets, but they need a translation layer — the converter turns them into Custom system prompts you can use and edit.
Reads all prompt blocks from the file
Resolves SillyTavern's variable macros ({{setvar}}, {{getvar}})
Strips structural markers and metadata
Sorts blocks into pre-history (opening) and post-history (closing)
Combines into a clean Custom system prompt
Always read the resulting prompt after import. The converter does its best, but complex presets may need manual tweaking.
Settings & Onboarding
Levers, switches, and a friendly wizard.
First Launch Wizard
Your Data
No cloud. No account. No drama.
Inkstone stores everything locally. There is no cloud account to delete, no support ticket to file. Your conversations, characters, API key, and settings never go anywhere except directly to the AI provider you configured.
Windows
C:\Users\[You]\AppData\Roaming\com.inkstoneContains the SQLite database (chats, characters, lorebooks, settings, personas, prompts) and encrypted API key. Folder is hidden by default — press Win+R, type %APPDATA%, Enter.
Android
com.inkstone.inkstone (private storage)Lives in the app's private internal storage. Not directly browsable without root — Android's sandboxing keeps apps from reading each other's data. API key encrypted via Android Keystore.
The Full Journey
From the moment you tap Send to the moment you see a response.
Every step happens on your device. Inkstone has no servers of its own.
You tap Send
Your message begins its journey
Saved locally
Stored in your device's database
Lorebook scan
Keywords checked against recent messages
Context assembled
8 layers stacked in the right order
Macros resolved
{{char}} becomes Ibara, {{date}} becomes today
Sent to your AI
The assembled context hits your provider
Response arrives
Streaming word by word, or all at once
Thinking separated
Reasoning content stored privately
Message saved
New alternative ready to view
UI updates
Swipe, regenerate, or keep the story going
Pop Quiz
When the context window fills up, what does Inkstone remove first?
That's the whole machine. Each system is designed to stay out of your way when you don't need it and be there when you do.