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
)






@CrewBase
class UnionAcceleratorWeddingPlanningCrewCrew:
    """UnionAcceleratorWeddingPlanningCrew crew"""

    
    @agent
    def budget_architect(self) -> Agent:
        
        
        return Agent(
            config=self.agents_config["budget_architect"],
            
            
            tools=[],
            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 logistics_scout(self) -> Agent:
        
        
        return Agent(
            config=self.agents_config["logistics_scout"],
            
            
            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 documenter(self) -> Agent:
        
        
        return Agent(
            config=self.agents_config["documenter"],
            
            
            tools=[],
            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 build_wedding_budget_model(self) -> Task:
        return Task(
            config=self.tasks_config["build_wedding_budget_model"],
            markdown=False,
            
            
        )
    
    @task
    def scout_shortlist_wedding_vendors(self) -> Task:
        return Task(
            config=self.tasks_config["scout_shortlist_wedding_vendors"],
            markdown=False,
            
            
        )
    
    @task
    def compile_union_accelerator_package(self) -> Task:
        return Task(
            config=self.tasks_config["compile_union_accelerator_package"],
            markdown=False,
            
            
        )
    

    @crew
    def crew(self) -> Crew:
        """Creates the UnionAcceleratorWeddingPlanningCrew 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"),
        )


