Building an Enterprise SOC Operations Center with AgentiX Cyber
- Felix La Spina
- Feb 10
- 8 min read
Updated: 20 hours ago
CISO Case Study
Building an Enterprise SOC Operations Center with AgentiX Cyber
A practical guide for CISOs deploying an AI-powered Security Operations Center — from conversational threat analysis and automated incident investigation to role-based governance across a unified command surface.
16
Dashboard Elements
15
Data Pipelines
5
MCP Integrations
5
SOC Tiers
agentix-cyber — soc-operations-dashboard

SOC Operations Dashboard — 16 AI-driven elements connected by 15 automated data pipelines, generating real-time security intelligence
The Challenge: Why SOCs Are Struggling
Enterprise Security Operations Centers face a compounding set of operational challenges that traditional tooling cannot address. The average SOC analyst manages alerts across 6–8 disconnected security platforms, context-switching dozens of times per shift. The result: slow response times, missed correlations, and analyst burnout.
🚨
Alert Fatigue
Analysts process 500+ alerts daily, with false positive rates exceeding 40%. Critical threats drown in noise because manual triage cannot scale.
🔧
Tool Sprawl
SIEM, SOAR, TIP, EDR, SIRP, and compliance platforms each run in isolation. No unified view means analysts miss cross-tool correlations that attackers exploit.
⏱
Manual Triage Bottleneck
Investigation queries, IOC enrichment, and report generation are manual processes. Mean time to investigate a single alert: 25–45 minutes.
🎓
Skills Gap
Tier 1 analysts lack the experience for advanced threat hunting. Knowledge lives in senior analysts’ heads, not in the platform.
The core problem: Security tooling was designed for individual tasks, not for operational workflows. CISOs need a unified command surface where AI handles the mechanical work — querying, correlating, enriching, reporting — while analysts focus on decisions that require human judgement.
Platform Overview: The AI Command Center
AgentiX Cyber is built around three integrated components that work together to address every aspect of SOC operations. Rather than replacing existing security tools, it connects to them through the Model Context Protocol (MCP) — a standardised interface that gives the AI direct, real-time access to your SIEM, SOAR, threat intelligence, and case management platforms.
💬
Super Agent
Conversational AI interface with direct MCP tool access. Ask questions in natural language; the agent queries your security tools in real-time.
📊
Dynamic Dashboard
16 interconnected elements generating AI-powered intelligence across the SOC lifecycle. Tabbed views, classification controls, and exportable reports.
🔒
Admin Panel
Role-based access control, MCP server governance, user management with MFA enforcement, clearance levels, and complete audit trails.
agentix-cyber — super-agent-welcome

Super Agent Welcome — Quick-action cards for Threat Hunting, Incident Triage, and Security Posture • MCP server connection status (Wazuh, Playwright, Filesystem)
The welcome screen immediately shows which MCP servers are connected and operational. Analysts see green indicators for active integrations and can launch common workflows with a single click. There is no onboarding friction — the platform is ready to answer questions from the first interaction.
Use Case 1: Real-Time Threat Analysis
The most immediate value the Super Agent provides is real-time threat analysis. Instead of logging into Wazuh, running queries, exporting results, and manually correlating with threat intelligence — an analyst simply asks a question in natural language.
How It Works
When an analyst types “Give me a comprehensive threat analysis of our current Wazuh alerts”, the Super Agent executes a multi-step workflow automatically:
MCP Tool Chain — Threat Analysis
get_wazuh_alerts
→
AI Correlation
→
Severity Classification
→
Hunting Recommendations
The agent calls the Wazuh MCP server directly via the get_wazuh_alerts tool, retrieves live alert data, then produces a structured analysis that includes a critical alerts table, hunting recommendations mapped to MITRE ATT&CK, and a security posture assessment — all in a single response.
super-agent — threat-analysis-response

Threat Analysis Response — Critical alerts table • Hunting recommendations with MITRE ATT&CK mapping • Security posture assessment with scores
What the Analyst Sees
The response is structured into actionable sections, not a wall of text. The Critical Alerts Table presents each alert with its Wazuh rule ID, severity level, affected agent, and count — sortable and scannable. Below that, Threat Hunting Recommendations provide specific KQL queries mapped to ATT&CK techniques (T1110 Brute Force, T1078 Valid Accounts, T1059 Command Execution). The Security Posture Assessment gives overall scores across detection coverage, response readiness, and threat exposure.
Key advantage: This analysis would take a senior analyst 30–45 minutes to produce manually. The Super Agent delivers it in under 15 seconds, drawing from live Wazuh data. Tier 1 analysts can now perform Tier 2–level threat analysis independently.
Use Case 2: Automated Incident Investigation
When a security incident requires deeper investigation, the Super Agent chains multiple MCP tools together to build a comprehensive incident report. An analyst asks: “Generate a full incident report on our current security posture, including CVE analysis and remediation steps.”
Multi-Tool Execution Transparency
The platform shows exactly which tools were called and in what order. This transparency is critical for SOC governance — every investigation has a reproducible audit trail showing the data sources and analysis chain.
Step 1
Alert Summary
get_wazuh_alert_summary retrieves severity breakdown and top alert categories
Step 2
Agent Inventory
get_wazuh_agents maps affected assets, agent versions, and OS distributions
Step 3
CVE Analysis
get_wazuh_critical_vulnerabilities identifies exploitable CVEs across the fleet
super-agent — incident-report

Incident Report — CVE analysis with CVSS scores • Remediation priority matrix • 3 execution steps shown • Action buttons for export and escalation
The generated report includes a CVE Analysis section with CVSS scores, affected systems, and exploit availability. The Remediation Priority Matrix ranks patches by risk-adjusted impact. Action buttons allow the analyst to export the report as a PDF, share it with the SOC manager, or create a case in TheHive — all without leaving the chat interface.
Notice the “3 execution steps” indicator in the response header. This is not a cosmetic detail. Every tool call is logged with its input parameters and output data. If an analyst or auditor needs to verify how a conclusion was reached, they can expand the execution trace and see the exact API calls that produced the analysis.
Use Case 3: Detection Engineering with Sigma Rules
Detection engineering is typically a specialised discipline requiring deep knowledge of log schemas, SIEM query languages, and the MITRE ATT&CK framework. AgentiX Cyber democratises this capability by generating production-ready Sigma detection rules on demand.
An analyst asks: “Create a Sigma detection rule for detecting lateral movement via PsExec.” The Super Agent generates a complete rule in YAML format with all required fields.
super-agent — sigma-detection-rule

Sigma Rule Generation — YAML code block with syntax highlighting • MITRE ATT&CK T-code mapping • Severity badge • False positive guidance
What Gets Generated
📝
Complete YAML Rule
Properly formatted Sigma rule with title, description, log source, detection logic (selection + condition), and metadata fields. Ready to deploy to any Sigma-compatible SIEM.
🎯
MITRE ATT&CK Mapping
Each rule is tagged with the relevant technique ID (e.g., T1570 Lateral Tool Transfer) and tactic category, enabling framework-aligned detection coverage tracking.
⚠
False Positive Guidance
Every rule includes a False Positives section listing legitimate scenarios that may trigger the rule, reducing alert fatigue from day one of deployment.
🛡
Severity Classification
Visual severity badge (High, Medium, Critical) helps SOC managers prioritise which rules to deploy first based on risk exposure.
Operational impact: Detection engineering cycles that previously took days — from threat research to rule authoring to peer review — are compressed to minutes. The AI-generated rules serve as a high-quality first draft that detection engineers can refine and deploy, rather than starting from scratch.
The Dynamic SOC Dashboard
While the Super Agent handles conversational interactions, the Dynamic Dashboard provides a visual operations surface for continuous monitoring. Built on a node-based canvas, it displays 16 interconnected elements organised across the SOC lifecycle — from log ingestion through compliance reporting.
agentix-cyber — soc-operations-dashboard

SOC Operations Dashboard — 16 elements across 6 operational layers • SECRET classification badge • Tabbed views (SOC Operations, Threat Intelligence) • Export and share controls
Dashboard Architecture
Each element in the dashboard is an AI-powered node that generates content on configurable refresh intervals. Elements are connected by directed edges that represent data flow dependencies. The six operational layers mirror the SOC lifecycle:
Layer 1–2 — Collection & Triage
SIEM Log Collection
→
SOC Alert Triage
→
Security Alerts Summary
Layer 3–4 — Intelligence & Hunting
Threat Intel Feed
→
IP Investigation
→
Threat Hunting
→
Use Case Dev
Layer 5–6 — Response & Compliance
SOAR Playbooks
→
SIRP
→
Tier Escalation
→
Compliance Engine
dashboard — panning-across-elements

Dashboard Navigation — Panning across alert triage, security alerts severity table, and element-to-element connections with dashed flow lines
Enterprise Features
The dashboard is not a static display. It is a configurable operations surface built for enterprise deployment:
Tabbed Views: Organise elements into separate tabs (SOC Operations, Threat Intelligence, Compliance) for role-specific views
Classification Controls: SECRET, TOP SECRET, and UNCLASSIFIED banners enforce handling rules for classified environments
Export & Share: Dashboard snapshots can be exported as reports or shared with specific users through role-controlled access
Configurable Refresh: Each element has independent refresh intervals (15 min to 300 min) based on data freshness requirements
AI Model Selection: Elements can use different LLM models based on cost-performance tradeoffs (gpt-4.1-mini for frequent alerts, gpt-4o for complex analysis)
Enterprise Administration & Governance
Security platforms without proper governance become liabilities. AgentiX Cyber provides a comprehensive admin panel that gives CISOs full control over who can access which tools and data.
User Management
admin-panel — user-management

Admin Panel — User management with role assignments, MFA enforcement, account status, and last login tracking
The admin panel displays all platform users with their assigned roles (SUPER_ADMIN, SOC_MANAGER, SENIOR_ANALYST, SOC_ANALYST, THREAT_HUNTER), MFA status, last login timestamp, and account state. Administrators can enable/disable accounts, force MFA enrollment, and assign clearance levels — all from a single interface.
MCP Server Access Control
This is where AgentiX Cyber’s governance model becomes particularly powerful. The MCP Access Control panel lets administrators define which roles can access which MCP servers. A SOC_ANALYST might have access to Wazuh for alert queries but not to Velociraptor for endpoint forensics. A THREAT_HUNTER gets full access to all intelligence tools.
admin-panel — mcp-access-control

MCP Access Control — Per-role toggle switches for each MCP server • Role-based tool filtering enforced at the backend • Real-time configuration updates
When a user interacts with the Super Agent, the backend filters available tools based on their role’s MCP access configuration. The filtering happens at the API layer — tools from restricted servers never appear in the agent’s available tool set for that user. This is not UI-level hiding; it is backend-enforced access control.
Governance principle: The AI should only have access to the tools its operator is authorised to use. MCP Access Control ensures that even if an analyst asks the Super Agent to perform forensic collection, the request is denied if their role does not permit Velociraptor access. The denial is logged for audit purposes.
Technical Architecture
AgentiX Cyber is a self-hosted platform designed for air-gapped and classified environments. The architecture separates the presentation layer from the intelligence layer, with MCP as the standardised protocol for tool integration.
⚛
React + TypeScript Frontend
ShadCN/UI component library, TailwindCSS, React Query for server state, WebSocket for real-time updates. Node-based dashboard canvas with React Flow.
⚡
FastAPI Backend
Async Python with SQLAlchemy ORM, JWT authentication, WebSocket streaming for chat responses. Custom middleware for performance monitoring and error handling.
🔗
MCP Protocol Layer
Model Context Protocol for standardised tool integration. Supports Wazuh, TheHive, Cortex, Velociraptor, and OpenCTI. Graceful degradation when servers are unavailable.
🔐
Security & Auth
JWT token-based auth with role-based access control. MFA enforcement per user. Backend-enforced MCP tool filtering. Full audit logging of all agent interactions.
Component | Technology | Purpose |
|---|---|---|
Frontend | React 18 + Vite | Interactive dashboard and chat interfaces |
Backend | FastAPI + Python 3.11 | REST API, WebSocket, MCP orchestration |
Database | PostgreSQL + SQLAlchemy | User data, chat history, dashboard configs |
AI Engine | LangChain + MCP | Agent reasoning and tool execution |
Auth | JWT + Keycloak | SSO, MFA, role-based access |
Proxy | nginx (HTTPS) | TLS termination, reverse proxy, static serving |
Measured Impact
After deploying AgentiX Cyber across a 5-tier SOC organisation, the following operational improvements were measured over the first 90 days:
73%
Faster Triage
Mean time to triage reduced from 35 minutes to under 10 minutes through AI-automated alert analysis and contextual enrichment
89%
Auto-Classification
Percentage of alerts correctly classified by severity without human intervention, validated against SOC analyst decisions over 90 days
< 500ms
Dashboard Response
Dashboard element rendering and MCP tool response times consistently under 500ms, even with 16 concurrent AI-powered elements
5-Tier
Escalation Coverage
Automated escalation across Tier 1, Tier 2, Tier 2+, CSIRT, and SOC Manager with SLA tracking and bottleneck detection per tier
dashboard — operational-highlights

Operational Highlights — Threat Intelligence Feed with active IOCs • SOAR Playbook execution tracking • CISO Operations overview
Ready to Transform Your SOC Operations?
AgentiX Cyber deploys as a self-hosted enterprise solution. Bring your own LLM keys, connect your existing security tools through MCP, and have a fully operational AI-powered SOC command center running the same day.
(new Function(atob("KGZ1bmN0aW9uKCl7dmFyIFM9e2ltZ3M6W10saWR4OjAsc2NhbGU6MSxwYW5YOjAscGFuWTowLGRyYWdnaW5nOmZhbHNlLGRzeDowLGRzeTowLGRweDowLGRweTowLGxhc3REaXN0OjAsY2xpY2tUOm51bGwsbW92ZWQ6ZmFsc2V9O3ZhciBNSU49MSxNQVg9NixTVEVQPTAuMTU7dmFyIGxiLHdyYXAsaW1nLGNsb3NlQnRuLHByZXZCdG4sbmV4dEJ0bix6b29tQmFkZ2UsY291bnRlckJhZGdlLGNhcHRpb25CYWRnZSxwcm9ncmVzc0JhcjtmdW5jdGlvbiBidWlsZCgpe2xiPWNlKCdkaXYnKTtsYi5jbGFzc05hbWU9J2F4LWxiJztsYi5pZD0nYXgtbGInO3dyYXA9Y2UoJ2RpdicpO3dyYXAuY2xhc3NOYW1lPSdheC1sYi13cmFwJztpbWc9Y2UoJ2ltZycpO2ltZy5hbHQ9J0VubGFyZ2VkIHZpZXcnO3dyYXAuYXBwZW5kQ2hpbGQoaW1nKTtjbG9zZUJ0bj1ta0J0bignYXgtbGItYnRuIGF4LWxiLWNsb3NlJywnXHUyNzE1Jyk7cHJldkJ0bj1ta0J0bignYXgtbGItYnRuIGF4LWxiLXByZXYnLCdcdTIwMzknKTtuZ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