Skip to main content

Importing Lorebooks

Import a Lorebook from a file or paste entries in bulk, instead of writing every entry in the editor. This page covers how to import, the JSON and plain text formats we accept, and what happens to your entries after import. Lorebooks are in beta and available to (c.ai+) subscribers.

Writing a big world one entry at a time can be slow. Importing lets you write your Lorebook wherever you like — a document, a notes app, your favorite text editor — then bring it all in at once. If you've built lorebooks in other apps or tools, you can import their exported JSON files too.

You can import in two ways: upload a file (plain text or JSON, up to 10 MB), or paste your entries as text. Everything is processed locally on your device.

How to import

  1. Select + Create → Lorebook.
  2. On the Fresh Start screen, select Import.
  3. Upload a file by dragging and dropping it (or clicking to browse), or paste your entries into the text box.
  4. Select Import.

Your Lorebook opens in the editor with all its entries, ready to review, edit, and publish like any other Lorebook.

Plain text

The simplest way to write a Lorebook outside the editor is plain text, using this format:

Lorebook Name: The Clockwork Isles
Lorebook Description: A scattered archipelago kept afloat by tide-powered machines.

Entry Title: The Gearwrights Guild
Keywords: guild, gearwrights, brass sigil
Content: The Gearwrights Guild maintains the great tide-engines beneath each island. Crossing the Guild means your island's engine mysteriously develops "maintenance delays."

Entry Title: Ferrik the Tinker
Keywords: Ferrik, tinker, houseboat
Content: Ferrik is a disgraced former Guild engineer who repairs contraband automata out of a houseboat.
He talks to his tools and owes money to half the harbor.

Entry Title: The Long Tick
Keywords: long tick, drowned engine
Content: Some nights the whole archipelago hears it: a slow mechanical heartbeat from beneath the waves.

How the format works:

  • Lorebook Name and Lorebook Description go at the top, once.
  • Each entry starts with Entry Title:, followed by Keywords: (separated by commas) and Content:.
  • Content can run across multiple lines and paragraphs. A new entry begins at the next Entry Title: line.

This format works anywhere you can write text, which makes it easy to draft a large world in a document, keep it organized, and paste it in when it's ready. 

You can copy the text in the code block above and replace the content on your own document to easily get started.

JSON files

If you've built lorebooks in other apps or tools, you can upload their exported JSON file directly as a starting point. Each entry's title, keywords, and content come through.

Here's the same Lorebook as above, as a JSON file:

{
  "entries": {
    "0": {
      "comment": "The Gearwrights Guild",
      "key": ["guild", "gearwrights", "brass sigil"],
      "content": "The Gearwrights Guild maintains the great tide-engines beneath each island. Crossing the Guild means your island's engine mysteriously develops \"maintenance delays\"."
    },
    "1": {
      "comment": "Ferrik the Tinker",
      "key": ["Ferrik", "tinker", "houseboat"],
      "content": "Ferrik is a disgraced former Guild engineer who repairs contraband automata out of a houseboat.\n\nHe talks to his tools and owes money to half the harbor."
    },
    "2": {
      "comment": "The Long Tick",
      "key": ["long tick", "drowned engine"],
      "content": "Some nights the whole archipelago hears it: a slow mechanical heartbeat from beneath the waves."
    }
  }
}

For each entry, comment becomes the entry's title, key becomes its keywords, and content becomes its content. Files exported from other tools sometimes contain many more fields than this. Anything outside our simpler format is left out during import — you don't need to trim them yourself.

Some other apps export JSON file that don't include a Lorebook name — set those in Lorebook Settings after importing the raw JSON file.

After importing, review your entries — especially:

  • Entries with no keywords. Some tools let an entry stay always-on without keywords. Here, entries activate by keywords only, so add keywords to any entry that arrived without them.
  • Entries with too many keywords. Some other Lorebooks allow more keywords than Character.ai (which allows up to 8), so you may need to delete some if your entry has more than that.
  • Entries that used special matching rules. Pattern-based keywords, secondary conditions, trigger chances, and timing rules aren't part of our format. Imported entries activate on their plain keywords alone, which may be more often than in the original tool.
  • Ordering and position settings. These are left out; entries here don't need them.
  • Untitled entries. Titles are optional in some tools, so entries may arrive without them.

A quick pass through your entries after import catches all of this in a few minutes.

Q: Why can't I save my Lorebook after importing?!

A: If you have trouble saving your Lorebook after importing, one of the entries usually has an error that you need to fix. Scan through them to see any with red or yellow highlights showing that there's something wrong - usually it's something simple like entries being too long, entries having too many keywords, or the entry might be missing a title

Fix up any issues that the Lorebook page flags and try to publish it again.

After importing

Imported Lorebooks work like any other:

  • Your Lorebook starts as a Draft. Review your entries, fix anything that didn't import the way you wanted, then Publish.
  • Link it to your Characters from Linked Characters in the editor.
  • The usual limits apply, including up to 8 keywords per entry.

New to Lorebooks? Start with Introduction to Lorebooks, and see What makes a good Lorebook? for how to write entries that work well in chat.

Was this article helpful?

0 out of 0 found this helpful