Add context limitation to agents #5855

Closed
opened 2026-02-21 18:12:53 -05:00 by yindo · 2 comments
Owner

Originally created by @BrianAndersen78 on GitHub (Sep 29, 2024).

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.

The fact that LLM's get longer and longer possible context window, using an agent in production is getting very expensive, because we always will fill up the context window. Especially if we use tools. A simple context limit would be much appreciated so it won't ruin us to use Agents in production.

2. Additional context or comments

No response

3. Can you help us with this feature?

  • I am interested in contributing to this feature.
Originally created by @BrianAndersen78 on GitHub (Sep 29, 2024). ### 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. The fact that LLM's get longer and longer possible context window, using an agent in production is getting very expensive, because we always will fill up the context window. Especially if we use tools. A simple context limit would be much appreciated so it won't ruin us to use Agents in production. ### 2. Additional context or comments _No response_ ### 3. Can you help us with this feature? - [ ] I am interested in contributing to this feature.
yindo added the 💪 enhancement label 2026-02-21 18:12:53 -05:00
yindo closed this issue 2026-02-21 18:12:53 -05:00
Author
Owner

@juniorsereno commented on GitHub (Sep 29, 2024):

This is really important and would make production much simple.

As it already has a limitation in ChatFlow, this should not be complicated to apply to agents.

@juniorsereno commented on GitHub (Sep 29, 2024): This is really important and would make production much simple. As it already has a limitation in ChatFlow, this should not be complicated to apply to agents.
Author
Owner

@dosubot[bot] commented on GitHub (Oct 31, 2024):

Hi, @BrianAndersen78! I'm helping the Dify team manage their backlog and am marking this issue as stale.

You opened this issue to request the addition of a context limitation feature for agents due to concerns about rising costs associated with larger context windows in production. User juniorsereno also supports this request, mentioning that since a limitation already exists in ChatFlow, it should be relatively straightforward to implement for agents.

Could you please let us know if this issue is still relevant to the latest version of the Dify repository? If it is, feel free to comment here to keep the discussion going. Otherwise, you can close the issue yourself, or it will be automatically closed in 7 days. Thank you!

@dosubot[bot] commented on GitHub (Oct 31, 2024): Hi, @BrianAndersen78! I'm helping the Dify team manage their backlog and am marking this issue as stale. You opened this issue to request the addition of a context limitation feature for agents due to concerns about rising costs associated with larger context windows in production. User juniorsereno also supports this request, mentioning that since a limitation already exists in ChatFlow, it should be relatively straightforward to implement for agents. Could you please let us know if this issue is still relevant to the latest version of the Dify repository? If it is, feel free to comment here to keep the discussion going. Otherwise, you can close the issue yourself, or it will be automatically closed in 7 days. Thank you!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#5855