Enhancement of LLM Node Memory Function #8271

Open
opened 2026-02-21 18:24:48 -05:00 by yindo · 8 comments
Owner

Originally created by @Ko-shuju on GitHub (Feb 14, 2025).

Self Checks

  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

Currently, when enabling the memory function in LLM nodes, the system records the user's conversation history and uses it as a reference for the LLM’s prompts. However, in a single conversation flow, multiple LLM nodes may be involved, yet the memory is shared across all LLM nodes, rather than being stored separately for each node.

This design leads to the following issues:

Memory Sharing Issue: Different LLM nodes handle different tasks, but they share the same memory, which may cause incorrect references in responses.
Incorrect Responses: When switching between different LLM nodes, the memory from the previous LLM node may affect the next node’s responses, leading to unintended or incorrect answers.

2. Additional context or comments

We propose an enhancement to the memory mechanism of LLM nodes, ensuring that different LLM nodes maintain independent memories or allowing the option to clear memory when needed. The key requests are as follows:

1️⃣ Independent Memory Storage (Preferred)
Each LLM node should have its own isolated memory space to ensure no cross-contamination between nodes.
A conversation history from Node A should not influence responses from Node B.
2️⃣ Memory Reset Functionality
Allow manual or configurable options to clear an LLM node’s memory within a workflow.
Provide an API or UI option to reset memory for specific LLM nodes to prevent error propagation.
3️⃣ Configurable Memory Management
Allow users to choose the memory mode in LLM node settings, such as:
Independent Memory Mode (Each LLM node retains separate memory)
Shared Memory Mode (Current design, suitable for specific use cases)
Auto-Clear Memory (Automatically clears memory after node execution)

3. Can you help us with this feature?

  • I am interested in contributing to this feature.
Originally created by @Ko-shuju on GitHub (Feb 14, 2025). ### Self Checks - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### 1. Is this request related to a challenge you're experiencing? Tell me about your story. Currently, when enabling the memory function in LLM nodes, the system records the user's conversation history and uses it as a reference for the LLM’s prompts. However, in a single conversation flow, multiple LLM nodes may be involved, yet the memory is shared across all LLM nodes, rather than being stored separately for each node. This design leads to the following issues: Memory Sharing Issue: Different LLM nodes handle different tasks, but they share the same memory, which may cause incorrect references in responses. Incorrect Responses: When switching between different LLM nodes, the memory from the previous LLM node may affect the next node’s responses, leading to unintended or incorrect answers. ### 2. Additional context or comments We propose an enhancement to the memory mechanism of LLM nodes, ensuring that different LLM nodes maintain independent memories or allowing the option to clear memory when needed. The key requests are as follows: 1️⃣ Independent Memory Storage (Preferred) Each LLM node should have its own isolated memory space to ensure no cross-contamination between nodes. A conversation history from Node A should not influence responses from Node B. 2️⃣ Memory Reset Functionality Allow manual or configurable options to clear an LLM node’s memory within a workflow. Provide an API or UI option to reset memory for specific LLM nodes to prevent error propagation. 3️⃣ Configurable Memory Management Allow users to choose the memory mode in LLM node settings, such as: ✅ Independent Memory Mode (Each LLM node retains separate memory) ✅ Shared Memory Mode (Current design, suitable for specific use cases) ✅ Auto-Clear Memory (Automatically clears memory after node execution) ### 3. Can you help us with this feature? - [ ] I am interested in contributing to this feature.
yindo added the 💪 enhancementgood first issueProposal labels 2026-02-21 18:24:48 -05:00
Author
Owner

@Yevanchen commented on GitHub (Feb 18, 2025):

Great We'll consider this issue in the near future

@Yevanchen commented on GitHub (Feb 18, 2025): Great We'll consider this issue in the near future
Author
Owner

@dosubot[bot] commented on GitHub (Mar 21, 2025):

Hi, @Ko-shuju. I'm Dosu, and I'm helping the Dify team manage their backlog. I'm marking this issue as stale.

