Janitor AI Scripts Guide: Build Your First Lorebook

Summary:Janitor AI’s “Scripts” temporarily inject settings into a character’s memory when specific keywords are triggered, preventing them from forgetting key details during long chats. This article compiles official documentation and community resources to guide you in creating your first script using a Lorebook in under ten minutes without writing any code. If you are more interested in character card creation, you can check out the Character.AI popular creator character card tips first.

Why Do Characters “Forget” Your Settings?

Anyone who plays with AI roleplay has probably experienced this: the character card clearly states “hates coffee,” but by the 30th message, the character is smiling while holding a latte. The reason is simple: character card content is fixed and fed into every conversation with limited space. The more details you want to add, the easier it is to crowd out other points and get ignored by the model.

One solution Janitor AI provides for creators is Scripts. Officially, scripts provide background information to the character when specific keywords appear in the chat. The effect is like a sticky note that is only valid in the moment, rather than permanently rewriting the character’s personality. If you are not yet familiar with this platform, you can check out its official homepage:

Janitor AI official homepage screenshot

Lorebook vs. Advanced: Choosing the Right Script Type

According to the official Scripts Beginner-Friendly Overview, scripts come in two types. A Lorebook is a set of entries where each entry only has “trigger keywords” and “a text box,” making setup simple. Advanced uses JavaScript to write conditional rules, such as making a character friendlier after a certain number of messages, or writing content separately into personality and scenario fields.

Janitor AI Lorebook vs Advanced scripts difference infographic

My advice is straightforward: beginners should always start with Lorebook. Most problems with characters forgetting settings can be solved by simply “mentioning a keyword to trigger a relevant description,” with no need to touch code from the start. Once you find that a single text box is not enough, you can upgrade that entry to Advanced. By the way, if you are used to SillyTavern, official instructions mention that you can paste Lorebook entries into the source view, but you only need to paste the content inside the outer brackets, not including the “entries” key.

Janitor AI official documentation: What are Scripts beginner overview

Make Your First Lorebook Script in Ten Minutes

The official step-by-step guide uses a “cafe” example, and the process is roughly as follows:

  1. Click your profile picture in the top right (bottom right on mobile), select “Scripts”, click “Create New Script”, and choose Lorebook.
  2. Name your script, choose a color theme (such as “Cafe Life”), and click create.
  3. Click “Add Entry” to add a new entry, select Background Info for Category, and enter comma-separated trigger words like coffee, cafe, latte, and espresso in Keys.
  4. Write one to three sentences of scene description you want to add in Content, and set Probability to 50 so it triggers on about half of the messages.
  5. Select and assign a character under “Assign to your Characters” on the right side of the page, then open a Test Chat to test it.
Janitor AI official documentation: How to use Scripts step-by-step guide

Here is a practical mindset: the more specific and concise the entry content, the better. Rather than writing a long paragraph about “the character’s coffee philosophy,” write details that turn directly into actions, like “She picks up her coffee and sniffs the aroma before drinking,” making it easier for the model to naturally blend it into replies. To learn more ways to give characters a soulful voice, check out this guide on Five-Senses Description and Catchphrase Design.

Key Settings to Make Scripts Behave

After creating the entries, these settings truly determine whether they work well. Below is a synthesis of official instructions and Arcanum’s curation article:

  • Message Depth: Determines how many past messages the script looks back at, ranging from 1 to 10, with a default of 3 when creating a form. When set to 1, it only scans your latest message, preventing character replies from triggering entries and avoiding endless script loops.
  • Probability: Rolls a die for every message without cumulative effects. 100 means it always triggers, while 50 is like a coin toss.
  • Min Messages: The chat must reach a specified length before entries become active, suitable for secrets told only after building familiarity.
  • Inclusion Groups: Entries in the same group compete with each other, with only one adopted per turn, ideal for mutually exclusive scenarios.
  • Order: Determines priority when there is too much content to fit. Note that two official guides contradict each other on whether higher or lower numbers go first, so the safest approach is to test it yourself.
Arcanum community article: Janitor AI Scripts settings and debug panel

Not Triggering? Troubleshoot with the Debug Panel

The most frustrating part of scripts is when “I set it up, but nothing happens.” The official recommended approach is: open Test Chat, click “Show Debug Panel”, send a message containing keywords, and check the “Changes” tab to see if the entry was added. If there is no response, check these items in order:

  • Whether your message actually contains the keyword and if Case Sensitive is enabled.
  • Whether the entry is in an Active state.
  • Whether Min Messages is higher than the current chat length.
  • Whether the probability is set too low—single tests are inaccurate, so send a few more messages.
  • Whether another entry in the same group preemptively selected it.

Another easily overlooked fact is that even if the debug panel shows the content has been added, the AI may still ignore it. Scripts are “reminders,” not “commands,” so important rules should still be written directly into the character card.

Don’t Want to Start From Scratch? Official Ready-Made Scripts

The Help Center Scripts category currently lists 12 articles. Beyond beginner guides, it includes advanced scripts made by community creators, such as Icehellionx’s emotion engine (detecting emotion words in replies), scene coordination engine (handling OOC commands like “cut to” or “fast forward”), likes and dislikes tracking engines, and Arcanox’s debug script and weighted random events. If you want “Pokemon-style” random encounters or automated user preference tracking, forking ready-made ones is much faster than writing your own.

Janitor AI Scripts pros and cons summary card

Pros of Scripts and What to Expect

Overall, the biggest value of Scripts is “saving space”: they do not occupy character card memory normally and only appear when needed. The limitations are also clear: they do not automatically carry over to the next message, Lorebook entries only have a single text box, Advanced requires JavaScript, and the source code of published scripts is visible to other users, so avoid putting private content there. Additionally, recent updates in the official changelog (such as App 2.6.0 released on October 1st and anti-bot measures on trending lists in late September) focus mainly on UI and stability adjustments with no new script announcements, so functional details should rely on the official Help Center.

Janitor AI official changelog update log page

Another common misconception is that “more entries are better.” Every triggered entry consumes context, and the community rule of thumb is around 2,500 tokens (this is a community guideline, not an official limit). Keeping entries concise and keywords specific is much more effective than stuffing a bunch of generic keywords.

Janitor AI Scripts tutorial: anime character holding a magic book

An Alternative If You Dislike Tweaking Settings

Scripts are powerful, but they are ultimately meant for creators who want to fine-tune characters meticulously, which comes with a learning curve. If you prefer spending your time on plots and character interactions, WeavAI takes a different route: an anime style with a full Traditional Chinese interface, offering both interactive fiction and roleplay modes. Creators also get a 30% points rebate, and daily check-ins award 500 points. WeavAI is an all-ages platform currently focused purely on text interaction with no image generation features.

Janitor AI Scripts and WeavAI character setting paths comparison table
WeavAI homepage screenshot

If you want to browse characters and stories made by others, you can check out the discovery page:

WeavAI discovery page screenshot

Conclusion: Just Make One Small Script First

If you only remember one thing: pick the setting in your character card that is forgotten most often, turn it into a Lorebook entry, set the probability to 100 and depth to 1, open the debug panel to confirm it triggers, and you are good to go. You can add conditions and probabilities gradually afterward. To maintain character formatting and consistency together, you can read further on OOC and Character Consistency Fixes and JanitorAI Similar Characters Feature Analysis.

作夢呢
作夢呢
Articles: 3652

Leave a Reply

Your email address will not be published. Required fields are marked *