What Is AiSOC? Building a Self-Hosted, Open-Source AI Security Operations Center

What Is AiSOC? Building a Self-Hosted, Open-Source AI Security Operations Center

The Operational Friction of Alert Fatigue in Modern SOCs

Security Operations Centers (SOCs) in enterprise environments process millions of telemetry events daily across SIEMs, EDRs, cloud audit logs, and network firewalls. This massive influx of data creates critical operational challenges:

  • Overwhelming Alert Fatigue: Security analysts spend up to 80% of their time evaluating false positives, causing critical high-severity alerts to be missed in the noise.
  • Slow Investigation Cycles: Correlating isolated alerts, retrieving threat intelligence context, and mapping adversary behavior manually to the MITRE ATT&CK framework takes hours per incident.
  • Data Sovereignty and Compliance Liabilities: Transmitting raw security logs, identity tokens, and internal network topologies to proprietary SaaS AI vendors violates strict data residency frameworks like GDPR, HIPAA, and PCI-DSS.
  • Lack of Auditability in AI Reasoning: Proprietary "black-box" AI triage tools offer little visibility into how verdicts are reached, creating compliance gaps during incident audits.

AiSOC resolves these liabilities by providing an open-source, self-hostable AI Security Operations Center that combines deterministic noise-reduction rules with transparent, agent-assisted investigation workflows.

What Is AiSOC?

AiSOC is an open-source, MIT-licensed AI Security Operations Center platform. Created and maintained by the AiSOC community, it provides a single, self-hostable software stack that ingests security telemetry, correlates related events into unified incident cases, performs AI-assisted investigations, and presents actionable verdicts in a dedicated SOC dashboard.

By deploying AiSOC on private cloud or on-premise infrastructure, organizations retain 100% control over their security data. Furthermore, every prompt, tool execution, and reasoning step taken by the AI agent is recorded step-by-step in an auditable Investigation Ledger.

Key capabilities of the platform include:

  • Deterministic Triage Engine: A lightweight execution engine (aisoc-lite) that filters out routine false positives prior to invoking LLM reasoning, saving up to 85% in inference token costs.
  • MITRE ATT&CK Automated Investigation: Agents dynamically trigger investigation tools to trace adversary tactics, techniques, and procedures (TTPs).
  • Auditable Investigation Ledger: Every agent action, API query, and rationale trace is saved chronologically for post-incident review and purple-team drills.
  • Extensible Connector Architecture: Native plugins for cloud logs, endpoint detectors, identity providers, and network gateways.

Core Concepts and Architecture

AiSOC operates on a multi-tiered architecture consisting of ingestion streaming, deterministic scoring, agentic reasoning, and state persistence:

  1. Ingestion Layer (Apache Kafka / Redis): Streams high-velocity security events from connectors and webhooks into unified processing queues.
  2. Deterministic Triage Scorer: Evaluates raw alerts against configurable baseline rules. High-confidence noise is suppressed instantly without invoking expensive LLM calls.
  3. Agentic Investigation Engine (Python / FastAPI): Handles complex cases requiring deep reasoning. The engine executes specialized tools (such as IP reputation checks, payload decoding, or user behavior lookups) and records every decision inside the Investigation Ledger.
  4. Persistence & Credential Vault (PostgreSQL / KMS): Stores case histories, tenant data, and encrypted integration secrets using envelope encryption.

Implementation Patterns and Code Demos

1. Deterministic Alert Scoring Engine

To prevent LLM budget inflation, AiSOC filters incoming telemetry through a deterministic scoring rule set before handing complex cases over to AI agents.

The following Python snippet illustrates how the triage engine categorizes incoming alerts:

# aisoc_triage_engine.py - Deterministic Alert Scoring Module
from typing import Dict, Any, List

class DeterministicTriageEngine:
    def __init__(self, suppression_rules: List[Dict[str, Any]]):
        self.suppression_rules = suppression_rules

    def evaluate_alert(self, alert: Dict[str, Any]) -> Dict[str, Any]:
        """Evaluate raw security alerts to filter noise before LLM execution."""
        event_type = alert.get("event_type")
        source_ip = alert.get("source_ip")
        severity = alert.get("severity", "LOW")

        # Match against deterministic suppression rules
        for rule in self.suppression_rules:
            if rule.get("event_type") == event_type and rule.get("ip") == source_ip:
                return {
                    "alert_id": alert.get("id"),
                    "verdict": "SUPPRESS",
                    "reason": f"Matched deterministic rule: {rule['rule_id']}",
                    "requires_llm": False
                }

        # Pass high/critical severity alerts to the AI agent pipeline
        if severity in ["HIGH", "CRITICAL"]:
            return {
                "alert_id": alert.get("id"),
                "verdict": "ESCALATE_TO_AGENT",
                "reason": "Severity threshold requires deep investigation",
                "requires_llm": True
            }

        return {
            "alert_id": alert.get("id"),
            "verdict": "REVIEW",
            "reason": "Queued for standard analyst review",
            "requires_llm": False
        }

2. Deploying the Complete Stack via Docker Compose

To deploy a self-hosted AiSOC stack with PostgreSQL, Redis, Kafka, API services, and the web console, use the following docker-compose.yml configuration:

version: '3.8'

services:
  postgres:
    image: postgres:16-alpine
    container_name: aisoc_postgres
    restart: always
    environment:
      POSTGRES_DB: aisoc_db
      POSTGRES_USER: aisoc
      POSTGRES_PASSWORD: SecureDatabasePassword123!
    volumes:
      - postgres_data:/var/lib/postgresql/data

  redis:
    image: redis:7-alpine
    container_name: aisoc_redis
    restart: always

  kafka:
    image: confluentinc/cp-kafka:7.5.0
    container_name: aisoc_kafka
    restart: always
    environment:
      KAFKA_NODE_ID: 1
      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: 'CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT'
      KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092'
      KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1

  api:
    image: aisoc/api:latest
    container_name: aisoc_api
    restart: always
    ports:
      - "8000:8000"
    environment:
      DATABASE_URL: postgresql://aisoc:SecureDatabasePassword123!@postgres:5432/aisoc_db
      REDIS_URL: redis://redis:6379/0
      KAFKA_BOOTSTRAP_SERVERS: kafka:29092
    depends_on:
      - postgres
      - redis
      - kafka

volumes:
  postgres_data:

Architectural Comparison

DimensionAiSOC (Open Source)Proprietary AI SOC SaaSTraditional SIEM / SOAR
LicensingOpen-source (MIT)Per-ingestion / Per-seat feeHigh per-GB or per-agent cost
Data Sovereignty100% On-premise / Private CloudExternal cloud vendor processingDepends on deployment model
Triage SpeedInstant deterministic + Async AIAsynchronous cloud processingManual playbook execution
AuditabilityReplayable step-by-step LedgerBlack-box verdictsManual audit logs
ExtensibilityOpen plugin architectureVendor-locked API bridgesCustom Python/REST playbooks

SecOps and Production Hardening Best Practices

  • Sanitize Agent Prompts: Wrap untrusted alert context inside strict boundary blocks to prevent prompt injection attacks from malicious payloads designed to trigger auto-close verdicts.
  • Implement Least-Privilege Connector Scopes: Ensure connector credentials (such as AWS IAM roles or EDR API tokens) possess read-only investigative scopes rather than administrative write permissions.
  • Use KMS Envelope Encryption: Protect integration API keys stored in the credential vault using AWS KMS, HashiCorp Vault, or local HSM key-rotation policies.
  • Offload Deterministic Filtering First: Maximize noise reduction by tuning baseline suppression rules prior to enabling automated AI agent investigation loops.

Getting Started

To test AiSOC in your environment within minutes:

# Option 1: Run deterministic triage evaluation CLI (No API key required)
npx aisoc triage --demo

# Option 2: Run in-memory simulation sandbox via Python
pip install -e packages/aisoc-sandbox
aisoc-sandbox demo

# Option 3: Launch full local stack via Docker Compose
git clone https://github.com/beenuar/AiSOC && cd AiSOC
pnpm aisoc:demo

By self-hosting AiSOC, engineering teams eliminate vendor lock-in, maintain absolute data sovereignty, and automate security investigation workflows without sacrificing operational transparency.

Share: