Explainer · Memory and context

How LoreWeaver works: AI memory for long stories.

A language model forgets everything between replies, so a long story depends on what it is shown each time. This is the system that decides: what the storyteller reads, how memories are written and found again, how lore cards are chosen, and how the Loom steers what happens next.

Written by
The LoreWeaver team
Checked
October 3, 2026
Reading time
8 minutes

The figures here are read from the settings LoreWeaver runs on, so they change when the product does.

The short answer

How does LoreWeaver remember long stories?

Before every reply, LoreWeaver assembles what the storyteller reads, in a fixed order: its instructions, your world setting, your character and session notes, pinned lore cards and any card named in the last 12 messages or your new turn, a recap, the memories that bear on the moment, any Loom directions, and the latest messages word for word. A new memory is written every 4 replies and recalled by meaning, full text, keywords, and importance, never by how recent it is. Your plan sets the room: up to 6,400 tokens a reply on Free and up to 100,000 on Legendary.

Updated

What every reply reads

Every reply is written from scratch. The storyteller sees only the text it is given for that reply, so anything it should know has to be put in front of it again, every time. Before each reply, LoreWeaver rebuilds that text in a fixed order and fits it to the room your plan allows.

Pick a plan to see how the room is shared out at the start. Recent messages always get the largest share: nothing keeps a scene coherent like its own last few pages.

Figure 1One reply’s reading, in order

Plan

Free: up to 6,400 tokens a reply

Read on every reply36% of the room

  1. Storyteller instructions12%How to write: voice, pacing, and the rules of play. Character worlds get rules for one-on-one roleplay.
  2. World setting14%Your premise, tone and genre, and style rules.
  3. Your character10%The persona you play, with its description.
  4. Session notesAs writtenReminders you leave for this story.

Chosen for this reply28% of the room

  1. Lore cards14%Pinned cards, then the cards the scene has named, strongest first.
  2. The recap6%The story so far in brief, once it is under way.
  3. Memories8%Past moments that bear on this one, in story order.
  4. Loom directionsWhen one firesWhat a thread wants from this reply, when one fires.

Word for word36% of the room

  1. Recent messages36%The latest turns, newest first, until the room is full.
  2. Your new turnAlwaysWhat you just wrote, read last.
Starting shares of the room after space is set aside for the reply, taken from the budget every reply is built with. Parts drawn as marks have no share of their own; they take the room their words need.

How the room moves

The shares are where each reply starts, not walls. Room that the instructions, your character, the recap, or memories leave unused goes first to the world setting, then to lore. When a scene names more lore than its share can hold, lore borrows from recent messages, and session notes take their room from recent messages too. Recent messages fill in newest first, and the oldest one that only partly fits is trimmed rather than dropped.

See it for yourself

Under your latest reply, the context inspector shows how much of the room each part used, which lore cards came in, and the words that called them up.

How memories are written and recalled

Recent messages carry a scene. Memories carry everything the scene has scrolled past: a betrayal on the second night, a debt from the fifth, a fear confessed once and never to be confessed again. Each story keeps its own memories, so a new story in the same world starts clean.

Figure 2The life of a memory

  1. 01Written

    Every 4 replies, what matters.

    Each stretch of the story becomes a few self-contained memories: who did or said what to whom, when it happened in the story, and where. Facts about people, plans with their times, and secrets with who knows them are all kept, every name spelled the way the story spelled it.

  2. 02Recalled

    What the scene no longer shows.

    Before each reply, pinned memories and the moments just before the visible conversation come first. Then up to 40 more are scored on meaning, wording, and who is in the scene, and the best fill the memory share. Turns the storyteller can still read are never repeated.

  3. 03Summed up

    A recap that grows with the story.

    The recap reads the new replies themselves and folds them in, keeping every name, promise, and date. It ends with where things stand: the current time and place, who matters, and every open thread. Lock it and it stays exactly as you wrote it.

  4. 04Yours

    Edit, pin, or add your own.

    Any memory can be corrected, and the corrected version is what recall searches. Pin a memory to have it in every reply, or write one yourself: a fact, a promise, a date that must never slip.

Story memories a story keeps

  1. Free30
  2. Plus300
  3. Pro1,200
  4. Ultra and LegendaryEvery memory
