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






@CrewBase
class Soc2ComplianceAutomationDevelopumKissmysaasCrew:
    """Soc2ComplianceAutomationDevelopumKissmysaas crew"""

    
    @agent
    def information_security_policy_architect(self) -> Agent:
        
        
        return Agent(
            config=self.agents_config["information_security_policy_architect"],
            
            
            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 cloud_security_telemetry_monitor(self) -> Agent:
        
        
        return Agent(
            config=self.agents_config["cloud_security_telemetry_monitor"],
            
            
            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 forensic_logging_witness_agent(self) -> Agent:
        
        
        return Agent(
            config=self.agents_config["forensic_logging_witness_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 compliance_dashboard_compiler(self) -> Agent:
        
        
        return Agent(
            config=self.agents_config["compliance_dashboard_compiler"],
            
            
            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 draft_security_policies(self) -> Task:
        return Task(
            config=self.tasks_config["draft_security_policies"],
            markdown=False,
            
            
        )
    
    @task
    def audit_infrastructure_security_posture(self) -> Task:
        return Task(
            config=self.tasks_config["audit_infrastructure_security_posture"],
            markdown=False,
            
            
        )
    
    @task
    def collect_compliance_evidence(self) -> Task:
        return Task(
            config=self.tasks_config["collect_compliance_evidence"],
            markdown=False,
            
            
        )
    
    @task
    def compile_soc2_readiness_report(self) -> Task:
        return Task(
            config=self.tasks_config["compile_soc2_readiness_report"],
            markdown=False,
            
            
        )
    

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


