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 TheProgramFirmwareUpdateForHumanBeingsCrew:
    """TheProgramFirmwareUpdateForHumanBeings crew"""

    
    @agent
    def the_intake_agent(self) -> Agent:
        
        
        return Agent(
            config=self.agents_config["the_intake_agent"],
            
            
            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 the_codifier(self) -> Agent:
        
        
        return Agent(
            config=self.agents_config["the_codifier"],
            
            
            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 the_librarian(self) -> Agent:
        
        
        return Agent(
            config=self.agents_config["the_librarian"],
            
            
            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 the_delivery_agent(self) -> Agent:
        
        
        return Agent(
            config=self.agents_config["the_delivery_agent"],
            
            
            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 the_archivist(self) -> Agent:
        
        
        return Agent(
            config=self.agents_config["the_archivist"],
            
            
            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 conversational_intake(self) -> Task:
        return Task(
            config=self.tasks_config["conversational_intake"],
            markdown=False,
            
            
        )
    
    @task
    def score_and_codify(self) -> Task:
        return Task(
            config=self.tasks_config["score_and_codify"],
            markdown=False,
            
            
        )
    
    @task
    def select_and_sequence_firmware(self) -> Task:
        return Task(
            config=self.tasks_config["select_and_sequence_firmware"],
            markdown=False,
            
            
        )
    
    @task
    def deliver_firmware(self) -> Task:
        return Task(
            config=self.tasks_config["deliver_firmware"],
            markdown=False,
            
            
        )
    
    @task
    def archive_and_track_progress(self) -> Task:
        return Task(
            config=self.tasks_config["archive_and_track_progress"],
            markdown=False,
            
            
        )
    

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


