# Lorebook & Scan Depth Support

Shape your character's behavior and world with custom rules and lore for a one-of-a-kind, immersive adventure!

### Step 1

Create Lorebook

<figure><img src="https://84480290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiGaVrzfUlCQ7YgLHy0uL%2Fuploads%2FThBKFViqBptlHLc0VF5I%2FCreate%20New%20Lorebook.png?alt=media&#x26;token=0b601891-63f1-4909-898e-7db183f0679a" alt=""><figcaption></figcaption></figure>

Enter Title & Scan Depth as well as:

* Select applicable categories (up to 7 max)
* Visibility - set the lorebook private or public
  * Public - everyone can use it
  * Private - only you can use it

Optional (but highly recommended!):

* Attach a cover image (recommended)
* Lorebook description (recommended)

{% hint style="info" %}
**What is Scan Depth?**&#x20;

Scan Depth is a setting for the knowledge base that determines how many previous messages the search should analyze for lorebook keywords. This helps the bot retain lorebook content in its memory for a longer period.

**Example:**

* If set to 1, it will only check the last user message for the lorebook keyword.
* If set to 4, it will check the last 4 messages (including bot messages).
  {% endhint %}

<figure><img src="https://84480290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiGaVrzfUlCQ7YgLHy0uL%2Fuploads%2F2UhuAmd5TjgEYQ99zeXE%2FScreenshot%202025-08-11%20at%207.04.31%E2%80%AFPM.png?alt=media&#x26;token=f1c3e4d7-bc24-4ab4-8623-9e569d425086" alt=""><figcaption></figcaption></figure>

### Step 2

Create Entries To Explain The Rules And Lore

<figure><img src="https://84480290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiGaVrzfUlCQ7YgLHy0uL%2Fuploads%2FuFfWFEUKfaYKXbJnDPSd%2FScreenshot%202025-08-11%20at%207.53.04%E2%80%AFPM.png?alt=media&#x26;token=61744c7c-2bbb-423c-9cbb-df15f5349129" alt=""><figcaption></figcaption></figure>

### Step 3

Set Activation Keys

<figure><img src="https://84480290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiGaVrzfUlCQ7YgLHy0uL%2Fuploads%2Fga3hMmtcVb2byJpbfweT%2FLorebook%20Activation%20Keys.png?alt=media&#x26;token=3ec352aa-1433-4adc-bc3f-aed85e267d24" alt=""><figcaption></figcaption></figure>

### Step 4

Use the activation key to trigger the entry during the conversation.

<figure><img src="https://84480290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiGaVrzfUlCQ7YgLHy0uL%2Fuploads%2FQGZKsXW0KyicmsCtTBbM%2FLorebook%20Activation%20Keys%202.png?alt=media&#x26;token=4fc68233-f418-4101-9979-db225c9d6df8" alt=""><figcaption></figcaption></figure>

<br>