Issue Summary:

  • You proposed an enhancement to the memory function of LLM nodes to prevent shared memory issues.
  • Suggested features include independent memory storage, a memory reset feature, and configurable memory management.
  • Yevanchen responded positively, indicating consideration of the issue in the near future.

Next Steps:

  • Please let us know if this issue is still relevant to the latest version of the Dify repository by commenting here.
  • If there is no further activity, this issue will be automatically closed in 15 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Mar 21, 2025): Hi, @Ko-shuju. I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog. I'm marking this issue as stale. **Issue Summary:** - You proposed an enhancement to the memory function of LLM nodes to prevent shared memory issues. - Suggested features include independent memory storage, a memory reset feature, and configurable memory management. - Yevanchen responded positively, indicating consideration of the issue in the near future. **Next Steps:** - Please let us know if this issue is still relevant to the latest version of the Dify repository by commenting here. - If there is no further activity, this issue will be automatically closed in 15 days. Thank you for your understanding and contribution!
Author
Owner

@Ko-shuju commented on GitHub (Mar 24, 2025):

I would like to confirm that the latest version does not yet support or
modify the application method I mentioned. I am very much looking forward
to this application being quickly integrated into the system. This would be
an extremely helpful application mode for users. Thank you.

dosubot[bot] @.***> 於 2025年3月22日 週六 上午12:01寫道:

Hi, @Ko-shuju https://github.com/Ko-shuju. I'm Dosu https://dosu.dev,
and I'm helping the Dify team manage their backlog. I'm marking this issue
as stale.

Issue Summary:

  • You proposed an enhancement to the memory function of LLM nodes to
    prevent shared memory issues.
  • Suggested features include independent memory storage, a memory
    reset feature, and configurable memory management.
  • Yevanchen responded positively, indicating consideration of the
    issue in the near future.

Next Steps:

  • Please let us know if this issue is still relevant to the latest
    version of the Dify repository by commenting here.
  • If there is no further activity, this issue will be automatically
    closed in 15 days.

Thank you for your understanding and contribution!


