mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #1268] [CLOSED] feat: Agent Memory Enhancement #5015
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#5015
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1268
Author: @adunato
Created: 5/26/2026
Status: ❌ Closed
Base:
staging← Head:upstream-main📝 Commits (3)
19411f3Fix mobile composer text input collapse (#1136)77a30faFix tracker aliases, avatars, HUD temps, and changelog (#1137)0649255feat: add scoped agent memory tools📊 Changes
17 files changed (+1178 additions, -160 deletions)
View changed files
📝
CHANGELOG.md(+16 -0)📝
packages/client/src/components/chat/ConversationInput.tsx(+5 -5)📝
packages/client/src/components/chat/RoleplayHUD.tsx(+19 -37)📝
packages/client/src/components/panels/SettingsPanel.tsx(+1 -1)📝
packages/client/src/components/panels/settings/TrackerCardColorSettings.tsx(+17 -11)📝
packages/client/src/features/tracker-panel/hooks/use-tracker-sprite-lookup.ts(+11 -6)📝
packages/client/src/features/tracker-panel/lib/tracker-metadata.ts(+31 -0)📝
packages/client/src/lib/character-display.ts(+40 -0)📝
packages/server/src/db/migrate.ts(+66 -1)📝
packages/server/src/db/schema/agents.ts(+10 -0)📝
packages/server/src/routes/generate.routes.ts(+79 -54)📝
packages/server/src/routes/generate/generate-route-utils.ts(+40 -4)📝
packages/server/src/routes/generate/retry-agents-route.ts(+16 -37)➕
packages/server/src/routes/generate/secret-plot-memory.ts(+64 -0)📝
packages/server/src/services/storage/agents.storage.ts(+355 -4)📝
packages/server/src/services/tools/tool-executor.ts(+318 -0)📝
packages/shared/src/types/agent.ts(+90 -0)📄 Description
Linked issue
Closes #589
Why this change
Agents currently have only narrow per-agent key/value memory, which works for internal state like the secret plot driver but does not give built-in or custom agents a clear way to save, search, list, and delete durable memory records. This change adds an owner-aware agent memory surface that keeps current secret plot behavior working while making explicit agent-authored memory available through built-in tools.
Examples of how this expanded memory agent functionality can be used are: custom memories saving and retrieval, persistent custom trackers, etc
What changed
Key Changes
agent_memorystorage to support typed records with title, content, metadata, optional embeddings, ownership fields, timestamps, and soft deletion.save_agent_memory,search_agent_memory,list_agent_memory, anddelete_agent_memory.Secondary Changes
settings.memoryScopeas an explicit opt-in for multi-agent cooperation, so writer/retriever custom agents can share records without making all agent memory chat-global.Validation
pnpm checkManual verification notes
memoryScopeand that existing writer-ownedcharacter_memoryrecords can be tagged withmetadata.memoryScopefor shared retrieval. The patch preserves per-agent isolation whenmemoryScopeis absent.Docs and release impact
UI evidence (if applicable)
Not applicable. This change adds server/storage/tool behavior and does not introduce a user-facing UI surface.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.