Everything you need to deploy, configure, and manage SentinelAI.
Get SentinelAI running in under 5 minutes.
# Clone or download SentinelAI
docker-compose up -d
The dashboard will be available at your configured URL. Default port is 8015.
# Windows (PowerShell as Administrator)
cd windows_agent
$env:SENTINEL_API_KEY = "sk_live_your_key_here"
python -m venv venv
.\venv\Scripts\activate
pip install -r requirements.txt
python agent.py --dashboard https://your-dashboard-url
# Linux / macOS (as root)
cd linux_agent
export SENTINEL_API_KEY="sk_live_your_key_here"
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
sudo python3 agent.py --dashboard https://your-dashboard-url
You should see the agent register in the dashboard's Agents panel. Events will start appearing within seconds as the monitors initialize.
The dashboard is a Docker stack consisting of FastAPI, PostgreSQL, and Redis.
| Service | Description | Default Port |
|---|---|---|
web | FastAPI application server | 8015 → 8000 |
db | PostgreSQL 14 database | 5444 → 5432 |
redis | Redis cache and sessions | 6390 → 6379 |
snort-connector | Snort IDS log processor | — |
Copy .env.example to .env and configure:
| Variable | Description | Required |
|---|---|---|
BYGHEART_API_KEY | Bygheart API key for AI analysis | Optional |
VIRUSTOTAL_API_KEY | VirusTotal API key for hash/URL scanning | Optional |
DATABASE_URL | PostgreSQL connection string | Auto-configured |
REDIS_URL | Redis connection string | Auto-configured |
DASHBOARD_PORT | Dashboard port | Default: 8015 |
# Start all services
docker-compose up -d
# View logs
docker-compose logs -f web
# Rebuild after changes
docker-compose up -d --build web
# Stop all services
docker-compose down
The Windows agent provides 25+ concurrent security monitors for comprehensive endpoint protection.
# Open PowerShell as Administrator
cd windows_agent
# Create virtual environment
python -m venv venv
.\venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Set API key
$env:SENTINEL_API_KEY = "sk_live_your_key_here"
# Run the agent
python agent.py --dashboard https://your-dashboard-url
Or use the batch file after setup:
run_agent.bat
| Option | Description | Default |
|---|---|---|
-d, --dashboard | Dashboard URL | http://localhost:8015 |
-v, --verbose | Enable verbose logging | Off |
--no-ai | Disable Bygheart AI escalation | Off |
The Windows agent runs these monitors concurrently:
The agent writes to sentinel_agent.log in the current directory. Use --verbose for detailed output.
The Linux agent provides 16 monitors; macOS provides 10 platform-specific monitors.
| Category | Monitor | Description |
|---|---|---|
| Core | Process | Reverse shells, crypto miners, malicious tools |
| Core | Network | Suspicious connections and ports |
| Core | Auth Log | Failed logins, brute force detection |
| System | Cron Jobs | New/modified cron entries |
| System | SSH Keys | authorized_keys changes |
| System | Systemd | New/modified services |
| System | Packages | Unauthorized installs (dpkg/rpm/pacman) |
| Security | Kernel Modules | Rootkit detection (diamorphine, reptile) |
| Security | LD_PRELOAD | Library injection attacks |
| Security | Setuid | New setuid/setgid binaries |
| Security | File Integrity | Critical file hash monitoring |
| Advanced | Container Escape | Docker socket, cgroup escapes |
| Advanced | Auditd | Audit log parsing |
| Advanced | SELinux | Policy violations |
| Advanced | AppArmor | Policy violations |
In addition to core process/network monitoring, macOS agents include: pf Firewall, Launch Daemons, Keychain Access, Gatekeeper, TCC Privacy, and XProtect integration.
# Linux / macOS
cd linux_agent
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
export SENTINEL_API_KEY="sk_live_your_key_here"
sudo python3 agent.py --dashboard https://your-dashboard-url
The dashboard uses JWT (JSON Web Token) authentication. Users log in with email and password, receiving a token for subsequent API calls.
Agents authenticate using API keys (prefixed with sk_live_). Each key is tied to a user account and determines which agents that user can see.
SENTINEL_API_KEY=sk_live_xxxSentinelAI can automatically respond to threats based on severity without manual intervention.
Configure auto-response from the dashboard's Monitoring section.
SentinelAI uses a three-stage detection pipeline.
The primary detection engine runs entirely on the endpoint:
Fallback for when ML models are unavailable:
For uncertain cases (40-70% ML confidence):
| Metric | Score |
|---|---|
| Accuracy | 96.5% |
| Precision | 99.7% |
| Recall | 89.9% |
| F1 Score | 94.5% |
| False Positive Rate | 0.2% |
The ML model improves over time:
# Activate virtual environment
.\venv\Scripts\activate
# Train with synthetic data
python train_ml.py
# Run tests
python test_ml.py
# Benchmark
python benchmark_ml.py
| Channel | Description |
|---|---|
| Email (SMTP) | SMTP email notifications for HIGH/CRITICAL threats |
| Discord Webhooks | Rich embed alerts to Discord channels |
| Generic Webhooks | POST alerts to any endpoint with HMAC signatures |
Configure notification channels from the dashboard Settings page. Set the minimum severity threshold for each channel to control alert volume.
Check file hashes, URLs, IPs, and domains against VirusTotal's database. Requires a free VirusTotal API key configured in the dashboard settings.
Threat intelligence feed integration for IP and domain reputation lookups.
Integrates with URLhaus, FeodoTracker, ThreatFox, and MalwareBazaar for known malware indicators.
The Docker stack includes a Snort connector that ingests Snort IDS alerts into the SentinelAI pipeline.
Any Docker container can send threat data to SentinelAI:
# From any Docker container
import requests
requests.post("http://host.docker.internal:8015/api/v1/threats/analyze", json={
"source_ip": "192.168.1.100",
"threat_type": "suspicious_activity",
"severity": "HIGH",
"description": "Unusual database query pattern detected"
})
GET /api/v1/health
Returns service health status.
POST /api/v1/auth/login
Content-Type: application/x-www-form-urlencoded
username=user@example.com&password=yourpassword
Returns a JWT token for subsequent authenticated requests.
POST /api/v1/threats/analyze
Content-Type: application/json
X-API-Key: sk_live_xxx
{
"source_ip": "192.168.1.100",
"threat_type": "malware",
"severity": "HIGH",
"description": "Suspicious process detected"
}
GET /api/v1/threats/recent
Authorization: Bearer <jwt_token>
POST /api/v1/windows/agent/register
Content-Type: application/json
X-API-Key: sk_live_xxx
{
"hostname": "DESKTOP-ABC123",
"platform": "Windows",
"platform_version": "10.0.19041",
"capabilities": ["process", "network", "eventlog", "firewall"]
}
GET /api/v1/windows/agent/list
Authorization: Bearer <jwt_token>
GET /api/v1/agents/stats
GET /api/v1/agents/fleet-overview
Authorization: Bearer <jwt_token>
GET /api/v1/ai/stats
Authorization: Bearer <jwt_token>
Send commands to connected agents from the dashboard.
| Command | Description |
|---|---|
block_ip | Block an IP address via OS firewall |
unblock_ip | Remove an IP block |
kill_process | Terminate a process by PID or name |
quarantine_file | Move a file to quarantine |
scan_path | Scan a directory for threats |
get_system_info | Retrieve full system information |
list_connections | List active network connections |
list_processes | List running processes |
POST /api/v1/windows/agent/{hostname}/commands/queue
Authorization: Bearer <jwt_token>
Content-Type: application/json
{
"command": "block_ip",
"args": {"ip": "10.0.0.5"}
}
Agents poll for commands every 30 seconds and execute them locally.
docker-compose up -ddocker-compose logs -f websentinel_agent.logGET /api/v1/healthSENTINEL_API_KEY environment variable is setpython train_ml.py