# nebulock-inc/agentic-threat-hunting-framework architecture

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

- Interactive diagram: https://gitdiagram.com/nebulock-inc/agentic-threat-hunting-framework
- Repository: https://github.com/nebulock-inc/agentic-threat-hunting-framework

## Overview

ATHF is a threat-hunting memory and automation framework: analysts document hunts in LOCK format, retain and search hunt and research records, and use AI agents and integrations to enrich that work. The graph shows the documented CLI/MCP entry points, hunt and investigation handling, research, ATT&CK coverage, and supporting verdict and metrics capabilities. Automation is shown as a separate repository subsystem. Some links rely on README claims or SOURCE INDEX references; unsampled implementations and their internal call paths are not inferred.

Main entry points: [`athf/commands/hunt.py`](https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/commands/hunt.py) (Hunt commands), [`athf/cli.py`](https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/cli.py) (ATHF CLI), [`athf/mcp/tools`](https://github.com/nebulock-inc/agentic-threat-hunting-framework/tree/main/athf/mcp/tools) (MCP tool sets), [`athf/agents/llm/hunt_researcher.py`](https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/agents/llm/hunt_researcher.py) (Hunt researcher)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User interfaces"]
  node_cli["ATHF CLI<br/>[cli.py]"]
  node_mcpserver["MCP server<br/>[server.py]"]
  node_automation_loop["Automation loop<br/>[loop.ts]"]
  node_automation_github["GitHub operations<br/>[github.ts]"]
  node_automation_classifier["Issue classifier<br/>[classifier.ts]"]
  node_automation_implementer["Issue implementer<br/>[implementer.ts]"]
end

subgraph group_hunt["Hunt lifecycle"]
  node_huntcmd["Hunt commands<br/>[hunt.py]"]
  node_huntmanager["Hunt records<br/>[hunt_manager.py]"]
  node_huntparser["LOCK parser<br/>[hunt_parser.py]"]
  node_template["Hunt templates<br/>[template_engine.py]"]
  node_investigate["Investigations<br/>[investigate.py]"]
  node_investparser["Investigation parser"]
end

subgraph group_research["Research and AI"]
  node_researchcmd["Research commands<br/>[research.py]"]
  node_researchagent["Hunt researcher<br/>[hunt_researcher.py]"]
  node_hypothesis["Hypothesis agent"]
  node_researchmanager["Research records"]
  node_websearch["Web search<br/>[web_search.py]"]
  node_similar["Similar hunts<br/>[similar.py]"]
end

subgraph group_integration["Tools and integrations"]
  node_mcp_tools["MCP tool sets"]
  node_splunk["Splunk client<br/>[splunk_client.py]"]
end

subgraph group_support["Shared analysis"]
  node_attack["ATT&amp;CK coverage<br/>[attack_matrix.py]"]
  node_verdicts["Verdict validation<br/>[verdicts.py]"]
  node_provenance["Evidence provenance<br/>[provenance.py]"]
  node_validation["Input validation<br/>[validation.py]"]
  node_metrics["Metrics recording<br/>[__init__.py]"]
  node_eventlog[("Metrics event log<br/>[__init__.py]")]
end

node_analyst(("Analyst"))
node_github(("GitHub"))
node_web(("Web search service"))

node_analyst -->|"runs commands"| node_cli
node_cli -->|"routes hunts"| node_huntcmd
node_cli -->|"routes research"| node_researchcmd
node_cli -->|"routes investigations"| node_investigate
node_huntcmd -->|"manages records"| node_huntmanager
node_huntcmd -->|"parses hunts"| node_huntparser
node_huntcmd -->|"renders templates"| node_template
node_huntcmd -->|"uses verdicts"| node_verdicts
node_huntcmd -->|"validates input"| node_validation
node_huntmanager -->|"parses files"| node_huntparser
node_huntmanager -->|"computes coverage"| node_attack
node_huntparser -->|"validates findings"| node_verdicts
node_huntparser -->|"checks evidence"| node_provenance
node_investigate -->|"parses investigations"| node_investparser
node_researchcmd -->|"runs research"| node_researchagent
node_researchcmd -->|"saves research"| node_researchmanager
node_researchagent -->|"searches sources"| node_websearch
node_researchagent -->|"checks related work"| node_researchmanager
node_researchmanager -->|"builds context"| node_hypothesis
node_researchagent -.->|"queries externally"| node_web
node_similar -->|"searches hunt records"| node_huntmanager
node_analyst -->|"uses assistant tools"| node_mcpserver
node_mcpserver -->|"registers tools"| node_mcp_tools
node_mcp_tools -->|"exposes hunt operations"| node_huntmanager
node_mcp_tools -->|"exposes research operations"| node_researchmanager
node_mcp_tools -->|"runs AI research"| node_researchagent
node_mcp_tools -->|"handles investigations"| node_investparser
node_cli -->|"offers Splunk commands"| node_splunk
node_metrics -->|"appends events"| node_eventlog
node_automation_loop -->|"classifies issues"| node_automation_classifier
node_automation_loop -->|"dispatches work"| node_automation_implementer
node_automation_loop -->|"uses GitHub operations"| node_automation_github
node_automation_github -->|"accesses repository"| node_github
node_automation_implementer -->|"updates issues"| node_github

click node_cli "https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/cli.py"
click node_mcpserver "https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/mcp/server.py"
click node_huntcmd "https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/commands/hunt.py"
click node_huntmanager "https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/core/hunt_manager.py"
click node_huntparser "https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/core/hunt_parser.py"
click node_template "https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/core/template_engine.py"
click node_investigate "https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/commands/investigate.py"
click node_investparser "https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/core/investigation_parser.py"
click node_researchcmd "https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/commands/research.py"
click node_researchagent "https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/agents/llm/hunt_researcher.py"
click node_hypothesis "https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/agents/llm/hypothesis_generator.py"
click node_researchmanager "https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/core/research_manager.py"
click node_websearch "https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/core/web_search.py"
click node_similar "https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/commands/similar.py"
click node_mcp_tools "https://github.com/nebulock-inc/agentic-threat-hunting-framework/tree/main/athf/mcp/tools"
click node_splunk "https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/core/splunk_client.py"
click node_attack "https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/core/attack_matrix.py"
click node_verdicts "https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/core/verdicts.py"
click node_provenance "https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/core/provenance.py"
click node_validation "https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/utils/validation.py"
click node_metrics "https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/metrics/__init__.py"
click node_eventlog "https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/metrics/__init__.py"
click node_automation_loop "https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/automation/loop.ts"
click node_automation_github "https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/automation/github.ts"
click node_automation_classifier "https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/automation/classifier.ts"
click node_automation_implementer "https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/automation/implementer.ts"

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_cli,node_mcpserver,node_automation_loop,node_automation_github,node_automation_classifier,node_automation_implementer toneBlue
class node_huntcmd,node_huntmanager,node_huntparser,node_template,node_investigate,node_investparser toneAmber
class node_researchcmd,node_researchagent,node_hypothesis,node_researchmanager,node_websearch,node_similar toneMint
class node_mcp_tools,node_splunk toneRose
class node_attack,node_verdicts,node_provenance,node_validation,node_metrics,node_eventlog,node_analyst,node_github,node_web toneIndigo
```

## Components

### User interfaces

- [ATHF CLI](https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/cli.py): `athf/cli.py`
- [MCP server](https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/mcp/server.py): `athf/mcp/server.py`
- [Automation loop](https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/automation/loop.ts): `automation/loop.ts`
- [GitHub operations](https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/automation/github.ts): `automation/github.ts`
- [Issue classifier](https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/automation/classifier.ts): `automation/classifier.ts`
- [Issue implementer](https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/automation/implementer.ts): `automation/implementer.ts`

### Hunt lifecycle

- [Hunt commands](https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/commands/hunt.py): `athf/commands/hunt.py`
- [Hunt records](https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/core/hunt_manager.py): `athf/core/hunt_manager.py`
- [LOCK parser](https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/core/hunt_parser.py): `athf/core/hunt_parser.py`
- [Hunt templates](https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/core/template_engine.py): `athf/core/template_engine.py`
- [Investigations](https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/commands/investigate.py): `athf/commands/investigate.py`
- [Investigation parser](https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/core/investigation_parser.py): `athf/core/investigation_parser.py`

### Research and AI

- [Research commands](https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/commands/research.py): `athf/commands/research.py`
- [Hunt researcher](https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/agents/llm/hunt_researcher.py): `athf/agents/llm/hunt_researcher.py`
- [Hypothesis agent](https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/agents/llm/hypothesis_generator.py): `athf/agents/llm/hypothesis_generator.py`
- [Research records](https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/core/research_manager.py): `athf/core/research_manager.py`
- [Web search](https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/core/web_search.py): `athf/core/web_search.py`
- [Similar hunts](https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/commands/similar.py): `athf/commands/similar.py`

### Tools and integrations

- [MCP tool sets](https://github.com/nebulock-inc/agentic-threat-hunting-framework/tree/main/athf/mcp/tools): `athf/mcp/tools`
- [Splunk client](https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/core/splunk_client.py): `athf/core/splunk_client.py`

### Shared analysis

- [ATT&CK coverage](https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/core/attack_matrix.py): `athf/core/attack_matrix.py`
- [Verdict validation](https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/core/verdicts.py): `athf/core/verdicts.py`
- [Evidence provenance](https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/core/provenance.py): `athf/core/provenance.py`
- [Input validation](https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/utils/validation.py): `athf/utils/validation.py`
- [Metrics recording](https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/metrics/__init__.py): `athf/metrics/__init__.py`
- [Metrics event log](https://github.com/nebulock-inc/agentic-threat-hunting-framework/blob/main/athf/metrics/__init__.py): `athf/metrics/__init__.py`

### Other components

- **Analyst**
- **GitHub**
- **Web search service**

## Connections

- Analyst → ATHF CLI: runs commands
- ATHF CLI → Hunt commands: routes hunts (evidence: `athf/cli.py`)
- ATHF CLI → Research commands: routes research (evidence: `athf/cli.py`)
- ATHF CLI → Investigations: routes investigations (evidence: `athf/cli.py`)
- Hunt commands → Hunt records: manages records (evidence: `athf/commands/hunt.py`)
- Hunt commands → LOCK parser: parses hunts (evidence: `athf/commands/hunt.py`)
- Hunt commands → Hunt templates: renders templates (evidence: `athf/commands/hunt.py`)
- Hunt commands → Verdict validation: uses verdicts (evidence: `athf/commands/hunt.py`)
- Hunt commands → Input validation: validates input (evidence: `athf/commands/hunt.py`)
- Hunt records → LOCK parser: parses files (evidence: `athf/core/hunt_manager.py`)
- Hunt records → ATT&CK coverage: computes coverage (evidence: `athf/core/hunt_manager.py`)
- LOCK parser → Verdict validation: validates findings (evidence: `athf/core/hunt_parser.py`)
- LOCK parser → Evidence provenance: checks evidence (evidence: `athf/core/hunt_parser.py`)
- Investigations → Investigation parser: parses investigations (evidence: `athf/commands/investigate.py`)
- Research commands → Hunt researcher: runs research (evidence: `athf/commands/research.py`)
- Research commands → Research records: saves research (evidence: `athf/commands/research.py`)
- Hunt researcher → Web search: searches sources (evidence: `athf/agents/llm/hunt_researcher.py`)
- Hunt researcher → Research records: checks related work (evidence: `athf/agents/llm/hunt_researcher.py`)
- Research records → Hypothesis agent: builds context (evidence: `athf/core/research_manager.py`)
- Hunt researcher → Web search service: queries externally (evidence: `athf/agents/llm/hunt_researcher.py`)
- Similar hunts → Hunt records: searches hunt records (evidence: `athf/commands/similar.py`)
- Analyst → MCP server: uses assistant tools
- MCP server → MCP tool sets: registers tools (evidence: `athf/mcp/server.py`)
- MCP tool sets → Hunt records: exposes hunt operations (evidence: `athf/mcp/tools/hunt_tools.py`)
- MCP tool sets → Research records: exposes research operations (evidence: `athf/mcp/tools/research_tools.py`)
- MCP tool sets → Hunt researcher: runs AI research (evidence: `athf/mcp/tools/research_tools.py`)
- MCP tool sets → Investigation parser: handles investigations (evidence: `athf/mcp/tools/investigate_tools.py`)
- ATHF CLI → Splunk client: offers Splunk commands (evidence: `athf/cli.py`)
- Metrics recording → Metrics event log: appends events (evidence: `athf/metrics/__init__.py`)
- Automation loop → Issue classifier: classifies issues (evidence: `automation/loop.ts`)
- Automation loop → Issue implementer: dispatches work (evidence: `automation/loop.ts`)
- Automation loop → GitHub operations: uses GitHub operations (evidence: `automation/loop.ts`)
- GitHub operations → GitHub: accesses repository (evidence: `automation/github.ts`)
- Issue implementer → GitHub: updates issues (evidence: `automation/implementer.ts`)
