@@ -670,10 +670,25 @@ def _check_dependencies(recipe_config: RecipeConfig) -> Dict[str, Any]:
670670 "external" : [],
671671 }
672672
673+ # Common package name to import name mappings
674+ PACKAGE_IMPORT_MAP = {
675+ "tavily-python" : "tavily" ,
676+ "google-generativeai" : "google.generativeai" ,
677+ "openai-whisper" : "whisper" ,
678+ "python-dotenv" : "dotenv" ,
679+ "pillow" : "PIL" ,
680+ "opencv-python" : "cv2" ,
681+ "scikit-learn" : "sklearn" ,
682+ "beautifulsoup4" : "bs4" ,
683+ "pyyaml" : "yaml" ,
684+ }
685+
673686 # Check Python packages
674687 for pkg in recipe_config .get_required_packages ():
688+ # Get the correct import name
689+ import_name = PACKAGE_IMPORT_MAP .get (pkg , pkg .replace ("-" , "_" ))
675690 try :
676- __import__ (pkg . replace ( "-" , "_" ) )
691+ __import__ (import_name )
677692 result ["packages" ].append ({"name" : pkg , "available" : True })
678693 except ImportError :
679694 result ["packages" ].append ({"name" : pkg , "available" : False })
@@ -750,6 +765,17 @@ def _execute_recipe(
750765 # Create a TemplateConfig compatible with loader
751766 template_path = Path (recipe_config .path ) if recipe_config .path else None
752767
768+ # Determine workflow file - check for agents.yaml if workflow.yaml not specified
769+ workflow_file = recipe_config .raw .get ("workflow" , "workflow.yaml" )
770+ agents_file = recipe_config .raw .get ("agents" , "agents.yaml" )
771+
772+ # If workflow.yaml doesn't exist but agents.yaml does, use agents.yaml as workflow
773+ if template_path :
774+ workflow_path = template_path / workflow_file
775+ agents_path = template_path / agents_file
776+ if not workflow_path .exists () and agents_path .exists ():
777+ workflow_file = agents_file
778+
753779 loader_config = LoaderTemplateConfig (
754780 name = recipe_config .name ,
755781 description = recipe_config .description ,
@@ -758,8 +784,8 @@ def _execute_recipe(
758784 license = recipe_config .license ,
759785 tags = recipe_config .tags ,
760786 requires = recipe_config .requires ,
761- workflow_file = recipe_config . raw . get ( "workflow" , "workflow.yaml" ) ,
762- agents_file = recipe_config . raw . get ( "agents" , "agents.yaml" ) ,
787+ workflow_file = workflow_file ,
788+ agents_file = agents_file ,
763789 config_schema = recipe_config .config_schema ,
764790 defaults = merged_config ,
765791 skills = recipe_config .raw .get ("skills" , []),
0 commit comments