-
agent1 = ChatCompletionAgent(arguments=KernelArguments( File "semantic_kernel/kernel.py", line 354, in invoke_function_call The above expection occurs when Agent2 is executing. The message is correct but why was Agent2 provided with Agent1's plugin (FixPlugin) at first place? Why is it requesting kernel to invoke a function it should never have access to? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Tagging @crickman |
Beta Was this translation helpful? Give feedback.
-
@sophialagerkranspandey this is Python, so I can handle. Hi @j-ajim, are you providing the same kernel instance to both I can't see from your code sample above, but when you create |
Beta Was this translation helpful? Give feedback.
-
Thanks for providing the detailed code. It's not 100% apparent to me, because you are using the The other side is, move to separate kernel instances for each agent. One agent may still be able to see some context from another, related to plugin-use, but try adding some text in the instructions or prompt that the agent must only call functions advertised to it. |
Beta Was this translation helpful? Give feedback.
Thanks for providing the detailed code. It's not 100% apparent to me, because you are using the
FunctionChoiceBehavior
filter argument, but I believe that because theAgentGroupChat
has a shared chat history where each agent is able to see context used by other agents, the LLM is thinking it has a plugin available (used by one agent) when in fact it is not available. There are some further details left out here - I can understand not wanting to provide everything in code. I would check how you are telling the agent which functions it is allowed to call. As an example, it may be worth it to provide in some system message or prompt that each agent only has "these plugins" available - you co…