-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsupervisor.py
More file actions
116 lines (109 loc) · 5.79 KB
/
Copy pathsupervisor.py
File metadata and controls
116 lines (109 loc) · 5.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
from agents.application.application_agent import ApplicationAgent
from agents.application.web_agent import WebAgent
from agents.audio.audio_agent import AudioAgent
from agents.audio.voice_control_agent import VoiceControlAgent
from agents.backup_restore.backup_restore_agent import BackupRestoreAgent
from agents.communication.email_agent import EmailAgent
from agents.communication.notification_agent import NotificationAgent
from agents.data_processing.data_processing_agent import DataProcessingAgent
from agents.database.database_agent import DatabaseAgent
from agents.email_client.email_client_agent import EmailClientAgent
from agents.file_management.file_management_agent import FileManagementAgent
from agents.file_management.document_agent import DocumentAgent
from agents.file_management.backup_agent import BackupAgent
from agents.file_management.clipboard_agent import ClipboardAgent
from agents.file_management.checksum_agent import ChecksumAgent
from agents.file_transfer.file_transfer_agent import FileTransferAgent
from agents.log_management.log_management_agent import LogManagementAgent
from agents.monitoring.system_monitoring_agent import SystemMonitoringAgent
from agents.monitoring.power_management_agent import PowerManagementAgent
from agents.monitoring.system_information_agent import SystemInformationAgent
from agents.monitoring.security_agent import SecurityAgent
from agents.multimedia.graphics_agent import GraphicsAgent
from agents.multimedia.video_agent import VideoAgent
from agents.multimedia.screen_capture_agent import ScreenCaptureAgent
from agents.networking.network_agent import NetworkAgent
from agents.networking.browser_automation_agent import BrowserAutomationAgent
from agents.os_management.operating_system_agent import OperatingSystemAgent
from agents.os_management.update_agent import UpdateAgent
from agents.performance_monitoring.performance_monitoring_agent import PerformanceMonitoringAgent
from agents.scheduler.scheduler_agent import SchedulerAgent
from agents.scheduler.automation_agent import AutomationAgent
from agents.ai.ai_model_training_agent import AIModelTrainingAgent
from agents.ai.natural_language_agent import NaturalLanguageAgent
from agents.ai.tensor_core_agent import TensorCoreAgent
from agents.utility.input_agent import InputAgent
from agents.utility.priority_agent import PriorityAgent
from agents.utility.math_agent import MathAgent
from agents.utility.speech_synthesis_agent import SpeechSynthesisAgent
from agents.virtual_assistant.virtual_assistant_agent import VirtualAssistantAgent
from agents.web_scraping.web_scraping_agent import WebScrapingAgent
from agents.ui.ui_agent import UIAgent
from agents.testing.testing_agent import TestingAgent
class Supervisor:
def __init__(self):
self.agents = []
self.register_agents()
def register_agents(self):
available_agents = {
"InputAgent": InputAgent,
"PriorityAgent": PriorityAgent,
"AudioAgent": AudioAgent,
"ApplicationAgent": ApplicationAgent,
"OperatingSystemAgent": OperatingSystemAgent,
"TensorCoreAgent": TensorCoreAgent,
"GraphicsAgent": GraphicsAgent,
"NaturalLanguageAgent": NaturalLanguageAgent,
"EmailAgent": EmailAgent,
"ChecksumAgent": ChecksumAgent,
"DocumentAgent": DocumentAgent,
"NotificationAgent": NotificationAgent,
"BrowsingAgent": BrowserAutomationAgent,
"MathAgent": MathAgent,
"VideoAgent": VideoAgent,
"WebAgent": WebAgent,
"ScreenCaptureAgent": ScreenCaptureAgent,
"DatabaseAgent": DatabaseAgent,
"NetworkAgent": NetworkAgent,
"SystemMonitoringAgent": SystemMonitoringAgent,
"SecurityAgent": SecurityAgent,
"UpdateAgent": UpdateAgent,
"BackupAgent": BackupAgent,
"SchedulerAgent": SchedulerAgent,
"AIModelTrainingAgent": AIModelTrainingAgent,
"FileManagementAgent": FileManagementAgent,
"VoiceControlAgent": VoiceControlAgent,
"ClipboardAgent": ClipboardAgent,
"PowerManagementAgent": PowerManagementAgent,
"SystemInformationAgent": SystemInformationAgent,
"BrowserAutomationAgent": BrowserAutomationAgent,
"SpeechSynthesisAgent": SpeechSynthesisAgent,
"BackupRestoreAgent": BackupRestoreAgent,
"DataProcessingAgent": DataProcessingAgent,
"EmailClientAgent": EmailClientAgent,
"FileTransferAgent": FileTransferAgent,
"LogManagementAgent": LogManagementAgent,
"PerformanceMonitoringAgent": PerformanceMonitoringAgent,
"VirtualAssistantAgent": VirtualAssistantAgent,
"WebScrapingAgent": WebScrapingAgent,
"UIAgent": UIAgent,
"TestingAgent": TestingAgent
}
print("Select agents to use (comma separated):")
for agent_name in available_agents:
print(agent_name)
selected_agents = input("Enter selected agents: ").split(',')
for agent_name in selected_agents:
agent_name = agent_name.strip()
if agent_name in available_agents:
self.agents.append(available_agents[agent_name](agent_name, self))
else:
print(f"Agent {agent_name} not found")
def add_subordinate(self, agent):
self.agents.append(agent)
def delegate_task(self, user_command):
for agent in self.agents:
response = agent.execute_task(user_command)
if "Unknown command" not in response:
return response
return f"No agent could handle the command: {user_command}"