Lunelle ← Back to home
Guides

How to write a chat memory summary (with templates)

Updated

A chat memory is a short note that the app sends to the AI with every reply, so the character keeps facts that have scrolled out of the conversation. Write it as a list of facts: where the story stands now, who the characters are to each other, what they are trying to do, which promises, debts, and secrets are still open, the objects that matter, and the past events that still affect the story. Keep it short, use the names the story uses, update it at the end of each session, and check any summary the AI writes before you save it, because AI summaries drop details and mix up relationships.

Apps give this note different names. Janitor AI and Chub call it Chat Memory, Character.AI has Story Memory and pinned messages, SillyTavern has the Summarize extension, AI Dungeon has the Story Summary and Plot Essentials, and NovelAI has the Memory box. In ChatGPT, Claude, and Gemini you can keep the same note in a project or a Gem. This guide covers what to write, templates you can copy, how to let the AI draft the summary, and how each app handles it, as of December 2026. Our guide on why AI characters forget explains the cause in more detail.

What a chat memory does

Before each reply, the app sends the model a block of text: the character’s definition, any notes or memory, and as many recent messages as still fit. The size of that block is the context window. Janitor AI’s help center puts the window of its own model at “Around 8k-9k tokens, give or take,” which is a few thousand words of chat. Once a conversation is longer than that, the oldest messages are no longer sent, and the character can’t read them.

A chat memory sits outside that rolling window. The app sends it with every reply, however long the chat gets, so a fact written there stays available after the message it came from has dropped out. Janitor AI lists chat memory among its permanent tokens, together with the character’s personality and scenario and your persona.

The space comes out of the same window as the chat, so a long memory leaves room for fewer recent messages. Janitor AI’s character creation guide recommends keeping permanent tokens “under 2500”, and that budget includes the memory. A memory is also not a guarantee. When Character.AI launched its 400-character Chat Memories field in 2025, it said it “can’t guarantee the Character will always use or reference the information exactly as written,” only that adding the information makes it more likely to be used. A short, clear memory gives the model the best chance.

A chat memory is different from a lorebook. A lorebook entry is added only when one of its keywords comes up, which suits world details that matter now and then. The memory is sent every time, so it should hold what the current story depends on. Our guide to lorebooks covers the other half.

What to put in a chat memory

A useful memory answers the questions a character would need to ask after missing the last few sessions: where are we, who is everyone, what is going on, and what is still unresolved. Janitor AI’s template divides the memory into six parts: Environment, Relationship Dynamic, Current Plot Points, notes on the character, notes on your character, and Important Past Events. The sections below follow the same idea.

Where the story stands now

Write the place, the time, and the situation: “The Gray Lantern inn at Hollow Ford, a rainy night, the bridge is out.” The character picks up the scene from this line, and it keeps the story from drifting back to an earlier location.

Who the characters are to each other

Events and the state of each character are what AI summaries get wrong most often. In FABLES, a 2024 study in which readers checked AI summaries of novels claim by claim, most of the false claims concerned “events and character states”, such as who knew what and how two people stood with each other. Give each relationship its own line, in its current state: “Sera Vale trusts Tam since the ambush.” If it changed during the story, say how it stands now and, when it matters, what changed it.

What the characters are trying to do

Write the goal or problem that is active right now: “Get the sealed letter to the Duchess in Varra before the new moon.” Janitor AI calls this Current Plot Points and suggests action verbs. A finished quest belongs under past events, or nowhere.

Promises, debts, and secrets

Open threads are the details a long story loses most easily, and readers notice when they vanish. An oath, a favor owed, or a secret needs one plain line each. Write who knows each secret as well as what it is, or a character may act on a secret it was never told.

Names, objects, and specifics

Summaries tend to turn specific details into general ones. In a study of AI-written conversation memories by Qingyue Wang and colleagues, a user had named a favorite film, the documentary The Social Dilemma, and the memory the model wrote said only that the user “Enjoys watching TV, reading, and listening to music.” Write the specific thing by name: the ship, the key, the wound on Sera’s arm. These details let a character refer back to the story instead of speaking in generalities.

Past events that still matter

Include an earlier event only if it still changes what happens now, and say what it changed. Janitor AI’s example is - {{char}} betrayed {{user}} a year ago. A good test is whether the character would act differently without knowing it. Scenes that ended without consequences can go.

What to leave out

Leave out what the character definition already says, such as personality and appearance, because the definition is sent with every reply too. Leave out moods and scenery that change from scene to scene. Leave out instructions about behavior. Janitor AI’s help center puts it as “Say what {{char}} is, not what they do”: - protective of {{user}} is a fact the model can use, while - always comforts {{user}} when they're sad tells the character what to do in every scene, whether it fits or not.

How to write it so the AI uses it

How each line is written matters about as much as what is in it. These habits come from app documentation and from research on where AI summaries go wrong.

  1. Write facts in short lines. Janitor AI’s advice is “List facts, not scenes”: - {{user}} was injured in the last fight instead of a paragraph about the limp. Prose spends the space on description, and the facts are harder to find, for the model and for you when you update the note.
  2. Use names instead of pronouns. In a roleplay, “I”, “you”, and “she” change meaning from message to message, and summaries mix up who did what. A 2022 study of dialogue summaries by Xiangru Tang and colleagues lists errors where “Mohit asked Darlene about the test” became “Darlene asked Mohit about the test.” With names, “Tam lied to Sera about the letter” can’t be read the other way round. In Janitor AI and SillyTavern, {{char}} and {{user}} work as names, because the app replaces them with the real ones.
  3. Keep one verb tense. Janitor AI’s help center says “Stick to ONE verb tense,” because switching tenses makes it harder for the model to tell what happened from what is happening.
  4. Replace a fact when it changes. If the memory says Sera’s sword is broken and a later line says she bought a new one, the model has two answers to choose from. Edit the old line instead of adding a second one. LongMemEval, a 2025 benchmark for chat memory, tests whether a system notices that a fact has changed as one of its five core abilities.
  5. Be specific. “Avoid vague fluff,” Janitor AI’s help center says, and its example replaces “complex and emotional” with “soft-spoken, avoids confrontation; hides anger easily.”

No format works best in every app. Researchers who changed only the formatting of prompts found large differences in results, and the format that worked best for one model “only weakly correlates” with what worked for another (Sclar et al., 2024). Use the format your app’s documentation suggests; Janitor AI’s suggests labeled sections with bullet points. If a memory isn’t working, try the same facts in another format before rewriting them. Labeled lines have one advantage that doesn’t depend on the model: they make the note easy to check and update.

Templates you can copy

Replace the example lines with your own story’s facts, delete sections you don’t need, and keep the result short. The filled-in examples were written for this guide as illustrations.

A general template for any app

Now: [place, time, and situation]
Characters: [each character, who they are to your character, how they stand now]
Goal: [what the characters are trying to do, and any deadline]
Open threads: [promises, debts, and secrets, and who knows each secret]
Items: [objects that matter and who has them]
Past events: [earlier events that still matter, and what they changed]

Filled in for a fantasy road story:

Now: The Gray Lantern inn at Hollow Ford, a rainy night. The bridge is out.
Characters: Sera Vale, hired sword traveling with Tam, trusts Tam since the ambush. Aldo, Tam's brother, joined the party at Hollow Ford. Mott, the innkeeper, keeps watching the door.
Goal: Get the sealed letter to the Duchess in Varra before the new moon, nine days away.
Open threads: Tam promised Sera double pay if they reach Varra in time. Aldo has secretly read the letter; Tam and Sera don't know.
Items: Tam carries the sealed letter. Sera's sword broke in the ambush; she uses a borrowed one.
Past events: Riders in gray cloaks ambushed Tam and Sera on the north road. Sera's left arm was cut and is still healing.

Janitor AI’s template

Janitor AI’s help center suggests these headings, with short bullet points under each:

Environment:
- night, heavy rain
- abandoned rail station outside Kessin
Relationship Dynamic:
- {{user}} and {{char}} were partners until {{char}} kept the reward; they work together again only because both need the ledger
Current Plot Points:
- searching the station for the ledger
- the Halloran gang is a day behind them
{{char}} notes:
- inventory: lockpicks, half a map of the station
- left arm in a sling after the fall
{{user}} notes:
- outfit: long gray coat, the ledger key on a chain
Important Past Events:
- {{char}} sold out {{user}} to the Hallorans two years ago
- {{user}} pulled {{char}} out of the river last night

A short memory for a 400-character field

Character.AI’s Chat Memories field takes 400 characters. Spend them on facts the story can’t recover any other way: names, relationships, open promises, and where the scene is. This version of the road story is 337 characters:

Tam: courier taking a sealed letter to the Duchess in Varra by the new moon. Sera Vale: hired sword, trusts Tam since the ambush, arm wounded. Tam promised Sera double pay if they reach Varra in time. Aldo: Tam's brother, joined at Hollow Ford, secretly read the letter. Now: the Gray Lantern inn at Hollow Ford, rainy night, bridge out.

A template for adventures and quests

Party: [each companion, their role, and how they feel about your character]
Quest: [the goal and any deadline]
Where we are: [location and what is nearby]
Known so far: [clues, rumors, and facts the party has learned]
Promises and debts: [who owes what to whom]
Inventory: [only items that matter to the plot]
Unfinished: [places to return to, enemies still at large, questions not answered]

