import os

from crewai import LLM
from crewai import Agent, Crew, Process, Task
from crewai.project import CrewBase, agent, crew, task
from crewai_tools import (
	EXASearchTool,
	ScrapeWebsiteTool
)






@CrewBase
class WhiteLabelAiOnboardingSystemInstallationManualCrew:
    """WhiteLabelAiOnboardingSystemInstallationManual crew"""

    
    @agent
    def faq_dispatcher_customer_data_router(self) -> Agent:
        
        
        return Agent(
            config=self.agents_config["faq_dispatcher_customer_data_router"],
            
            
            tools=[				EXASearchTool(),
				ScrapeWebsiteTool()],
            reasoning=False,
            max_reasoning_attempts=None,
            inject_date=True,
            allow_delegation=False,
            max_iter=25,
            max_rpm=None,
            
            
            max_execution_time=None,
            llm=LLM(
                model="openai/gpt-4o-mini",
                
                
            ),
            
        )
        
    
    @agent
    def customer_profile_analyzer(self) -> Agent:
        
        
        return Agent(
            config=self.agents_config["customer_profile_analyzer"],
            
            
            tools=[				EXASearchTool()],
            reasoning=False,
            max_reasoning_attempts=None,
            inject_date=True,
            allow_delegation=False,
            max_iter=25,
            max_rpm=None,
            
            
            max_execution_time=None,
            llm=LLM(
                model="openai/gpt-4o-mini",
                
                
            ),
            
        )
        
    
    @agent
    def hosting_package_recommender(self) -> Agent:
        
        
        return Agent(
            config=self.agents_config["hosting_package_recommender"],
            
            
            tools=[				ScrapeWebsiteTool()],
            reasoning=False,
            max_reasoning_attempts=None,
            inject_date=True,
            allow_delegation=False,
            max_iter=25,
            max_rpm=None,
            
            
            max_execution_time=None,
            llm=LLM(
                model="openai/gpt-4o-mini",
                
                
            ),
            
        )
        
    
    @agent
    def multi_language_localizer(self) -> Agent:
        
        
        return Agent(
            config=self.agents_config["multi_language_localizer"],
            
            
            tools=[				EXASearchTool()],
            reasoning=False,
            max_reasoning_attempts=None,
            inject_date=True,
            allow_delegation=False,
            max_iter=25,
            max_rpm=None,
            
            
            max_execution_time=None,
            llm=LLM(
                model="openai/gpt-4o-mini",
                
                
            ),
            
        )
        
    
    @agent
    def technical_documentation_specialist(self) -> Agent:
        
        
        return Agent(
            config=self.agents_config["technical_documentation_specialist"],
            
            
            tools=[				ScrapeWebsiteTool(),
				EXASearchTool()],
            reasoning=False,
            max_reasoning_attempts=None,
            inject_date=True,
            allow_delegation=False,
            max_iter=25,
            max_rpm=None,
            
            
            max_execution_time=None,
            llm=LLM(
                model="openai/gpt-4o-mini",
                
                
            ),
            
        )
        
    

    
    @task
    def handle_customer_inquiry_data_lookup(self) -> Task:
        return Task(
            config=self.tasks_config["handle_customer_inquiry_data_lookup"],
            markdown=False,
            
            
        )
    
    @task
    def analyze_customer_profile_history(self) -> Task:
        return Task(
            config=self.tasks_config["analyze_customer_profile_history"],
            markdown=False,
            
            
        )
    
    @task
    def recommend_hosting_package(self) -> Task:
        return Task(
            config=self.tasks_config["recommend_hosting_package"],
            markdown=False,
            
            
        )
    
    @task
    def localize_customer_materials(self) -> Task:
        return Task(
            config=self.tasks_config["localize_customer_materials"],
            markdown=False,
            
            
        )
    
    @task
    def create_installation_manual(self) -> Task:
        return Task(
            config=self.tasks_config["create_installation_manual"],
            markdown=False,
            
            
        )
    

    @crew
    def crew(self) -> Crew:
        """Creates the WhiteLabelAiOnboardingSystemInstallationManual crew"""

        return Crew(
            agents=self.agents,  # Automatically created by the @agent decorator
            tasks=self.tasks,  # Automatically created by the @task decorator
            process=Process.sequential,
            verbose=True,

            chat_llm=LLM(model="openai/gpt-4o-mini"),
        )


