User guide

This part of the manual is for people who write with Marginalia and for those who run it for others. It explains every screen and setting, from installing Marginalia and connecting a model to branching a story, building a lorebook and backing up the database. You don't need to know anything about programming; a few pages about templates go deeper for those who want to fine-tune what is sent to the model.

If you are new, start with Getting started – it takes you from installation to the first generated part of a book in a few minutes.

How Marginalia works

You write a story together with a large language model. For each part of the story you say what should happen - the scene, whose point of view, who is present, a few sentences of instructions - and the model writes the prose. Before every part Marginalia builds the prompt for the model from:

flowchart LR
    instr["Your instructions<br/>for the next part"] --> prompt
    story["The story so far<br/>(active branch)"] --> prompt
    sum["Summaries<br/>of older parts"] --> prompt
    lore["Lorebook entries<br/>relevant now"] --> prompt
    \style["Book prompts<br/>POV, tense, style"] --> prompt
    prompt["Prompt<br/>(templates)"] --> model["Model<br/>(inference provider + protocol)"]
    model --> part["New part"]

Everything in this picture can be adjusted, and the user guide is organized along it.

Core concepts

Concept What it is Read more
Book One story with everything that belongs to it: parts, prompts, lorebook, summaries, backups. Books
Part One piece of the story, normally one answer of the model. You can edit, regenerate or delete it. Story editor
Branch Parts form a tree: you can write another version of a part or continue differently from any earlier one. The active branch is what you see and what the model reads. Branches & story tree
Lorebook Notes about the world and characters. Each entry is put into the prompt only when it is relevant, e.g. when a character's name appears. Lorebooks
Summary A condensed version of older parts, so a long book still fits into what the model can read at once. Summaries
Meta summary A summary of summaries: several summaries merged into one shorter text, to free up the context. Summaries
Template The text with placeholders and macros from which the prompt is built. Every book has its own prompts, with defaults in Settings. Templates & macros
Inference provider The connection to a model: API address, API key, model and its limits. Inference providers
Protocol Generation settings: temperature, top P, penalties and optional limits. The provider says which model writes, the protocol how. Protocols
Tag A label on books and lorebooks; tags also decide which lorebook entries a book uses. Managing books
Extension A plugin that adds features, such as chapter markers or AI reviews. Extensions

Everything you create belongs to your account. Other users of the same Marginalia don't see your books, lorebooks, providers or settings - only books you choose to publish.

The workspace

After logging in you see the workspace. The tabs on the left are the main areas of Marginalia:

The workspace
The workspace
Tab  
Books Your books. Open one to write. See Books.
Lorebooks All your lorebooks and their entries. See Lorebooks.
Settings Your defaults: model, protocol and the default prompts for new books. See Account & settings.
Protocols Generation settings. See Protocols.
Inference Providers Connections to models. See Inference providers.
Resources The files you uploaded, such as pictures of parts. See Resources.
Trash What you deleted, until an administrator cleans up. Restore it from here. See Trash.

At the bottom are Change Password, Logout and, for administrators, Admin. Extensions may add more tabs and buttons.

Sections of this guide

Section For
Getting started Installing the desktop app or a server, the first start and a quick start.
Inference providers Connecting cloud and local models, context limits, reasoning models.
Resources The files you uploaded: download, replace and delete them.
Trash Deleted books, lorebooks and other objects, and how to restore them.
Protocols Temperature, top P, penalties and per-protocol limits.
Books Managing books, the story editor, branches, book prompts, summaries, backups and publishing.
Lorebooks Creating lorebooks, entries and how they are activated, import and export (including SillyTavern).
Templates & macros What is sent to the model and how to change it; the macro reference.
Extensions The bundled extensions: Author's Note, Chapter Marker, Lorebook VCS, Reviewer, Side Query.
Account & settings Your password, user name and default settings.
Administration For administrators: users, database backups, cleanup, installing extensions.
Troubleshooting & FAQ Logs, common problems and their solutions.

Conventions

  • Names of tabs, buttons and fields are in bold or italics, written as they appear in Marginalia, e.g. Admin → Users.

  • ~/.marginalia is the data folder in your home directory (%USERPROFILE%\.marginalia on Windows); on a Docker server it is the ./data folder next to docker-compose.yml.

  • Most changes are saved as soon as you make them. The exception is the Settings tab, which has a Save button.