Logo AI SOC Agent

AI SOC Agent

Cộng đồng
M507

Blackhat 2025 presentation and codebase: AI SOC agent & MCP server for automated security investigation, alert triage, and incident response. Integrates with ELK, IRIS, and other platforms.

Nhà phát hànhM507
Kho mãAI-SOC-Agent
Ngôn ngữPython
Bản fork
11
Sao
51
Công cụ có sẵn
0
Phương thức truyền tảistdio, streamable-http
Danh mục
Giấy phépMIT
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    AI SOC Agent cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    51 sao và 11 bản fork từ kho mã được liên kết.

SamiGPT

SamiGPT is an AI-powered security investigation and incident response platform that provides security operations teams with intelligent automation for case management, SIEM analysis, and CTI enrichment through the Model Context Protocol (MCP).

Note: This project is currently under active development. Features, APIs, and documentation may change as development progresses.

Demo

Watch the demo video to see SamiGPT in action:

Demo Video

For detailed documentation and presentation materials:

AI Agents Presentation PDF

SamiGPT's Dashboard:

SamiGPTs Dashboard

Quick Start

Two ways to run SamiGPT. Docker Compose starts a separate copy for setup. The production method is the servee systemd service on ports 8081 and 8082.

Docker Compose

SamiGPT runs as its own Docker Compose stack from onboarding/docker-compose.yml. That container is new: the UI is on host port 18081 and MCP is on host port 18082. It does not bind 8081 or 8082, and it does not use the production service.

The container starts with a blank config. A setup wizard at /setup asks for the console password and the integration tokens. Skipped steps stay at the placeholders from config.json.example and are not treated as connected. Certificate checks for Elastic, the local TIP, and NetBox are left off. The MCP listener binds 0.0.0.0.

Start it:

bash
docker compose -p samigpt-onboarding -f onboarding/docker-compose.yml up --build

Open the wizard:

https://127.0.0.1:18081/setup

The browser warns about the self-signed certificate written in the container on first start. Accept it for this host. The wizard order is Security, SIEM (Elastic), case management, EDR, threat intel, knowledge and assets, engineering tickets, then AI and MCP. Each optional step has Skip for now. Finish writes the config and opens the console at https://127.0.0.1:18081. Sign in with the username and password from the Security step.

Config and certificates stay in Compose volumes, so the next up keeps what the wizard saved. Stop the stack with:

bash
docker compose -p samigpt-onboarding -f onboarding/docker-compose.yml down

Add -v only when you want that saved config removed.

After the wizard

Use Refresh models on the AI step to list models for the token you entered. MCP is reachable on the host at port 18082 (the process inside the container listens on 8082). The AI step stores the public URL and bearer token. Open WebUI can be registered from that same step.

In SamiGPT, the MCP button shows health and registered tools:

MCP connected on SamiGPT

In Open WebUI, add SamiGPT under Settings → Tools using the public MCP URL from the wizard and Authorization: Bearer <mcp token>. That is separate from the AI provider URL, which points SamiGPT at Open WebUI:

MCP connected on Open WebUI

Production service

To run SamiGPT as the boot-persistent production service, use the installer under servee/. It copies the app to /opt/servee, creates a Python 3.10+ venv, installs dependencies, and enables + starts the servee unit (Restart=always). Re-running the script reinstalls cleanly and preserves config.json, certs/, data/, and logs/.

systemctl restart servee (and every start) syncs this source tree into /opt/servee before launching. config.json, certs/, data/, logs/, and the virtualenv stay in place. Dependencies are reinstalled only when requirements.txt changes. A full wipe, including a new virtualenv, is still sudo ./servee/install.sh.

bash
# Install or reinstall (requires root; stop any manual `python app.py` first)
sudo ./servee/install.sh

# Service control. Restart syncs code from the tree install.sh was run from.
sudo systemctl status servee
sudo systemctl restart servee
sudo systemctl stop servee
sudo systemctl start servee

# Follow logs
journalctl -u servee -f

Optional: point the installer at a specific Python 3.10+ binary:

bash
sudo PYTHON_BIN=/path/to/python3.11 ./servee/install.sh

After install, the UI is at https://<host>:8081 and MCP at :8082, with runtime files under /opt/servee. An existing config.json there is kept, so the console opens at sign-in. A host with no password opens the same setup wizard at https://<host>:8081/setup.

Overview

SamiGPT acts as an MCP server that exposes security investigation and response capabilities as tools that can be used by AI agents, LLM tools, and automated workflows. It provides a unified, vendor-neutral API layer that connects to:

  • Case Management Systems (TheHive, IRIS)
  • SIEM Platforms (Elastic)
  • EDR Solutions (Elastic Defend)
  • Threat Intelligence (OpenCTI, Local TIP)
  • DCIM/IPAM (NetBox)

