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,
	FileReadTool
)






@CrewBase
class AutonomousCostBenefitAnalyzerFinancialDecisionIntelligenceCrew:
    """AutonomousCostBenefitAnalyzerFinancialDecisionIntelligence crew"""

    
    @agent
    def lead_capital_resource_auditor(self) -> Agent:
        
        
        return Agent(
            config=self.agents_config["lead_capital_resource_auditor"],
            
            
            tools=[				EXASearchTool(),
				FileReadTool()],
            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 risk_adjusted_yield_forecast_engineer(self) -> Agent:
        
        
        return Agent(
            config=self.agents_config["risk_adjusted_yield_forecast_engineer"],
            
            
            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 opportunity_cost_inertia_actuary(self) -> Agent:
        
        
        return Agent(
            config=self.agents_config["opportunity_cost_inertia_actuary"],
            
            
            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 executive_capital_allocation_briefing_partner(self) -> Agent:
        
        
        return Agent(
            config=self.agents_config["executive_capital_allocation_briefing_partner"],
            
            
            tools=[				FileReadTool()],
            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 true_total_cost_of_ownership_audit(self) -> Task:
        return Task(
            config=self.tasks_config["true_total_cost_of_ownership_audit"],
            markdown=False,
            
            
        )
    
    @task
    def probability_weighted_yield_projection(self) -> Task:
        return Task(
            config=self.tasks_config["probability_weighted_yield_projection"],
            markdown=False,
            
            
        )
    
    @task
    def quantifying_the_cost_of_inaction(self) -> Task:
        return Task(
            config=self.tasks_config["quantifying_the_cost_of_inaction"],
            markdown=False,
            
            
        )
    
    @task
    def the_capital_allocation_briefing(self) -> Task:
        return Task(
            config=self.tasks_config["the_capital_allocation_briefing"],
            markdown=False,
            
            
        )
    

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


