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






@CrewBase
class RfpGrantWriterRevolutionCrew:
    """RfpGrantWriterRevolution crew"""

    
    @agent
    def lead_rfp_compliance_parser(self) -> Agent:
        
        
        return Agent(
            config=self.agents_config["lead_rfp_compliance_parser"],
            
            
            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",
                
                
            ),
            
        )
        
    
    @agent
    def organizational_capability_matcher(self) -> Agent:
        
        
        return Agent(
            config=self.agents_config["organizational_capability_matcher"],
            
            
            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",
                
                
            ),
            
        )
        
    
    @agent
    def senior_technical_proposal_writer(self) -> Agent:
        
        
        return Agent(
            config=self.agents_config["senior_technical_proposal_writer"],
            
            
            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",
                
                
            ),
            
        )
        
    
    @agent
    def red_team_proposal_auditor(self) -> Agent:
        
        
        return Agent(
            config=self.agents_config["red_team_proposal_auditor"],
            
            
            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 rfp_compliance_matrix_extraction(self) -> Task:
        return Task(
            config=self.tasks_config["rfp_compliance_matrix_extraction"],
            markdown=False,
            
            
        )
    
    @task
    def organizational_qualification_mapping(self) -> Task:
        return Task(
            config=self.tasks_config["organizational_qualification_mapping"],
            markdown=False,
            
            
        )
    
    @task
    def technical_proposal_framework_development(self) -> Task:
        return Task(
            config=self.tasks_config["technical_proposal_framework_development"],
            markdown=False,
            
            
        )
    
    @task
    def final_compliance_audit_sign_off(self) -> Task:
        return Task(
            config=self.tasks_config["final_compliance_audit_sign_off"],
            markdown=False,
            
            
        )
    

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