How a memory is written, found, summed up, and shaped by you, with a scene from a harbor mystery. The ruler shows how many story memories each plan keeps; the recap keeps following the story past that.

When the story changes

Rewind to an earlier reply or undo the last exchange, and the memories written from the erased turns go with them while the recap is rebuilt. Memories you wrote stay. A branch starts with the memories of the moment it splits from. In the story sidebar you can read, edit, pin, or delete any memory, add your own, have the latest replies remembered right away, and rewrite or lock the recap.

How lore cards are chosen

A lore card holds one piece of canon: a person, a place, a faction, an object, an event, or any category your world invents. Each card has a title, a description, tags, and an importance from 1 to 5.

Cards are chosen by name, not by guesswork. A card joins a reply when it is pinned, or when its title or one of its tags appears as a whole word in the last 12 messages or in what you just wrote.

Figure 3Which cards one reply brings in

Older messages are not scanned for lore

Scanned for names: the last 12 messages and your turn

7 more messages above these

  1. The storytellerRain hammers the harbor as you cross the quay. Under the customs arch, Maren Holt is waiting with her collar up and a lantern at her feet.
  2. YouI hold up the wax seal I found in the wreck: the mark of the Tide Court.
  3. The storytellerHer face gives nothing away. “Plenty of people carry that mark,” she says. “Most of them are dead.”
  4. You“This one was pressed into a letter you swore you burned.”
  5. The storytellerFor the first time tonight, she looks away, out toward the black water.
  6. Your turnAsk Maren where the letters went.

In this reply, in order

  1. 01The Tide CourtPinnedPinned cards come first, in every reply.
  2. 02Maren HoltTitle and tagHer full name, then “Maren” in your turn. Importance 5.
  3. 03GullhavenTag“harbor” is one of its tags. Importance 3.
  4. 04Maren’s sealed letterLoomA thread brought it into this reply.

Lore’s share of the room is full

Not this time

  • Captain FerroTagNamed by “quay”, but no room was left.
  • The Salt BishopNot namedNot mentioned in the window, so it waits.
  • The Old LighthouseLoomA thread is keeping it out of this scene.

How cards rank

Pinned
Always in, and always first.
Title
Named in the window: a strong match.
Tags
Each tag named adds weight.
Importance
From 1 to 5, it adds the rest.
One reply in the same harbor scene. Numbers beside the underlined words point to the card each one called up; the dotted word named a card that found no room this time.

Why descriptions are never scanned

Matching on names keeps a card quiet until the scene calls for it. A card whose description mentions the sea does not wake up every time someone sails. Tags are how you give a card more ways to be named: a nickname, a title, a place it belongs to.

When the Loom steps in

A Loom thread can pin a card, switch it on or off, bring it into a reply, or keep it out. A thread that keeps a card out always wins, and a direction that names a character card brings that card along.

Seeing what came in

Words that brought a card into your latest reply are underlined in the story; hover or tap one to see the card behind it. On worlds that switch it on, the LoreMap can also bring a card's closest connections into the scene.

How the Loom steers a story

Memory keeps the past straight. The Loom decides what happens next. It is a no-code engine of if/then threads: before every reply, each active thread checks its conditions against the story, and when they hold, its actions run before the storyteller replies. Some actions change the story’s state; others hand the storyteller a direction for this reply.

Figure 4Three threads, from condition to direction

  1. The letter surfacesFires once

    If

    • The scene mentions “harbor master”
    • andThe flag letters_found is set

    Then

    • Bring in the card “Maren’s sealed letter”
    • Set the flag confronted

    The storyteller is told

    Vale lays a letter on the table, sealed with Maren’s crest, and waits for her to explain it.

  2. Pick the lockEach time it matches

    If

    • The scene mentions “lock”
    • andThe player carries the lockpicks

    Then

    • Roll 1d20+3 against DC 14

    The storyteller is told

    A roll of 16 against DC 14, a success: the tumblers give with a soft click, and the cellar door swings inward.

    Rolled 13, plus 3

    • Critical success
    • Success
    • Failure
    • Critical failure
  3. The tide turnsEach time it matches

    If

    • Every sixth reply

    Then

    • Raise the counter tide by 1
    • Show tide on a meter

    The storyteller is told

    Out on the water, the harbor bells ring for the turning tide.

