# achuth07/agentic-threat-hunter architecture

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

- Interactive diagram: https://gitdiagram.com/achuth07/agentic-threat-hunter
- Repository: https://github.com/achuth07/agentic-threat-hunter

## Overview

Agentic-Threat-Hunter is a web-based AI threat-hunting assistant. An analyst submits a question in the React chat; the FastAPI WebSocket backend streams activity and results while a LangGraph agent routes research or hunt work to security tools. Results are summarized and shown with activity, dashboard, integrations, and settings views. The README documents Splunk, Velociraptor, VirusTotal, Sigma, web research, and Atomic Red Team capabilities. Some connections below rely on README statements because the relevant implementation excerpts were incomplete.

Main entry points: [`server.py`](https://github.com/achuth07/agentic-threat-hunter/blob/master/server.py) (FastAPI WebSocket), [`agent/hierarchical_agent.py`](https://github.com/achuth07/agentic-threat-hunter/blob/master/agent/hierarchical_agent.py) (Agent workflow), [`web/src/App.jsx`](https://github.com/achuth07/agentic-threat-hunter/blob/master/web/src/App.jsx) (Chat state), [`web/src/ThreatHuntingPlatform.jsx`](https://github.com/achuth07/agentic-threat-hunter/blob/master/web/src/ThreatHuntingPlatform.jsx) (Hunting views)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web interface"]
  node_app_entry["React entry<br/>[main.jsx]"]
  node_error_boundary["Error boundary<br/>[ErrorBoundary.jsx]"]
  node_app_state["Chat state<br/>[App.jsx]"]
  node_platform_ui["Hunting views"]
end

subgraph group_backend["Service and orchestration"]
  node_api_server["FastAPI WebSocket<br/>[server.py]"]
  node_hierarchical_agent["Agent workflow"]
  node_multitool_agent["Multi-tool graph<br/>[multitool_agent.py]"]
end

subgraph group_hunt_tools["Hunting capabilities"]
  node_splunk["Splunk search"]
  node_velociraptor["Velociraptor VQL"]
  node_virustotal["VirusTotal lookup<br/>[virustotal_tool.py]"]
  node_sigma["Sigma rules<br/>[sigma_tool.py]"]
  node_atomic_red_team["Atomic tests<br/>[atomic_red_team.py]"]
  node_web_research["Web research<br/>[web_tools.py]"]
end

node_analyst(("Analyst"))
node_ollama["Ollama LLM"]
node_splunk_service["Splunk platform"]
node_velociraptor_service["Velociraptor server"]
node_vt_service["VirusTotal API"]
node_web_services["Search services"]
node_windows_host["Windows host"]

node_analyst -->|"asks hunt"| node_platform_ui
node_app_entry -->|"wraps"| node_error_boundary
node_app_entry -->|"renders"| node_app_state
node_app_state -->|"renders"| node_platform_ui
node_platform_ui -->|"sends requests"| node_app_state
node_app_state -->|"streams over WebSocket"| node_api_server
node_api_server -->|"runs workflow"| node_hierarchical_agent
node_hierarchical_agent -.->|"reasons with"| node_ollama
node_multitool_agent -.->|"generates queries"| node_ollama
node_hierarchical_agent -->|"invokes"| node_atomic_red_team
node_hierarchical_agent -->|"invokes"| node_sigma
node_hierarchical_agent -->|"invokes"| node_web_research
node_api_server -->|"health checks"| node_velociraptor
node_api_server -->|"health checks"| node_virustotal
node_api_server -.->|"routes hunts"| node_splunk
node_api_server -.->|"routes hunts"| node_velociraptor
node_api_server -.->|"routes hunts"| node_virustotal
node_api_server -.->|"offers capability"| node_sigma
node_api_server -.->|"offers capability"| node_web_research
node_splunk -.->|"executes searches"| node_splunk_service
node_velociraptor -->|"runs VQL"| node_velociraptor_service
node_virustotal -.->|"checks indicators"| node_vt_service
node_web_research -->|"searches and reads"| node_web_services
node_atomic_red_team -->|"runs tests"| node_windows_host

click node_app_entry "https://github.com/achuth07/agentic-threat-hunter/blob/master/web/src/main.jsx"
click node_error_boundary "https://github.com/achuth07/agentic-threat-hunter/blob/master/web/src/components/ErrorBoundary.jsx"
click node_app_state "https://github.com/achuth07/agentic-threat-hunter/blob/master/web/src/App.jsx"
click node_platform_ui "https://github.com/achuth07/agentic-threat-hunter/blob/master/web/src/ThreatHuntingPlatform.jsx"
click node_api_server "https://github.com/achuth07/agentic-threat-hunter/blob/master/server.py"
click node_hierarchical_agent "https://github.com/achuth07/agentic-threat-hunter/blob/master/agent/hierarchical_agent.py"
click node_multitool_agent "https://github.com/achuth07/agentic-threat-hunter/blob/master/agent/multitool_agent.py"
click node_velociraptor "https://github.com/achuth07/agentic-threat-hunter/blob/master/tools/velociraptor_tool.py"
click node_virustotal "https://github.com/achuth07/agentic-threat-hunter/blob/master/tools/virustotal_tool.py"
click node_sigma "https://github.com/achuth07/agentic-threat-hunter/blob/master/tools/sigma_tool.py"
click node_atomic_red_team "https://github.com/achuth07/agentic-threat-hunter/blob/master/tools/atomic_red_team.py"
click node_web_research "https://github.com/achuth07/agentic-threat-hunter/blob/master/tools/web_tools.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_app_entry,node_error_boundary,node_app_state,node_platform_ui toneBlue
class node_api_server,node_hierarchical_agent,node_multitool_agent toneAmber
class node_splunk,node_velociraptor,node_virustotal,node_sigma,node_atomic_red_team,node_web_research,node_velociraptor_service,node_vt_service toneMint
class node_analyst,node_ollama,node_splunk_service,node_web_services,node_windows_host toneIndigo
```

## Components

### Web interface

- [React entry](https://github.com/achuth07/agentic-threat-hunter/blob/master/web/src/main.jsx): `web/src/main.jsx`
- [Error boundary](https://github.com/achuth07/agentic-threat-hunter/blob/master/web/src/components/ErrorBoundary.jsx): `web/src/components/ErrorBoundary.jsx`
- [Chat state](https://github.com/achuth07/agentic-threat-hunter/blob/master/web/src/App.jsx): `web/src/App.jsx`
- [Hunting views](https://github.com/achuth07/agentic-threat-hunter/blob/master/web/src/ThreatHuntingPlatform.jsx): `web/src/ThreatHuntingPlatform.jsx`

### Service and orchestration

- [FastAPI WebSocket](https://github.com/achuth07/agentic-threat-hunter/blob/master/server.py): `server.py`
- [Agent workflow](https://github.com/achuth07/agentic-threat-hunter/blob/master/agent/hierarchical_agent.py): `agent/hierarchical_agent.py`
- [Multi-tool graph](https://github.com/achuth07/agentic-threat-hunter/blob/master/agent/multitool_agent.py): `agent/multitool_agent.py`

### Hunting capabilities

- **Splunk search**
- [Velociraptor VQL](https://github.com/achuth07/agentic-threat-hunter/blob/master/tools/velociraptor_tool.py): `tools/velociraptor_tool.py`
- [VirusTotal lookup](https://github.com/achuth07/agentic-threat-hunter/blob/master/tools/virustotal_tool.py): `tools/virustotal_tool.py`
- [Sigma rules](https://github.com/achuth07/agentic-threat-hunter/blob/master/tools/sigma_tool.py): `tools/sigma_tool.py`
- [Atomic tests](https://github.com/achuth07/agentic-threat-hunter/blob/master/tools/atomic_red_team.py): `tools/atomic_red_team.py`
- [Web research](https://github.com/achuth07/agentic-threat-hunter/blob/master/tools/web_tools.py): `tools/web_tools.py`

### Other components

- **Analyst**
- **Ollama LLM**
- **Splunk platform**
- **Velociraptor server**
- **VirusTotal API**
- **Search services**
- **Windows host**

## Connections

- Analyst → Hunting views: asks hunt (evidence: `README.md`)
- React entry → Error boundary: wraps (evidence: `web/src/main.jsx`)
- React entry → Chat state: renders (evidence: `web/src/main.jsx`)
- Chat state → Hunting views: renders (evidence: `web/src/App.jsx`)
- Hunting views → Chat state: sends requests (evidence: `web/src/App.jsx`)
- Chat state → FastAPI WebSocket: streams over WebSocket (evidence: `README.md`)
- FastAPI WebSocket → Agent workflow: runs workflow (evidence: `server.py`)
- Agent workflow → Ollama LLM: reasons with (evidence: `README.md`)
- Multi-tool graph → Ollama LLM: generates queries (evidence: `README.md`)
- Agent workflow → Atomic tests: invokes (evidence: `agent/hierarchical_agent.py`)
- Agent workflow → Sigma rules: invokes (evidence: `agent/hierarchical_agent.py`)
- Agent workflow → Web research: invokes (evidence: `agent/hierarchical_agent.py`)
- FastAPI WebSocket → Velociraptor VQL: health checks (evidence: `server.py`)
- FastAPI WebSocket → VirusTotal lookup: health checks (evidence: `server.py`)
- FastAPI WebSocket → Splunk search: routes hunts (evidence: `README.md`)
- FastAPI WebSocket → Velociraptor VQL: routes hunts (evidence: `README.md`)
- FastAPI WebSocket → VirusTotal lookup: routes hunts (evidence: `README.md`)
- FastAPI WebSocket → Sigma rules: offers capability (evidence: `README.md`)
- FastAPI WebSocket → Web research: offers capability (evidence: `README.md`)
- Splunk search → Splunk platform: executes searches (evidence: `README.md`)
- Velociraptor VQL → Velociraptor server: runs VQL (evidence: `tools/velociraptor_tool.py`)
- VirusTotal lookup → VirusTotal API: checks indicators (evidence: `README.md`)
- Web research → Search services: searches and reads (evidence: `tools/web_tools.py`)
- Atomic tests → Windows host: runs tests (evidence: `tools/atomic_red_team.py`)