The platform enables automated triage, investigation, correlation, and response workflows through intelligent agent profiles organized by SOC tier (SOC1, SOC2).

Features

Core Capabilities

  • Automated Alert Triage: Intelligent initial assessment and classification of security alerts
  • Case Management: Create, update, and manage security cases with observables, comments, and timeline tracking
  • SIEM Integration: Search security events, pivot on indicators, and correlate activities across environments
  • EDR Response: Endpoint isolation, process termination, and forensic artifact collection
  • Threat Intelligence: IOC enrichment and reputation analysis
  • Infrastructure Lookup: Resolve IPs, hosts, and prefixes against NetBox DCIM/IPAM for asset context
  • Multi-Tier SOC Workflows: Structured workflows for SOC1 (triage) and SOC2 (investigation)

Agent Profiles & Runbooks

SamiGPT includes pre-configured agent profiles with specialized runbooks:

  • SOC1 Agents: Initial alert triage, enrichment, and false positive identification
  • SOC2 Agents: Deep investigation, correlation, and case analysis

Workflows

SamiGPT uses structured workflows organized by SOC tier. The following diagrams illustrate the execution flow:

Agent Profiles Flow

This diagram shows how agent profiles are organized and how routing rules direct cases to the appropriate SOC tier agents.

Agent Profiles Flow

Initial Alert Triage (SOC1)

The initial alert triage workflow handles new security alerts, performs quick assessment, enrichment, and determines whether to create a case or close as false positive.

Initial Alert Triage

Case Analysis (SOC2)

The SOC2 case analysis workflow performs deep investigation, SIEM analysis, CTI enrichment, correlation, and prepares cases for SOC3 escalation.

Case Analysis

Installation

Prerequisites

  • Docker Compose, for the setup stack
  • Python 3.10 or newer, for the production servee service

Setup

  • Docker Compose: docker compose -p samigpt-onboarding -f onboarding/docker-compose.yml up --build, then https://127.0.0.1:18081/setup
  • Production service: sudo ./servee/install.sh, then https://<host>:8081

Connect MCP Server to AI Tools

The official, supported way to use SamiGPT's tools is to connect them to Open WebUI from the wizard's AI step, or afterward under Settings → Tools in Open WebUI. Once SamiGPT is registered as a tool server, you can drive it from any LLM provider Open WebUI supports (OpenAI, OpenRouter, local/self-hosted models, etc.) without any further per-client setup.

Send Authorization: Bearer and the MCP token. Use https when MCP TLS is on, and http when it is left off.

Docker Compose (host port 18082):

  • Health: http://127.0.0.1:18082/health
  • Tools: http://127.0.0.1:18082/tools
  • JSON-RPC: POST http://127.0.0.1:18082/rpc

Production service (port 8082):

  • Health: https://<host>:8082/health
  • Tools: https://<host>:8082/tools
  • JSON-RPC: POST https://<host>:8082/rpc

Architecture

Infrastructure Overview

Infrastructure Diagram

Directory Structure

SamiGPT/
├── src/
│   ├── api/              # Generic interfaces (CaseManagementClient, SIEMClient, EDRClient)
│   ├── core/             # Configuration, logging, errors, DTOs
│   ├── integrations/     # Vendor-specific implementations
│   │   ├── case_management/  # TheHive, IRIS integrations
│   │   ├── siem/             # Elastic integration
│   │   ├── edr/              # EDR platform integrations
│   │   ├── cti/              # Threat intelligence integrations
│   │   ├── netbox/           # NetBox DCIM/IPAM integration
│   │   └── eng/              # Engineering board integrations
│   ├── llm/              # Pluggable LLM providers (Cursor, OpenAI, OpenRouter, Open WebUI, custom)
│   ├── mcp/              # MCP server, HTTP transport, supervisor, runbooks
│   ├── orchestrator/     # Workflow orchestration
│   └── web/              # Legacy integration config UI
├── app.py                # Process entry point inside the Compose image
├── onboarding/           # Docker Compose wizard (ports 18081 and 18082)
├── run_books/            # SOC tier runbooks and workflows
├── config/               # Agent profiles and configuration
└── client_env/           # Client-specific infrastructure data (gitignored except templates)

Design Principles

  • Vendor-Neutral APIs: All integrations implement generic interfaces, allowing easy swapping of security tools
  • Separation of Concerns: AI/orchestrator layer only interacts with generic APIs, never vendor-specific code
  • Modular Integration: Each vendor integration is self-contained with HTTP client, models, mappers, and client implementation