If you track numbers such as hit points or gold, keep them in a log outside the chat and copy in only what the story needs. Our guide to playing D&D solo with an AI game master has a campaign log format.

A template for a story with several characters

In a scene with several characters, the memory also has to say who knows what, or characters start acting on things they never heard. Give each character a line:

[Name]: [who they are] Wants: [goal] Knows: [facts they know] Doesn't know: [facts hidden from them]
Sera Vale: hired sword. Wants: her double pay and the riders who cut her. Knows: the letter is for the Duchess. Doesn't know: Aldo read it.
Aldo: Tam's brother. Wants: to sell what the letter says. Knows: the letter names a traitor at court. Doesn't know: the riders are still following.

Our guide to AI group chats covers why characters in a shared scene know things they shouldn’t.

Let the AI draft the summary, then check it

Most apps can write the summary for you, either with a button or when you ask out of character. Janitor AI’s help center suggests asking for “a recap every so often” and using it “as the new memory”, with prompts like this one:

task: pause chat|roleplay, answer query(outside of roleplay, succinct summary(list of all impactful events in roleplay(for each event listed: +their effects)))

In any app, an out-of-character request that names the parts you want works too:

(OOC: Pause the story. Write a memory note for this chat as a short list of facts, not a retelling. Include where the scene is now, each character and how they stand with my character, what we are trying to do, every promise, debt, and secret that is still open and who knows each secret, the items that matter and who has them, and earlier events that still affect the story, with what they changed. Use full names and present tense. Don't add anything that didn't happen in the chat.)

Read the result before you save it. In the 2025 study by Wang and colleagues, the authors checked 100 memories written by their recursive summarizing method by hand and found three kinds of error: invented facts, wrong relationships, and missing details. Errors made up less than 10% of the content, but a wrong fact in a memory is sent with every reply until someone fixes it. In FABLES, readers found that 33.3% to 65.4% of book summaries, depending on the model, left out key events, and models that read a whole book at once put more weight on the ending than on the beginning. SillyTavern’s documentation gives the practical advice: summaries “may lose some important details or contain hallucinations”, so keep track of them and correct them by hand.

When you check a summary, look for:

  1. Names, and who did what to whom.
  2. Each relationship as it stands now.
  3. Every open promise, debt, and secret, and who knows each one.
  4. Events from early in the story, which summaries tend to drop.
  5. Specific names and objects that were turned into general phrases.
  6. Anything that never happened.

Fix errors before you save. Apps that build each new summary from the previous one, as AI Dungeon’s Auto Summarization and the method in the Wang study do, carry an error into every later version. When you can, add new events to the memory instead of regenerating it from scratch, so your corrections stay. Janitor AI has a “summarize since last update” option for this, and AI Dungeon says that edits you make to the Story Summary “ARE sent to the summarization AI”.

When to update the memory

Update it at the end of each session or chapter, and right after anything important changes: a relationship turns, a promise is made or kept, someone learns a secret, or the characters move on. SillyTavern’s documentation suggests creating the first summary “when the messages are starting to get dropped out of the prompt”, which in an app with a small context window comes sooner than most players expect. For comparison, AI Dungeon’s automatic system writes a small memory every six actions and updates its overall summary every 15.

Delete what is finished: a debt that was paid, a secret everyone now knows, a place the story won’t return to. A memory that is never trimmed keeps growing and takes more room from the chat.

Check that the memory is working

Ask about a fact that is in the memory but not in the recent messages, in character and in different words from the memory line. If the memory says Tam promised Sera double pay, have Tam ask, “Sera, what did I promise you on the north road?” A right answer shows the character is reading the note. You can also step outside the story and ask, “(OOC: What do you know about the sealed letter?)”

If the answer is wrong, Janitor AI’s help center suggests three questions: “Did I phrase it clearly?”, “Did I bury it under too much fluff?”, and “Is it even still in the context window?” Our guide to why AI characters forget has a longer test for comparing how much different apps remember.

Why a chat memory stops working

The memory is too long

“More Isn’t Better,” Janitor AI’s help center says, and it describes a good memory as “your best set of post-it notes, not a giant wiki.” A long memory takes space from recent messages, and important lines get lost among unimportant ones. Cut it back to what the story depends on now.

It contradicts the chat or the character definition

A line that was true three sessions ago and isn’t now gives the model two versions of the story. So does a memory that disagrees with the definition. Find the stale line and change it to match the story as it stands.

The lines are vague or tell the character how to act

“Complex and emotional” gives the model nothing to use, and always comforts {{user}} makes the character comfort you whether or not the scene calls for it. Rewrite such lines as specific facts.

The app replaced the chat with the summary

Janitor AI added a “memory replaces old messages” toggle to its chat memory panel in August 2026. It is off by default, and when it is on, messages covered by the memory stop being sent with the prompt. When this behavior reached all users by mistake during a test, Janitor AI wrote that bots “suddenly had less of the actual conversation to work with and replies got vaguer or forgot details.” If replies got vaguer after you turned the toggle on, turn it off.

The fact was never saved

A fact you mentioned in the chat but never added to the memory, a pin, or a lorebook will drop out with the message it came from. Character.AI says items you write into Story Memory or pin yourself are protected when it tidies older parts of a chat; other details may not be.

Chat memory in each app

Janitor AI

Chat Memory is a field in the chat memory panel of each chat. It belongs to that chat, and Janitor AI’s changelog says branches copy it over. You can write it by hand or generate a summary, and the “summarize since last update” option adds only what happened since the last summary. Automatic summarizing runs only when “memory replaces old messages” is on, and it has its own switch. In August 2026 Janitor AI said that deleting messages “doesn’t touch your memory anymore, ever, unless you specifically choose to clear it.”

Character.AI

Character.AI’s Memory screen opens from the notebook icon in the chat header or from the chat menu. Story Memory is where you add backstory and key events, and you can long-press a message and tap Pin to add it word for word. Both are free; c.ai+ subscribers get twice as many pins and more Memory. Facts, a c.ai+ feature, saves details about your persona, the character, and side characters automatically, and you can edit or disable them and copy them to a new chat. The creator guide, updated June 2026, also describes the 400-character Chat Memories field.

SillyTavern

The Summarize extension, in the Extensions panel, writes a running summary and inserts it into the prompt. You can edit the current summary, roll back to the previous one, or pause automatic updates to keep a summary you wrote yourself. The settings control how often it updates (every so many messages or words), the prompt it uses, and where the summary goes in the prompt.

AI Dungeon

The Memory System has two parts. Auto Summarization keeps the Story Summary, a running overview of the plot, and the Memory Bank stores short summaries of past actions and brings back the relevant ones. You turn them on under Gameplay, AI Models, Memory System. The Story Summary can also be written by hand, and if you change something earlier in the story, you have to update the summary yourself. Facts that should always be considered go in Plot Essentials.

NovelAI

The Memory box holds information you want the AI to remember, and by default it goes “at the top of your Story Context before anything else.” NovelAI’s documentation suggests updating it “with important story elements as they take place.” The Author’s Note sits near the end of the context and suits short notes about the current scene.

Chub

Chat Memory in Chub takes a summary you write or one the AI generates, and the generated summary covers only “the messages that are out of context”, the ones the AI no longer sees.

ChatGPT, Claude, and Gemini

The memory features in these assistants are built for facts about you, and OpenAI’s help center notes that ChatGPT’s memory “does not retain every detail from every conversation.” For a story, keep your memory note yourself: paste it at the start of a new chat, add it to a ChatGPT or Claude project as a file or in the instructions, or upload it to a Gemini Gem. Update the file when the story changes.

Common questions

What should I put in Janitor AI chat memory?

Janitor AI’s help center suggests six labeled sections with short bullet points: Environment, Relationship Dynamic, Current Plot Points, notes on the character, notes on your character, and Important Past Events. Add open promises and secrets under Current Plot Points or a section of their own, use one verb tense, and keep the whole memory short, since it counts toward the same token budget as the chat.

How do I make Character.AI remember things?

Add the facts to Story Memory on the Memory screen, and pin the messages that hold key moments, since Character.AI protects both when it compresses older parts of a chat. Write the facts plainly, use the same names the story uses, and update them when something changes. c.ai+ subscribers can also review and edit Facts.

How long should a chat memory be?

As short as it can be while still holding what the story depends on. Character.AI’s Chat Memories field takes 400 characters, and Janitor AI recommends keeping all permanent text, including the memory, under 2,500 tokens. For most stories, a few lines per section is enough.

Does Janitor AI summarize chats automatically?

Only if you turn it on. Automatic summarizing runs only when “memory replaces old messages” is switched on in the chat memory panel, and it has its own off switch. With the default settings, you generate or update the summary yourself.

Should I let the AI write my chat memory?

It saves time, but check the result before you save it. AI summaries leave out key events, mix up who did what, and sometimes add things that never happened. Correct those lines, and add new events to a checked memory instead of regenerating it from scratch.

What’s the difference between chat memory and a lorebook?

Chat memory is sent with every reply and holds the current state of the story. A lorebook entry is sent only when its keyword comes up and holds background details about the world. See what a lorebook is and how to write one.

Long-term memory is one of Lunelle AI’s three focus areas: characters remember events, choices, and how their relationship with you has changed, across sessions. See long-term memory in Lunelle AI.

Sources