A SillyTavern extension for per-character episodic memory in group roleplay. Built with Claude Code (Anthropic)
Each character remembers only what they personally witnessed — based on the Presence extension's per-message tracking. Memories are stored in the chat file, injected into the correct character's prompt at generation time, and expire naturally as the character accumulates their own messages.
- Requirements
- Installation
- Quick Start
- Features
- How Memory Works
- Settings Reference
- Memory Manager Panel
- Injection Positions
- Memory Intensity
- Lifespan
- Presets
- Lorebook Export
- qvink Integration
- Known Limitations
- Troubleshooting
- File Structure
- Data Schema
- Console API
- Debug Logging
- SillyTavern — current public release
- Presence extension — strongly recommended
Without Presence installed, the extension cannot determine which characters witnessed which messages. All messages in the selected range will be included in every summary regardless of who was present, which defeats the purpose of per-character isolation. A warning banner appears in the extension panel if Presence is not detected.
- In SillyTavern, open the Extensions tab.
- Click Install Extension.
- Paste this URL and confirm:
https://github.com/TheDartDragon/Dragon-Memories-Manager
- Download or clone this repository.
- Place the
Dragon-Memories-Managerfolder in:SillyTavern/public/extensions/third-party/ - Reload SillyTavern and enable Dragon Memories Manager from the Extensions tab.
- Open a group chat and run a scene.
- Click the wand (⚡) menu → Create Memory.
- Select a character using the avatar buttons.
- Choose a message range (manual, from last summary, or set markers).
- Click Generate Memory and wait for the summary.
- Review the result — swipe for alternatives, edit directly if needed.
- Adjust lifespan if needed, then click Save.
The memory is now active. It will be injected into that character's context every time they generate a response, until it expires.
- Click the wand (⚡) menu → Create Memory.
- Click All Remember All (below the character avatar buttons).
The extension generates and saves a full-history memory for every character in the group using default lifespan and injection settings. No review step — the first result is saved automatically. Use the Memory Manager panel afterward to inspect, edit, or adjust individual entries.
- Per-character isolation — each character's memories are stored and injected separately; one character's memories never appear in another's context.
- Presence filtering — only messages where the target character was actually present are included in the summarization transcript.
- Three range selection modes — manual range input, automatic from last summary, or click-to-mark directly in the chat.
- All Remember All — one-click baseline: generates and saves a full-history memory for every character in the group with default settings.
- In-chat MM flow — the Memory Manager conducts the creation flow as a pseudo-character in the chat, using SillyTavern's native swipe and edit UI.
- Lorebook context during summarization — optionally runs ST's keyword matching against the transcript and feeds matched lorebook entries to the scribe as background context. Per-lorebook blocklist available.
- Summary cleaning — strips reasoning blocks (
<think>…</think>or any ST-configured prefix/suffix) and custom literal strings from generated summaries at save time, before the token count is recorded.
- Lifespan — memories expire automatically after a configurable number of the character's own generated messages.
- Memory intensity — per-memory injection position override, so a pivotal scene can inject deeper in the prompt than a routine one.
- Injection cap — optional character limit on total injected memory per character; oldest memories are dropped first when over the cap.
- Hide summarized messages — optionally hides raw messages already covered by active memories during generation, so the LLM sees the summary instead of the original messages. Enables a clean three-layer stack alongside qvink MessageSummarize.
- Memory Manager panel — view, edit, reactivate, reassign, or export all memories for any character in the current chat.
- Blank memory — create an empty memory entry for manual editing; useful for tracking attire, wounds, relationships, or other persistent state that doesn't come from a generated summary.
- Edit Range — change the message range of any existing memory entry directly from the Manager panel.
- Token count — each saved memory records its token count at save time and displays it in the Manager panel.
- Staleness warning — memory cards show a badge when the summarized message range has been deleted or rolled back.
- Lorebook export — export any memory to a World Info lorebook with character filter and injection position preserved.
- Connection profile swap — switches to a dedicated connection profile before generating a summary, then restores the original. Requires Connection Manager.
- Completion preset swap — switches to a dedicated completion preset (sampler settings) for summarization, then restores. Auto-fills from the selected connection profile's stored preset.
- Built-in presets — PList, Summary, and Tracker prompt and injection presets out of the box.
- Debug log — a ring buffer captures all internal events; copy to clipboard for bug reports.
Wand menu → Create Memory
↓
Character selector — avatar buttons for each group member
↓
Range selector — Manual / From Last Summary / Set Markers
↓
Collect messages → presence-filter → build prompt → generate
↓
Review: swipeable summary, editable text, lifespan input, intensity override
↓
Save: write to chat_metadata, remove MM messages from chat
After saving, the Memory Manager interaction messages are removed from the chat entirely.
The Presence extension stores a present array on each message — an array of avatar filenames for every character that was active at that moment. The filter resolves the target character's avatar filename, then keeps only messages where that filename appears in present. Messages with no present data (older messages or edge cases) are always included.
On every GENERATION_AFTER_COMMANDS event, all active memories for the currently generating character are grouped by their effective injection slot and injected using setExtensionPrompt. Injection is skipped entirely during the summarization pass so memories do not contaminate the scribe prompt.
When Hide summarized messages is enabled, DMM registers a generate_interceptor (declared in manifest.json). SillyTavern passes an ephemeral copy of the chat array to this function before prompt assembly — DMM splices out the messages already covered by active memories. The real chat is never touched; no restore step is needed. Manually hidden or system messages are accounted for so the splice count stays accurate even when those messages are absent from the ephemeral array.
After injection, the generating character's active memories are ticked: char_message_count is incremented for each active entry. When char_message_count >= lifespan, the entry is marked inactive. Ticking is suppressed on swipes and regenerations (detected by tracking whether a new user message has appeared since the last tick) and while the MM creation flow is running.
Manual — type a range like 23-67. You can see message indices by hovering over any message in the chat.
From Last Summary — automatically starts from the message after the last completed summary for this character, up to the current end of chat. If no previous summary exists, starts from message 0.
Set Markers — click Set Start Marker, then click any message in chat to mark the start. Then Set End Marker and click another message. The selected range is highlighted before you confirm.
Found in the Extensions tab under Dragon Memories Manager.
Memory Behavior
| Setting | Description |
|---|---|
| Default Lifespan | How many of the character's own generated messages a new memory lives for. Default: 20. |
| Injection cap | Maximum total characters injected per character per generation. 0 = unlimited. Oldest memories are dropped first when over the cap. |
| Hide summarized messages | During generation, ephemerally removes raw messages already covered by active memories from the prompt so the LLM only sees the summary. Uses ST's generate_interceptor — the real chat is never modified. See qvink Integration. |
Context Injection
| Setting | Description |
|---|---|
| Preset selector | Load a built-in or user-saved preset (applies scribe prompt + context wrapper + injection settings at once). |
| Save As / Delete / Restore Defaults | Manage user presets. Built-in presets (PList, Summary, Tracker) cannot be deleted. |
| Position in context | Where memories are inserted in the prompt. See Injection Positions. |
| Depth / Role | Message depth and prompt role for the At Depth position. |
| Context wrapper | Template for each injected memory block. {{summary}} = memory text, {{char}} = character name. |
Summarization
| Setting | Description |
|---|---|
| Connection profile | Switch to a dedicated connection profile before generating a summary, then restore. Requires Connection Manager. Leave empty to use the current profile. |
| Completion preset | Switch to a dedicated completion preset (sampler settings) for summarization, then restore. Auto-fills from the selected connection profile's stored preset. |
| Scribe prompt | The prompt sent to the LLM to produce the memory. {{char}} and {{transcript}} are replaced at generation time. {{memories}} is replaced with the character's active memory summaries (empty if none exist). |
| Include lorebook context | Runs ST's keyword matching against the transcript and feeds matched entries to the scribe as background context. |
| Exclude lorebooks | Tag-based blocklist — lorebooks added here are filtered out from the scribe's context even when inclusion is enabled. |
| Strip reasoning blocks | Removes prefix…suffix blocks using ST's configured reasoning tags (AI Response Formatting → Reasoning prefix/suffix). Applied at save time. |
| Strip strings | Literal strings to remove from the summary before saving. Useful for stripping model-specific reply prefixes or stray tags. |
Manager Character
| Setting | Description |
|---|---|
| Manager Name | Display name for the Memory Manager pseudo-character. Default: Memories Manager. |
| Manager Avatar | Upload an image or select from existing character cards. Uses that card's name and avatar only — card content is ignored. |
Debug
| Setting | Description |
|---|---|
| Debug Logging | Print internal events to the browser console. |
| Copy Log / Clear Log | Copy or clear the internal ring buffer. The buffer retains 500 entries regardless of whether logging is enabled. |
Accessible via wand (⚡) menu → Memories Manager.
Shows all stored memories for any character in the current chat. Characters with existing memories appear in the dropdown even if they are no longer in the group.
| Control | Action |
|---|---|
| Character dropdown | Switch between characters. |
| ↺ Reset range | Clears the "From Last Summary" range pointer for the selected character. The next summary using that mode will start from message 0. Useful after manually deleting memories and wanting to re-summarize from scratch. |
| ✕ (red, right of dropdown) | Delete all memories for the selected character. Asks for confirmation. Does not affect the character card or group membership. |
Each card shows: active/inactive status, message range, creation message index, a 150-character preview, lifespan progress, intensity override, and action buttons.
| Control | Action |
|---|---|
| Lifespan input | Edit total lifespan. Saving resets char_message_count to 0 — the countdown restarts from now. |
| Intensity dropdown | Per-memory injection position override. See Memory Intensity. |
| Deactivate / Reactivate | Toggle whether the memory is injected. Reactivating resets the countdown. |
| Edit | Open a full-text editor for the memory summary. |
| Edit Range | Change the start and end message indices for this memory entry. |
| Export → Lorebook | Export to a World Info lorebook. See Lorebook Export. |
| Reassign to… | Move this memory to a different character. Useful if it was created under the wrong name. |
| ✕ Delete | Permanently delete this single memory entry. |
Closes the panel and starts the MM creation flow.
Creates an empty memory entry and opens the text editor immediately. Useful for manually tracking things that don't come from a generated summary — attire, wounds, relationships, persistent world state. The entry is discarded if you close the editor without saving.
| Position | Where in the prompt |
|---|---|
| After World Info (default) | Just after the World Info block, before the main chat history. |
| Before World Info | Before the World Info block, near the top of context. |
| After System Prompt | After the system/author's note prompt. |
| After Char Description | After the character description card. |
| Just Before Chat | Immediately before the chat history starts. |
| At Depth | At a specific message depth within the chat history, with a configurable role (System / User / Assistant). Depth 0 = just before the last message. |
The global setting applies to all memories that don't have a per-memory intensity override.
Each memory entry can override the global injection position via the Intensity dropdown in the Manager panel or the review step of the creation flow.
Use this to make pivotal memories inject more prominently (e.g. At Depth 1, System) while routine ones sit further back (e.g. After World Info).
Available options mirror the global Injection Positions. Selecting — use global — removes the override and falls back to the extension setting.
Lifespan counts the target character's own generated messages, not global chat messages. A lifespan of 20 means the memory stays active for 20 turns where that specific character generates a response. Other characters' turns do not count.
When a memory expires it becomes inactive — it stops injecting but is kept in the log. It can be reactivated manually from the Manager panel, which resets the countdown.
Editing the lifespan value in the Manager panel also resets char_message_count to 0, giving the memory a fresh countdown from that moment.
Presets bundle a generation prompt, injection template, injection position, depth, and role into a single named entry.
| Preset | Style | Default Position |
|---|---|---|
| PList | Compact structured format: [Char's Memory | Time: … | Location: … | Topics: … | Events: … | Character Impression: …] |
At Depth 5, System |
| Summary | Short 2–4 sentence narrative in third person, past tense. | After World Info |
| Tracker | Detailed structured log with weather, clothing, notable quotes, and emotional impression. | At Depth 5, System |
Save any combination of current settings as a named preset from the Extensions panel. Save with the same name to overwrite. Built-in presets cannot be deleted.
Exports a single memory entry to a SillyTavern World Info lorebook.
- Choose from a dropdown of all existing lorebooks, or create a new one with the + Create new lorebook toggle.
- The last-used lorebook per character is remembered and pre-selected next time.
- The exported WI entry is configured with:
- Keys:
[char name] memory,[char name] past - Character filter: restricted to the source character only
- Injection position: mapped from the memory's effective position
- Depth / Role: preserved for
At Depthentries
- Keys:
The memory remains active in the chat after export — exporting does not deactivate it.
DMM works cle
0 comments
log in to comment.