Configuration

Configuration is managed through config.json and can be edited via the web interface or directly.

Configuration File Structure

See config.json.example for the complete configuration schema. Key sections:

  • iris / thehive: Case management configuration
  • elastic: SIEM configuration
  • edr: EDR platform configuration
  • cti: Threat intelligence configuration
  • netbox: NetBox DCIM/IPAM configuration
  • eng: Engineering board configuration (ClickUp, Trello, GitHub)
  • ai_controller: Web interface bind address and session storage
  • llm: LLM provider used by the web UI (Cursor Agent, OpenAI, OpenRouter, Open WebUI, custom)
  • mcp: HTTP MCP listener host/port and auto-start
  • web: Console username and password. The wizard hashes the password with Argon2id. A plaintext password is not accepted.
  • logging: Logging configuration

Logging

SamiGPT provides comprehensive logging:

  • Session chat transcripts: one JSON file per session. On the servee unit that is /opt/servee/data/ai_controller/sessions/<session-id>.json. See documentation/session-chat-logs.md.
  • MCP Server Logs: logs/mcp/mcp_all.log, mcp_requests.log, mcp_responses.log, mcp_errors.log
  • Application Logs: logs/debug.log, logs/error.log, logs/warning.log

Development

Adding a New Integration

  1. Create integration directory under src/integrations/
  2. Implement generic interface from src/api/
  3. Add HTTP client, models, and mappers
  4. Register in configuration

Example structure:

src/integrations/case_management/new_vendor/
├── __init__.py
├── client.py          # HTTP client
├── models.py          # Vendor-specific models
├── mapper.py          # Vendor ↔ Generic DTO mapping
└── case_client.py     # Implements CaseManagementClient

Running Tests

bash
# Run all tests
pytest tests/

# Run specific integration tests
pytest tests/integrations/case_management/

Contributing

When contributing:

  1. Keep all vendor-specific code under src/integrations/
  2. Ensure all integrations implement the generic APIs in src/api/
  3. Add tests for new integrations
  4. Update documentation as needed

License

MIT

Support

For issues, questions, or contributions, please open an issue on the repository.

Acknowledgments

The following projects helped and inspired us during the literature review:

Changelog

v0.3

  • Setup wizard: a new install can be configured in the browser, so the console password, integrations, and MCP are ready without hand-editing config.json
  • Docker Compose: setup in its own container, without touching the production service
  • Operators page: change the console username and password from the UI (the new password is stored as a new Argon2id hash) and see the actions that account may approve, grouped by SOC, detection engineering, and engineering
  • Audit view: append-only record of sign-in, failed sign-in, and sign-out, merged with approval decisions (approved, denied, reviewed, ignored). Passwords and session tokens are never written
  • Reports view: finished investigation write-ups from completed session replies, listed newest first and opened as markdown
  • Library in the console: runbooks (shared plus SOC1/SOC2/SOC3), standards, and operator documentation, read from the repo and rendered in the UI
  • Overview dashboard: landing page with 7-day, 30-day, and all-time charts for open work, what was filed and settled, how closed alerts were decided, how the approval queue was resolved, detection work filed, response actions that ran, and model spend
  • Session tab bar: pin sessions, drag to reorder, an overflow menu of every open session, and a new-session shortcut (Alt+N)
  • Appearance: three palettes (U-Theme, FT-Theme, B-Theme) plus a system mode that follows the browser light/dark preference, stored in this browser

v0.2

  • Single entry point (app.py) serving an authenticated, HTTPS-only web UI (session login, auto-generated self-signed cert)
  • MCP server as a separate HTTPS listener with its own health check, supervisor, and start/stop/restart controls from the UI
  • Pluggable LLM providers: Cursor Agent, OpenAI, OpenRouter, Open WebUI, and custom OpenAI-compatible endpoints, selectable and testable from Settings
  • Open WebUI integration path: SamiGPT registers as an MCP tool server in Open WebUI, so it can be driven from any LLM provider Open WebUI supports
  • Approval queue: human-in-the-loop review/approval workflow for agent actions before they execute
  • Multi-cluster Elastic support with per-cluster skill vectors (MSV) controlling which capabilities are enabled per cluster
  • Skill toggles in Settings: enable/disable individual skills per integration directly from the web UI, instead of editing the skill vector by hand
  • NetBox integration (DCIM/IPAM) as a new data source for investigations
  • Engineering board integration (GitHub Issues, Trello) for filing follow-up work from investigations
  • Requests view in the UI for tracking in-flight and historical tool calls. A request, such as a detection or runbook gap, can be filed directly as a GitHub issue in a repository you configure, for example a Detection-as-Code repository, and its status stays synchronized when that issue is closed
  • systemd service installer (servee/) for running SamiGPT as a boot-persistent service
  • Secret-handling and TLS hardening (core/secrets.py, core/tls.py), plus gitleaks-based secret scanning in CI

