Skip to content

Lorebook Editor

The Lorebook editor manages SillyTavern-style World Info entries: text that can activate on keywords (or always, for constants) and inject into the model context during roleplay.

The same editor is used in two places:

  1. Character workspace → Lorebook tab (the lorebook that lives on the card)
  2. Lorebook vault → open a standalone book (Lorebook Vault)

TIP

Field help icons (?) next to labels summarize SillyTavern World Info behavior. Prefer those for short definitions; this page covers the CharacterVault layout and tools.

Two-panel layout

Content stays in front. Extra controls open from the header so the editor can use the space.

  • Left sidebar – Book settings, search, AI context usage, entry list, import/export, new entry
  • Right panel – Entry title, keys, Enabled / Constant, and the content editor

Options and (on a character) Attach sit in the entry header. Click either to open a panel over the editor; click again, Done, or Escape to close. Opening one closes the other.

On a phone, the list and the entry swap: tap a row to edit, Back to return to the list. Attach is also next to book settings on the list so you can reach it without opening an entry.

Book settings

Expand Lorebook at the top of the sidebar:

SettingRole
Book nameDisplay name for the book
DescriptionShort description
Scan depthHow many recent chat messages ST scans for keys (book-level)
Token budgetMax tokens World Info may consume at once (book-level)
Recursive scanningWhen on, activated entries can unlock others by naming their keys in Content
MapOpens the Recursion map
Delete lorebookCharacters only: remove the lorebook from the card (when offered)

Entry list

Each row shows a title (entry title / memo, or a fallback), key count, optional token count for the selected row, context eye, and delete.

Filter by title, internal notes, content, or primary keys. A result count appears when search is active.

AI context (Character Vault)

A compact AI context block shows how many entries are included and a token usage bar (book token budget when set, otherwise sampler context length).

ControlMeaning
Eye on a rowInclude or exclude that entry from Orion / AI toolbar context
All / NoneEnable or disable context for every entry

This is separate from Enabled (SillyTavern activation). See AI Context → Lorebook.

Import & export

Bottom of the sidebar:

  • Import – Replace the current book’s entries with a JSON lorebook (confirmation if entries already exist)
  • Export – Download ST-compatible JSON
  • New Entry – Append a blank entry and open it

Entry detail

The header title is the ST entry title (memo). It is not sent as content. Next to it: Attach (characters only), Options, and Delete. Options shows a small accent dot when this entry has non-default settings.

Always on screen:

FieldDescription
Primary keysKeywords or /regex/ that can activate the entry
EnabledWhen off, the entry never activates in SillyTavern
ConstantAlways-on; no keyword required
ContentText injected when the entry activates (full CodeMirror + AI toolbar)

Enabled and Constant are pressable chips (accent when on).

Options

Click Options to cover the content editor. Done or Escape closes it. Fields inside:

FieldDescription
Secondary keysOptional filter keys when Selective is on
Selective + logicAND ANY / NOT ALL / NOT ANY / AND ALL (ST selectiveLogic)
Insertion orderHigher numbers insert later / closer to the end of context
PositionWhere content injects (before/after char, before/after example, or at depth)
Depth / roleFor at depth: chat depth and system / user / assistant role
Case sensitiveExact letter case for keys
Match whole wordsWhole-word style matching for plain keys
Probability % / Use %Chance the entry is inserted after it would activate
Non-recursableOther entries cannot unlock this one via recursive scanning
Prevent further recursionWhen this activates, it will not unlock further entries
Delay until recursionOnly activates on recursive passes, not the first chat scan
Internal notesOptional notes (stored as the entry name field; not ST memo)

At-a-glance counts: Triggers N · Triggered by M (or “No recursion links”), plus Map.

Recursion map

A full-screen map of how your entries unlock each other. If entry A's content mentions one of entry B's primary keys, there's a path from A to B: when A activates, B can activate right after it (as long as flags allow it).

Open the map

  • Entry → OptionsMap (opens with that entry already inspected)
  • Book settings → Map (opens the whole book)

Both open the same view; the only difference is whether an entry is pre-selected.

The web view

By default you get a picture of the whole book. Each box is an entry, each arrow is a path: the entry an arrow starts from mentions the other entry's keys in its content. Entries group into clusters so you can see which ones belong to the same chain. Little dots on a box show its flags (see the legend at the bottom).

ActionHow
Move aroundDrag the background
ZoomScroll wheel, centered on your cursor
Inspect an entryClick it; click the same box again to clear
Select for bulk editsCtrl (or Cmd) + click; click again to deselect
Reset cameraReset view
Show entries with no linksShow standalone

Hover an entry to light up just its connections and fade everything else. A legend at the bottom of the map explains the arrows and flag dots.

The list view

Switch to List next to the Web button for a plain table of every entry, with search and All / Linked / Standalone filters. Same actions: click a row to inspect (again to clear), use the checkbox to select. For very large books the map opens in list mode first, since a wall of boxes is slower to read and slower to draw.

Inspecting an entry

The right-hand panel shows the clicked entry: its keys, flags, who can unlock it, and what it unlocks. From here you can:

  • Edit primary keys as chips under Keys. Click a chip to rename it, X to remove it, or type in the field to add one (Enter or comma). These write to the actual entry and update the map immediately. They are the real trigger keys, not map-only labels.
  • On Unlocked by / Unlocks rows, the matched keywords are chips too. Unlocked by edits this entry’s keys (Mentions these keys in its content). Unlocks edits the other entry’s keys (These keys match in this content). Removing a matched chip on an Unlocks row drops that hop.
  • Toggle Non-recursable, Prevent further, or Delay until recursion for just this entry. These apply right away.
  • Select it to add it to a bulk selection.

Escape while renaming a chip cancels the rename and leaves the map open. Pan and zoom stay put when arrows appear or vanish; use Reset view to recenter.

Clicking another entry in its "Unlocked by" or "Unlocks" lists inspects that one instead, so you can walk a chain step by step. Click the inspected box again, or the inspector X, to close the panel and drop the path highlight.

Bulk flag changes

Selecting one or more entries opens a bar at the bottom. Pick On or Off for any of the three recursion flags, or use Isolate: block both directions (non-recursable plus prevent further). Nothing is applied yet. The bar shows exactly what is staged and for how many entries. Press Apply to commit, or Discard to back out. For big selections (more than 25 entries), Apply asks for a second click so a stray tap cannot rewrite half the book.

Quick-select shortcuts in the bar: All entries, Visible (what search is showing), Linked (entries with at least one path), and Clear.

Small print

Authoring aid, not a full ST simulator

The map reads primary keys in content (including simple /regex/ support, case sensitivity, and whole-word options). Key chips on the map edit those same primary keys. It does not fully simulate selective secondary logic, probability, token budget, multi-step depth, or chat scan. Treat it as a guide for wiring keys and recursion flags.

If Recursive scanning is off on the book, the map still shows potential key hits and warns that SillyTavern will not recurse until scanning is enabled (book or global ST setting).

For a walkthrough with examples, see the Recursion Map Guide.

AI key generation

The sparkle control next to primary keys asks the AI for 2–5 comma-separated trigger keywords from Content, then merges them with existing keys.

  • Requires a configured AI provider (AI Setup)
  • Uses the Custom / instruct prompt model mapping when set; otherwise the global model
  • Click again to abort; requests time out after about 15 seconds

Content editor

Entry Content uses the shared CodeMirror stack: AI toolbar, spellcheck, macros, Markdown image highlighting, font size. See Editor & AI Toolkit.

Import & export

Works for both the lorebook on a character and a library book.

Export

  1. Open the lorebook editor (character tab or vault book).
  2. Click Export.
  3. Save the JSON (SillyTavern-oriented world info).

Import

  1. Click Import and choose a JSON file.
  2. If the book already has entries, confirm replacement.
  3. Supported shapes include CharacterVault / ST lorebook JSON (character_book, entries, etc.).

TIP

Standalone library import (multiple files, keep books separate) is on the Lorebook Vault tab. Character/vault editor import replaces the current book’s entries.

Linking a library book (characters)

On a character, Attach in the entry header (or next to book settings on a phone) opens the link panel: Open in vault, Attach / Replace, copy, and Detach. The button label is Attach, the linked book’s name, or Missing.

A character can link one book from the Lorebooks library. After you link, you’ll be asked whether to copy that book onto the character (this replaces the lorebook already on the card).

Once linked, they stay in sync: Open in vault writes the character’s current lorebook to the library book; edits in the library workspace update every linked character. The link itself stays in CharacterVault; exporting a card includes the lorebook on that character.

See Lorebook Vault → Linking.

Next steps

Privacy