semantic-kernel icon indicating copy to clipboard operation
semantic-kernel copied to clipboard

.Net: Python: Bug: Agents are not responding after user clarification

Open Dhruvkumar-Microsoft opened this issue 1 month ago • 2 comments

Describe the bug A clear and concise description of what the bug is.

We are having multi agents team. which we are using for HR related operations and we have configured 2 agents with MCP tools. After providing the user input related to mcp tools agents are not giving response.

Version we are using. semantic-kernel==1.35.3 azure-ai-projects==1.0.0 azure-ai-agents==1.2.0b2

Error screenshot:

Image Image

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Platform

  • Language: [e.g. C#, Python] Python==3.11.13
  • Source: [e.g. NuGet package version 0.1.0, pip package version 0.1.0, main branch of repository]
  • AI model: [e.g. OpenAI:GPT-4o-mini(2024-07-18)] gpt-4.1-mini
  • IDE: [e.g. Visual Studio, VS Code]
  • OS: [e.g. Windows, Mac] Windows, Linux

Additional context Add any other context about the problem here.

Dhruvkumar-Microsoft avatar Nov 10 '25 06:11 Dhruvkumar-Microsoft

More details below with DEBUG mode:


DEBUG:semantic_kernel.agents.orchestration.magentic:HRHelperAgent_03fe48a2efaf41aaa015d0020e0c9859/default: Received response message.
DEBUG:semantic_kernel.agents.orchestration.magentic:TechnicalSupportAgent_03fe48a2efaf41aaa015d0020e0c9859/default: Received response message.
DEBUG:semantic_kernel.agents.orchestration.magentic:ProxyAgent_03fe48a2efaf41aaa015d0020e0c9859/default: Received response message.
INFO:in_process_runtime:Calling message handler for HRHelperAgent_03fe48a2efaf41aaa015d0020e0c9859 with message type MagenticRequestMessage published by MagenticManagerActor_03fe48a2efaf41aaa015d0020e0c9859/default
INFO:in_process_runtime.events:{"payload": "{\"agent_name\":\"HRHelperAgent\"}", "sender": "MagenticManagerActor_03fe48a2efaf41aaa015d0020e0c9859/default", "receiver": null, "kind": "MessageKind.PUBLISH", "delivery_stage": "DeliveryStage.DELIVER", "type": "Message"}
INFO:in_process_runtime:Calling message handler for TechnicalSupportAgent_03fe48a2efaf41aaa015d0020e0c9859 with message type MagenticRequestMessage published by MagenticManagerActor_03fe48a2efaf41aaa015d0020e0c9859/default
INFO:in_process_runtime.events:{"payload": "{\"agent_name\":\"HRHelperAgent\"}", "sender": "MagenticManagerActor_03fe48a2efaf41aaa015d0020e0c9859/default", "receiver": null, "kind": "MessageKind.PUBLISH", "delivery_stage": "DeliveryStage.DELIVER", "type": "Message"}
INFO:in_process_runtime:Calling message handler for ProxyAgent_03fe48a2efaf41aaa015d0020e0c9859 with message type MagenticRequestMessage published by MagenticManagerActor_03fe48a2efaf41aaa015d0020e0c9859/default
INFO:in_process_runtime.events:{"payload": "{\"agent_name\":\"HRHelperAgent\"}", "sender": "MagenticManagerActor_03fe48a2efaf41aaa015d0020e0c9859/default", "receiver": null, "kind": "MessageKind.PUBLISH", "delivery_stage": "DeliveryStage.DELIVER", "type": "Message"}
DEBUG:semantic_kernel.agents.orchestration.magentic:HRHelperAgent_03fe48a2efaf41aaa015d0020e0c9859/default: Received request message.
DEBUG:semantic_kernel.prompt_template.kernel_prompt_template:Rendering list of 1 blocks
DEBUG:semantic_kernel.prompt_template.kernel_prompt_template:Rendered prompt: You have access to a number of HR related MCP tools for tasks like employee onboarding, benefits management, policy guidance, and general HR inquiries. Use these tools to assist employees with their HR needs efficiently and accurately.If you need more information to accurately call these tools, do not make up answers, call the ProxyAgent for clarification.
INFO:semantic_kernel.agents.azure_ai.agent_thread_actions:Assistant run created with ID: run_UnjnV5Ra0sAnWoltRBxOgwwx
INFO:semantic_kernel.agents.azure_ai.agent_thread_actions:Assistant run in progress with ID: run_UnjnV5Ra0sAnWoltRBxOgwwx
DEBUG:semantic_kernel.agents.azure_ai.agent_thread_actions:Generating content for tool call type `knowledge`, agent `HRHelperAgent` and thread `thread_dRTfpOIQQCEw9oYOjGWhtGSG` with tool call details: {'type': 'tool_calls', 'tool_calls': [{'index': 0, 'id': 'call_n5rYc68BVKzZ1OG5RlaKsS5D', 'type': 'knowledge', 'tool_call': {'arguments': '{"employee_name": "Jessica Smith"}', 'output': None}}, {'index': 1, 'id': 'call_7bKyaSJnaeaAX8N6QbbZ4JKX', 'type': 'knowledge', 'tool_call': {'arguments': '{"employee_name": "Jessica Smith", "benefits_package": "Standard"}', 'output': None}}, {'index': 2, 'id': 'call_Lzs2FC52FAjcNaIKwmFsCjcp', 'type': 'knowledge', 'tool_call': {'arguments': '{"employee_name": "Jessica Smith", "mentor_name": "Jim Shorts"}', 'output': None}}, {'index': 3, 'id': 'call_ODFheDuRQqlwYS3qrtxbB7ii', 'type': 'knowledge', 'tool_call': {'arguments': '{"employee_name": "Jessica Smith", "date": "2025-11-25"}', 'output': None}}, {'index': 4, 'id': 'call_GWueLbv50lvEpkiwF4xSiWv7', 'type': 'knowledge', 'tool_call': {'arguments': '{"employee_name": "Jessica Smith", "department": "HR"}', 'output': None}}]}
DEBUG:semantic_kernel.agents.azure_ai.agent_thread_actions:Generating content for tool call type `knowledge`, agent `HRHelperAgent` and thread `thread_dRTfpOIQQCEw9oYOjGWhtGSG` with tool call details: {'type': 'tool_calls', 'tool_calls': [{'index': 0, 'id': 'call_n5rYc68BVKzZ1OG5RlaKsS5D', 'type': 'knowledge', 'tool_call': {'arguments': '{"employee_name": "Jessica Smith"}', 'output': None}}, {'index': 1, 'id': 'call_7bKyaSJnaeaAX8N6QbbZ4JKX', 'type': 'knowledge', 'tool_call': {'arguments': '{"employee_name": "Jessica Smith", "benefits_package": "Standard"}', 'output': None}}, {'index': 2, 'id': 'call_Lzs2FC52FAjcNaIKwmFsCjcp', 'type': 'knowledge', 'tool_call': {'arguments': '{"employee_name": "Jessica Smith", "mentor_name": "Jim Shorts"}', 'output': None}}, {'index': 3, 'id': 'call_ODFheDuRQqlwYS3qrtxbB7ii', 'type': 'knowledge', 'tool_call': {'arguments': '{"employee_name": "Jessica Smith", "date": "2025-11-25"}', 'output': None}}, {'index': 4, 'id': 'call_GWueLbv50lvEpkiwF4xSiWv7', 'type': 'knowledge', 'tool_call': {'arguments': '{"employee_name": "Jessica Smith", "department": "HR"}', 'output': None}}]}
DEBUG:semantic_kernel.agents.azure_ai.agent_thread_actions:Generating content for tool call type `knowledge`, agent `HRHelperAgent` and thread `thread_dRTfpOIQQCEw9oYOjGWhtGSG` with tool call details: {'type': 'tool_calls', 'tool_calls': [{'index': 0, 'id': 'call_n5rYc68BVKzZ1OG5RlaKsS5D', 'type': 'knowledge', 'tool_call': {'arguments': '{"employee_name": "Jessica Smith"}', 'output': None}}, {'index': 1, 'id': 'call_7bKyaSJnaeaAX8N6QbbZ4JKX', 'type': 'knowledge', 'tool_call': {'arguments': '{"employee_name": "Jessica Smith", "benefits_package": "Standard"}', 'output': None}}, {'index': 2, 'id': 'call_Lzs2FC52FAjcNaIKwmFsCjcp', 'type': 'knowledge', 'tool_call': {'arguments': '{"employee_name": "Jessica Smith", "mentor_name": "Jim Shorts"}', 'output': None}}, {'index': 3, 'id': 'call_ODFheDuRQqlwYS3qrtxbB7ii', 'type': 'knowledge', 'tool_call': {'arguments': '{"employee_name": "Jessica Smith", "date": "2025-11-25"}', 'output': None}}, {'index': 4, 'id': 'call_GWueLbv50lvEpkiwF4xSiWv7', 'type': 'knowledge', 'tool_call': {'arguments': '{"employee_name": "Jessica Smith", "department": "HR"}', 'output': None}}]}
DEBUG:semantic_kernel.agents.azure_ai.agent_thread_actions:Generating content for tool call type `knowledge`, agent `HRHelperAgent` and thread `thread_dRTfpOIQQCEw9oYOjGWhtGSG` with tool call details: {'type': 'tool_calls', 'tool_calls': [{'index': 0, 'id': 'call_n5rYc68BVKzZ1OG5RlaKsS5D', 'type': 'knowledge', 'tool_call': {'arguments': '{"employee_name": "Jessica Smith"}', 'output': None}}, {'index': 1, 'id': 'call_7bKyaSJnaeaAX8N6QbbZ4JKX', 'type': 'knowledge', 'tool_call': {'arguments': '{"employee_name": "Jessica Smith", "benefits_package": "Standard"}', 'output': None}}, {'index': 2, 'id': 'call_Lzs2FC52FAjcNaIKwmFsCjcp', 'type': 'knowledge', 'tool_call': {'arguments': '{"employee_name": "Jessica Smith", "mentor_name": "Jim Shorts"}', 'output': None}}, {'index': 3, 'id': 'call_ODFheDuRQqlwYS3qrtxbB7ii', 'type': 'knowledge', 'tool_call': {'arguments': '{"employee_name": "Jessica Smith", "date": "2025-11-25"}', 'output': None}}, {'index': 4, 'id': 'call_GWueLbv50lvEpkiwF4xSiWv7', 'type': 'knowledge', 'tool_call': {'arguments': '{"employee_name": "Jessica Smith", "department": "HR"}', 'output': None}}]}
DEBUG:semantic_kernel.agents.azure_ai.agent_thread_actions:Generating content for tool call type `knowledge`, agent `HRHelperAgent` and thread `thread_dRTfpOIQQCEw9oYOjGWhtGSG` with tool call details: {'type': 'tool_calls', 'tool_calls': [{'index': 0, 'id': 'call_n5rYc68BVKzZ1OG5RlaKsS5D', 'type': 'knowledge', 'tool_call': {'arguments': '{"employee_name": "Jessica Smith"}', 'output': None}}, {'index': 1, 'id': 'call_7bKyaSJnaeaAX8N6QbbZ4JKX', 'type': 'knowledge', 'tool_call': {'arguments': '{"employee_name": "Jessica Smith", "benefits_package": "Standard"}', 'output': None}}, {'index': 2, 'id': 'call_Lzs2FC52FAjcNaIKwmFsCjcp', 'type': 'knowledge', 'tool_call': {'arguments': '{"employee_name": "Jessica Smith", "mentor_name": "Jim Shorts"}', 'output': None}}, {'index': 3, 'id': 'call_ODFheDuRQqlwYS3qrtxbB7ii', 'type': 'knowledge', 'tool_call': {'arguments': '{"employee_name": "Jessica Smith", "date": "2025-11-25"}', 'output': None}}, {'index': 4, 'id': 'call_GWueLbv50lvEpkiwF4xSiWv7', 'type': 'knowledge', 'tool_call': {'arguments': '{"employee_name": "Jessica Smith", "department": "HR"}', 'output': None}}]}
INFO:semantic_kernel.agents.azure_ai.agent_thread_actions:Run step completed with ID: step_uwkMXn11euTe6mfWCCfEJhvg
DEBUG:semantic_kernel.agents.azure_ai.agent_thread_actions:Entering step type thread.run.completed, agent `HRHelperAgent` and thread `thread_dRTfpOIQQCEw9oYOjGWhtGSG` and run id `run_UnjnV5Ra0sAnWoltRBxOgwwx`
INFO:semantic_kernel.agents.azure_ai.agent_thread_actions:Run completed with ID: run_UnjnV5Ra0sAnWoltRBxOgwwx
ERROR:semantic_kernel.agents.orchestration.agent_actor_base:Exception occurred in agent HRHelperAgent_03fe48a2efaf41aaa015d0020e0c9859/default:
Agent "HRHelperAgent" did not return any response.
ERROR:in_process_runtime:Error processing publish message for HRHelperAgent_03fe48a2efaf41aaa015d0020e0c9859/default
Traceback (most recent call last):
  File "c:\Users\v-roopanpm\OneDrive - Microsoft\Desktop\Multi-Agent-Custom-Automation-Engine-Solution-Accelerator\src\backend\.venv\Lib\site-packages\semantic_kernel\agents\runtime\in_process\in_process_runtime.py", line 470, in _on_message
    return await agent.on_message(
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\v-roopanpm\OneDrive - Microsoft\Desktop\Multi-Agent-Custom-Automation-Engine-Solution-Accelerator\src\backend\.venv\Lib\site-packages\semantic_kernel\agents\runtime\core\base_agent.py", line 129, in on_message
    return await self.on_message_impl(message, ctx)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\v-roopanpm\OneDrive - Microsoft\Desktop\Multi-Agent-Custom-Automation-Engine-Solution-Accelerator\src\backend\.venv\Lib\site-packages\semantic_kernel\agents\orchestration\agent_actor_base.py", line 53, in on_message_impl
    return await super().on_message_impl(message, ctx)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\v-roopanpm\OneDrive - Microsoft\Desktop\Multi-Agent-Custom-Automation-Engine-Solution-Accelerator\src\backend\.venv\Lib\site-packages\semantic_kernel\agents\runtime\core\routed_agent.py", line 488, in on_message_impl
    return await h(self, message, ctx)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\v-roopanpm\OneDrive - Microsoft\Desktop\Multi-Agent-Custom-Automation-Engine-Solution-Accelerator\src\backend\.venv\Lib\site-packages\semantic_kernel\agents\orchestration\agent_actor_base.py", line 53, in on_message_impl
    return await super().on_message_impl(message, ctx)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\v-roopanpm\OneDrive - Microsoft\Desktop\Multi-Agent-Custom-Automation-Engine-Solution-Accelerator\src\backend\.venv\Lib\site-packages\semantic_kernel\agents\runtime\core\routed_agent.py", line 488, in on_message_impl
    return await h(self, message, ctx)
  File "c:\Users\v-roopanpm\OneDrive - Microsoft\Desktop\Multi-Agent-Custom-Automation-Engine-Solution-Accelerator\src\backend\.venv\Lib\site-packages\semantic_kernel\agents\orchestration\agent_actor_base.py", line 53, in on_message_impl
    return await super().on_message_impl(message, ctx)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\v-roopanpm\OneDrive - Microsoft\Desktop\Multi-Agent-Custom-Automation-Engine-Solution-Accelerator\src\backend\.venv\Lib\site-packages\semantic_kernel\agents\runtime\core\routed_agent.py", line 488, in on_message_impl
    return await h(self, message, ctx)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\v-roopanpm\OneDrive - Microsoft\Desktop\Multi-Agent-Custom-Automation-Engine-Solution-Accelerator\src\backend\.venv\Lib\site-packages\semantic_kernel\agents\runtime\core\routed_agent.py", line 488, in on_message_impl
    return await h(self, message, ctx)
s\runtime\core\routed_agent.py", line 488, in on_message_impl
    return await h(self, message, ctx)
    return await h(self, message, ctx)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\v-roopanpm\OneDrive - Microsoft\Desktop\Multi-Agent-Custom-Automation-Engine-Solution-Accelerator\src\backend\.venv\Lib\site-packages\semantic_kernel\agents\runtime\core\routed_agent.py", line 156, in wrapper
  File "c:\Users\v-roopanpm\OneDrive - Microsoft\Desktop\Multi-Agent-Custom-Automation-Engine-Solution-Accelerator\src\backend\.venv\Lib\site-packages\semantic_kernel\agents\runtime\core\routed_agent.py", line 156, in wrapper
s\runtime\core\routed_agent.py", line 156, in wrapper
    return_value = await func(self, message, ctx)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\v-roopanpm\OneDrive - Microsoft\Desktop\Multi-Agent-Custom-Automation-Engine-Solution-Accelerator\src\backend\.venv\Lib\site-packages\semantic_kernel\agents\orchestration\magentic.py", line 738, in _handle_request_message
    response = await self._invoke_agent()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\v-roopanpm\OneDrive - Microsoft\Desktop\Multi-Agent-Custom-Automation-Engine-Solution-Accelerator\src\backend\.venv\Lib\site-packages\semantic_kernel\agents\orchestration\agent_actor_base.py", line 76, in async_wrapper
    return await func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\v-roopanpm\OneDrive - Microsoft\Desktop\Multi-Agent-Custom-Automation-Engine-Solution-Accelerator\src\backend\.venv\Lib\site-packages\semantic_kernel\agents\orchestration\agent_actor_base.py", line 193, in _invoke_agent
    raise RuntimeError(f'Agent "{self._agent.name}" did not return any response.')
RuntimeError: Agent "HRHelperAgent" did not return any response.
INFO:in_process_runtime.events:{"payload": "{\"agent_name\":\"HRHelperAgent\"}", "handling_agent": "HRHelperAgent_03fe48a2efaf41aaa015d0020e0c9859/default", "exception": "Agent \"HRHelperAgent\" did not return any response.", "type": "MessageHandlerException"}
INFO:v3.orchestration.orchestration_manager.OrchestrationManager:Error: Agent "HRHelperAgent" did not return any response.
INFO:v3.orchestration.orchestration_manager.OrchestrationManager:Error type: RuntimeError
INFO:v3.orchestration.orchestration_manager.OrchestrationManager:Error attributes: {}
INFO:v3.orchestration.orchestration_manager.OrchestrationManager:==================================================

Roopan-Microsoft avatar Nov 10 '25 08:11 Roopan-Microsoft

More details,

When reviewing the logs, we noticed that one of the agents is passing the call type as 'knowledge', whereas the expected value is 'function'. Additionally, the package does not mention the available list of call types, so we need to investigate how the value 'knowledge' is being passed.

Image Image

Roopan-Microsoft avatar Nov 10 '25 15:11 Roopan-Microsoft