v0.1 — Black Hat version

Presented at Black Hat MEA 2025.

Performance & Cost

  • ~ $0.18 per alert
  • ~ 50 seconds to investigate an alert per agent/tab

For detailed cost and usage data, see: Cost Data CSV

Cài đặt

TypingMind
{
  "mcpServers": {
    "ai-soc-agent": {
      "command": "python",
      "args": [
        "-m",
        "src.mcp.mcp_server"
      ]
    }
  }
}

Dùng MCP AI SOC Agent với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối AI SOC Agent, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. Bạn có thể chạy MCP ngay trên thiết bị của mình hoặc kết nối qua URL của máy chủ MCP từ xa.

Cách 1: Dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm AI SOC Agent làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của AI SOC Agent.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "ai-soc-agent": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của AI SOC Agent, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của AI SOC Agent.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng AI SOC Agent giúp tôi làm việc này không?
AI SOC Agent
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng AI SOC Agent.

Cách 2: Thêm URL máy chủ MCP

Dùng cách này khi AI SOC Agent đã được lưu trữ từ xa hoặc nhóm của bạn muốn có một trình kết nối dùng chung cho nhiều người dùng.

1

Mở mục Trình kết nối MCP

Trong TypingMind, vào Plugin, mở mục Trình kết nối MCP, rồi chọn Thêm URL.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Vào mục Plugin.
  3. Mở mục Trình kết nối MCP.
  4. Nhấp vào Thêm URL.
Biểu mẫu Thêm URL máy chủ MCP tùy chỉnh của TypingMind
2

Dán URL máy chủ

Nhập URL máy chủ MCP do nhà cung cấp cung cấp vào trường URL máy chủ. Thêm tên kết nối, mô tả, biểu tượng, header HTTP tùy chỉnh hoặc cài đặt ứng dụng khách OAuth nếu máy chủ yêu cầu.

  1. Dán URL máy chủ MCP do nhà cung cấp cung cấp vào trường URL máy chủ.
  2. Nhập tên kết nối cho AI SOC Agent.
  3. Thêm mô tả và biểu tượng nếu bạn muốn dễ nhận biết kết nối hơn.
  4. Thêm header HTTP tùy chỉnh hoặc thông tin ứng dụng khách OAuth nếu máy chủ yêu cầu xác thực.
3

Tạo kết nối

Nhấp vào Tạo kết nối, sau đó quay lại danh sách Plugin và xác nhận kết nối MCP mới đang hoạt động.

  1. Nhấp vào Tạo kết nối.
  2. Quay lại danh sách trình kết nối MCP.
  3. Xác nhận kết nối AI SOC Agent hiển thị trạng thái đang hoạt động.
  4. Làm mới danh sách plugin nếu kết nối chưa xuất hiện ngay.
4

Đổi mô hình mà không cần kết nối lại

Bắt đầu cuộc trò chuyện với mô hình bạn thích, bật các công cụ của AI SOC Agent trong mục Plugin và chuyển sang mô hình khác khi cần. Kết nối MCP vẫn sẵn dùng trong không gian làm việc TypingMind.

  1. Bắt đầu cuộc trò chuyện mới trong TypingMind.
  2. Chọn mô hình AI bạn muốn dùng.
  3. Bật các công cụ của AI SOC Agent trong mục Plugin.
  4. Yêu cầu mô hình dùng công cụ khi cần.
  5. Chuyển sang mô hình AI khác và dùng lại cùng kết nối MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng AI SOC Agent giúp tôi làm việc này không?
AI SOC Agent
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng AI SOC Agent.

Câu hỏi thường gặp

Máy chủ MCP AI SOC Agent dùng để làm gì?

AI SOC Agent là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP AI SOC Agent với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng AI SOC Agent với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP AI SOC Agent với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối AI SOC Agent, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP AI SOC Agent với TypingMind?

Bạn có thể kết nối AI SOC Agent trong TypingMind bằng trình kết nối MCP cục bộ hoặc bằng cách thêm URL máy chủ MCP từ xa. Dùng trình kết nối cục bộ khi máy chủ cần truy cập tệp, ứng dụng hoặc tài nguyên riêng trên thiết bị của bạn; dùng URL máy chủ khi máy chủ MCP được lưu trữ từ xa.

MCP AI SOC Agent cung cấp những công cụ nào trong TypingMind?

AI SOC Agent cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP AI SOC Agent không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu AI SOC Agent yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