[GH-ISSUE #4288] [FEAT]: Management for agent memory #2729

Closed
opened 2026-02-22 18:30:58 -05:00 by yindo · 8 comments
Owner

Originally created by @shanevcantwell on GitHub (Aug 14, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4288

Originally assigned to: @timothycarambat on GitHub.

How are you running AnythingLLM?

AnythingLLM desktop app v1.8.4 - original bug reported on Aug 20, 2024

What happened?

Referring bug: https://github.com/Mintplex-Labs/anything-llm/issues/2151
If I can look at the embeddings window and see nothing attached to the workspace, and start a brand new thread, that thread should not be parroting information contained only within the file agent-memory.txt that cannot apparently be managed through the UI.

Are there known steps to reproduce?

Repro (v1.8.4):

  • Configure a workspace with a "competent" LLM acting an agent. "Competent" is defined by being able to utilize agent tools.
  • Create a new thread in the workspace.
  • Ensure all embeddings are clear and the right/bottom pane of the documents attachment folder shows "No Documents".
  • @agent Save to memory "The secret word is sphadoinkle."
  • Create a new, empty thread, in any workspace.
  • Ask what the secret word is.

Expected:

  • Absolutely any response without the word "shpadoinkle".

Actual:

  • The model knows the secret word, and Citations lists that the model references a file "agent-memory.txt" that contains, upon clicking the file link with that name listed under the Citations section of the model response, says something to the effect of "The user said the secret word is shpadoinkle."

Warnings:

  • If the model happens to not reference the contents of agent-memory.txt on a given response for whatever reason, it is completely hidden in the embeddings because it is not listed under Citations, only to pop up at unknown times in the future.
  • I don't even know how AnythingLLM determines whether an embedding is accessed. Is it from the vector db pulling from the vector db? I'm not sure how the number of times the file is accessed, unless that speaks to how many chunks were pulled from that file. I have one showing accessed 3x but clicking seems to show the same chunk 3x.
  • Is there effectively or actually a secret, global vector db entry cross-polluting across all workspaces??
Originally created by @shanevcantwell on GitHub (Aug 14, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4288 Originally assigned to: @timothycarambat on GitHub. ### How are you running AnythingLLM? AnythingLLM desktop app v1.8.4 - original bug reported on Aug 20, 2024 ### What happened? Referring bug: https://github.com/Mintplex-Labs/anything-llm/issues/2151 If I can look at the embeddings window and see nothing attached to the workspace, and start a brand new thread, that thread should not be parroting information contained only within the file agent-memory.txt that cannot apparently be managed through the UI. ### Are there known steps to reproduce? Repro (v1.8.4): * Configure a workspace with a "competent" LLM acting an agent. "Competent" is defined by being able to utilize agent tools. * Create a new thread in the workspace. * Ensure all embeddings are clear and the right/bottom pane of the documents attachment folder shows "No Documents". * @agent Save to memory "The secret word is sphadoinkle." * Create a new, empty thread, in any workspace. * Ask what the secret word is. Expected: * Absolutely any response without the word "shpadoinkle". Actual: * The model knows the secret word, and Citations lists that the model references a file "agent-memory.txt" that contains, upon clicking the file link with that name listed under the Citations section of the model response, says something to the effect of "The user said the secret word is shpadoinkle." Warnings: * If the model happens to not reference the contents of agent-memory.txt on a given response for whatever reason, it is *completely hidden* in the embeddings because it is not listed under Citations, only to pop up at unknown times in the future. * I don't even know how AnythingLLM determines whether an embedding is accessed. Is it from the vector db pulling from the vector db? I'm not sure how the *number* of times the file is accessed, unless that speaks to how many chunks were pulled from that file. I have one showing accessed 3x but clicking seems to show the same chunk 3x. * Is there effectively or actually a secret, global vector db entry cross-polluting across all workspaces??
yindo added the enhancementcore-team-onlyfeature request labels 2026-02-22 18:30:59 -05:00
yindo closed this issue 2026-02-22 18:30:59 -05:00
Author
Owner

@timothycarambat commented on GitHub (Aug 14, 2025):

It is not a bug - that file is a virtual file (for now) which is why it cannot be managed. Its basically an invisible doc that is in the vector DB it can use for retrieval

@timothycarambat commented on GitHub (Aug 14, 2025): It is not a bug - that file is a virtual file (for now) which is why it cannot be managed. Its basically an invisible doc that is in the vector DB it can use for retrieval
Author
Owner

@shanevcantwell commented on GitHub (Aug 14, 2025):

A frustrating and completely test-case destroying thing that can be accidentally introduced into my entire cross-workspace environment if I use an undocumented long-standing functionality that has no published way to fix is perhaps not a bug, but it was a huge time sink for an 18mo+ user who has chipped in multiple time on his favorite LLM communication product.

Can you please provide quick instructions for how to reverse the mistake I made in trying out @agent save to memory and subsequently burned hours trying to track down why my models were suddenly suffering from phantom "context bleed" and provide good repro info for?

I'm about to try out the exciting new version and maybe this is already answered - this post being here to read still means I haven't found a fix tho.

Thanks!

@shanevcantwell commented on GitHub (Aug 14, 2025): A frustrating and completely test-case destroying thing that can be accidentally introduced into my entire cross-workspace environment if I use an undocumented long-standing functionality that has no published way to fix is perhaps not a bug, but it was a huge time sink for an 18mo+ user who has chipped in multiple time on his favorite LLM communication product. Can you please provide quick instructions for how to reverse the mistake I made in trying out `@agent save to memory` and subsequently burned hours trying to track down why my models were suddenly suffering from phantom "context bleed" and provide good repro info for? I'm about to try out the exciting new version and maybe this is already answered - this post being here to read still means I haven't found a fix tho. Thanks!
Author
Owner

@therealtimex commented on GitHub (Aug 17, 2025):

I imagine a simple solution is to add workspace id to the memories and make agent's memory queries workspace independent.

@therealtimex commented on GitHub (Aug 17, 2025): I imagine a simple solution is to add workspace id to the memories and make agent's memory queries workspace independent.
Author
Owner

@shanevcantwell commented on GitHub (Aug 19, 2025):

I imagine a simple solution is to add workspace id to the memories and make agent's memory queries workspace independent.

It just introduces confusing vectors to the prompt that can distract models sometimes quite significantly, and I haven't figured out any way to clear them out in a targeted way. It mostly was just highly distracting to have to try to track down why all my agentic model auditioning workspaces were suddenly but inconsistently parroting some form of how they could apply whatever I was testing to TensorRT-LLM. 🤯

@shanevcantwell commented on GitHub (Aug 19, 2025): > I imagine a simple solution is to add workspace id to the memories and make agent's memory queries workspace independent. It just introduces confusing vectors to the prompt that can distract models sometimes quite significantly, and I haven't figured out any way to clear them out in a targeted way. It mostly was just highly distracting to have to try to track down why all my agentic model auditioning workspaces were suddenly but inconsistently parroting some form of how they could apply whatever I was testing to TensorRT-LLM. 🤯
Author
Owner

@timothycarambat commented on GitHub (Aug 19, 2025):

Will certainly fix, that shouldn't be the case for exactly why you outlined.

@timothycarambat commented on GitHub (Aug 19, 2025): Will certainly fix, that shouldn't be the case for exactly why you outlined.
Author
Owner

@shanevcantwell commented on GitHub (Sep 15, 2025):

Hi - is there really no way I can clear this out? Starting over again is, shall we say, highly non-trivial. Even a workflow/agent tool you can share to give the agent the ability, if not some way to do it external to anythingllm?

Agent @agent invoked. Swapping over to agent chat. Type /exit to exit agent execution loop early.
system profile picture
I cannot directly “delete from memory” or “clear” specific content from the agent’s memory or a file like “agent-mem.txt” with the tools I have. My rag-memory tool only allows me to search for or store information, not remove it.
@shanevcantwell commented on GitHub (Sep 15, 2025): Hi - is there really no way I can clear this out? Starting over again is, shall we say, highly non-trivial. Even a workflow/agent tool you can share to give the agent the ability, if not some way to do it external to anythingllm? ``` Agent @agent invoked. Swapping over to agent chat. Type /exit to exit agent execution loop early. system profile picture I cannot directly “delete from memory” or “clear” specific content from the agent’s memory or a file like “agent-mem.txt” with the tools I have. My rag-memory tool only allows me to search for or store information, not remove it. ```
Author
Owner

@raisin-honey-jsb commented on GitHub (Jan 6, 2026):

Enter the workspace and run “Reset Vector Database” to remove all embedded documents in the workspace (including agent-memory.txt). Any original workspace files will need to be re-embedded afterward.

@raisin-honey-jsb commented on GitHub (Jan 6, 2026): Enter the workspace and run “Reset Vector Database” to remove all embedded documents in the workspace (including agent-memory.txt). Any original workspace files will need to be re-embedded afterward.
Author
Owner

@timothycarambat commented on GitHub (Jan 9, 2026):

Moving this discussion to #4846 where we are going to support a traditional memory/notes system and tool

@timothycarambat commented on GitHub (Jan 9, 2026): Moving this discussion to #4846 where we are going to support a traditional memory/notes system and tool
yindo changed title from [FEAT]: Management for agent memory to [GH-ISSUE #4288] [FEAT]: Management for agent memory 2026-06-05 14:48:13 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#2729