@@ -110,7 +110,7 @@ def _create_supervisor_instance(self, workflow_id: str, unique_suffix: int):
110110 """Factory function to create a supervisor instance for evaluation."""
111111 run_id = f"{ workflow_id } _{ unique_suffix } "
112112 builder = WorkflowBuilder (self .system_messages , self .structured_workflow , self .llm_config , run_id )
113- return builder .build_and_validate ()
113+ return builder .build_component_and_validate ()
114114
115115 def _save_workflow_to_file (self , accuracy : float , iteration : int ) -> str :
116116 """Builds the workflow with current system messages and saves it to a file."""
@@ -119,7 +119,7 @@ def _save_workflow_to_file(self, accuracy: float, iteration: int) -> str:
119119 output_path = os .path .join (self .output_dir , filename )
120120
121121 builder = WorkflowBuilder (self .system_messages , self .structured_workflow , self .llm_config , self .workflow_id )
122- builder .build_and_validate ()
122+ builder .build_component_and_validate ()
123123 builder .save_workflow_to_file (output_path )
124124 logger .info (f"Workflow saved to: { output_path } " )
125125 return output_path
@@ -133,8 +133,8 @@ def build_and_optimize(self) -> Dict[str, Any]:
133133 final accuracy, path to the saved file, and performance history.
134134 """
135135 logger .info ("Step 1: Designing initial workflow from user query..." )
136- expanded_workflow = self .expander .expand_workflow_query (self .user_query , prompts .nexus_guidelines )
137- self .structured_workflow = self .structurer .structure_workflow (expanded_workflow )
136+ expanded_workflow = self .expander .decompose_and_plan_tasks (self .user_query , prompts .nexus_guidelines )
137+ self .structured_workflow = self .structurer .reasoning_workflow_design (expanded_workflow )
138138
139139 agents_names = [self .structured_workflow .main_supervisor .name ] + [agent .name for agent in self .structured_workflow .agents ]
140140 logger .info (f"Created agents: { ', ' .join (agents_names )} " )
@@ -156,7 +156,6 @@ def build_and_optimize(self) -> Dict[str, Any]:
156156 self .workflow_id ,
157157 iteration = i ,
158158 is_factory = True )
159-
160159 accuracy = evaluation_results ['accuracy' ]
161160 final_accuracy = accuracy
162161
0 commit comments