Skip to content

Commit fe8fe5b

Browse files
committed
Update planner_agent.py
1 parent 7a4673e commit fe8fe5b

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/backend/kernel_agents/planner_agent.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,12 @@ def __init__(
103103
AgentType.GENERIC.value,
104104
]
105105
self._agent_tools_list = {
106-
AgentType.HR: HrTools.get_all_kernel_functions(),
107-
AgentType.MARKETING: MarketingTools.get_all_kernel_functions(),
108-
AgentType.PRODUCT: ProductTools.get_all_kernel_functions(),
109-
AgentType.PROCUREMENT: ProcurementTools.get_all_kernel_functions(),
110-
AgentType.TECH_SUPPORT: TechSupportTools.get_all_kernel_functions(),
111-
AgentType.GENERIC: GenericTools.get_all_kernel_functions(),
106+
AgentType.HR: HrTools.generate_tools_json_doc(),
107+
AgentType.MARKETING: MarketingTools.generate_tools_json_doc(),
108+
AgentType.PRODUCT: ProductTools.generate_tools_json_doc(),
109+
AgentType.PROCUREMENT: ProcurementTools.generate_tools_json_doc(),
110+
AgentType.TECH_SUPPORT: TechSupportTools.generate_tools_json_doc(),
111+
AgentType.GENERIC: GenericTools.generate_tools_json_doc(),
112112
}
113113

114114
self._agent_instances = agent_instances or {}
@@ -324,8 +324,6 @@ async def _create_structured_plan(
324324
kernel_args = KernelArguments(**args)
325325
# kernel_args["input"] = f"TASK: {input_task.description}\n\n{instruction}"
326326

327-
logging.info(f"Kernel arguments: {kernel_args}")
328-
329327
# Get the schema for our expected response format
330328

331329
# Ensure we're using the right pattern for Azure AI agents with semantic kernel
@@ -535,6 +533,10 @@ def _generate_args(self, objective: str) -> any:
535533
# Create list of available tools in JSON-like format
536534
tools_list = []
537535

536+
for agent_name, tools in self._agent_tools_list.items():
537+
if agent_name in self._available_agents:
538+
tools_list.append(tools)
539+
538540
tools_str = str(tools_list)
539541

540542
# Return a dictionary with template variables

0 commit comments

Comments
 (0)