[GH-ISSUE #1805] [Feature]: Long-Term Memory: show which Agents read memories, how often and how recently #1763

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

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

Originally assigned to: @Promansis on GitHub.

What problem does this solve?

Memory Settings → Recall → Sharing has the "Other Agents can read memories" switch and one sentence under it: "Read lately by slurp2." or "No other Agent has read memories lately." A user who turns the switch on can't tell whether an Agent such as Slurp is actually using memories, when it last did, or how many it gets. When a post arrives without memories, they can't see which side is off.

Long-Term Memory already records each read in its activity log, with the Agent's name and the number of memories returned. The sentence uses only the names and drops the rest.

Proposed package or change

Package-only Long-Term Memory patch release. No Engine change, no new storage, no new route, no schema change.

Replace the sentence with a small table in the same Sharing group. It has one row per Agent that has read memories, newest first, up to ten:

Agent                          Last read      Reads this week   Memories returned this week
slurp2                         2 min. ago     14                61
an Agent that gave no name     3 days ago     1                 0
  • The empty state keeps "No other Agent has read memories lately."
  • The switch above already says whether reads are allowed here, so the table needs no status word.
  • Recent reads with 0 memories returned tell the user the Agent is asking, but nothing it may read matches: the memories are limited to one chat, game-only, or not marked Roleplay or Conversation.

Minimal fix

Under packages/long-term-memory/src/engine/packages/:

  • Server server/src/services/long-term-memory/services/storage-read.ts, listLtmPackageReaders (~50):
    • in the same single pass over readLtmDebugLog({ phase: "retrieval" }, root), aggregate per caller:
      • lastReadAt: newest ts;
      • reads: events in the last 7 days;
      • memories: sum of counts.memories in the last 7 days;
    • return { caller, lastReadAt, reads, memories }[] with the same sort and slice(0, 10).
    • recordLtmPackageRead (~33) already writes counts.memories, and routes/settings.ts:28 stays unchanged (only the payload grows).
  • Client:
    • client/src/features/long-term-memory/api.ts (~212): the reader type gains reads: number; memories: number.
    • client/src/features/long-term-memory/settings/MemorySettings.tsx (~877–891, inside data-ltm-recall-group="sharing"):
      • render a <table> with the four column headers in place of the readLatelyBy paragraph;
      • format "Last read" with formatAge from settings/debug-activity.ts (~26), the helper the Activity view already uses;
      • a reader with caller: null keeps memorysettings.anAgentWithoutAName;
      • the empty-state paragraph stays.
    • client/src/features/long-term-memory/locales/en.json and ko.json: add four header keys (memorysettings.otherAgentsAgent, .otherAgentsLastRead, .otherAgentsReadsThisWeek, .otherAgentsMemoriesThisWeek) and remove memorysettings.readLatelyBy. node scripts/validate-package-locales.mjs must pass.
  • packages/long-term-memory/docs/UI.md: one sentence under the Sharing heading describing the table.
  • Version: patch bump after the current staging version, then rebuild the package and catalog.

Regression:

  1. tests/long-term-memory-runtime.regression.ts (~441, the listLtmPackageReaders assertion after the recall and listNotes reads):
    • each row's reads equals the number of reads that caller made;
    • its memories equals the sum of the memories those reads returned;
    • rows are ordered by lastReadAt, newest first;
    • a read older than 7 days counts toward lastReadAt but not toward reads or memories;
    • the existing name assertion stays.
  2. tests/long-term-memory-routes.regression.ts (~39) already smoke-tests GET /settings/package-readers; no change is expected.

Non-goals

  • A "Feeds memories" column for memories an Agent sends into Long-Term Memory. No Agent does that yet; it comes with learning from Noodle and Slurp posts, and the row key (the caller id) is ready for it.
  • A reason why an Agent stopped reading. Long-Term Memory only sees calls, so it can state a last-read time but not why the calls stopped. Each Agent's own settings should say whether its switch is on.
  • A per-memory list of which Agent received it. Long-Term Memory knows a memory was returned, not whether it was used.

Why should this be optional?

Long-Term Memory is already an optional catalog package. The table appears only in its own settings, and it lists only reads that the user's switch allowed.

Alternatives considered

  • Keep the sentence and point users to Settings → Debug → Activity. The activity view lists every read, but finding "is Slurp using memories right now" among extraction and recall events is slow, and it shows no totals.
  • A status word per Agent ("Reading" / "Not reading"). "Not reading" would guess at a cause Long-Term Memory can't see. A last-read time is what it can state.

Additional context

  • Window: 7 days, which answers "is this working now". The debug log is capped at 2 MB, so a very busy install loses old events anyway.
  • The matching status line beside each Agent's own "use memories" switch is that Agent's change, not part of this issue.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @Promansis on GitHub (Oct 28, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1805 Originally assigned to: @Promansis on GitHub. ## What problem does this solve? Memory Settings → Recall → Sharing has the "Other Agents can read memories" switch and one sentence under it: "Read lately by slurp2." or "No other Agent has read memories lately." A user who turns the switch on can't tell whether an Agent such as Slurp is actually using memories, when it last did, or how many it gets. When a post arrives without memories, they can't see which side is off. Long-Term Memory already records each read in its activity log, with the Agent's name and the number of memories returned. The sentence uses only the names and drops the rest. ## Proposed package or change Package-only Long-Term Memory patch release. No Engine change, no new storage, no new route, no schema change. Replace the sentence with a small table in the same Sharing group. It has one row per Agent that has read memories, newest first, up to ten: ``` Agent Last read Reads this week Memories returned this week slurp2 2 min. ago 14 61 an Agent that gave no name 3 days ago 1 0 ``` - The empty state keeps "No other Agent has read memories lately." - The switch above already says whether reads are allowed here, so the table needs no status word. - Recent reads with 0 memories returned tell the user the Agent is asking, but nothing it may read matches: the memories are limited to one chat, game-only, or not marked Roleplay or Conversation. ### Minimal fix Under `packages/long-term-memory/src/engine/packages/`: - Server `server/src/services/long-term-memory/services/storage-read.ts`, `listLtmPackageReaders` (~50): - in the same single pass over `readLtmDebugLog({ phase: "retrieval" }, root)`, aggregate per caller: - `lastReadAt`: newest `ts`; - `reads`: events in the last 7 days; - `memories`: sum of `counts.memories` in the last 7 days; - return `{ caller, lastReadAt, reads, memories }[]` with the same sort and `slice(0, 10)`. - `recordLtmPackageRead` (~33) already writes `counts.memories`, and `routes/settings.ts:28` stays unchanged (only the payload grows). - Client: - `client/src/features/long-term-memory/api.ts` (~212): the reader type gains `reads: number; memories: number`. - `client/src/features/long-term-memory/settings/MemorySettings.tsx` (~877–891, inside `data-ltm-recall-group="sharing"`): - render a `<table>` with the four column headers in place of the `readLatelyBy` paragraph; - format "Last read" with `formatAge` from `settings/debug-activity.ts` (~26), the helper the Activity view already uses; - a reader with `caller: null` keeps `memorysettings.anAgentWithoutAName`; - the empty-state paragraph stays. - `client/src/features/long-term-memory/locales/en.json` and `ko.json`: add four header keys (`memorysettings.otherAgentsAgent`, `.otherAgentsLastRead`, `.otherAgentsReadsThisWeek`, `.otherAgentsMemoriesThisWeek`) and remove `memorysettings.readLatelyBy`. `node scripts/validate-package-locales.mjs` must pass. - `packages/long-term-memory/docs/UI.md`: one sentence under the Sharing heading describing the table. - Version: patch bump after the current staging version, then rebuild the package and catalog. Regression: 1. `tests/long-term-memory-runtime.regression.ts` (~441, the `listLtmPackageReaders` assertion after the recall and `listNotes` reads): - each row's `reads` equals the number of reads that caller made; - its `memories` equals the sum of the memories those reads returned; - rows are ordered by `lastReadAt`, newest first; - a read older than 7 days counts toward `lastReadAt` but not toward `reads` or `memories`; - the existing name assertion stays. 2. `tests/long-term-memory-routes.regression.ts` (~39) already smoke-tests `GET /settings/package-readers`; no change is expected. ### Non-goals - A "Feeds memories" column for memories an Agent sends into Long-Term Memory. No Agent does that yet; it comes with learning from Noodle and Slurp posts, and the row key (the caller id) is ready for it. - A reason why an Agent stopped reading. Long-Term Memory only sees calls, so it can state a last-read time but not why the calls stopped. Each Agent's own settings should say whether its switch is on. - A per-memory list of which Agent received it. Long-Term Memory knows a memory was returned, not whether it was used. ## Why should this be optional? Long-Term Memory is already an optional catalog package. The table appears only in its own settings, and it lists only reads that the user's switch allowed. ## Alternatives considered - **Keep the sentence and point users to Settings → Debug → Activity.** The activity view lists every read, but finding "is Slurp using memories right now" among extraction and recall events is slow, and it shows no totals. - **A status word per Agent ("Reading" / "Not reading").** "Not reading" would guess at a cause Long-Term Memory can't see. A last-read time is what it can state. ## Additional context - Window: 7 days, which answers "is this working now". The debug log is capped at 2 MB, so a very busy install loses old events anyway. - The matching status line beside each Agent's own "use memories" switch is that Agent's change, not part of this issue. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-11-07 16:36:30 +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#1763
No description provided.