Where a direction is read

  1. 01After the lore and memoriesAs a numbered list the next reply must carry out in full.
  2. 02Beside your turnThe same list again, right after your own words.
Three threads from the harbor world. A condition, an action, and the direction the storyteller receives, strung on one thread; a dice check sends whichever of its four outcomes the roll lands on.

What a thread can wait for

  • Words in your message or the storyteller’s last reply
  • Reply counts: the first reply, the tenth, every fifth, or a range
  • Flags and counters in the story’s state
  • Lore cards that have come up, or never have
  • Items the player is carrying
  • Other threads: whether they have fired, in what order, and how recently
  • Chance, or a dice check against a difficulty class

Conditions combine with and, or, not, or any number out of a set, so a thread waits for exactly the moment you mean.

What a thread can do

  • Direct the storyteller: a plot turn, a line of dialogue, a detail of the scene, a transition, a flashback, or foreshadowing
  • Change lore: pin a card for good or for a few replies, switch it on or off, bring it in or keep it out, raise its importance, or swap its description
  • Keep score with flags and counters, and run a story HUD with meters, quests, and an inventory
  • Roll dice in standard notation, such as 1d20+5 or 4d6kH3, against a difficulty class, with a direction for each of four outcomes
  • Offer choices the player can tap, show achievements and hints, and add to the session notes

Rules that keep it fair

A thread can fire once, wait out a cooldown, or stop after a set number of fires. Threads are unlimited on every plan, and 53 ready-made templates cover fantasy, horror, sci-fi, romance, mystery, survival, and more. Publish a world and its threads travel with it; hidden threads do their work without showing players how. The Loom guide covers every condition and action.

What each plan holds

Every plan runs the same memory, lore cards, and Loom. The plan sets the room: how much the storyteller reads for each reply, how many memories a story keeps, and how many replies a day come from premium storytellers. When the day’s premium replies run out, the story carries on with the free storyteller.

LoreWeaver plans compared by context per reply, memories per story, and premium replies a day
PlanContext per replyMemories per storyPremium replies a day
FreeUp to 6,400 tokens3025
PlusUp to 16,000 tokens300150
ProUp to 32,000 tokens1,200350
UltraUp to 64,000 tokensUnlimited750
LegendaryUp to 100,000 tokensUnlimitedUnlimited

Premium replies reset at midnight UTC. Prices, voice, images, and everything else each plan adds are on the plans page.

Questions

Questions about memory and context.

01What is a context window, and why does it matter for AI stories?

It is how much text an AI model can read at once, measured in tokens. A story that runs for weeks outgrows it. A plain chat drops the oldest messages first; LoreWeaver chooses what goes in, so the parts that matter come back long after the scene has scrolled away.

02Does LoreWeaver remember everything that happens?

It keeps what matters in three places. Recent messages arrive word for word, earlier events live on as memories and in the recap, and your world’s canon lives on lore cards that return whenever the story names them. How many memories a story keeps depends on the plan, from 30 on Free to every memory on Ultra and Legendary.

03How are memories found again?

By meaning first, then by the words and keywords they share with the moment, with importance settling close calls. How recently a memory was written plays no part, so a promise from the first night can outrank yesterday’s small talk.

04Are lore cards chosen by meaning or by name?

By name. A card comes in when it is pinned or when its title or one of its tags appears as a whole word in the last 12 messages or your new turn. Memories are the part that is found by meaning.

05Do memories carry over between stories?

Each story keeps its own memories and recap, and a branch starts with the memories of the story it split from. What every story in a world shares is the world itself: its setting, lore cards, and Loom threads.

06Can I see or change what the storyteller remembers?

Yes. The story sidebar lists every memory, which you can edit or delete, and the recap, which you can rewrite. Under your latest reply, the context inspector shows what that reply read.

07Does a bigger plan change how the system works?

No. Every plan uses the same memory, lore cards, and Loom. A bigger plan gives each reply more room, so more lore, more memories, and more recent messages fit at once, and it lets a story keep more memories.

08Is the Loom free?

Yes. Threads are unlimited on every plan, including Free, and 53 templates install in one click.

Go deeper

Guides that pick up where this page stops.