# ogwanwan/agentic-soc architecture

> Architecture diagram of the GitHub repository ogwanwan/agentic-soc, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ogwanwan/agentic-soc
- Repository: https://github.com/ogwanwan/agentic-soc

## Overview

Agentic SOC turns server logs into prioritized incidents, investigates queued incidents with an evidence-oriented LLM agent, maps findings to MITRE ATT&CK, and produces response recommendations. Detection and investigation run as separate processes connected through a SQLite queue. The graph preserves the documented normalization, detection, correlation, triage, investigation, mapping, and response stages. Edges supported only by the README reflect documented workflow; source excerpts and the SOURCE INDEX support the more specific internal relationships. Some unsampled subsystem details are consequently omitted.

Main entry points: [`run_pipeline.py`](https://github.com/ogwanwan/agentic-soc/blob/main/run_pipeline.py) (Detection runner), [`detection_pipeline/correlate/grouping.py`](https://github.com/ogwanwan/agentic-soc/blob/main/detection_pipeline/correlate/grouping.py) (Incident correlation), [`llm/investigate/main.py`](https://github.com/ogwanwan/agentic-soc/blob/main/llm/investigate/main.py) (Investigation entry), [`llm/investigate/attack_mapping/engine.py`](https://github.com/ogwanwan/agentic-soc/blob/main/llm/investigate/attack_mapping/engine.py) (ATT&CK mapping)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_detection["Detection pipeline"]
  node_pipeline_runner["Detection runner<br/>[run_pipeline.py]"]
  node_normalization["Event normalization<br/>[normalize.py]"]
  node_log_parsers["Log parsers"]
  node_sigma_engine["Sigma engine<br/>[engine.py]"]
  node_rule_loader["Rule loader<br/>[loader.py]"]
  node_suricata_detection["Suricata detection<br/>[suricata_seed.py]"]
  node_seed_aggregation["Seed aggregation<br/>[aggregate.py]"]
  node_correlator["Incident correlation<br/>[grouping.py]"]
  node_linkers["Layer linkers"]
  node_incident_dedup["Incident deduplication<br/>[dedup.py]"]
  node_triage["Deterministic triage<br/>[triage.py]"]
  node_triage_review["LLM triage review<br/>[llm_review.py]"]
end

subgraph group_queue["Incident queue"]
  node_queue_store[("Incident queue<br/>[incidents.py]")]
  node_queue_database[("SQLite database<br/>[db.py]")]
  node_queue_poller["Investigation queue poller"]
end

subgraph group_investigation["Investigation"]
  node_investigation_main["Investigation entry<br/>[main.py]"]
  node_investigation_pipeline["Incident investigation<br/>[pipeline.py]"]
  node_agent_loop["Investigation loop<br/>[loop.py]"]
  node_investigation_tools["Log investigation tools"]
end

subgraph group_mapping["ATT&amp;CK mapping"]
  node_attack_mapping["ATT&amp;CK mapping<br/>[engine.py]"]
  node_mapping_retrieval["ATT&amp;CK retrieval<br/>[retrieve.py]"]
end

subgraph group_response["Response guidance"]
  node_response_decision["Response planning<br/>[decide.py]"]
  node_response_catalog["Action catalog<br/>[catalog.py]"]
  node_response_writer["Recommendation generation<br/>[llm.py]"]
end

node_log_sources(("Server logs"))
node_dashboard(("SOC dashboard"))

node_log_sources -->|"provides logs"| node_normalization
node_pipeline_runner -->|"normalizes"| node_normalization
node_normalization -->|"uses parsers"| node_log_parsers
node_pipeline_runner -->|"runs detection"| node_sigma_engine
node_sigma_engine -->|"loads rules"| node_rule_loader
node_pipeline_runner -->|"runs detection"| node_suricata_detection
node_pipeline_runner -->|"aggregates seeds"| node_seed_aggregation
node_pipeline_runner -->|"correlates events"| node_correlator
node_correlator -->|"loads linkers"| node_linkers
node_correlator -->|"deduplicates incidents"| node_incident_dedup
node_pipeline_runner -->|"scores incidents"| node_triage
node_pipeline_runner -->|"reviews incidents"| node_triage_review
node_triage_review -->|"annotates incidents"| node_queue_store
node_pipeline_runner -->|"stores incidents"| node_queue_store
node_queue_store -->|"writes records"| node_queue_database
node_queue_poller -->|"polls queue"| node_queue_database
node_queue_poller -->|"starts investigation"| node_investigation_main
node_investigation_main -->|"runs pipeline"| node_investigation_pipeline
node_investigation_pipeline -->|"investigates incidents"| node_agent_loop
node_agent_loop -->|"invokes tools"| node_investigation_tools
node_investigation_main -->|"maps findings"| node_attack_mapping
node_attack_mapping -.->|"retrieves techniques"| node_mapping_retrieval
node_attack_mapping -->|"supplies findings"| node_response_decision
node_response_decision -.->|"selects actions"| node_response_catalog
node_response_decision -.->|"requests recommendations"| node_response_writer
node_response_writer -->|"provides results"| node_dashboard

click node_pipeline_runner "https://github.com/ogwanwan/agentic-soc/blob/main/run_pipeline.py"
click node_normalization "https://github.com/ogwanwan/agentic-soc/blob/main/detection_pipeline/tools/normalize.py"
click node_log_parsers "https://github.com/ogwanwan/agentic-soc/tree/main/detection_pipeline/tools"
click node_sigma_engine "https://github.com/ogwanwan/agentic-soc/blob/main/detection_pipeline/detect/engine.py"
click node_rule_loader "https://github.com/ogwanwan/agentic-soc/blob/main/detection_pipeline/detect/loader.py"
click node_suricata_detection "https://github.com/ogwanwan/agentic-soc/blob/main/detection_pipeline/detect/suricata_seed.py"
click node_seed_aggregation "https://github.com/ogwanwan/agentic-soc/blob/main/detection_pipeline/detect/aggregate.py"
click node_correlator "https://github.com/ogwanwan/agentic-soc/blob/main/detection_pipeline/correlate/grouping.py"
click node_linkers "https://github.com/ogwanwan/agentic-soc/tree/main/detection_pipeline/correlate/links"
click node_incident_dedup "https://github.com/ogwanwan/agentic-soc/blob/main/detection_pipeline/correlate/dedup.py"
click node_triage "https://github.com/ogwanwan/agentic-soc/blob/main/detection_pipeline/triage/triage.py"
click node_triage_review "https://github.com/ogwanwan/agentic-soc/blob/main/llm/triage_review/llm_review.py"
click node_queue_store "https://github.com/ogwanwan/agentic-soc/blob/main/detection_pipeline/store/incidents.py"
click node_queue_database "https://github.com/ogwanwan/agentic-soc/blob/main/detection_pipeline/store/db.py"
click node_queue_poller "https://github.com/ogwanwan/agentic-soc/blob/main/run_investigation_queue.py"
click node_investigation_main "https://github.com/ogwanwan/agentic-soc/blob/main/llm/investigate/main.py"
click node_investigation_pipeline "https://github.com/ogwanwan/agentic-soc/blob/main/llm/investigate/agent/pipeline.py"
click node_agent_loop "https://github.com/ogwanwan/agentic-soc/blob/main/llm/investigate/agent/loop.py"
click node_investigation_tools "https://github.com/ogwanwan/agentic-soc/tree/main/llm/investigate/agent/tools/real"
click node_attack_mapping "https://github.com/ogwanwan/agentic-soc/blob/main/llm/investigate/attack_mapping/engine.py"
click node_mapping_retrieval "https://github.com/ogwanwan/agentic-soc/blob/main/llm/investigate/attack_mapping/retrieve.py"
click node_response_decision "https://github.com/ogwanwan/agentic-soc/blob/main/llm/respond/decide.py"
click node_response_catalog "https://github.com/ogwanwan/agentic-soc/blob/main/llm/respond/catalog.py"
click node_response_writer "https://github.com/ogwanwan/agentic-soc/blob/main/llm/respond/llm.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_pipeline_runner,node_normalization,node_log_parsers,node_sigma_engine,node_rule_loader,node_suricata_detection,node_seed_aggregation,node_correlator,node_linkers,node_incident_dedup,node_triage,node_triage_review toneBlue
class node_queue_store,node_queue_database,node_queue_poller toneAmber
class node_investigation_main,node_investigation_pipeline,node_agent_loop,node_investigation_tools,node_log_sources toneMint
class node_attack_mapping,node_mapping_retrieval toneRose
class node_response_decision,node_response_catalog,node_response_writer,node_dashboard toneIndigo
```

## Components

### Detection pipeline

- [Detection runner](https://github.com/ogwanwan/agentic-soc/blob/main/run_pipeline.py): `run_pipeline.py`
- [Event normalization](https://github.com/ogwanwan/agentic-soc/blob/main/detection_pipeline/tools/normalize.py): `detection_pipeline/tools/normalize.py`
- [Log parsers](https://github.com/ogwanwan/agentic-soc/tree/main/detection_pipeline/tools): `detection_pipeline/tools`
- [Sigma engine](https://github.com/ogwanwan/agentic-soc/blob/main/detection_pipeline/detect/engine.py): `detection_pipeline/detect/engine.py`
- [Rule loader](https://github.com/ogwanwan/agentic-soc/blob/main/detection_pipeline/detect/loader.py): `detection_pipeline/detect/loader.py`
- [Suricata detection](https://github.com/ogwanwan/agentic-soc/blob/main/detection_pipeline/detect/suricata_seed.py): `detection_pipeline/detect/suricata_seed.py`
- [Seed aggregation](https://github.com/ogwanwan/agentic-soc/blob/main/detection_pipeline/detect/aggregate.py): `detection_pipeline/detect/aggregate.py`
- [Incident correlation](https://github.com/ogwanwan/agentic-soc/blob/main/detection_pipeline/correlate/grouping.py): `detection_pipeline/correlate/grouping.py`
- [Layer linkers](https://github.com/ogwanwan/agentic-soc/tree/main/detection_pipeline/correlate/links): `detection_pipeline/correlate/links`
- [Incident deduplication](https://github.com/ogwanwan/agentic-soc/blob/main/detection_pipeline/correlate/dedup.py): `detection_pipeline/correlate/dedup.py`
- [Deterministic triage](https://github.com/ogwanwan/agentic-soc/blob/main/detection_pipeline/triage/triage.py): `detection_pipeline/triage/triage.py`
- [LLM triage review](https://github.com/ogwanwan/agentic-soc/blob/main/llm/triage_review/llm_review.py): `llm/triage_review/llm_review.py`

### Incident queue

- [Incident queue](https://github.com/ogwanwan/agentic-soc/blob/main/detection_pipeline/store/incidents.py): `detection_pipeline/store/incidents.py`
- [SQLite database](https://github.com/ogwanwan/agentic-soc/blob/main/detection_pipeline/store/db.py): `detection_pipeline/store/db.py`
- [Investigation queue poller](https://github.com/ogwanwan/agentic-soc/blob/main/run_investigation_queue.py): `run_investigation_queue.py`

### Investigation

- [Investigation entry](https://github.com/ogwanwan/agentic-soc/blob/main/llm/investigate/main.py): `llm/investigate/main.py`
- [Incident investigation](https://github.com/ogwanwan/agentic-soc/blob/main/llm/investigate/agent/pipeline.py): `llm/investigate/agent/pipeline.py`
- [Investigation loop](https://github.com/ogwanwan/agentic-soc/blob/main/llm/investigate/agent/loop.py): `llm/investigate/agent/loop.py`
- [Log investigation tools](https://github.com/ogwanwan/agentic-soc/tree/main/llm/investigate/agent/tools/real): `llm/investigate/agent/tools/real`

### ATT&CK mapping

- [ATT&CK mapping](https://github.com/ogwanwan/agentic-soc/blob/main/llm/investigate/attack_mapping/engine.py): `llm/investigate/attack_mapping/engine.py`
- [ATT&CK retrieval](https://github.com/ogwanwan/agentic-soc/blob/main/llm/investigate/attack_mapping/retrieve.py): `llm/investigate/attack_mapping/retrieve.py`

### Response guidance

- [Response planning](https://github.com/ogwanwan/agentic-soc/blob/main/llm/respond/decide.py): `llm/respond/decide.py`
- [Action catalog](https://github.com/ogwanwan/agentic-soc/blob/main/llm/respond/catalog.py): `llm/respond/catalog.py`
- [Recommendation generation](https://github.com/ogwanwan/agentic-soc/blob/main/llm/respond/llm.py): `llm/respond/llm.py`

### Other components

- **Server logs**
- **SOC dashboard**

## Connections

- Server logs → Event normalization: provides logs
- Detection runner → Event normalization: normalizes (evidence: `run_pipeline.py`)
- Event normalization → Log parsers: uses parsers (evidence: `detection_pipeline/tools/normalize.py`)
- Detection runner → Sigma engine: runs detection (evidence: `run_pipeline.py`)
- Sigma engine → Rule loader: loads rules (evidence: `detection_pipeline/detect/engine.py`)
- Detection runner → Suricata detection: runs detection (evidence: `run_pipeline.py`)
- Detection runner → Seed aggregation: aggregates seeds (evidence: `run_pipeline.py`)
- Detection runner → Incident correlation: correlates events (evidence: `run_pipeline.py`)
- Incident correlation → Layer linkers: loads linkers (evidence: `detection_pipeline/correlate/grouping.py`)
- Incident correlation → Incident deduplication: deduplicates incidents (evidence: `detection_pipeline/correlate/grouping.py`)
- Detection runner → Deterministic triage: scores incidents (evidence: `run_pipeline.py`)
- Detection runner → LLM triage review: reviews incidents (evidence: `run_pipeline.py`)
- LLM triage review → Incident queue: annotates incidents
- Detection runner → Incident queue: stores incidents (evidence: `run_pipeline.py`)
- Incident queue → SQLite database: writes records (evidence: `detection_pipeline/store/incidents.py`)
- Investigation queue poller → SQLite database: polls queue
- Investigation queue poller → Investigation entry: starts investigation
- Investigation entry → Incident investigation: runs pipeline (evidence: `llm/investigate/main.py`)
- Incident investigation → Investigation loop: investigates incidents (evidence: `llm/investigate/agent/pipeline.py`)
- Investigation loop → Log investigation tools: invokes tools
- Investigation entry → ATT&CK mapping: maps findings (evidence: `llm/investigate/main.py`)
- ATT&CK mapping → ATT&CK retrieval: retrieves techniques
- ATT&CK mapping → Response planning: supplies findings
- Response planning → Action catalog: selects actions
- Response planning → Recommendation generation: requests recommendations
- Recommendation generation → SOC dashboard: provides results
