Multi-Agent Orchestrator System (MOS) is a real-time, multi-agent monitoring and management system that supports multiple platforms. MOS enables device monitoring (Desktop, Mobile, IoT) from a central server via a web dashboard. Sistem ini terdiri dari:
- Agent → An application running on a target device (Windows, Linux, macOS, Android, iOS, IoT).
- Server → Manages agent connections, stores history, and provides a dashboard for monitoring and management.
- Sends system monitoring data
- CPU load
- Memory (total & used)
- Disk usage
- Uptime
- Network performance (ping, estimated bandwidth)
- Sends open application activity (Desktop/GUI only)
- Receives commands from the server and sends the output of the execution results
- Automatic reconnection if the WebSocket connection is lost
- Supports multiple platforms: Desktop, Mobile, IoT
- Stores agent data and monitoring history
- Real-time web dashboard displays:
- Agent status (online/offline)
- Agent system statistics
- Application activity
- Executed command output
- Sends commands to specific or all agents
- Validates commands for security
- Stores agent history in
database/<DeviceID>/
MOS/
│
├─ agent/
│ ├─ services/
│ │ ├─ activity.js
│ │ ├─ commands.js
│ │ ├─ connection.js
│ │ └─ monitor.js
│ ├─ app.js
│ └─ package.json
│
├─ server/
│ ├─ controllers/
│ │ ├─ auth.js
│ │ └─ dashboard.js
│ ├─ database/
│ │ ├─ <DeviceID>/
│ │ ├─ blacklist_cmd.json
│ │ ├─ agents.json
│ │ └─ users.json
│ ├─ public/
│ ├─ routes/
│ │ └─ web.js
│ ├─ services/
│ │ ├─ activity.js
│ │ ├─ commands.js
│ │ ├─ monitor.js
│ │ ├─ scheduler.js
│ │ └─ websocket.js
│ ├─ views/
│ │ ├─ components/
│ │ ├─ dashboard.ejs
│ │ └─ login.ejs
│ ├─ app.js
│ └─ package.json
│
└─ README.md
- WebSocket endpoint for agent:
/ws/agent - WebSocket endpoint for dashboard:
/ws/dashboard - Web dashboard for agent monitoring and management
- Connect to the server via WebSocket
- Send statistics and activity data
- Receive commands from the server
- Agent status (online/offline)
- Real-time statistics (CPU, memory, disk, network)
- Application activity (Desktop)
- Executed command output
- Monitoring history
When an agent first connects, it sends a message of type register:
{
"type": "register",
"agentId": "DEVICE_HOSTNAME",
"platform": "windows/linux/android/ios/iot"
}The server saves the agent to agents.json and marks it as online.
The agent sends messages of type monitor every interval (default 5 seconds):
{
"type": "monitor",
"agentId": "DEVICE_HOSTNAME",
"stats": {
"hostname": "DEVICE_HOSTNAME",
"platform": "windows",
"cpuLoad": 12.5,
"totalMem": 8589934592,
"usedMem": 4294967296,
"uptime": "2h 30m 15s",
"disks": [
{"drive":"C:","free":10000000000,"size":50000000000,"used":40000000000}
],
"netPerformance": {"ping":12,"download":54.3,"upload":12.1}
}
}Agent sends message of type activity (Desktop/GUI):
{
"type": "activity",
"agentId": "DEVICE_HOSTNAME",
"timestamp": "2025-09-10T08:00:00Z",
"openApplications": [
{"process":"chrome.exe","title":"Multi-Agent Dashboard"}
]
}The dashboard sends commands via the server to the agent:
{
"type": "command",
"command": "ls -la"
}The agent executes the command and sends the result:
{
"type": "output",
"agentId": "DEVICE_HOSTNAME",
"command": "ls -la",
"output": "total 12\n-rw-r--r-- 1 user file1\n..."
}The server can request the agent to send activity data with the message type:
{ "type": "get_activity" }If the WebSocket connection is lost, the agent tries to reconnect every 3 seconds until successful.
+--------+ WebSocket +--------+ WebSocket +-----------+
| Agent | -----------------> | Server | <----------------- | Dashboard |
| | <----------------- | | -----------------> | |
+--------+ +--------+ +-----------+
- Agent → Server:
register,monitor,activity,output - Server → Dashboard: Monitoring data, history, output
- Dashboard → Server → Agent: Execute command (
command)
cd server
npm install
node app.jscd agent
npm install
node app.jsMake sure the
SERVER_URLinagent/app.jsmatches the server address
- Server URL agent:
// agent/app.js
const SERVER_URL = 'ws://<IP_SERVER>:8000/ws/agent';
// server/public/assets/js/dashboard.js
const ws = new WebSocket("ws://<IP_SERVER>:8000/ws/dashboard");- The monitoring interval can be changed in
agent/services/connection.jsandserver/services/websocket.js - The database path is in
server/database/ - It is recommended to use TLS for WebSocket (
wss://) for security.
Username: admin
Password: admin
MIT License
