LangGraph supervisor keeps calling same node even when FINISH #461
Replies: 11 comments
-
Could you share al angsmith trace of this behavior to help me debug? |
Beta Was this translation helpful? Give feedback.
-
@hinthornw here is the trace.
for a simple hi the supervisor called the conversational node twice. |
Beta Was this translation helpful? Give feedback.
-
Another trace : Here the python tool is called twice at the end. INPUT:
|
Beta Was this translation helpful? Give feedback.
-
@hinthornw in the example https://github.com/langchain-ai/langgraph/blob/main/examples/multi_agent/hierarchical_agent_teams.ipynb you can see the Research team is called 9 times with the same output and then other node is called. can't we remove this redundant calling?? |
Beta Was this translation helpful? Give feedback.
-
I have a similar issue: @hinthornw, using graphs for agent orchestration is a nice concept. Also great videos. Hoping to connect with you. Will DM via LinkedIn |
Beta Was this translation helpful? Give feedback.
-
We are working on a project which incorporates LangGraph multi agents and supervisor workflow. There is still a problem of Supervisor calling the same agent even if this agent has already performed its task. I have already tried to modify the prompt, but I wonder if there is a way to modify the workflow to limit the number of interactions between supervisor and other agents? This would be very helpful. |
Beta Was this translation helpful? Give feedback.
-
@madina1203 you can add a conditional edge like the following
And modify the prompt to add prefix FINISH: in the response. |
Beta Was this translation helpful? Give feedback.
-
Facing the similar issue with multi- agent collaboration. Router calls the same node even when the recusion limit is set to 150. @madina1203 what is conditional_map in above case ? |
Beta Was this translation helpful? Give feedback.
-
One way to have them end more reliably is to include reminders/instructions in responses after a tool is invoked. Like after a tool is used, return the tool result and append "If all tasks are complete, reply with "FINISHED", etc. Or could factor finishing out into an explicit function call |
Beta Was this translation helpful? Give feedback.
-
Experiencing the same thing.. Any updates on this? |
Beta Was this translation helpful? Give feedback.
-
Same here |
Beta Was this translation helpful? Give feedback.
-
Checked other resources
Example Code
Here is my System Prompt:
And here is the response.
Error Message and Stack Trace (if applicable)
No response
Description
Hello,
I have a conversational node which is used to respond with a normal conversation.
Even when the message is prefixed as finish the supervisor keeps calling the node again.
System Info
System Information
Package Information
Packages not installed (Not Necessarily a Problem)
The following packages were not found:
Beta Was this translation helpful? Give feedback.
All reactions