Skip to content

Silly Tavern character card fields (4/5): Lorebook — character_book and entries ​

Series: Silly Tavern character card fields (5 parts). Structure follows the CharacterBook type in the V2 explainer; how Silly Tavern imports this into World Info / character lore depends on your ST version.

What character_book is ​

Terminology from the spec:

  • Lorebook: keyword-triggered entries stitched into the prompt.
  • World book: lore not tied to a single card.
  • Character book: lore embedded in the card so users don’t fetch a separate world file.

The spec recommends stacking character and world lore (not replacing), and suggests character book first, then world book when budget is tight—implementation varies.

Outer fields (concept) ​

Besides entries, a book may include:

  • name / description: human-readable labels.
  • scan_depth, token_budget, recursive_scanning: how much history to scan, total budget, recursive triggers (mapped differently per app).
  • extensions: must be an object; default {}; do not delete unknown keys.

Each entry (concept) ​

FieldPlain language
keysKeywords that can fire this entry
contentText inserted when fired
secondary_keysUsed with selective for two-key triggers
selectiveWhether dual-key logic is enabled
enabledOn/off
insertion_orderLower numbers insert higher in the stack when multiple entries fire
case_sensitiveKeyword case sensitivity
constantIf true, always insert within budget
position'before_char' or 'after_char'
priorityWhen budget is tight, lower numbers may drop first
extensionsPer-entry bag; preserve unknown keys

Some fields are noted as not mapped in every frontend—verify in ST when migrating cards.

Tiny sample (illustrative only) ​

json
"character_book": {
  "name": "Shop lore",
  "scan_depth": 50,
  "token_budget": 300,
  "recursive_scanning": false,
  "extensions": {},
  "entries": [
    {
      "keys": ["register", "loose leaf"],
      "content": "This register was insect-damaged; the client glued the spine last year—avoid stressing that repair.",
      "enabled": true,
      "insertion_order": 100,
      "case_sensitive": false,
      "selective": false,
      "secondary_keys": [],
      "constant": false,
      "position": "before_char",
      "extensions": {}
    },
    {
      "keys": ["paste"],
      "content": "The studio uses wheat-starch paste—low odor; ink-sensitive people may find it sharp.",
      "enabled": true,
      "insertion_order": 200,
      "selective": true,
      "secondary_keys": ["allergy"],
      "extensions": {}
    }
  ]
}

Workflow in three verbs: pick keywords → write short entries → chat a few turns to check false triggers.

See also ​


Previous: (3/5) Openings & context

Next: (5/5) Extensions & debugging

Series index: Blog · Silly Tavern character card fields


Edit character_book and write back to PNG on Mac with Sillycard. Details: App Store and in-app copy.

Sillytavern Card Viewer / Editor / Manager on iOS & macOS — Sillycard & Sillycard on Phone. App languages: English, 简体中文, 繁體中文, 日本語, Русский. Privacy policy. © 2026 Sillycard