Category: Fundamentals
Welcome back to the MiocAI documentation series. If you've been with us for a while, you know the struggle: you have a massive, beautifully crafted fantasy world with complex magic systems, political
MiocAI هو بديل لـ Character.AI و Candy AI وتطبيقات الدردشة الأخرى مع شخصيات الذكاء الاصطناعي.
Welcome back to the MiocAI documentation series. If you've been with us for a while, you know the struggle: you have a massive, beautifully crafted fantasy world with complex magic systems, political factions, and a dozen side characters. But when you try to actually roleplay in it, your bot either forgets how the magic works, hallucinates the name of the king, or becomes completely brain-dead because you crammed 5,000 words of worldbuilding into its backstory.
Enter our newest and most powerful worldbuilding tool: The Lorebook System.
In this first entry of our Lorebook guides, we are going to break down exactly what a Lorebook is, why you desperately need to start using them, and how they fundamentally differ from the memory tools you are already used to.
To understand Lorebooks, we first need to clarify what they are NOT. MiocAI already has a "Memory Manager" inside your chat settings. It is easy to confuse the two, but using them correctly makes a world of difference.
The standard Memory Manager is your character's diary. It is meant for highly specific, localized facts that pertain directly to the ongoing chat. * "My character broke their arm yesterday." * "We are currently angry at each other." * "We just arrived in Paris."
These are fleeting or deeply personal facts. They belong in the Memory Manager.
A Lorebook is the grand encyclopedia of your universe. It is a massive, structured collection of world knowledge. It doesn't store what happened five minutes ago; it stores the fundamental rules of the reality your characters exist in. * "The city of Eldoria is built on a floating island and ruled by a council of mages." * "Vampires in this universe are not hurt by sunlight, but silver makes them violently ill." * "The Galactic Federation uses plasma-based weaponry."
If it's a piece of lore, a location, a secondary NPC, or a world rule, it belongs in a Lorebook.
Many users make the fatal mistake of treating the Character Definition (Personality and Backstory boxes) as a worldbuilding dump. They write out the entire history of, say, the world they are constructing to get a single fact right during the roleplay. Yuck.
Do not do this. It lobotomizes your AI.
AI models have a limited "context window" (the amount of text they can process at once). If you force the AI to read a 4,000-word essay about the history of your galaxy on every single message, it leaves the model with virtually zero brain power to process the actual conversation. The bot becomes rigid, its responses get shorter, and it stops picking up on the emotional cues of the chat.
Lorebooks solve this through dynamic injection.
Instead of forcing the AI to remember the entire encyclopedia at all times, the Lorebook sits quietly in the background. It only hands the AI the specific page it needs, exactly when it needs it.
Lorebooks are made up of individual Entries. Each entry is tied to a set of Keywords.
Here is how the magic works in practice:
Let's say you create a Lorebook entry for a shady tavern called "The Rusty Anchor." You set the keyword as Rusty Anchor.
For 50 messages, you and the bot are wandering through the forest. The AI is completely unaware of the tavern. It is using 100% of its brainpower to focus on the forest roleplay.
Then, you type: "We should head back to the city and get a drink at the Rusty Anchor."
The system instantly scans your message, sees the keyword, and yoinks the entry for the tavern out of the Lorebook, sliding it into the AI's active context. Suddenly, the AI knows the bartender's name, the smell of the floorboards, and the terrible price of the ale, without you ever having to explain it in the chat.
Perhaps the greatest superpower of the Lorebook system is that Lorebooks are independent from characters.
If you spend three hours writing a beautifully detailed cyberpunk city into a character's backstory, that lore is trapped with that specific character. If you want to make a new character in that same city, you have to copy-paste it all over again.
Lorebooks exist at the account level. You create your "Cyberpunk City" Lorebook once. Then, you can simply attach it to any chat you want.
You build your universe once, and then you can drop any character into it by simply clicking a toggle in your Chat Settings panel.
If you are skipping to the end, here are the golden rules of the new system:
In our next guide, we will... probably explain more about the lorebook.