Contents

Quick Start

Get SentinelAI running in under 5 minutes.

1. Start the Dashboard

# Clone or download SentinelAI
docker-compose up -d

The dashboard will be available at your configured URL. Default port is 8015.

2. Create an API Key

  1. Open the dashboard and log in
  2. Go to Settings (gear icon) → API Keys tab
  3. Click Create to generate a new API key
  4. Copy the key immediately — it won't be shown again

3. Run an Agent

# 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

4. Verify

You should see the agent register in the dashboard's Agents panel. Events will start appearing within seconds as the monitors initialize.

Dashboard Setup

The dashboard is a Docker stack consisting of FastAPI, PostgreSQL, and Redis.

Docker Compose Services

ServiceDescriptionDefault Port
webFastAPI application server8015 → 8000
dbPostgreSQL 14 database5444 → 5432
redisRedis cache and sessions6390 → 6379
snort-connectorSnort IDS log processor

Environment Configuration

Copy .env.example to .env and configure:

VariableDescriptionRequired
BYGHEART_API_KEYBygheart API key for AI analysisOptional
VIRUSTOTAL_API_KEYVirusTotal API key for hash/URL scanningOptional
DATABASE_URLPostgreSQL connection stringAuto-configured
REDIS_URLRedis connection stringAuto-configured
DASHBOARD_PORTDashboard portDefault: 8015

Common Docker Commands

# 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

Windows Agent

The Windows agent provides 25+ concurrent security monitors for comprehensive endpoint protection.

Requirements

Installation

# 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

Command Line Options

OptionDescriptionDefault
-d, --dashboardDashboard URLhttp://localhost:8015
-v, --verboseEnable verbose loggingOff
--no-aiDisable Bygheart AI escalationOff

What It Monitors

The Windows agent runs these monitors concurrently:

Agent Logs

The agent writes to sentinel_agent.log in the current directory. Use --verbose for detailed output.

Linux & macOS Agent

The Linux agent provides 16 monitors; macOS provides 10 platform-specific monitors.

Linux Monitors

CategoryMonitorDescription
CoreProcessReverse shells, crypto miners, malicious tools
CoreNetworkSuspicious connections and ports
CoreAuth LogFailed logins, brute force detection
SystemCron JobsNew/modified cron entries
SystemSSH Keysauthorized_keys changes
SystemSystemdNew/modified services
SystemPackagesUnauthorized installs (dpkg/rpm/pacman)
SecurityKernel ModulesRootkit detection (diamorphine, reptile)
SecurityLD_PRELOADLibrary injection attacks
SecuritySetuidNew setuid/setgid binaries
SecurityFile IntegrityCritical file hash monitoring
AdvancedContainer EscapeDocker socket, cgroup escapes
AdvancedAuditdAudit log parsing
AdvancedSELinuxPolicy violations
AdvancedAppArmorPolicy violations

macOS-Specific Monitors

In addition to core process/network monitoring, macOS agents include: pf Firewall, Launch Daemons, Keychain Access, Gatekeeper, TCC Privacy, and XProtect integration.

Installation

# 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
Running as root/sudo is recommended for full capabilities including firewall control, auth log access, and kernel module monitoring.

API Keys & Authentication

User Authentication

The dashboard uses JWT (JSON Web Token) authentication. Users log in with email and password, receiving a token for subsequent API calls.

Agent API Keys

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.

Creating API Keys

  1. Log in to the dashboard
  2. Go to SettingsAPI Keys
  3. Click Create
  4. Copy the key immediately (shown only once)
  5. Set as environment variable: SENTINEL_API_KEY=sk_live_xxx
Never share API keys or commit them to version control. Rotate keys immediately if compromised.

Auto-Response

SentinelAI can automatically respond to threats based on severity without manual intervention.

Capabilities

Configuration

Configure auto-response from the dashboard's Monitoring section.

ML Detection Engine

SentinelAI uses a three-stage detection pipeline.

Stage 1: Advanced ML v2.0 (Local)

The primary detection engine runs entirely on the endpoint:

Stage 2: Legacy Heuristics

Fallback for when ML models are unavailable:

Stage 3: Bygheart AI Escalation (Optional)

For uncertain cases (40-70% ML confidence):

Benchmark Results

MetricScore
Accuracy96.5%
Precision99.7%
Recall89.9%
F1 Score94.5%
False Positive Rate0.2%

Autonomous Learning

The ML model improves over time:

Retraining

# 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

Notifications & Alerts

Supported Channels

ChannelDescription
Email (SMTP)SMTP email notifications for HIGH/CRITICAL threats
Discord WebhooksRich embed alerts to Discord channels
Generic WebhooksPOST alerts to any endpoint with HMAC signatures

Configuration

Configure notification channels from the dashboard Settings page. Set the minimum severity threshold for each channel to control alert volume.

Integrations

VirusTotal

Check file hashes, URLs, IPs, and domains against VirusTotal's database. Requires a free VirusTotal API key configured in the dashboard settings.

AlienVault OTX

Threat intelligence feed integration for IP and domain reputation lookups.

Abuse.ch Feeds

Integrates with URLhaus, FeodoTracker, ThreatFox, and MalwareBazaar for known malware indicators.

Snort IDS

The Docker stack includes a Snort connector that ingests Snort IDS alerts into the SentinelAI pipeline.

Docker Projects

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"
})

API Reference

Health Check

GET /api/v1/health

Returns service health status.

Authentication

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.

Threat Analysis

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"
}

Recent Threats

GET /api/v1/threats/recent
Authorization: Bearer <jwt_token>

Agent Registration

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"]
}

List Connected Agents

GET /api/v1/windows/agent/list
Authorization: Bearer <jwt_token>

Agent Stats

GET /api/v1/agents/stats
GET /api/v1/agents/fleet-overview
Authorization: Bearer <jwt_token>

AI Analysis Stats

GET /api/v1/ai/stats
Authorization: Bearer <jwt_token>

Remote Commands

Send commands to connected agents from the dashboard.

Available Commands

CommandDescription
block_ipBlock an IP address via OS firewall
unblock_ipRemove an IP block
kill_processTerminate a process by PID or name
quarantine_fileMove a file to quarantine
scan_pathScan a directory for threats
get_system_infoRetrieve full system information
list_connectionsList active network connections
list_processesList running processes

Sending Commands via API

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.

Troubleshooting

"Dashboard not reachable"

"Access Denied" errors on agent

No events appearing in dashboard

Agent not registering

High false positive rate