Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Adding a choice whether to add node output to state.messages in sequential agents #3813

Open
kpzen opened this issue Jan 5, 2025 · 3 comments
Labels
enhancement New feature or request

Comments

@kpzen
Copy link

kpzen commented Jan 5, 2025

In sequential agent flows, by default the State contains an immutable state.messages array, which acts as the transcript or history of the conversation between the user and the agents. This includes the output from "in between" nodes, and also tool nodes, meaning the state can grow quite large from longer flows with several document retrievals. Some of these outputs might not be needed in state, and depending on the size, make the state.messages too large to be of any use. It would therefore be a nice feature to be able to choose whether to add the output of a node to the state.messages array, allowing us to manage it in a new way. This can be done with a simple yes/no choice under "additional parameters". Right now I can think of the tool, llm and agent node, but possibly it makes sense for the condition agent too.

@HenryHengZJ
Copy link
Contributor

this feature already exists:
image

@kpzen
Copy link
Author

kpzen commented Jan 7, 2025

@HenryHengZJ I am talking about something different. The feature you linked concerns the construction of each llm call and whether to include the state messages as input, but I'm talking about an option for each node whether its output should be added to the state in the first place. Maybe I was a bit unclear.

@HenryHengZJ
Copy link
Contributor

@HenryHengZJ I am talking about something different. The feature you linked concerns the construction of each llm call and whether to include the state messages as input, but I'm talking about an option for each node whether its output should be added to the state in the first place. Maybe I was a bit unclear.

ah okay my mistake, misunderstood the question. will reopen it!

@HenryHengZJ HenryHengZJ reopened this Jan 10, 2025
@HenryHengZJ HenryHengZJ added the enhancement New feature or request label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants