How do you guys prevent supervisor from repeatedly handing off to the same agent, or calling multiple agents in sequence? Prompts are not helping and we’ll have to add a separate state variable to track the number of times an agent is called.
1 Like
I have ran into the same issue before and did not found a reliable solution yet.
What seemed to work was having a way larger prompt with more context (not per se about handoff policy). However, its pretty random so I would not count that towards a solid fix.
Did you try using a better model that is more suited for tool calling? I would be interested to see if that works for you.