[GH-ISSUE #1744] [Feature]: Long-Term Memory 1.5.0: learn from chat messages #1730

Closed
opened 2026-11-07 16:36:17 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Promansis on GitHub (Oct 26, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1744

Originally assigned to: @Promansis on GitHub.

What problem does this solve?

Marinara Engine now skips its built-in memory recall in chats where Long-Term Memory is on (Engine #8359, PR #8361), so the two no longer inject memories side by side. In those chats, memories come only from what Long-Term Memory has imported in Sources: chat summaries, characters and lorebooks. A chat with Long-Term Memory on but no summaries has nothing to recall.

Proposed package or change

Long-Term Memory 1.5.0, for Conversation, Roleplay and Game:

  • Chat messages as a source.
    • A new "Chat messages" tab in Sources lists each chat's messages in pieces of up to 24,000 characters, split at message boundaries (", messages 1-40").
    • Pieces import and extract through the usual review-first flow, with the chat's scope and mode, like chat summaries.
    • A piece is named by its first message. When the chat continues, the last piece shows as changed and Refresh updates it, instead of adding an overlapping copy.
    • Messages are read with persistence.listMessages (the existing chat-read permission), using the Engine's agent view of each message.
    • If a chat also has summaries, its rows say that importing both can repeat memories in review.
  • Requires an Engine that skips built-in recall. The manifest declares capability API 1.387 (shipped with #8359) and keeps engine.min 2.5.1, like Story Writer does. Engine staging (1.387) can install 1.5.0 now; the v2.5.1 release (1.341) refuses it, so the new package and an Engine without the change cannot be mixed. Users on older Engines keep their installed 1.4.x.
  • Drops the chat-write permission. It is used only to switch Long-Term Memory on automatically in chats that had the Engine's old built-in Long-Term Memory. After this, those chats need it switched on in Chat Settings → Agents. The CHANGELOG says so.
  • The description says "your chats" instead of "your chat summaries". docs/UI.md describes the new tab.

Not included: importing new messages automatically, moving summary reads to persistence.listChatSummaries (a later patch, because it changes some existing source ids), and learning from Noodle and Slurp posts.

Why should this be optional?

Long-Term Memory is already an optional catalog package. This keeps its memory sources inside the package, and leaves the Engine's built-in recall in charge of chats without it.

Alternatives considered

  • Keep the Engine's built-in recall running beside Long-Term Memory: two memory blocks and two embedding passes per turn, which is what the Engine change removed.
  • Read the Engine's memory_chunks index: it is an Engine table layout the package cannot see, and its chunks carry no characters to scope by.
  • Mix message pieces into the Chat summaries list: the same events would be one click away from importing twice.

Additional context

  • Release order: merging into staging reaches only Engine staging builds, which read the Agents staging catalog. Promotion to main should wait for the Engine release that contains #8359; before then, release Engines would see 1.5.0 but refuse it. 1.5.0 replaces 1.4.x in the v2 and v3 catalog lanes.
  • Tests: a chat-message import regression (boundaries, stable pieces when messages are added, scope, mode), a storage round trip for the new source kind, and the import route accepting the new source.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Promansis on GitHub (Oct 26, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1744 Originally assigned to: @Promansis on GitHub. ## What problem does this solve? Marinara Engine now skips its built-in memory recall in chats where Long-Term Memory is on (Engine #8359, PR #8361), so the two no longer inject memories side by side. In those chats, memories come only from what Long-Term Memory has imported in Sources: chat summaries, characters and lorebooks. A chat with Long-Term Memory on but no summaries has nothing to recall. ## Proposed package or change Long-Term Memory 1.5.0, for Conversation, Roleplay and Game: - **Chat messages as a source.** - A new "Chat messages" tab in Sources lists each chat's messages in pieces of up to 24,000 characters, split at message boundaries ("<chat>, messages 1-40"). - Pieces import and extract through the usual review-first flow, with the chat's scope and mode, like chat summaries. - A piece is named by its first message. When the chat continues, the last piece shows as changed and Refresh updates it, instead of adding an overlapping copy. - Messages are read with `persistence.listMessages` (the existing `chat-read` permission), using the Engine's agent view of each message. - If a chat also has summaries, its rows say that importing both can repeat memories in review. - **Requires an Engine that skips built-in recall.** The manifest declares capability API 1.387 (shipped with #8359) and keeps `engine.min` 2.5.1, like Story Writer does. Engine staging (1.387) can install 1.5.0 now; the v2.5.1 release (1.341) refuses it, so the new package and an Engine without the change cannot be mixed. Users on older Engines keep their installed 1.4.x. - **Drops the `chat-write` permission.** It is used only to switch Long-Term Memory on automatically in chats that had the Engine's old built-in Long-Term Memory. After this, those chats need it switched on in Chat Settings → Agents. The CHANGELOG says so. - The description says "your chats" instead of "your chat summaries". `docs/UI.md` describes the new tab. Not included: importing new messages automatically, moving summary reads to `persistence.listChatSummaries` (a later patch, because it changes some existing source ids), and learning from Noodle and Slurp posts. ## Why should this be optional? Long-Term Memory is already an optional catalog package. This keeps its memory sources inside the package, and leaves the Engine's built-in recall in charge of chats without it. ## Alternatives considered - Keep the Engine's built-in recall running beside Long-Term Memory: two memory blocks and two embedding passes per turn, which is what the Engine change removed. - Read the Engine's `memory_chunks` index: it is an Engine table layout the package cannot see, and its chunks carry no characters to scope by. - Mix message pieces into the Chat summaries list: the same events would be one click away from importing twice. ## Additional context - Release order: merging into `staging` reaches only Engine staging builds, which read the Agents staging catalog. Promotion to `main` should wait for the Engine release that contains #8359; before then, release Engines would see 1.5.0 but refuse it. 1.5.0 replaces 1.4.x in the v2 and v3 catalog lanes. - Tests: a chat-message import regression (boundaries, stable pieces when messages are added, scope, mode), a storage round trip for the new source kind, and the import route accepting the new source. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-11-07 16:36:17 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#1730
No description provided.