mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[GH-ISSUE #1567] [Feature]: Long-Term Memory: let other Agents recall memories about the characters they write as, with a switch in Memory Settings #1547
Labels
No labels
agent: chess
agent: conversation-calls
agent: eightball
agent: haptic
agent: hierarchical-maps
agent: hierarchical-maps
agent: illustrator
agent: poker
agent: rock-paper-scissors
agent: tic-tac-toe
agent: uno
artifacts
bug
bugfix
build
catalog
ci
client
dependencies
docs
documentation
enhancement
feature
fixed-in-staging
in-pr
normal-scope
packages
pull-request
qol
regression
roadmap
scope-risk
server
soup
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Agents#1547
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Promansis on GitHub (Oct 22, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1567
Originally assigned to: @Promansis on GitHub.
What problem does this solve?
Other Agents that write as a character want what Long-Term Memory knows about that character. Slurp already does this for its feed posts ("What your other Agents know"), and a Noodle update is planned. The only way in is the
long-term-memory:storageservice, which after #1565 lists whole memories available to a character everywhere. Every package then has to choose and trim memories itself, with nothing that ranks them against what it is about to write. The user can't see which Agents read memories, or stop them from Long-Term Memory's side.Proposed package or change
A recall service for other Agents, a Memory Settings switch that stops every read by another Agent, and a line that names the Agents that read memories lately. One PR in
long-term-memory, patch bump, on top of #1565. Nothing changes in the Engine, Slurp or Noodle.Minimal fix
S =
packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory, H =packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory, C =packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory.S/services/recall.ts. Input checked with zod:caller(a name, up to 64 letters, digits and. _ : -; a malformed name is dropped, not the read),queryText(1-8,000 characters),characterIds(up to 20),personaId(only when the persona's own account writes),mode(roleplayorconversation),maxTokens(50-4,000, default 800) and anAbortSignal. It returnsnullfor invalid input (no query, or no character or persona), an aborted call or reads turned off, and{ version: 1, sections: [] }when nothing matches. It reuses the recall ranking through one new option inS/recall/retrieval.ts,noteIds, which limits the candidates to the listed memories. Malformed vault files are skipped, as in chat recall. Recall receipts and usage are not touched. A thrown error other than an abort reaches the caller.longTermMemoryShareWithPackagesinH/schema/settings.ts(optional in the settings, required in the resolved settings, defaulttrue). Off, the recall service returnsnulland the storage read[], which Slurp's flavour brief already treats as no memories.calleris the name a package gives itself; the Engine does not say who looks a service up. Each read writes one debug-log line (phaseretrieval, actionpackage_listorpackage_recall, the name assource, the count).GET /settings/package-readerslists the ten names that read most lately, each with its latest read, withnullfor a package that gave none. The list covers what the debug log holds (it keeps 1.5 to 2 MB), so Clear log empties it and refreshes the line.C/settings/MemorySettings.tsx, aToggleand one line under it. Activity labels both actions "Read by another Agent" (C/settings/ActivityView.tsx). Strings inC/locales/en.json:docs/ARCHITECTURE.mdgets "Services for Other Packages": the call, the result, the rules above and the versioning rule (a new section field can be added without a version change; removing or renaming one raisesversion).## Unreleased: other Agents can ask for memories about the characters they write as, with only memories available everywhere and no changes; the new setting (on by default) turns it off, also for Slurp's "What your other Agents know", and names the Agents that read memories lately; each read shows in Activity as "Read by another Agent".Regression proof
tests/long-term-memory-runtime.regression.ts, in its own vault, with memories for characterchar-a:version1 and removed on deactivate;char-areturns exactly a thread, a resolved timeline event, a relationship aboutchar-aandchar-b,char-a's character memory and a world memory, in that order, each with title and text. It leaves out a tone memory, a memory limited to a chat, an archived one, a game-only one, a character memory available tochar-abut aboutchar-z, and a character memory with no subjects;{ version: 1, sections: [] }, and so doesmode: "conversation"against roleplay-only memories;null;nulland the storage read[].tests/long-term-memory-routes.regression.tslists the new route. Each of these one-line mutations fails the matching assertion: recall without the subject rule, a subject rule that lets subject-less memories through, tone added to the recalled types, and a switch that ignores the new setting.Why should this be optional?
It stays inside Long-Term Memory, which is already optional, and adds no Engine code. Consent to use memories belongs to each reading Agent: Slurp's "What your other Agents know" today, and an off-by-default setting with a first-time confirmation in Noodle or Slurp when they move to this service. The new switch is the stop on Long-Term Memory's side. It is on by default so Slurp's current flavour brief keeps working after the update.
Alternatives considered
exclusiveCharacterIds): it checks availability, not subjects, and only character and relationship memories have subjects. The service checks subjects on those and availability on the rest.Additional context
Follows #1565. Noodle and Slurp would call
runtime.services.get("long-term-memory:recall"), checkversionand keep their current behaviour when the service is missing or returnsnull; their changes are separate.Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked: