Wizard Module¶
Total files documented: 58
wizard/wizardmain.py¶
Wizard Main Application¶
wizard/wizardmain.py¶
Purpose¶
This file serves as the main entry point for the Wizard application, responsible for initializing the FastAPI application and including various routers for different features.
Key Responsibilities¶
- Initialize the FastAPI application
- Include routers for various features, such as systems, products, forms, rules, and more
- Define the application title and tags
Important Functions¶
Not clear from code.
Important Classes¶
Not clear from code.
System Fit¶
This file fits into the wider 3-Cubed Python system as the main entry point for the Wizard application. It initializes the FastAPI application and includes various routers for different features, which are likely developed as separate modules within the wizard_agents package. The application title and tags are also defined here, indicating that this application is part of the Wizard feature set.
wizard/crew_agents/crew_llm.py¶
Purpose¶
This file, crew_llm.py, initializes and configures various Large Language Models (LLMs) using the CrewAI library. It sets up connections to OpenAI, Gemini, and Groq LLMs, allowing for their usage in the wider 3-Cubed Python system.
Key Responsibilities¶
- Initializes and configures LLMs from different providers (OpenAI, Gemini, Groq)
- Sets up environment variables for API keys
- Raises errors if required environment variables are not set
- Creates instances of the LLM class from the CrewAI library
Important Functions¶
Not clear from code. The file primarily consists of variable assignments and LLM instance creations.
Important Classes¶
LLM: A class from the CrewAI library, used to create instances of LLMs from different providers.
System Fit¶
This file fits into the wider 3-Cubed Python system by providing a centralized location for initializing and configuring LLMs. It allows other parts of the system to access and utilize these LLMs for various tasks, such as natural language processing and generation. The LLM instances created in this file can be used throughout the system, enabling features like conversational interfaces, text summarization, and more.
wizard/crew_agents/crew_llm1.py¶
Purpose¶
This file, crew_llm1.py, initializes and configures Large Language Models (LLMs) from various providers, including OpenAI, Gemini, and Groq. It sets up the models with specific API keys and model names.
Key Responsibilities¶
- Initialize LLMs from OpenAI, Gemini, and Groq providers
- Configure model names and API keys for each provider
- Validate the presence of required environment variables
- Raise an error if any required environment variable is missing
Important Functions¶
Not clear from code. This file appears to be a configuration file, and the main functionality is achieved through the creation of LLM instances.
Important Classes¶
Not clear from code. The LLM class is imported from crewai, but its implementation is not shown in this file.
System Fit¶
This file fits into the wider 3-Cubed Python system as a configuration file for initializing and configuring LLMs. It is likely used as a dependency by other components in the system, which rely on the configured LLMs for their functionality. The specific role of this file is to provide a centralized location for managing LLM configurations, making it easier to switch between different models or providers.
wizard/outside_files/Automation.py¶
Purpose¶
This file, Automation.py, is part of the 3-Cubed Python system and is responsible for automating processes using CrewAI and FastAPI. It defines models for categorized automation results and digitization results, as well as tasks for automation and digitization.
Key Responsibilities¶
- Define Pydantic models for categorized automation results and digitization results
- Initialize FastAPI app and CrewAI agents
- Define tasks for automation and digitization
- Use LLM (Large Language Model) for automation and digitization tasks
Important Functions¶
run_process_optimization_crew: Not clear from code. This function is not defined in the provided code snippet.
Important Classes¶
TaskOutputAuto: Represents the output of an automation task, including ID, activity, automation solution, current effort, expected effort reduction, impact on process efficiency, current AHT, and AHT reduction.TaskOutputDig: Represents the output of a digitization task, including ID, activity, current mode, and mode recommendation.CategorizedAutomationResults: Represents the categorized automation results, including Office Automation, Robotics Process Automation, Machine Learning AI, and requires digitization.CategorizedDigitizationResults: Represents the categorized digitization results, including Requires Digitization.
System Fit¶
This file fits into the wider 3-Cubed Python system by providing a framework for automating processes using CrewAI and FastAPI. It defines the models and tasks necessary for automation and digitization, and uses LLM for task completion. The output of these tasks is structured in Pydantic models, making it easy to integrate with other parts of the system.
wizard/outside_files/Automation_test.py¶
Purpose¶
This file, Automation_test.py, contains the implementation of automation and digitization analysis using the CrewAI framework. It defines Pydantic models for API responses, automation and digitization agents, and tasks. The file also initializes a FastAPI app and defines API routes for automation and digitization analysis.
Key Responsibilities¶
- Define Pydantic models for API responses (AutomationAnalysisResults, DigitizationAnalysisResults, ProcessOptimizationResults)
- Initialize FastAPI app and API router
- Define automation and digitization agents using CrewAI framework
- Define tasks for automation and digitization analysis
- Implement API routes for automation and digitization analysis
Important Functions¶
run_automation_crew: Not clear from code. This function is not defined in the provided code snippet.
Important Classes¶
TaskOutputAuto: Represents the output of an automation task, containing information about the task ID, activity, current effort, automation solution, and expected effort reduction.TaskOutputDig: Represents the output of a digitization task, containing information about the task ID, activity, form, current mode, and mode recommendation.AutomationAnalysisResults: Represents the API response for automation analysis, containing a title and a list of automation recommendations.DigitizationAnalysisResults: Represents the API response for digitization analysis, containing a title and a list of digitization recommendations.ProcessOptimizationResults: Represents the API response for process optimization, containing a title, automation recommendations, and digitization recommendations.
System Fit¶
This file fits into the wider 3-Cubed Python system by providing the implementation of automation and digitization analysis using the CrewAI framework. The file defines the necessary models, agents, and tasks for automation and digitization analysis, and provides API routes for these analyses. The output of these analyses can be used to optimize business processes and improve efficiency.
wizard/outside_files/co.py¶
Purpose¶
This file (co.py) is part of the 3-Cubed Python system and provides functionality for process optimization using CrewAI. It includes agents, tasks, and helpers for extracting control IDs and activities.
Key Responsibilities¶
- Define agents and tasks for process optimization
- Provide helpers for extracting control IDs and activities
- Implement a modified Crew execution function for process optimization
Important Functions¶
extract_control_ids_from_nested¶
Extracts control IDs from a nested object.
extract_all_activities¶
Extracts all activities from a nested object.
truncate_list¶
Truncates a list to a maximum number of items.
run_process_optimization_crew¶
Executes a Crew process for process optimization.
extract_control_ids¶
Extracts control IDs from a nested object (helper function).
extract_all_activities¶
Extracts all activities from a nested object (helper function).
Important Classes¶
TaskOutputAuto¶
Represents the output of an automation task.
TaskOutputDig¶
Represents the output of a digitization task.
CategorizedAutomationResults¶
Represents the categorized results of an automation task.
CategorizedDigitizationResults¶
Represents the categorized results of a digitization task.
System Fit¶
This file fits into the wider 3-Cubed Python system by providing functionality for process optimization using CrewAI. It works in conjunction with other files to analyze processes, identify automation opportunities, and execute Crew processes for optimization.
wizard/outside_files/controleffort_test.py¶
Purpose¶
This file, controleffort_test.py, is part of the 3-Cubed Python system and provides functionality for control effort analysis. It utilizes the CrewAI framework to define agents and tasks for identifying over-controls and under-controls, and provides recommendations for optimization and improvement.
Key Responsibilities¶
- Define Pydantic models for control effort analysis results and API responses
- Initialize FastAPI and LLM (Large Language Model)
- Define agents and tasks for over-control and under-control analysis
- Provide recommendations for optimization and improvement
Important Functions¶
run_control_effort_crew¶
Not clear from code.
Important Classes¶
ControlEffortAnalysisResult¶
Represents the result of a control effort analysis, including: * LOD (Lines of Defense) value * Control objective * Risk * Control type * Control activity * Control activity ID * Total effort * Control group activity * Control group activity ID * Effectiveness score * Suggestion for removing, merging, or replacing an over-controlled activity * Recommendation for improving or optimizing the control
ControlEffortAnalysisResults¶
Represents the API response for control effort analysis results, including: * Title of the control effort analysis report * List of control activities analyzed with recommendations
Agent¶
Represents an agent in the CrewAI framework, including: * Name * Role * Goal * Backstory * LLM (Large Language Model) * Verbose mode
Task¶
Represents a task in the CrewAI framework, including: * Description * Expected output * Agent * Output Pydantic model
System Fit¶
This file fits into the wider 3-Cubed Python system by providing functionality for control effort analysis, which is a key aspect of the system's compliance and risk management capabilities. The CrewAI framework is used to define agents and tasks for identifying over-controls and under-controls, and providing recommendations for optimization and improvement. The Pydantic models defined in this file are used to represent the results of the control effort analysis and the API responses.
wizard/outside_files/controls.py¶
Purpose¶
This file, controls.py, is responsible for defining the control effort analysis functionality within the 3-Cubed Python system. It utilizes the CrewAI framework to create a crew that analyzes control activities, identifies excessive or redundant controls, and suggests rationalization and optimization strategies.
Key Responsibilities¶
- Define Pydantic models for control effort analysis results
- Initialize an OpenAI LLM for use in the control effort analysis
- Define two agents: Over-Control Analysis Expert and Under-Control Risk Expert
- Define two tasks: Over-Control Analysis and Under-Control Risk Analysis
- Create a Control Effort Crew that executes the tasks using the agents
- Provide functions for extracting control IDs and all activities from nested objects
Important Functions¶
extract_control_ids(obj): Recursively extracts control IDs from a nested objectextract_all_activities(obj): Recursively extracts all activities from a nested object
Important Classes¶
ControlEffortAnalysisResult: A Pydantic model representing a single control effort analysis resultControlEffortAnalysisResults: A Pydantic model representing a list of control effort analysis resultsOverControlsAgentandUnderControlsAgent: Agents responsible for analyzing control activities and identifying excessive or redundant controlsControlEffortCrew: A crew that executes the control effort analysis tasks using the agents
System Fit¶
This file fits into the wider 3-Cubed Python system by providing the control effort analysis functionality. It is designed to work in conjunction with other components of the system, such as the data module, to provide a comprehensive analysis of control activities and suggest optimization strategies. The control effort crew is a key component of the system, as it executes the control effort analysis tasks and provides the results to the user.
wizard/outside_files/data.py¶
Purpose¶
This file, data.py, contains Pydantic models that represent various data structures used in the 3-Cubed Python system. These models are used to validate and structure data, making it easier to work with and analyze.
Key Responsibilities¶
- Define Pydantic models for different data entities, such as activities, teams, schedules, and project data.
- Implement validation logic for each model using Pydantic's built-in validation features.
- Provide a structured way to represent and work with data in the 3-Cubed system.
Important Functions¶
convert_empty_string_to_default: Converts an empty string to a default integer value (0) in theDLRelatedfield of theActivitymodel.set_in_scope: Sets theIn_Scopefield of theTeammodel toTrueif the team is active and not a system team.calculate_actual_finish: Calculates the actual finish time of an activity based on its start time and AHT (Average Handling Time).calculate_delay_type: Determines the delay type of an activity based on its delay and actor presence.
Important Classes¶
ControlEffectiveness: Represents the effectiveness of a control, with attributes for score, coverage, team segregation, and timeliness.ControlActivity: Represents a control activity, with attributes for control activity ID, control type, control efficacy, and control effort.Risk: Represents a risk, with attributes for risk ID, risk name, and controls.ControlObjective: Represents a control objective, with attributes for objective ID, objective text, risks, and risk activity ID.LOD: Represents a line of defense, with attributes for objective, risk, and LOD value.Form: Represents a form, with attributes for name and mode.BR: Represents a business rule, with attributes for name and skill.Product: Represents a product, with attributes for ID, product name, parent ID, root, root factor, and parent factor.Activity: Represents an activity, with attributes for ID, name, team ID, AHT, type, rework volume, rework effort, volume, effort, and various other fields.Arrow: Represents an arrow, with attributes for predecessor, successor, release, wait type, wait time, and mode.Team: Represents a team, with attributes for actor ID, actor name, working hours, start time, end time, count, is active, is system, and various other fields.SchedData: Represents scheduled data, with attributes for activity ID, unit, activity name, AHT, actor ID, actor name, actor number, actual start, actual finish, peak, critical, delay, and actor present.pActor: Represents a project actor, with attributes for actor team, actor ID, actor tasks, actor begin time, actor end time, actor EOD, actor effort, and actor utilization.Peak: Represents a peak, with attributes for team ID, team name, peak hours, and total effort.ReworkStructure: Represents a rework structure, with attributes for loop, key decision, rework volume, rework effort, and rework cycle time.ProjectData: Represents project data, with attributes for industry name, activities, arrows, teams, controls, reworks, and various other fields.
System Fit¶
This file is part of the 3-Cubed Python system, which is designed to provide a structured way to represent and work with data related to project management, risk management, and control activities. The models defined in this file are used to validate and structure data, making it easier to work with and analyze. The system is designed to be extensible and flexible, allowing users to easily add or modify models as needed.
wizard/outside_files/final_nva.py¶
Purpose¶
This file, final_nva.py, is part of the 3-Cubed Python system and is responsible for executing automation and NVA (Non-Value-Added) crews. It utilizes the CrewAI framework to orchestrate the workflow and FastAPI for API endpoints.
Key Responsibilities¶
- Execute automation crew to process project data
- Run NVA crew after automation crew completes to analyze results
- Store structured output in state for further processing
- Provide API endpoints for running automation and NVA crews
Important Functions¶
execute_automation_crew: Executes the automation crew to process project datarun_nva_crew: Runs the NVA crew after automation crew completes to analyze resultsrun_automation_crew: Runs the automation crew to process project data (part of theAutomationFlowclass)run_nva_optimization_crew: Runs the NVA crew to analyze results (part of theAutomationFlowclass)
Important Classes¶
AutomationFlow: A class that defines the automation workflow, including running the automation crew and NVA crew
System Fit¶
This file fits into the wider 3-Cubed Python system by providing a mechanism for executing automation and NVA crews. It utilizes the CrewAI framework to orchestrate the workflow and FastAPI for API endpoints. The output of this file is stored in the state, which can be used by other parts of the system for further processing.
Notes¶
- The
AutomationFlowclass is defined to encapsulate the automation workflow, including running the automation crew and NVA crew. - The
execute_automation_crewfunction is not explicitly defined in this file, but it is assumed to be a wrapper around therun_automation_crewfunction. - The
run_nva_crewfunction is not explicitly defined in this file, but it is assumed to be a wrapper around therun_nva_optimization_crewfunction. - The
run_automation_crewandrun_nva_crewfunctions are part of theAutomationFlowclass and are responsible for running the automation crew and NVA crew, respectively. - The
run_nva_optimization_crewfunction is assumed to be a separate function that runs the NVA crew to analyze results.
wizard/outside_files/final_rework.py¶
Purpose¶
This file, final_rework.py, defines a workflow for executing a series of automated tasks using the CrewAI framework. The workflow consists of three main steps: running the Automation Crew, the NVA Crew, and the Rework Crew. Each step is designed to build upon the output of the previous step, ultimately producing a structured result.
Key Responsibilities¶
- Define the AutomationFlow class, which inherits from CrewAI's Flow class.
- Implement the
run_automation_crew,run_nva_crew, andrun_rework_crewmethods, which execute the respective crews. - Use the
startandlistendecorators to define the workflow sequence. - Store and retrieve data from the workflow state.
Important Functions¶
run_automation_crew: Executes the Automation Crew, passing input data and storing the output in the workflow state.run_nva_crew: Executes the NVA Crew after the Automation Crew completes, passing input data and storing the output in the workflow state.run_rework_crew: Executes the Rework Crew after the NVA Crew completes, passing input data and storing the output in the workflow state.
Important Classes¶
AutomationFlow: The main class that defines the workflow sequence and executes the crews.
System Fit¶
This file fits into the wider 3-Cubed Python system by providing a workflow for executing automated tasks using the CrewAI framework. The workflow is designed to be modular and extensible, allowing for easy addition of new crews and steps as needed. The file uses the FastAPI framework to define API endpoints for the workflow, making it easy to integrate with other components of the system.
wizard/outside_files/main2.py¶
Purpose¶
This file, main2.py, serves as the entry point for the 3-Cubed Python system, utilizing the FastAPI framework to create a web application. It imports various components, including CrewAI flows, Pydantic models, and routers for different features.
Key Responsibilities¶
- Initialize the FastAPI application
- Configure CORS middleware for cross-origin resource sharing
- Include routers for different features, such as automation, customer experience, and process optimization
- Set up the application's routes and tags
Important Functions¶
Not clear from code. The functions imported from other modules (e.g., run_automation_crew, run_nva_optimization_crew) are not used within this file.
Important Classes¶
Not clear from code. The classes imported from other modules (e.g., Flow, ProjectData) are not used within this file.
System Fit¶
This file fits into the wider 3-Cubed Python system as the entry point for the web application. It imports and configures various components, including CrewAI flows and Pydantic models, and sets up the application's routes and tags. The routers included in this file provide endpoints for different features, such as automation, customer experience, and process optimization.
wizard/outside_files/models.py¶
Purpose¶
This file (models.py) defines a set of Pydantic models that represent various entities in the 3-Cubed Python system, including control effectiveness, control activities, risks, control objectives, lines of defense, forms, business requirements, products, activities, arrows, teams, scheduled data, actors, peaks, rework structures, and project data.
Key Responsibilities¶
- Define Pydantic models for various entities in the system
- Implement validation logic for each model using Pydantic's built-in validation features
- Use Pydantic's
field_validatorandmodel_validatordecorators to define custom validation logic for specific fields and models
Important Functions¶
convert_empty_string_to_default: Converts an empty string to a default integer value (e.g., 0) for theDLRelatedfield in theActivitymodelset_in_scope: Sets theIn_Scopefield in theTeammodel toTrueif the team is active and not a system teamcalculate_actual_finish: Calculates the actual finish time for an activity based on its start time and AHT (Average Handling Time)calculate_delay_type: Calculates the delay type for an activity based on its delay and actor presence
Important Classes¶
ControlEffectiveness: Represents the effectiveness of a control, with fields for score, coverage, team segregation, and timelinessControlActivity: Represents a control activity, with fields for control activity ID, control type, control efficacy, and control effortRisk: Represents a risk, with fields for risk ID, risk name, and controlsControlObjective: Represents a control objective, with fields for objective ID, objective text, risks, and risk activity IDLOD: Represents a line of defense, with fields for objective, risk, and LOD (Line of Defense)Form: Represents a form, with fields for name and modeBR: Represents a business requirement, with fields for name and skillProduct: Represents a product, with fields for ID, product name, parent ID, root, root factor, and parent factorActivity: Represents an activity, with fields for ID, name, team ID, AHT, type, rework volume, rework effort, volume, effort, fresh, peak, forms, BRs, systems, NVA, automation, DL type, deadline, DL related, and productsArrow: Represents an arrow, with fields for predecessor, successor, release, wait type, wait time, and modeTeam: Represents a team, with fields for actor ID, actor name, working hours, start time, end time, count, is active, is system, min FTE, in scope, salary, location code, location name, and currencySchedData: Represents scheduled data, with fields for activity ID, unit, activity name, AHT, actor ID, actor name, actor number, actual start, actual finish, peak, critical, delay, actor present, delay type, fresh, and peakpActor: Represents an actor, with fields for actor team, actor ID, actor tasks, actor begin, actor end, actor EOD, actor effort, and actor utilizationPeak: Represents a peak, with fields for team ID, team name, peak hours, and total effortReworkStructure: Represents a rework structure, with fields for loop, key decision, rework volume, rework effort, and rework cycle timeProjectData: Represents project data, with fields for industry name, activities, arrows, scheduled data, teams, actors, controls, reworks, rework structures, paths, objectives, project controls, lines of defense, peaks, and project controls
System Fit¶
This file is part of the 3-Cubed Python system, which appears to be a project management and risk assessment tool. The models defined in this file are used to represent various entities in the system, including control effectiveness, control activities, risks, control objectives, lines of defense, forms, business requirements, products, activities, arrows, teams, scheduled data, actors, peaks, rework structures, and project data. The validation logic implemented in this file ensures that the data entered into the system is consistent and valid.
wizard/outside_files/nva.py¶
Purpose¶
This file (nva.py) contains the implementation of the Non-Value-Added (NVA) analysis and process validation functionality for the 3-Cubed Python system. It utilizes the CrewAI framework to define agents, tasks, and a crew for identifying and validating activities.
Key Responsibilities¶
- Define Pydantic models for NVA analysis and process validation results
- Create APIRouter for handling NVA analysis and process validation requests
- Define agents for NVA identification and process validation
- Define tasks for NVA identification and process validation
- Create a crew for sequential execution of NVA identification and process validation tasks
- Implement functions for extracting control IDs and all activities from nested objects
Important Functions¶
extract_control_ids_from_nested: Extracts control IDs from a nested objectrun_nva_optimization_crew: Runs the NVA optimization crew for identifying and validating activities
Important Classes¶
NVAAnalysisResult: Represents the result of an NVA analysis, containing information about the activity, team, systems, and classificationProcessValidationResult: Represents the result of a process validation, containing information about the activity and reason for removalNVAAnalysisResults: Represents a list of NVA analysis resultsProcessValidationResults: Represents a list of process validation resultsNVACrewResults: Represents the results of the NVA optimization crew, containing both NVA analysis and process validation results
System Fit¶
This file is part of the 3-Cubed Python system, which utilizes the CrewAI framework to automate business processes. The NVA analysis and process validation functionality is designed to identify and validate activities, providing recommendations for improvement. The results of this analysis are stored in the NVACrewResults class, which can be used to inform business decisions and optimize processes.
wizard/outside_files/Nva_test.py¶
Purpose¶
This file, Nva_test.py, is a Python script that defines a FastAPI application for Non-Value-Added (NVA) analysis and process validation. It utilizes the CrewAI library to create agents and tasks for identifying NVA activities and validating processes.
Key Responsibilities¶
- Initialize a FastAPI application
- Define Pydantic models for NVA analysis and process validation results
- Create agents and tasks for NVA identification and process validation
- Define API responses for NVA analysis and process validation results
Important Functions¶
run_nva_optimization_crew: This function is not explicitly defined in the provided code, but it is likely the main entry point for the NVA analysis and process validation workflow.
Important Classes¶
NVAAnalysisResult: A Pydantic model representing the result of an NVA analysis, containing information about the activity, team, systems, and recommendations.ProcessValidationResult: A Pydantic model representing the result of a process validation, containing information about the activity and reason for removal.NVAAnalysisResults: A Pydantic model representing the API response for NVA analysis, containing a title and a list of NVA analysis results.ProcessValidationResults: A Pydantic model representing the API response for process validation, containing a title and a list of process validation results.NVACrewResults: A Pydantic model representing the API response for NVA crew analysis, containing a title, NVA recommendations, and process validation recommendations.
System Fit¶
This file fits into the wider 3-Cubed Python system by providing a FastAPI application for NVA analysis and process validation. It utilizes the CrewAI library to create agents and tasks for identifying NVA activities and validating processes, and returns API responses in the form of Pydantic models. The system is designed to analyze processes, identify NVA activities, and provide recommendations for improvement.
wizard/outside_files/rejections.py¶
Purpose¶
This file, rejections.py, contains functions and classes for analyzing process rejections in a given industry. It utilizes the CrewAI framework to create tasks, run crews, and extract rejection-prone activities from process paths.
Key Responsibilities¶
- Create rejection tasks for analyzing process rejections
- Run crews to execute rejection analysis tasks
- Extract rejection-prone activities from process paths
- Handle duplicate end activities in process paths
- Parse LLM output to extract rejection information
Important Functions¶
create_rejection_task(industry_name: str, activities: List[dict], paths: List[List[Union[str, int]]]) -> Task: Creates a task for analyzing process rejections in a given industry.run_rejection_analysis_crew(industry_name: str, activities: List[dict], paths: List[List[Union[str, int]]]) -> List[RejectionActivityMinimal]: Runs a crew to execute the rejection analysis task and returns a list of rejection-prone activities.
Important Classes¶
RejectionActivityMinimal: A Pydantic model representing a minimal rejection activity with an activity ID and name.ProjectData: A Pydantic model representing project data, including industry name, activities, and paths.
System Fit¶
This file fits into the wider 3-Cubed Python system by providing functionality for analyzing process rejections in a given industry. It utilizes the CrewAI framework to create tasks, run crews, and extract rejection-prone activities from process paths. The create_rejection_task and run_rejection_analysis_crew functions can be used as part of a larger workflow to analyze process rejections and provide insights for improvement.
wizard/outside_files/rework.py¶
Purpose¶
This file, rework.py, is part of the 3-Cubed Python system and is responsible for analyzing rework loops to extract key insights. It utilizes the CrewAI framework to define an agent, task, and crew for rework analysis.
Key Responsibilities¶
- Analyze rework loops to extract key insights
- Identify decision probabilities and automation feasibility
- Provide a structured rework analysis report considering only 'Decision' activities
- Suggest how to reduce rework for each decision point
Important Functions¶
extract_control_ids_from_nested: Extracts control activity IDs from nested objectsextract_activity_ids: Extracts activity IDs from nested objectsrun_rework_analysis_crew: Runs the rework analysis crew and returns the output
Important Classes¶
ReworkAnalysisResult: A Pydantic model representing a single rework analysis resultReworkAnalysisResults: A Pydantic model representing a list of rework analysis results
System Fit¶
This file fits into the wider 3-Cubed Python system by providing a specific implementation of the CrewAI framework for rework analysis. It defines an agent, task, and crew for analyzing rework loops and extracting key insights. The output of this file is a structured rework analysis report that can be used to suggest how to reduce rework for each decision point.
Notes¶
- The file uses the CrewAI framework to define an agent, task, and crew for rework analysis
- The
run_rework_analysis_crewfunction takes input data and returns a list of rework analysis results - The
ReworkAnalysisResultandReworkAnalysisResultsclasses are used to represent the output of the rework analysis crew - The file uses Pydantic models to define the structure of the output data
wizard/outside_files/Rework_Test.py¶
Purpose¶
This file, Rework_Test.py, defines a FastAPI application that utilizes the CrewAI framework to execute a rework analysis crew. The crew consists of a single agent and task, designed to analyze rework loops and provide insights on decision probabilities, automation feasibility, and effort reduction strategies.
Key Responsibilities¶
- Initialize the FastAPI application
- Define a Pydantic model for rework analysis results
- Define a Pydantic model for API response
- Initialize an LLM (Large Language Model)
- Define a rework agent with required backstory
- Define a rework task with description and expected output
- Define a rework crew with one agent and one task
- Execute the rework crew using the
run_rework_analysis_crewfunction
Important Functions¶
run_rework_analysis_crew(input_data): Executes the rework analysis crew with one agent and one task, taking input data as an argument.
Important Classes¶
ReworkAnalysisResult: A Pydantic model representing a single rework analysis result, containing attributes such as loop ID, cycle time, activity ID, and more.ReworkAnalysisResults: A Pydantic model representing the API response, containing a title and a list of rework analysis results.ReworkAgent: A CrewAI agent responsible for analyzing rework loops and providing insights.ReworkTask: A CrewAI task that defines the rework analysis process and expected output.ReworkCrew: A CrewAI crew that executes the rework analysis task with one agent.
System Fit¶
This file fits into the wider 3-Cubed Python system by utilizing the CrewAI framework to execute a rework analysis crew. The CrewAI framework provides a structured approach to defining agents, tasks, and crews, which are then executed to produce insights and recommendations. The FastAPI application serves as a interface to interact with the rework analysis crew and retrieve results.
wizard/rework_crew/Automation.py¶
Purpose¶
This file, Automation.py, is part of the 3-Cubed Python system and is responsible for automating tasks and processes using AI and ML techniques. It defines simplified Pydantic models for categorized output, initializes a FastAPI app, and creates automation and digitization agents.
Key Responsibilities¶
- Define simplified Pydantic models for categorized output
- Initialize a FastAPI app
- Create automation and digitization agents
- Define tasks for automation and digitization
- Use LLM (Large Language Model) for task analysis and output generation
Important Functions¶
run_process_optimization_crew: Not clear from code. This function is not defined in the provided code snippet.TaskOutputAutoandTaskOutputDigclasses: These classes define the structure of the output for automation and digitization tasks, respectively.CategorizedAutomationResultsandCategorizedDigitizationResultsclasses: These classes define the structure of the output for categorized automation and digitization results, respectively.
Important Classes¶
TaskOutputAuto: Defines the structure of the output for automation tasks.TaskOutputDig: Defines the structure of the output for digitization tasks.CategorizedAutomationResults: Defines the structure of the output for categorized automation results.CategorizedDigitizationResults: Defines the structure of the output for categorized digitization results.Agent: Represents an AI agent with specific roles and goals.Task: Represents a task with a description, expected output, and an associated agent.
System Fit¶
This file fits into the wider 3-Cubed Python system by providing a framework for automating tasks and processes using AI and ML techniques. It integrates with the CrewAI library to create automation and digitization agents, and uses Pydantic models to define the structure of the output for these tasks. The file is designed to be part of a larger system that uses FastAPI to create a web API for interacting with the automation and digitization agents.
wizard/rework_crew/models_nva.py¶
Purpose¶
This file (models_nva.py) contains Pydantic models for representing various entities in the 3-Cubed Python system, including control effectiveness, control activities, risks, control objectives, and project data.
Key Responsibilities¶
- Define Pydantic models for data validation and serialization
- Provide a structured representation of data for the 3-Cubed Python system
- Enable data validation and type checking using Pydantic's built-in features
Important Functions¶
convert_empty_string_to_default: Converts empty strings to default integer values (e.g., 0) in theDLRelatedfield of theActivitymodel.set_in_scope: Sets theIn_Scopefield of theTeammodel toTrueif the team is active and not a system team.calculate_actual_finish: Calculates theActualFinishfield of theSchedDatamodel based on theActualStartandAHTfields.calculate_delay_type: Calculates theDelayTypefield of theSchedDatamodel based on theDelayfield.
Important Classes¶
ControlEffectiveness: Represents the effectiveness of a control, with fields for score, coverage, team segregation, and timeliness.ControlActivity: Represents a control activity, with fields for control activity ID, control type, control efficacy, and control effort.Risk: Represents a risk, with fields for risk ID, risk name, and controls.ControlObjective: Represents a control objective, with fields for objective ID, objective text, risks, and risk activity ID.LOD: Represents a line of defense, with fields for objective, risk, and LOD value.Form: Represents a form, with fields for name and mode.BR: Represents a business requirement, with fields for name and skill.Product: Represents a product, with fields for ID, product name, parent ID, root, root factor, and parent factor.Activity: Represents an activity, with fields for ID, name, team ID, AHT, type, rework volume, rework effort, volume, effort, fresh, peak, forms, BRs, systems, NVA, automation, DL type, deadline, DL related, and products.Arrow: Represents an arrow, with fields for predecessor, successor, release, wait type, wait time, and mode.Team: Represents a team, with fields for actor ID, actor name, working hours, start time, end time, count, is active, is system, min FTE, in scope, salary, location code, location name, and currency.SchedData: Represents scheduled data, with fields for activity ID, unit, activity name, AHT, actor ID, actor name, actor number, actual start, actual finish, peak, critical, delay, actor present, delay type, fresh, and peak.pActor: Represents a project actor, with fields for actor team, actor ID, actor tasks, actor begin, actor end, actor EOD, actor effort, and actor utilization.Peak: Represents a peak, with fields for team ID, team name, peak hours, and total effort.ReworkStructure: Represents a rework structure, with fields for loop, key decision, rework volume, rework effort, and rework cycle time.ProjectData: Represents project data, with fields for industry name, activities, and other project-related data.
System Fit¶
This file is part of the 3-Cubed Python system, which appears to be a project management and risk analysis tool. The models defined in this file provide a structured representation of data for the system, enabling data validation and type checking using Pydantic's built-in features. The models are designed to capture various aspects of project management, including control effectiveness, control activities, risks, control objectives, and project data.
wizard/rework_crew/models_rework.py¶
Purpose¶
This file (models_rework.py) defines a set of Pydantic models for representing data related to project management, control activities, risks, and team performance. These models are used to validate and structure data in the 3-Cubed Python system.
Key Responsibilities¶
- Define Pydantic models for various data entities, including:
- Control activities and their effectiveness
- Risks and their associated controls
- Control objectives and their associated risks
- Lines of defense (LOD) and their associated risks
- Forms and business requirements (BR)
- Products and their attributes
- Activities and their attributes
- Arrows and their relationships
- Teams and their attributes
- Scheduling data and its attributes
- Project data and its attributes
- Implement validation logic for project data using model validators
- Provide default values for certain attributes to ensure data consistency
Important Functions¶
convert_empty_string_to_default: Converts empty strings to default integer values (e.g., 0) for certain attributesset_in_scope: Sets theIn_Scopeattribute toTrueif the team is active and not a system teamcalculate_actual_finish: Calculates the actual finish time for scheduling data based on the actual start time and AHTcalculate_delay_type: Calculates the delay type for scheduling data based on the delay and actor presence
Important Classes¶
ControlEffectiveness: Represents the effectiveness of a control activityControlActivity: Represents a control activity and its associated attributesRisk: Represents a risk and its associated controlsControlObjective: Represents a control objective and its associated risksLOD: Represents a line of defense and its associated riskForm: Represents a form and its associated attributesBR: Represents a business requirement and its associated attributesProduct: Represents a product and its associated attributesActivity: Represents an activity and its associated attributesArrow: Represents an arrow and its associated relationshipsTeam: Represents a team and its associated attributesSchedData: Represents scheduling data and its associated attributespActor: Represents a project actor and its associated attributesPeak: Represents a peak and its associated attributesReworkStructure: Represents a rework structure and its associated attributesProjectData: Represents project data and its associated attributes
System Fit¶
This file is part of the 3-Cubed Python system, which is designed to manage and analyze project data. The models defined in this file are used to structure and validate data, ensuring that it is consistent and accurate. The validation logic implemented in this file helps to prevent errors and inconsistencies in the data, making it easier to analyze and visualize project performance.
wizard/rework_crew/Nva_test.py¶
Purpose¶
This file, Nva_test.py, is part of the 3-Cubed Python system and is responsible for implementing the NVA (Non-Value-Added) analysis and process validation functionality. It utilizes the CrewAI framework to create agents that identify NVA activities and validate processes.
Key Responsibilities¶
- Initialize FastAPI and LLM (Large Language Model) components
- Define NVA and process validation agents using CrewAI
- Create tasks for NVA identification and process validation
- Define Pydantic models for API responses (NVA analysis and process validation results)
Important Functions¶
run_nva_optimization_crew: This function is not explicitly defined in the provided code snippet. However, it is likely the main entry point for the NVA analysis and process validation functionality.
Important Classes¶
NVAAnalysisResult: A Pydantic model representing the result of an NVA analysis, containing information about the activity, team, systems, and classification.ProcessValidationResult: A Pydantic model representing the result of a process validation, containing information about the activity and reason for removal.NVAAnalysisResults: A Pydantic model representing the API response for NVA analysis, containing a title and a list of NVA analysis results.ProcessValidationResults: A Pydantic model representing the API response for process validation, containing a title and a list of process validation results.NVACrewResults: A Pydantic model representing the API response for NVA crew analysis, containing a title, NVA recommendations, and process validation recommendations.
System Fit¶
This file fits into the wider 3-Cubed Python system by providing the necessary functionality for NVA analysis and process validation. It integrates with the CrewAI framework to create agents that can identify NVA activities and validate processes. The Pydantic models defined in this file are used to represent the API responses for NVA analysis and process validation, which can be consumed by other components of the system.
wizard/rework_crew/Rework_Test.py¶
Purpose¶
This file, Rework_Test.py, is part of the 3-Cubed Python system and is responsible for rework analysis using CrewAI. It defines Pydantic models for rework analysis results and API responses, initializes a FastAPI application, and sets up a rework agent and task.
Key Responsibilities¶
- Define Pydantic models for rework analysis results and API responses
- Initialize a FastAPI application
- Set up a rework agent and task using CrewAI
- Perform rework analysis using the rework agent and task
Important Functions¶
run_rework_analysis_crew: Not clear from code, but likely the main function responsible for running the rework analysis using the rework agent and task.
Important Classes¶
ReworkAnalysisResult: A Pydantic model representing a single rework analysis result, containing information such as loop ID, cycle time, activity ID, and more.ReworkAnalysisResults: A Pydantic model representing the API response for rework analysis, containing a title and a list of rework analysis results.
System Fit¶
This file fits into the wider 3-Cubed Python system by providing a rework analysis capability using CrewAI. The rework agent and task are designed to analyze rework loops and provide insights on decision probabilities, automation feasibility, and more. The Pydantic models defined in this file are used to represent the rework analysis results and API responses, ensuring a consistent and structured data format throughout the system.
wizard/wizard_agents/controls.py¶
Purpose¶
This file, controls.py, is part of the 3-Cubed Python system and is responsible for building control objectives for a process. It uses the CrewAI framework to prepare inputs, run agents, and produce specific, actionable control objectives.
Key Responsibilities¶
- Prepare inputs from request data
- Run agents to produce control objectives and controls
- Map existing controls to control objectives
Important Functions¶
prepare_inputs: Prepares inputs from request data, including process type, industry, sub-industry, function, and process data.objectives_agent: Returns an Agent instance for producing control objectives.controls_agent: Returns an Agent instance for identifying existing controls in the process map.mapping_agent: Returns an Agent instance for mapping existing controls to control objectives.predict_objectives_and_controls: Not clear from code, as it is not defined in this file.run_controls: Not clear from code, as it is not defined in this file.run_mapping: Not clear from code, as it is not defined in this file.
Important Classes¶
RiskAssessmentCrew: A CrewBase class that builds control objectives for a process.ActivityRef: A BaseModel representing an activity reference.ObjectiveItem: A BaseModel representing an objective item.RiskObjectivesResult: A BaseModel representing a risk objectives result.ControlActivity: A BaseModel representing a control activity.ControlItem: A BaseModel representing a control item.ControlsListResult: A BaseModel representing a controls list result.MappedControlOut: A BaseModel representing a mapped control output.MappedControlsResult: A BaseModel representing a mapped controls result.CombinedResult: A BaseModel representing a combined result.
System Fit¶
This file fits into the wider 3-Cubed Python system by providing a CrewAI-based solution for building control objectives for a process. It uses the CrewAI framework to prepare inputs, run agents, and produce specific, actionable control objectives. The output of this file can be used as input for other components of the system.
wizard/wizard_agents/controlssplit.py¶
Purpose¶
This file, controlssplit.py, is part of the 3-Cubed Python system and is responsible for building control objectives (ISAE 3402 style) for a process. It prepares inputs from a request, runs a single agent + task, and returns a combined result.
Key Responsibilities¶
- Prepare inputs from a request
- Run a single agent + task
- Return a combined result
Important Functions¶
prepare_inputs: Prepares inputs from a request and returns a dictionary of inputs.objectives_agent: Returns an Agent instance for the Risk Objectives Analyst role.controls_agent: Returns an Agent instance for the Controls Specialist role.predict_objectives_and_controls_split: Not clear from code.run_controls: Not clear from code.run_mapping: Not clear from code.
Important Classes¶
RiskAssessmentCrew: A Crew class that builds control objectives for a process.ActivityRef: A model representing an activity reference.ObjectiveItem: A model representing an objective item.RiskObjectivesResult: A model representing a risk objectives result.ControlActivity: A model representing a control activity.ControlItem: A model representing a control item.ControlsListResult: A model representing a controls list result.MappedControlOut: A model representing a mapped control output.MappedControlsResult: A model representing a mapped controls result.CombinedResult: A model representing a combined result.
System Fit¶
This file fits into the wider 3-Cubed Python system by providing a Crew class that can be used to build control objectives for a process. The Crew class uses Agents and Tasks to perform the necessary computations and returns a combined result. The file is part of the wizard/wizard_agents module and is designed to work with the crewai library.
wizard/wizard_agents/cubedaht.py¶
Purpose¶
This file, cubedaht.py, contains the implementation of an AHT (Average Handling Time) prediction agent using the CrewAI framework. It defines a Crew that estimates the average time required to complete a process in a back-office environment.
Key Responsibilities¶
- Prepare input data for the AHT prediction task
- Define an AHT prediction agent using the CrewAI framework
- Define an AHT prediction task that estimates the average handling time
- Define a Crew that combines the AHT prediction agent and task
Important Functions¶
prepare_inputs: Normalizes the input data for the AHT prediction taskaht_predictor: Defines the AHT prediction agent using the CrewAI frameworkaht_prediction_task: Defines the AHT prediction task that estimates the average handling timeaht_prediction_crew: Defines the Crew that combines the AHT prediction agent and task
Important Classes¶
AHTPredictionRequest: Represents the input data for the AHT prediction taskAHTPredictionResult: Represents the output of the AHT prediction taskAHTPredictionResponse: Represents the response of the AHT prediction CrewAHTPredictionFinalResponse: Represents the final response of the AHT prediction CrewAHTPredictionCrew: Represents the Crew that combines the AHT prediction agent and task
System Fit¶
This file fits into the wider 3-Cubed Python system as part of the CrewAI framework. It defines a specific Crew that can be used to estimate the average handling time for processes in a back-office environment. The Crew can be integrated into the larger system to provide a scalable and efficient way to estimate process times.
Additional Notes¶
- The
aht_prediction_taskfunction has an additional rule that requires the LB and UB values to be within the ML range. - The
aht_prediction_crewfunction defines a Crew that combines the AHT prediction agent and task. - The
prepare_inputsfunction normalizes the input data for the AHT prediction task. - The
aht_predictorfunction defines the AHT prediction agent using the CrewAI framework.
wizard/wizard_agents/cubedcomponent.py¶
Purpose¶
This file, cubedcomponent.py, is part of the 3-Cubed Python system and provides functionality for predicting the cost of business process components. It utilizes CrewAI to create a crew that can estimate realistic monthly component costs based on provided context.
Key Responsibilities¶
- Prepare input data for cost prediction
- Create a crew that can estimate component costs
- Define tasks and agents for cost modeling
Important Functions¶
prepare_inputs: Normalizes input data, extracts modes from forms, and determines complexity from rules.component_cost_predictor: Creates an agent that estimates realistic monthly component costs.component_cost_task: Defines a task for cost modeling (currently commented out).
Important Classes¶
NodeInfo: Represents information about a node, including its ID, name, team, location, type, application, product, forms, rules, and successors.ComponentCostRequest: Represents a request for component cost estimation, including the model name, project ID, instance name, process type, and nodes.ComponentCostResponse: Represents a response to a component cost estimation request, including the ID, name, location, application, and cost.ComponentCostFinalResponse: Represents the final response to a component cost estimation request, including a list of nodes with their estimated costs.ComponentCostPredictionCrew: A crew that uses CrewAI to create a crew for estimating component costs.
System Fit¶
This file fits into the wider 3-Cubed Python system by providing a crew that can estimate realistic monthly component costs for business process components. The crew uses CrewAI to create a crew that can perform cost modeling tasks, and the prepare_inputs function normalizes input data to prepare it for cost prediction. The component_cost_predictor function creates an agent that estimates component costs, and the component_cost_task function defines a task for cost modeling (currently commented out).
wizard/wizard_agents/cubeddeadline.py¶
Purpose¶
This file, cubeddeadline.py, is part of the Wizard Agents in the 3-Cubed Python system. It provides functionality for deadline prediction and expert advice on process design and SLA (Service-Level Agreement) management.
Key Responsibilities¶
- Extract relevant information from input paths and nodes
- Prepare inputs for deadline prediction
- Provide deadline prediction and expert advice
Important Functions¶
extract_sample_paths: Extracts sample paths that include the specified activity.format_paths_with_highlight: Returns a formatted string of paths, highlighting the target activity.get_immediate_predecessor_from_paths: Returns the immediate predecessor of an activity ID.prepare_inputs: Prepares inputs for deadline prediction.
Important Classes¶
NodeInfo: Represents a node with an ID, name, type, team, and successors.DeadlinePredictionRequest: Represents a request for deadline prediction with model name, project ID, instance name, process type, paths, and nodes.DeadlinePredictionResult: Represents the result of deadline prediction with type, duration, and relative to.DeadlineNodeResponse: Represents a node with an ID, name, and deadline.DeadlinePredictionFinalResponse: Represents the final response with nodes.ThreeLineDeadline: Represents a deadline with type, duration, and relative to.DeadlinePredictionCrew: A crew that provides deadline prediction and expert advice.
System Fit¶
This file fits into the wider 3-Cubed Python system as part of the Wizard Agents, which provide expert advice and automation capabilities. The DeadlinePredictionCrew class is a crew that provides deadline prediction and expert advice on process design and SLA management. The file interacts with other components of the system, such as the CrewBase and Agent classes, to provide its functionality.
wizard/wizard_agents/cubeddecisionperct.py¶
Purpose¶
This file, cubeddecisionperct.py, is part of the 3-Cubed Python system and provides functionality for decision percentage analysis in business process modeling. It defines a crew agent that estimates a realistic Forward vs Reverse percentage split for binary decision nodes.
Key Responsibilities¶
- Prepare inputs for decision percentage analysis
- Define a crew agent for decision split analysis
- Define a task for decision percentage estimation
Important Functions¶
prepare_inputs: Prepares inputs for decision percentage analysis by collecting relevant information from the request and building successor options and paths from the decision node.decision_split_analyst: Defines a crew agent for decision split analysis, which estimates a realistic Forward vs Reverse percentage split for binary decision nodes.decision_percentage_task: Defines a task for decision percentage estimation, which uses the decision split analyst agent to estimate the percentage split.
Important Classes¶
DecisionPercentageCrew: A crew agent that provides functionality for decision percentage analysis.DecisionSplit: A model that represents a decision split, with attributes for ID and percentage.DecisionPercentageResult: A model that represents the result of decision percentage estimation, with attributes for Forward and Reverse percentages.
System Fit¶
This file fits into the wider 3-Cubed Python system by providing a crew agent that can be used to estimate decision percentage splits in business process modeling. The crew agent can be integrated with other components of the system to provide a comprehensive solution for business process analysis and optimization.
wizard/wizard_agents/cubedforms.py¶
Purpose¶
This file, cubedforms.py, is part of the Wizard Agents in the 3-Cubed Python system. It contains classes and functions for predicting forms and modes in a process. The FormsPredictionCrew class is responsible for preparing inputs and prompting an agent to pick the most relevant forms and assign the single best mode for each.
Key Responsibilities¶
- Prepare inputs for the forms prediction task
- Prompt an agent to pick the most relevant forms and assign the single best mode for each
- Use the CrewAI library to create a Crew for forms prediction
Important Functions¶
prepare_inputs: Prepares the inputs for the forms prediction task by extracting relevant information from the request and taxonomy data.forms_predictor: Returns an Agent that specializes in enterprise process documentation and digital form architecture.forms_prediction_task: Defines the task for the forms prediction Crew.
Important Classes¶
FormsPredictionCrew: A Crew that prepares inputs and prompts an agent to pick the most relevant forms and assign the single best mode for each.NodeInfo: Not clear from code.FormsPredictionRequest: Not clear from code.FormMode: Not clear from code.FormsPredictionResult: Not clear from code.FormName: Not clear from code.FormsOnlyResult: Not clear from code.FormsPredictionResponse: Not clear from code.FormsPredictionFinalResponse: Not clear from code.FormsPredictionCrew: A Crew that prepares inputs and prompts an agent to pick the most relevant forms and assign the single best mode for each.
System Fit¶
This file fits into the wider 3-Cubed Python system as part of the Wizard Agents. The FormsPredictionCrew class is responsible for preparing inputs and prompting an agent to pick the most relevant forms and assign the single best mode for each. This is a key component of the system, as it enables the prediction of forms and modes in a process. The CrewAI library is used to create a Crew for forms prediction, which is a key feature of the system.
wizard/wizard_agents/cubedformssplit.py¶
Purpose¶
This file (cubedformssplit.py) is part of the Wizard Agents module in the 3-Cubed Python system. It contains the implementation of a Crew AI agent that predicts forms based on input data. The agent uses a database query to retrieve relevant forms and then passes the results to a subsequent task for mode assignment.
Key Responsibilities¶
- Prepare input data for the forms prediction task
- Query the database to retrieve relevant forms based on the input data
- Pass the retrieved forms to the subsequent task for mode assignment
- Handle errors and exceptions during the database query and task execution
Important Functions¶
prepare_inputs: Prepares the input data for the forms prediction task by extracting relevant information from the request and building a dynamic input string for the task.forms_only_crew: Not clear from code. This function is likely related to the forms-only crew, but its implementation is not provided in this file.
Important Classes¶
FormsPredictionCrew: This class represents the Crew AI agent that predicts forms based on input data. It contains theprepare_inputsmethod and is decorated with the@CrewBasedecorator.NodeInfo: A Pydantic model that represents a node in the workflow, containing information such as the node ID, name, team, type, application, product, predecessors, and successors.FormsPredictionRequest: A Pydantic model that represents the input request for the forms prediction task, containing information such as the model name, project ID, instance name, industry, sub-industry, function, and nodes.FormMode: A Pydantic model that represents a form mode, containing information such as the F and M values.FormsPredictionResult: A Pydantic model that represents the result of the forms prediction task, containing a list of form modes.FormName: A Pydantic model that represents a form name, containing the F value.FormsOnlyResult: A Pydantic model that represents the result of the forms-only task, containing a list of form names.FormsPredictionResponse: A Pydantic model that represents the response of the forms prediction task, containing information such as the ID, name, application, product, and forms.FormsPredictionFinalResponse: A Pydantic model that represents the final response of the forms prediction task, containing a list of forms prediction responses.
System Fit¶
This file fits into the wider 3-Cubed Python system as part of the Wizard Agents module. The FormsPredictionCrew class is a Crew AI agent that predicts forms based on input data, which is then used by the subsequent task for mode assignment. The Pydantic models defined in this file are used to represent the input and output data for the forms prediction task.
wizard/wizard_agents/cubednva.py¶
Purpose¶
This file, cubednva.py, is part of the Wizard agents in the 3-Cubed Python system. It defines a Crew AI agent that predicts the type of activity (NVA) in a decision tree node.
Key Responsibilities¶
- Define Pydantic models for NVA prediction requests and responses
- Implement the
NVAPredictionCrewclass, which extends theCrewBasestructure - Define the
prepare_inputsmethod, which normalizes and prepares input data for NVA prediction - Define the
nva_classifierfunction, which is not shown in this code snippet
Important Functions¶
prepare_inputs: Normalizes and prepares input data for NVA prediction- Extracts relevant information from the input request
- Creates a dictionary with normalized data for NVA prediction
nva_classifier: Not shown in this code snippet, but likely performs the actual NVA prediction using machine learning models
Important Classes¶
NVAPredictionCrew: Extends theCrewBasestructure and defines the NVA prediction agent- Uses the
before_kickoffhook to prepare input data for NVA prediction - Uses the
prepare_inputsmethod to normalize and prepare input data
- Uses the
System Fit¶
This file fits into the wider 3-Cubed Python system as part of the Wizard agents. The NVAPredictionCrew class is designed to work with the CrewBase structure and uses the before_kickoff hook to prepare input data for NVA prediction. The prepare_inputs method normalizes and prepares the input data for NVA prediction, which is then used by the nva_classifier function to make predictions.
wizard/wizard_agents/cubedproduct.py¶
Purpose¶
This file, cubedproduct.py, is part of the 3-Cubed Python system and serves as a crew agent for product prediction tasks. It prepares inputs for the crew, predicts products, and returns a final response.
Key Responsibilities¶
- Prepare inputs for the crew based on the provided request
- Predict products using the
product_predictoragent - Return a final response with the predicted product
Important Functions¶
prepare_inputs: Prepares the inputs for the crew based on the provided request- This function parses the process type, industry, sub-industry, and function from the request
- It tries to match the provided process type with the taxonomy data and returns a list of matched products
product_predictor: Predicts the product using theAgentclass- This function returns an
Agentinstance with the role, goal, backstory, LLM, and tools
- This function returns an
product_prediction_task: Defines the task for the product prediction- This function returns a
Taskinstance with the description, expected output, and agent
- This function returns a
app_prediction_crew: Defines the crew for the product prediction- This function returns a
Crewinstance with the planning, agents, tasks, process, and output log file
- This function returns a
Important Classes¶
ProductPredictionCrew: The main class for the product prediction crew- This class defines the
prepare_inputs,product_predictor,product_prediction_task, andapp_prediction_crewfunctions
- This class defines the
NodeInfo: A data model for node information- This class defines the
id,name,team,type,application, andsuccessorsattributes
- This class defines the
ProductPredictionRequest: A data model for product prediction requests- This class defines the
model_name,project_id,instance_name,process_type, andnodesattributes
- This class defines the
ProductPredictionResult: A data model for product prediction results- This class defines the
productattribute
- This class defines the
ProductPredictionResponse: A data model for product prediction responses- This class defines the
id,name,application, andproductattributes
- This class defines the
ProductPredictionFinalResponse: A data model for final product prediction responses- This class defines the
nodesattribute
- This class defines the
System Fit¶
This file fits into the wider 3-Cubed Python system as a crew agent for product prediction tasks. It receives requests, prepares inputs, predicts products, and returns a final response. The ProductPredictionCrew class is the main entry point for this functionality, and it uses other classes and functions to perform the prediction tasks.
wizard/wizard_agents/cubedproductsplit.py¶
Purpose¶
This file, cubedproductsplit.py, is part of the Wizard Agents module in the 3-Cubed Python system. It defines a Crew, ProductPredictionCrew, responsible for predicting products based on input data.
Key Responsibilities¶
- Prepare input data for product prediction
- Use a Crew to predict products from a list of candidates
- Integrate with a database to retrieve product information
Important Functions¶
prepare_inputs¶
This function prepares the input data for product prediction by: * Extracting relevant information from the input request * Querying a database to retrieve product information * Building a list of matched products
product_predictor¶
This function defines an Agent that predicts products based on the input data. It uses a Large Language Model (LLM) to make predictions.
Important Classes¶
ProductPredictionCrew¶
This class defines a Crew that uses the prepare_inputs and product_predictor functions to predict products. It integrates with a database to retrieve product information.
System Fit¶
This file fits into the wider 3-Cubed Python system as part of the Wizard Agents module. It is designed to work with other components in the system to provide a comprehensive product prediction service. The Crew defined in this file can be used as a building block for more complex workflows and applications.
wizard/wizard_agents/cubedrejections.py¶
Purpose¶
This file, cubedrejections.py, is part of the Wizard Agents in the 3-Cubed Python system. It provides functionality to analyze business process flows and determine whether a specific end activity represents a rejection outcome.
Key Responsibilities¶
- Analyze business process flows to identify rejection endpoints
- Determine whether a specific end activity represents a rejection outcome
- Provide a crew-based solution to predict rejection outcomes
Important Functions¶
_paths_to_text_labeled: Not clear from codeprepare_inputs: Prepares inputs for the rejection outcome analysisrejection_outcome_analyst: Returns an Agent instance for process outcome analysisrejection_outcome_task: Returns a Task instance for rejection outcome evaluationrejection_outcome_crew: Returns a Crew instance for rejection outcome analysis
Important Classes¶
BusinessRule: Represents a business rule with a name and valueNodeInfo: Represents a node in the business process flow with an ID, name, type, successors, and business rulesRejectionOutcomeRequest: Represents a request for rejection outcome analysis with model name, project ID, instance name, process type, paths, and nodesRejectionOutcomeFinalResponse: Represents the final response with predicted IDsRejectionOutcomeCrew: Represents a crew for rejection outcome analysis
System Fit¶
This file fits into the wider 3-Cubed Python system by providing a crew-based solution for rejection outcome analysis. It uses the CrewAI framework to define a crew that consists of an Agent for process outcome analysis and a Task for rejection outcome evaluation. The crew is then used to analyze business process flows and predict rejection outcomes. The results are returned as a final response with predicted IDs.
wizard/wizard_agents/cubedrules.py¶
Purpose¶
This file, cubedrules.py, is part of the 3-Cubed Python system and is responsible for implementing a crew-based solution for predicting business rules and assigning skill levels. It utilizes the CrewAI framework to create a crew that can process requests and provide relevant business rules and skill levels.
Key Responsibilities¶
- Prepare inputs for the crew by splitting process types and extracting relevant information from the taxonomy data.
- Create a crew that can predict business rules and assign skill levels based on the provided inputs.
- Define tasks and agents within the crew to perform the prediction and assignment tasks.
- Output the predicted business rules and assigned skill levels in a specific format.
Important Functions¶
prepare_inputs: Prepares the inputs for the crew by splitting process types and extracting relevant information from the taxonomy data.rules_predictor: Defines the agent that will predict business rules and assign skill levels.rules_prediction_task: Defines the task that will be performed by the agent to predict business rules and assign skill levels.
Important Classes¶
RulesPredictionCrew: The main crew class that orchestrates the prediction and assignment tasks.RulesPredictionRequest: A Pydantic model that represents the input request for the crew.RulesPredictionResult: A Pydantic model that represents the output result of the crew.FormMode: A Pydantic model that represents the form mode for a specific field.
System Fit¶
This file fits into the wider 3-Cubed Python system by providing a crew-based solution for predicting business rules and assigning skill levels. It utilizes the CrewAI framework to create a crew that can process requests and provide relevant business rules and skill levels. The crew is designed to work with the taxonomy data and provide output in a specific format.
wizard/wizard_agents/cubedrulessplit.py¶
Purpose¶
This file, cubedrulessplit.py, is part of the Wizard Agents module in the 3-Cubed Python system. It defines a Crew, RulesPredictionCrew, which is responsible for predicting rules and assigning competency levels to crew members.
Key Responsibilities¶
- Prepare inputs for the rules selection and competency assignment tasks
- Select rules based on industry, sub-industry, and function
- Assign competency levels to crew members based on the selected rules
- Return the predicted rules and competency levels as output
Important Functions¶
prepare_inputs: Prepares the inputs for the rules selection and competency assignment tasksrules_selector: Selects rules based on industry, sub-industry, and function (Not clear from code)competency_assigner: Assigns competency levels to crew members based on the selected rules (Not clear from code)rules_selection_task: Performs the rules selection task using therules_only_crewcrewcompetency_assignment_task: Performs the competency assignment task using thecompetency_only_crewcrew
Important Classes¶
RulesPredictionCrew: The main crew class responsible for predicting rules and assigning competency levelsRulesPredictionRequest: A Pydantic model representing the input request for the rules prediction taskRulesPredictionResult: A Pydantic model representing the output result of the rules prediction taskRuleValue: A Pydantic model representing a single rule valueRulesOnlyResult: A Pydantic model representing the output result of the rules selection task
System Fit¶
This file fits into the wider 3-Cubed Python system as part of the Wizard Agents module. It is designed to work with the CrewAI framework and is responsible for predicting rules and assigning competency levels to crew members. The output of this file is used as input for other tasks and crews in the system.
wizard/wizard_agents/cubedsalary.py¶
Purpose¶
This file, cubedsalary.py, is part of the 3-Cubed Python system and provides functionality for salary prediction and component cost estimation. It utilizes the CrewAI framework to create a crew that can process requests and generate outputs.
Key Responsibilities¶
- Process requests for salary prediction and component cost estimation
- Extract relevant information from input data
- Use CrewAI to create a crew that can perform tasks and generate outputs
- Estimate realistic base annual salary and component costs
Important Functions¶
prepare_inputs: Prepares the input data for the crew by extracting relevant information and formatting it for processing.salary_predictor: Creates an Agent that can estimate the base annual salary for a given role and context.salary_prediction_task: Defines the task that the crew will perform to estimate the base annual salary.
Important Classes¶
SalaryPredictionCrew: A Crew that uses the CrewAI framework to process requests and generate outputs.NodeInfo: A Pydantic model that represents information about a node, including its ID, name, team, location, and application.SalaryPredictionRequest: A Pydantic model that represents a request for salary prediction, including the model name, project ID, instance name, process type, and nodes.SalaryPredictionResponse: A Pydantic model that represents the response to a salary prediction request, including the ID, name, team, location, application, product, and salary.
System Fit¶
This file fits into the wider 3-Cubed Python system by providing a crew that can process requests for salary prediction and component cost estimation. The crew uses the CrewAI framework to create agents and tasks that can perform these functions. The outputs from these tasks are then used to generate responses to the original requests.
wizard/wizard_agents/cubedsystems.py¶
Purpose¶
This file, cubedsystems.py, is part of the Wizard Agents module in the 3-Cubed Python system. It defines a Crew, ApplicationPredictionCrew, which predicts the most likely enterprise system used for a specific activity in a business process.
Key Responsibilities¶
- Load the structured systems library from a JSON file.
- Prepare inputs for the Crew by extracting relevant information from the request.
- Define an Agent,
application_predictor, which picks one system from the provided list that best fits the activity and context. - Define a Task,
application_prediction_task, which evaluates the most likely system used for a specific activity. - Define a Crew,
app_prediction_crew, which runs the Agent and Task sequentially.
Important Functions¶
prepare_inputs: Prepares the inputs for the Crew by extracting relevant information from the request.application_predictor: Defines the Agent that picks one system from the provided list that best fits the activity and context.application_prediction_task: Defines the Task that evaluates the most likely system used for a specific activity.app_prediction_crew: Defines the Crew that runs the Agent and Task sequentially.
Important Classes¶
ApplicationPredictionCrew: A Crew that predicts the most likely enterprise system used for a specific activity in a business process.NodeInfo: A Pydantic model that represents a node in the business process.ApplicationPredictionRequest: A Pydantic model that represents the request to predict the application.ApplicationPredictionResult: A Pydantic model that represents the result of the application prediction.ApplicationPredictionResponse: A Pydantic model that represents the response to the application prediction.ApplicationPredictionFinalResponse: A Pydantic model that represents the final response to the application prediction.
System Fit¶
This file fits into the wider 3-Cubed Python system as part of the Wizard Agents module. It provides a Crew that can be used to predict the most likely enterprise system used for a specific activity in a business process. The Crew can be integrated with other modules in the system to provide a comprehensive solution for business process automation.
wizard/wizard_agents/cubedsystemssplit.py¶
Purpose¶
This file, cubedsystemssplit.py, is part of the Wizard agents in the 3-Cubed Python system. It defines a Crew, ApplicationPredictionCrew, which prepares inputs for an application prediction task and uses a Crew AI agent to predict the most suitable systems for a given activity and business context.
Key Responsibilities¶
- Prepare inputs for the application prediction task
- Use a Crew AI agent to predict the most suitable systems
- Handle database connections for system data retrieval
Important Functions¶
prepare_inputs: Prepares the inputs for the application prediction task by retrieving relevant system data from the database.application_predictor: Returns a Crew AI agent that predicts the most suitable systems for a given activity and business context.application_prediction_task: Defines the task for the Crew AI agent to complete.
Important Classes¶
ApplicationPredictionCrew: The main Crew class that orchestrates the application prediction task.NodeInfo: Not clear from code.ApplicationPredictionRequest: Not clear from code.ApplicationPredictionResult: Not clear from code.ApplicationPredictionResponse: Not clear from code.ApplicationPredictionFinalResponse: Not clear from code.
System Fit¶
This file fits into the wider 3-Cubed Python system as part of the Wizard agents. It uses the Crew AI framework to predict the most suitable systems for a given activity and business context, and integrates with the database to retrieve relevant system data. The output of this file is used to inform business decisions and optimize system usage.
wizard/wizard_agents/cubedwaittype.py¶
Purpose¶
This file, cubedwaittype.py, is part of the 3-Cubed Python system and provides functionality for predicting wait types and times in business processes. It utilizes the CrewAI framework to create a crew agent that can analyze process context and coordination constraints to set appropriate wait behavior.
Key Responsibilities¶
- Analyze process context and coordination constraints to set appropriate wait behavior
- Predict wait types (TOD, Post, None) and realistic times for given successors
- Provide a crew agent that can be used in the 3-Cubed system
Important Functions¶
prepare_inputs: Prepares the inputs for the wait type predictor by extracting relevant information from the requestwaittype_predictor: Returns a crew agent that can predict wait types and times
Important Classes¶
WaitTypePredictionCrew: A crew class that provides the wait type prediction functionalityWaitTypeRequest: A pydantic model that represents a request for wait type predictionWaitTypeItem: A pydantic model that represents a wait type itemWaitTypePredictionResult: A pydantic model that represents the result of a wait type predictionWaitTypeNodeResponse: A pydantic model that represents a node response for wait type predictionWaitTypeFinalResponse: A pydantic model that represents the final response for wait type prediction
System Fit¶
This file fits into the wider 3-Cubed Python system by providing a crew agent that can be used to predict wait types and times in business processes. The WaitTypePredictionCrew class can be used in conjunction with other crew agents to create a comprehensive business process scheduling system. The pydantic models provided in this file can be used to represent the data exchanged between the crew agent and other components of the system.
wizard/wizard_agents/database.py¶
Purpose¶
This file, wizard/wizard_agents/database.py, is responsible for establishing a connection to the WizardDB database using the pyodbc library. It provides a single function, get_db_connection_wizard, to retrieve a database connection.
Key Responsibilities¶
- Establish a connection to the WizardDB database
- Handle database connection errors and raise a 500 HTTP exception
Important Functions¶
get_db_connection_wizard¶
This function establishes a connection to the WizardDB database using the provided database credentials. It takes no arguments and returns a pyodbc connection object. If a database connection error occurs, it prints the error message and raises a 500 HTTP exception.
Important Classes¶
None
System Fit¶
This file fits into the wider 3-Cubed Python system as part of the wizard_agents module, which is responsible for interacting with the WizardDB database. The get_db_connection_wizard function can be used by other components of the system to establish a database connection, enabling data access and manipulation.
wizard/wizard_agents/enrichment.py¶
Purpose¶
This file, enrichment.py, is part of the Wizard Agents module in the 3-Cubed Python system. It is responsible for enriching process context data by predicting key systems, products, forms, rules, and components used in the given process context.
Key Responsibilities¶
- Prepare input data for enrichment
- Define and manage agents for predicting key systems, products, forms, rules, and components
- Define and manage tasks for each agent to execute
- Handle output data from each task
Important Functions¶
parse_components_str: Not clear from codeprepare_inputs: Prepares input data for enrichment by extracting industry, sub-industry, and function from the requestsystems_agent,products_agent,forms_agent,rules_agent,components_agent: Define and manage agents for predicting key systems, products, forms, rules, and componentssystems_task,products_task,forms_task,rules_task,components_task: Define and manage tasks for each agent to execute
Important Classes¶
EnrichmentRequest: Represents the input data for enrichment, including model name, project ID, instance name, industry, sub-industry, and functionSystemsResult,ProductsResult,FormsResult,RulesResult,ComponentsResult: Represents the output data from each task, including predicted systems, products, forms, rules, and componentsEnrichmentResponse: Represents the final enriched data, including industry, sub-industry, function, systems, products, forms, and rulesEnrichmentCrew: Represents the crew that manages the enrichment process, including preparing input data, defining and managing agents, and handling output data
System Fit¶
This file fits into the wider 3-Cubed Python system as part of the Wizard Agents module. It is designed to work with the CrewAI framework to enrich process context data by predicting key systems, products, forms, rules, and components. The output from this file can be used as input for other modules in the system to further process and analyze the enriched data.
wizard/wizard_agents/helpers.py¶
Purpose¶
This file, helpers.py, contains a single function get_aht_range that makes an external API call to retrieve the AHT (Average Handling Time) range. The function takes a list of dictionaries as input and returns a list of JSON objects.
Key Responsibilities¶
- Makes an external API call to retrieve the AHT range
- Handles API request and response
Important Functions¶
get_aht_range¶
This function is the primary function in this file. It takes a list of dictionaries as input, makes a POST request to the external API, and returns a list of JSON objects containing the AHT range.
Important Classes¶
None
System Fit¶
This file fits into the wider 3-Cubed Python system as part of the wizard module, which is likely responsible for interacting with external APIs and services. The get_aht_range function is likely used by other components in the system to retrieve the AHT range for decision-making or other purposes.
wizard/wizard_agents/insertdb.py¶
Purpose¶
This file, insertdb.py, is part of the Wizard Agents module in the 3-Cubed Python system. It provides a FastAPI endpoint for inserting enrichment data into a database.
Key Responsibilities¶
- Handles HTTP POST requests to the
/save_enrichment/endpoint - Validates incoming data using Pydantic models
- Inserts data into the database using SQL queries
- Returns a response with the number of inserted records
Important Functions¶
save_enrichment: The main function that handles the HTTP POST request and inserts data into the databaseinsert_list: A helper function that inserts a list of values into a database table
Important Classes¶
EnrichmentUpsertRequest: A Pydantic model that represents the incoming data for the/save_enrichment/endpointEnrichmentUpsertResponse: A Pydantic model that represents the response data returned by the/save_enrichment/endpoint
System Fit¶
This file fits into the wider 3-Cubed Python system as part of the Wizard Agents module, which is responsible for handling enrichment data. The /save_enrichment/ endpoint is a key part of this module, allowing users to insert new enrichment data into the database. The data is validated and inserted using the save_enrichment function, which relies on the insert_list helper function to perform the actual database inserts.
wizard/wizard_agents/savecomponent.py¶
Purpose¶
This file, savecomponent.py, is part of the Wizard Agents module in the 3-Cubed Python system. It provides functionality to save enrichment data to a database, specifically handling components, systems, products, forms, and business rules.
Key Responsibilities¶
- Save enrichment data to a database
- Handle components, systems, products, forms, and business rules
- Perform upsert operations on the database
- Handle database connections and transactions
Important Functions¶
upsert_components¶
This function performs an upsert operation on the mstref_Triples table in the database. It checks if a record already exists, and if not, inserts a new record. If a record exists, it updates the existing record.
save_enrichment_to_db¶
This function is the main entry point for saving enrichment data to the database. It takes in various parameters such as industry, sub-industry, function, instance name, systems, products, forms, rules, and components. It then calls the upsert_components function to save the components and performs insert operations on the mstRef_Systems, mstRef_Products, mstRef_Forms, and mstRef_BusinessRules tables.
Important Classes¶
None
System Fit¶
This file fits into the wider 3-Cubed Python system as part of the Wizard Agents module. It provides a way to save enrichment data to a database, which is a critical component of the system. The data saved in the database can be used for various purposes such as reporting, analytics, and decision-making.
Note: The database schema and table names used in this file are specific to the 3-Cubed Python system and may not be applicable to other systems.
wizard/wizard_agents_old/cubedaht.py¶
Purpose¶
This file, cubedaht.py, is part of the 3-Cubed Python system and provides functionality for predicting Average Handling Time (AHT) in enterprise back-office processes. It utilizes CrewAI, a framework for building and managing AI-powered workflows, and FastAPI for creating a RESTful API.
Key Responsibilities¶
- Provides a CrewAI crew for predicting AHT in enterprise back-office processes
- Defines Pydantic models for AHT prediction requests and responses
- Implements a FastAPI endpoint for submitting AHT prediction requests
- Uses CrewAI to execute the AHT prediction workflow
Important Functions¶
prepare_inputs: Prepares the input data for the AHT prediction workflow by normalizing the forms and rules dataaht_predictor: Returns an Agent instance for estimating AHT in minutes using the provided contextaht_prediction_task: Defines a Task instance for estimating AHT in minutes based on the provided contextaht_prediction_crew: Returns a Crew instance for executing the AHT prediction workflow
Important Classes¶
AHTPredictionRequest: A Pydantic model representing an AHT prediction requestAHTPredictionResult: A Pydantic model representing an AHT prediction resultAHTPredictionResponse: A Pydantic model representing an AHT prediction responseAHTPredictionFinalResponse: A Pydantic model representing the final AHT prediction responseAHTPredictionCrew: A CrewAI crew for predicting AHT in enterprise back-office processes
System Fit¶
This file fits into the wider 3-Cubed Python system by providing a CrewAI crew for predicting AHT in enterprise back-office processes. The crew is designed to work with the existing CrewAI framework and can be integrated with other components of the system to provide a comprehensive solution for process time estimation. The FastAPI endpoint allows for easy integration with other systems and applications, making it a valuable addition to the 3-Cubed Python system.
wizard/wizard_agents_old/cubedcomponent.py¶
Purpose¶
This file, cubedcomponent.py, is part of the 3-Cubed Python system and provides functionality for predicting the cost of business process components. It utilizes the CrewAI framework to create a crew that can estimate realistic monthly component costs based on provided context.
Key Responsibilities¶
- Prepare input data for cost prediction
- Create a crew that can estimate component costs
- Define the component cost prediction task and agent
Important Functions¶
prepare_inputs: Normalizes input data and extracts relevant information for cost predictioncomponent_cost_predictor: Creates an agent that can estimate component costscomponent_cost_task: Defines the task for component cost prediction (currently commented out)
Important Classes¶
NodeInfo: Represents information about a node in the business processComponentCostRequest: Represents a request for component cost predictionComponentCostResponse: Represents the response to a component cost prediction requestComponentCostFinalResponse: Represents the final response to a component cost prediction requestComponentCostPredictionCrew: The crew that performs component cost prediction
System Fit¶
This file fits into the wider 3-Cubed Python system by providing a crew that can estimate component costs based on provided context. The crew uses the CrewAI framework to create an agent that can perform the cost prediction task. The output of this file can be used as input for other components in the system to make informed decisions about business process costs.
wizard/wizard_agents_old/cubeddeadline.py¶
Purpose¶
This file, cubeddeadline.py, is part of the Wizard Agents in the 3-Cubed Python system. It provides functionality for predicting deadlines in a process design context.
Key Responsibilities¶
- Extract sample paths from a list of paths that include a specified activity
- Format paths with highlighting for a target activity
- Determine if a node is a decision-like node
- Get the immediate predecessor of an activity from a list of paths
- Prepare inputs for the deadline prediction process
- Provide a deadline expert agent for process design and SLA expert tasks
Important Functions¶
extract_sample_paths: Extracts sample paths that include the specified activity, limiting the number of returned paths tomax_samples.format_paths_with_highlight: Returns a formatted string of paths, highlighting the target activity.is_decision_like: Determines if a node is a decision-like node based on keywords.get_immediate_predecessor_from_paths: Returns the immediate predecessor of an activity from a list of paths.prepare_inputs: Prepares inputs for the deadline prediction process, including industry, sub-industry, function, process type, activity ID, activity name, activity type, team name, path examples, predecessor ID, predecessor name, and predecessor type.
Important Classes¶
NodeInfo: Represents a node in the process graph, with attributes for ID, name, type, team, and successors.DeadlinePredictionRequest: Represents a request for deadline prediction, with attributes for model name, project ID, instance name, process type, paths, and nodes.DeadlinePredictionResult: Represents the result of deadline prediction, with attributes for type, duration, and relative to.DeadlineNodeResponse: Represents a node response with a deadline, with attributes for ID, name, and deadline.DeadlinePredictionFinalResponse: Represents the final response for deadline prediction, with attributes for nodes.ThreeLineDeadline: Represents a deadline in a concise structured format, with attributes for deadline type, duration, and relative to.DeadlinePredictionCrew: Represents a crew for deadline prediction, with methods for preparing inputs and providing a deadline expert agent.
System Fit¶
This file fits into the wider 3-Cubed Python system as part of the Wizard Agents, which provide functionality for process design and SLA expert tasks. The DeadlinePredictionCrew class is a crew that provides a deadline expert agent for these tasks, using the prepare_inputs method to prepare inputs for the deadline prediction process and the deadline_expert method to provide the deadline expert agent.
wizard/wizard_agents_old/cubeddecisionperct.py¶
Purpose¶
This file, cubeddecisionperct.py, is part of the 3-Cubed Python system and provides functionality for estimating decision percentages in business process modeling. It utilizes the CrewAI framework to create a crew that can analyze decision nodes and estimate realistic Forward vs Reverse percentage splits.
Key Responsibilities¶
- Prepare inputs for decision percentage analysis
- Create a crew that can analyze decision nodes and estimate percentage splits
- Define tasks for decision percentage analysis
Important Functions¶
prepare_inputs: Prepares inputs for decision percentage analysis by extracting relevant information from the request.decision_split_analyst: Creates an agent that can analyze decision nodes and estimate realistic Forward vs Reverse percentage splits.decision_percentage_task: Defines a task for decision percentage analysis that utilizes thedecision_split_analystagent.
Important Classes¶
DecisionPercentageCrew: A crew that provides functionality for decision percentage analysis.DecisionSplit: A model that represents a decision split with an ID and a percentage.DecisionPercentageResult: A model that represents the result of a decision percentage analysis with Forward and Reverse percentages.
System Fit¶
This file fits into the wider 3-Cubed Python system by providing a crew that can analyze decision nodes and estimate percentage splits. The DecisionPercentageCrew class is a key component of this system, and it utilizes the CrewAI framework to create a crew that can perform decision percentage analysis. The decision_split_analyst agent and decision_percentage_task are also important components of this system, as they provide the necessary functionality for decision percentage analysis.
wizard/wizard_agents_old/cubedforms.py¶
Purpose¶
This file, cubedforms.py, is part of the 3-Cubed Python system and contains a Crew implementation for forms prediction. It utilizes the CrewAI library to create a crew that can predict forms and modes for a given business process.
Key Responsibilities¶
- Load taxonomy data from a JSON file
- Prepare inputs for the crew by extracting relevant information from the request
- Create a crew that can predict forms and modes for a given business process
- Define a task that can be executed by the crew to predict forms and modes
Important Functions¶
prepare_inputs: Prepares the inputs for the crew by extracting relevant information from the request.forms_predictor: Returns an Agent instance that can predict forms and modes for a given business process.forms_prediction_task: Defines a task that can be executed by the crew to predict forms and modes for a given business process.
Important Classes¶
FormsPredictionCrew: A Crew implementation that can predict forms and modes for a given business process.NodeInfo: Not clear from code.FormsPredictionRequest: Not clear from code.FormMode: Not clear from code.FormsPredictionResult: Not clear from code.FormsPredictionResponse: Not clear from code.FormsPredictionFinalResponse: Not clear from code.
System Fit¶
This file fits into the wider 3-Cubed Python system by providing a crew implementation for forms prediction. The crew can be used to predict forms and modes for a given business process, which can be useful for enterprise process documentation and digital form architecture. The crew can be integrated with other components of the system to provide a comprehensive solution for business process analysis and optimization.
wizard/wizard_agents_old/cubednva.py¶
Purpose¶
This file, cubednva.py, is part of the Wizard agents in the 3-Cubed Python system. It contains the implementation of a Crew AI agent that predicts the type of activity (NVA) for a given node in a decision tree.
Key Responsibilities¶
- Predict the type of activity (NVA) for a given node in a decision tree
- Prepare inputs for the NVA prediction task
- Define the structure of the Crew AI agent
Important Functions¶
prepare_inputs: Prepares the inputs for the NVA prediction task by normalizing the request data and extracting relevant information.nva_classifier: Not clear from code. This function is not implemented in the provided code snippet.nva_task: Not clear from code. This function is not implemented in the provided code snippet.nva_crew: Not clear from code. This function is not implemented in the provided code snippet.
Important Classes¶
NVAPredictionCrew: The Crew AI agent that predicts the type of activity (NVA) for a given node in a decision tree.NVAPredictionRequest: A Pydantic model that represents the request data for the NVA prediction task.NVAPredictionResult: A Pydantic model that represents the result of the NVA prediction task.NVANodeResponse: A Pydantic model that represents the response for a given node in the decision tree.
System Fit¶
This file fits into the wider 3-Cubed Python system as part of the Wizard agents. The Crew AI agent in this file is responsible for predicting the type of activity (NVA) for a given node in a decision tree, which is a key component of the Wizard agents. The predicted NVA type is then used to inform the decision-making process in the Wizard agents.
wizard/wizard_agents_old/cubedproduct.py¶
Purpose¶
This file, cubedproduct.py, is part of the 3-Cubed Python system and contains a FastAPI application that uses CrewAI to predict products based on a given process type and node information.
Key Responsibilities¶
- Load the taxonomy data from a JSON file
- Define a Crew,
ProductPredictionCrew, that prepares inputs and prompts an agent to pick a product - Define a FastAPI application that accepts a
ProductPredictionRequestand returns aProductPredictionFinalResponse
Important Functions¶
prepare_inputs: Prepares the inputs for the Crew by parsing the process type and matching products from the taxonomy dataproduct_predictor: Returns an Agent that picks a product from the provided listproduct_prediction_task: Defines a Task that prompts the Agent to pick a productapp_prediction_crew: Returns a Crew that runs the Taskproduct_product: The main function that accepts aProductPredictionRequestand returns aProductPredictionFinalResponse
Important Classes¶
ProductPredictionCrew: A Crew that prepares inputs and prompts an Agent to pick a productNodeInfo: A Pydantic model that represents a node with its ID, name, team, type, application, and successorsProductPredictionRequest: A Pydantic model that represents a request with its model name, project ID, instance name, process type, and nodesProductPredictionResult: A Pydantic model that represents a result with its productProductPredictionResponse: A Pydantic model that represents a response with its ID, name, application, and productProductPredictionFinalResponse: A Pydantic model that represents the final response with a list of nodes and their predicted products
System Fit¶
This file fits into the wider 3-Cubed Python system by providing a FastAPI application that uses CrewAI to predict products based on a given process type and node information. The CrewAI system is designed to automate decision-making and process automation, and this file is a key component of that system. The taxonomy data loaded from the JSON file is used to match products with the given process type, and the Agent is prompted to pick a product from the matched list. The predicted products are then returned as a ProductPredictionFinalResponse.
wizard/wizard_agents_old/cubedrejections.py¶
Purpose¶
This file, cubedrejections.py, is part of the 3-Cubed Python system and provides functionality for predicting rejection outcomes in business process flows. It utilizes CrewAI, a framework for building and managing AI-powered workflows.
Key Responsibilities¶
- Predict rejection outcomes for given end activities in business process flows
- Analyze process flows and name semantics to identify rejection endpoints
- Evaluate if a specific end activity represents a rejection outcome (YES/NO)
Important Functions¶
predict_rejection_outcomes: The main endpoint function that takes aRejectionOutcomeRequestobject and returns aRejectionOutcomeFinalResponseobject containing the predicted rejection outcomes.prepare_inputs: Prepares the input data for the rejection outcome analysis.rejection_outcome_analyst: Returns an Agent object responsible for analyzing the rejection outcome.rejection_outcome_task: Returns a Task object that defines the rejection outcome analysis task.rejection_outcome_crew: Returns a Crew object that manages the rejection outcome analysis workflow.
Important Classes¶
RejectionOutcomeRequest: A Pydantic model representing the request data for predicting rejection outcomes.RejectionOutcomeFinalResponse: A Pydantic model representing the response data containing the predicted rejection outcomes.RejectionOutcomeCrew: A CrewAI Crew class that manages the rejection outcome analysis workflow.BusinessRule: A Pydantic model representing a business rule involved in the rejection outcome analysis.NodeInfo: A Pydantic model representing information about a node in the business process flow.
System Fit¶
This file fits into the wider 3-Cubed Python system by providing a specific functionality for predicting rejection outcomes in business process flows. It utilizes CrewAI to manage the workflow and integrates with the FastAPI app to expose the endpoint for predicting rejection outcomes. The file is part of the wizard/wizard_agents_old module, which suggests that it is an older implementation that may be replaced or refactored in the future.
wizard/wizard_agents_old/cubedrules.py¶
Purpose¶
This file, cubedrules.py, is part of the 3-Cubed Python system and is responsible for implementing a Crew AI agent that predicts business rules and assigns skill levels for a given process activity.
Key Responsibilities¶
- Loads the taxonomy data from a JSON file
- Prepares inputs for the Crew AI agent
- Defines a Crew AI agent that predicts business rules and assigns skill levels
- Defines a task for the Crew AI agent to perform
Important Functions¶
prepare_inputs: Prepares the inputs for the Crew AI agent by splitting the process type into components and matching them with the taxonomy data.rules_predictor: Defines the Crew AI agent that predicts business rules and assigns skill levels.rules_prediction_task: Defines the task for the Crew AI agent to perform, which involves selecting up to 5 relevant business rules and assigning a skill level to each.
Important Classes¶
RulesPredictionCrew: A Crew AI agent that predicts business rules and assigns skill levels.NodeInfo: Not used in this file.RulesPredictionRequest: Not used in this file.RuleValue: Not used in this file.RulesPredictionResult: The expected output format for the Crew AI agent.RulesPredictionResponse: Not used in this file.RulesPredictionFinalResponse: Not used in this file.
System Fit¶
This file fits into the wider 3-Cubed Python system by providing a Crew AI agent that can be used to predict business rules and assign skill levels for a given process activity. The agent is designed to work with the taxonomy data loaded from a JSON file and can be used in conjunction with other components of the system to provide a comprehensive solution for business rule prediction and skill level assignment.
wizard/wizard_agents_old/cubedsalary.py¶
Purpose¶
This file, cubedsalary.py, is part of the Wizard agents in the 3-Cubed Python system. It contains the implementation of a crew agent for predicting salaries based on provided inputs.
Key Responsibilities¶
- Prepare inputs for the salary prediction task
- Define the salary prediction task and its expected output
- Create a crew for salary prediction with a sequential process
Important Functions¶
prepare_inputs: Prepares the inputs for the salary prediction task by extracting relevant information from the request.salary_predictor: Defines the agent responsible for estimating the realistic base annual salary for a given role and context.salary_prediction_task: Defines the task that the agent will perform, which involves writing a job description and estimating the salary.salary_prediction_crew: Creates a crew for salary prediction with a sequential process.
Important Classes¶
SalaryPredictionRequest: A Pydantic model representing the request for salary prediction.SalaryPredictionResponse: A Pydantic model representing the response for salary prediction.SalaryPredictionFinalResponse: A Pydantic model representing the final response for salary prediction.SalaryPredictionCrew: A crew class that defines the salary prediction process.
System Fit¶
This file fits into the wider 3-Cubed Python system as part of the Wizard agents. The crew agent for salary prediction is designed to work with other agents and tasks in the system to provide a comprehensive solution for estimating salaries. The file uses the CrewAI library to define the crew and its processes, and the FastAPI library to handle API requests and responses.
wizard/wizard_agents_old/cubedsystems.py¶
Purpose¶
This file, cubedsystems.py, is part of the Wizard agents in the 3-Cubed Python system. It contains the implementation of a CrewAI crew, ApplicationPredictionCrew, which predicts the most likely enterprise system used for a specific activity in a business process.
Key Responsibilities¶
- Prepare inputs for the crew by extracting relevant information from the request.
- Define an agent,
application_predictor, to pick the most likely system from a list of available systems. - Define a task,
application_prediction_task, to evaluate the most likely system used for a specific activity. - Define a crew,
app_prediction_crew, to orchestrate the agent and task.
Important Functions¶
prepare_inputs: Prepares the inputs for the crew by extracting relevant information from the request.application_predictor: Defines an agent to pick the most likely system from a list of available systems.application_prediction_task: Defines a task to evaluate the most likely system used for a specific activity.app_prediction_crew: Defines a crew to orchestrate the agent and task.
Important Classes¶
ApplicationPredictionCrew: A CrewAI crew that predicts the most likely enterprise system used for a specific activity.NodeInfo: A Pydantic model representing a node in the business process.ApplicationPredictionRequest: A Pydantic model representing the request to predict the application.ApplicationPredictionResult: A Pydantic model representing the result of the application prediction.ApplicationPredictionResponse: A Pydantic model representing the response to the application prediction.ApplicationPredictionFinalResponse: A Pydantic model representing the final response to the application prediction.
System Fit¶
This file fits into the wider 3-Cubed Python system by providing a crew that can be used to predict the most likely enterprise system used for a specific activity in a business process. The crew can be used in conjunction with other crews and agents to provide a comprehensive solution for business process automation. The file uses the CrewAI library to define the crew and its components, and the FastAPI library to define the API endpoint for the application prediction.
wizard/wizard_agents_old/cubedwaittype.py¶
Purpose¶
This file, cubedwaittype.py, contains the implementation of a CrewAI agent for predicting wait types in a business process. It uses a combination of natural language processing and machine learning to determine the most appropriate wait type and time for a given successor activity.
Key Responsibilities¶
- Predict wait types (TOD, Post, None) for a successor activity based on process context and coordination constraints
- Determine realistic wait times for the predicted wait type
- Provide a strict JSON output format for the predicted wait type and time
Important Functions¶
prepare_inputs: Prepares the input data for the wait type predictor by extracting relevant information from the requestwaittype_predictor: Returns an Agent instance that uses a Large Language Model (LLM) to predict the wait type and time
Important Classes¶
WaitTypePredictionCrew: A CrewAI crew class that encapsulates the wait type prediction functionalityWaitTypeItem: A Pydantic model that represents a wait type item with ID, Type, and Time attributesWaitTypePredictionResult: A Pydantic model that represents the result of the wait type prediction with a list of wait type items
System Fit¶
This file is part of the 3-Cubed Python system, which is a business process automation platform that uses CrewAI and FastAPI to build and deploy AI-powered agents. The cubedwaittype.py file is designed to work with the wizard/wizard_agents_old module, which provides a set of pre-built agents for common business process tasks. The wait type predictor agent is intended to be used in conjunction with other agents to automate business process workflows.