Reply to this email directly, view it on GitHub
https://github.com/langgenius/dify/issues/13738#issuecomment-2743806335,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/BIUEET5RRHHSO5XKLUKYP7T2VQZV3AVCNFSM6AAAAABXEDXIGGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONBTHAYDMMZTGU
.
You are receiving this because you were mentioned.Message ID:
@.***>
[image: dosubot[bot]]dosubot[bot] left a comment (langgenius/dify#13738)
https://github.com/langgenius/dify/issues/13738#issuecomment-2743806335

Hi, @Ko-shuju https://github.com/Ko-shuju. I'm Dosu https://dosu.dev,
and I'm helping the Dify team manage their backlog. I'm marking this issue
as stale.

Issue Summary:

  • You proposed an enhancement to the memory function of LLM nodes to
    prevent shared memory issues.
  • Suggested features include independent memory storage, a memory
    reset feature, and configurable memory management.
  • Yevanchen responded positively, indicating consideration of the
    issue in the near future.

Next Steps:

  • Please let us know if this issue is still relevant to the latest
    version of the Dify repository by commenting here.
  • If there is no further activity, this issue will be automatically
    closed in 15 days.

Thank you for your understanding and contribution!


Reply to this email directly, view it on GitHub
https://github.com/langgenius/dify/issues/13738#issuecomment-2743806335,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/BIUEET5RRHHSO5XKLUKYP7T2VQZV3AVCNFSM6AAAAABXEDXIGGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONBTHAYDMMZTGU
.
You are receiving this because you were mentioned.Message ID:
@.***>

@Ko-shuju commented on GitHub (Mar 24, 2025): I would like to confirm that the latest version does not yet support or modify the application method I mentioned. I am very much looking forward to this application being quickly integrated into the system. This would be an extremely helpful application mode for users. Thank you. dosubot[bot] ***@***.***> 於 2025年3月22日 週六 上午12:01寫道: > Hi, @Ko-shuju <https://github.com/Ko-shuju>. I'm Dosu <https://dosu.dev>, > and I'm helping the Dify team manage their backlog. I'm marking this issue > as stale. > > *Issue Summary:* > > - You proposed an enhancement to the memory function of LLM nodes to > prevent shared memory issues. > - Suggested features include independent memory storage, a memory > reset feature, and configurable memory management. > - Yevanchen responded positively, indicating consideration of the > issue in the near future. > > *Next Steps:* > > - Please let us know if this issue is still relevant to the latest > version of the Dify repository by commenting here. > - If there is no further activity, this issue will be automatically > closed in 15 days. > > Thank you for your understanding and contribution! > > — > Reply to this email directly, view it on GitHub > <https://github.com/langgenius/dify/issues/13738#issuecomment-2743806335>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/BIUEET5RRHHSO5XKLUKYP7T2VQZV3AVCNFSM6AAAAABXEDXIGGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONBTHAYDMMZTGU> > . > You are receiving this because you were mentioned.Message ID: > ***@***.***> > [image: dosubot[bot]]*dosubot[bot]* left a comment (langgenius/dify#13738) > <https://github.com/langgenius/dify/issues/13738#issuecomment-2743806335> > > Hi, @Ko-shuju <https://github.com/Ko-shuju>. I'm Dosu <https://dosu.dev>, > and I'm helping the Dify team manage their backlog. I'm marking this issue > as stale. > > *Issue Summary:* > > - You proposed an enhancement to the memory function of LLM nodes to > prevent shared memory issues. > - Suggested features include independent memory storage, a memory > reset feature, and configurable memory management. > - Yevanchen responded positively, indicating consideration of the > issue in the near future. > > *Next Steps:* > > - Please let us know if this issue is still relevant to the latest > version of the Dify repository by commenting here. > - If there is no further activity, this issue will be automatically > closed in 15 days. > > Thank you for your understanding and contribution! > > — > Reply to this email directly, view it on GitHub > <https://github.com/langgenius/dify/issues/13738#issuecomment-2743806335>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/BIUEET5RRHHSO5XKLUKYP7T2VQZV3AVCNFSM6AAAAABXEDXIGGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONBTHAYDMMZTGU> > . > You are receiving this because you were mentioned.Message ID: > ***@***.***> >
Author
Owner

@dosubot[bot] commented on GitHub (Mar 24, 2025):

@crazywoola, the user @Ko-shuju has confirmed that the latest version does not yet support the enhancement to the memory function of LLM nodes they proposed. They are looking forward to this feature being integrated, as it would be extremely helpful for users. Could you please assist them with this issue?

@dosubot[bot] commented on GitHub (Mar 24, 2025): @crazywoola, the user @Ko-shuju has confirmed that the latest version does not yet support the enhancement to the memory function of LLM nodes they proposed. They are looking forward to this feature being integrated, as it would be extremely helpful for users. Could you please assist them with this issue?
Author
Owner

@k1eNdn commented on GitHub (Apr 14, 2025):

a simple solution is wrap LLM inside a agent (not have tool, to make sure only use LLM). so each agent will have seperate memory. @Ko-shuju

@k1eNdn commented on GitHub (Apr 14, 2025): a simple solution is wrap LLM inside a agent (not have tool, to make sure only use LLM). so each agent will have seperate memory. @Ko-shuju
Author
Owner

@Ko-shuju commented on GitHub (Apr 14, 2025):

@k1endn Thank you for your suggestion. I can try testing this approach within Dify, though I haven't yet developed a complete plan for how the overall process should be structured.

@Ko-shuju commented on GitHub (Apr 14, 2025): @k1endn Thank you for your suggestion. I can try testing this approach within Dify, though I haven't yet developed a complete plan for how the overall process should be structured.
Author
Owner

@imaxwen commented on GitHub (Apr 18, 2025):

+1 👍🏻 independent memories for each LLM Node

@imaxwen commented on GitHub (Apr 18, 2025): +1 👍🏻 independent memories for each LLM Node
Author
Owner

@Yevanchen commented on GitHub (Apr 22, 2025):

@Ko-shuju I would like to know what purpose does Auto Clear serve?

@Yevanchen commented on GitHub (Apr 22, 2025): @Ko-shuju I would like to know what purpose does Auto Clear serve?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#8271