-
I have an implementation of two agents, each with their own kernel plugin, together in an AgentGroupChat. I've noticed that, on occasion, the agents get confused about which tools are available. AgentTwo will attempt to call tools from AgentOnePlugin, and vice-versa. The ChatHistory seems to be the culprit, AFAICT, of this information leak between agents. The xml output includes Overriding the Any advice on the 'right' way to handle this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hi @drdrewAQ thanks for bringing this up. For our understanding, are you using two chat completion agents or a chat completion agent and an assistant agent? My guess is you have two chat completion agents, but I'd like to be sure. Also, what model are you using? An agent (and thus LLM) should be paying attention to the tools it was provided -- I haven't seen a model try to call tools based on previous context provided in the messages dict. Per your case, that is indeed what is happening, so that is very interesting. Let me investigate a bit and I'll get back to you ASAP. |
Beta Was this translation helpful? Give feedback.
Thanks for confirming, @drdrewAQ. For this model type, it may be worth exploring how you might manage the chat history that the agents use. Since every ChatMessageContent (and its derivative types) are shared between agents in a group chat right now, you may need to remove content types like
FunctionCallContent
andFunctionResultContent
so that information doesn't bleed to another agent. This would involve getting the messages from the chat, filtering them, clearing the chat, and then adding the messages back.