# bdg9412/artex-ko-plus architecture

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

- Interactive diagram: https://gitdiagram.com/bdg9412/artex-ko-plus
- Repository: https://github.com/bdg9412/artex-ko-plus

## Overview

AegisLoop is a security validation and investigation platform built around authorized offensive assessment, evidence-backed findings, defensive validation, incident investigation, and a separate autonomous-hunting workflow. Users submit scoped tasks through the web UI; the backend coordinates planning and worker execution, persists findings and evidence, and exposes results for review and follow-up. README statements establish the domain stages; sampled Go excerpts show the task engine and worker boundaries, but unsampled integrations are not treated as inspected.

Main entry points: [`hunting/engine.go`](https://github.com/bdg9412/artex-ko-plus/blob/main/hunting/engine.go) (Hunt orchestration), [`agent/worker.go`](https://github.com/bdg9412/artex-ko-plus/blob/main/agent/worker.go) (Assessment worker), [`agent/planner.go`](https://github.com/bdg9412/artex-ko-plus/blob/main/agent/planner.go) (Planner), [`server/server.go`](https://github.com/bdg9412/artex-ko-plus/blob/main/server/server.go) (HTTP API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["User interface"]
  node_web["Web console<br/>[page.tsx]"]
end

subgraph group_runtime["Assessment runtime"]
  node_planner["Planner<br/>[planner.go]"]
  node_worker["Assessment worker<br/>[worker.go]"]
  node_guard["Scope guard<br/>[guard.go]"]
  node_finding["Finding evidence<br/>[findings.go]"]
end

subgraph group_defense["Defense and investigation"]
  node_defense["Defense evaluation<br/>[evaluate.go]"]
  node_closedloop["Closed-loop review<br/>[evaluate.go]"]
  node_investigation["Incident investigation<br/>[analyze.go]"]
  node_securitysource["Security log sources<br/>[splunk.go]"]
end

subgraph group_hunting["Autonomous hunting"]
  node_research["Threat research<br/>[research.go]"]
  node_hunt["Hunt orchestration<br/>[engine.go]"]
  node_verify["Evidence verification<br/>[verify.go]"]
  node_trends["Threat trends<br/>[trends.go]"]
end

subgraph group_platform["Platform services"]
  node_http["HTTP API<br/>[server.go]"]
  node_manager["Task manager<br/>[manager.go]"]
  node_store[("Persistent records<br/>[db.go]")]
  node_evidence[("Evidence store<br/>[store.go]")]
  node_llm["LLM providers<br/>[provider.go]"]
  node_traffic["Traffic capture<br/>[traffic.go]"]
end

node_operator(("Security operator"))

node_operator -->|"submits scope"| node_web
node_web -->|"uses API"| node_http
node_http -->|"resolves tasks"| node_manager
node_manager -.->|"persists tasks"| node_store
node_manager -->|"starts capture"| node_traffic
node_http -->|"starts task engine"| node_planner
node_planner -->|"dispatches intent"| node_worker
node_worker -->|"gates tool calls"| node_guard
node_worker -->|"records results"| node_store
node_worker -->|"reports findings"| node_finding
node_finding -.->|"anchors evidence"| node_evidence
node_operator -->|"reviews finding"| node_defense
node_defense -->|"informs revalidation"| node_closedloop
node_operator -->|"starts investigation"| node_investigation
node_investigation -->|"queries logs"| node_securitysource
node_operator -->|"configures hunt"| node_hunt
node_trends -->|"seeds review"| node_hunt
node_hunt -->|"runs research"| node_research
node_hunt -->|"runs verification"| node_verify
node_hunt -->|"searches Splunk"| node_securitysource
node_hunt -.->|"preserves run"| node_store
node_planner -.->|"requests completion"| node_llm
node_worker -.->|"requests completion"| node_llm

click node_web "https://github.com/bdg9412/artex-ko-plus/blob/main/web/src/app/(main)/function/tasks/page.tsx"
click node_http "https://github.com/bdg9412/artex-ko-plus/blob/main/server/server.go"
click node_manager "https://github.com/bdg9412/artex-ko-plus/blob/main/server/manager.go"
click node_store "https://github.com/bdg9412/artex-ko-plus/blob/main/db/db.go"
click node_planner "https://github.com/bdg9412/artex-ko-plus/blob/main/agent/planner.go"
click node_worker "https://github.com/bdg9412/artex-ko-plus/blob/main/agent/worker.go"
click node_guard "https://github.com/bdg9412/artex-ko-plus/blob/main/guard/guard.go"
click node_finding "https://github.com/bdg9412/artex-ko-plus/blob/main/db/findings.go"
click node_evidence "https://github.com/bdg9412/artex-ko-plus/blob/main/evidence/store.go"
click node_defense "https://github.com/bdg9412/artex-ko-plus/blob/main/defenseeval/evaluate.go"
click node_closedloop "https://github.com/bdg9412/artex-ko-plus/blob/main/closedloop/evaluate.go"
click node_investigation "https://github.com/bdg9412/artex-ko-plus/blob/main/investigation/analyze.go"
click node_securitysource "https://github.com/bdg9412/artex-ko-plus/blob/main/securitysource/splunk.go"
click node_research "https://github.com/bdg9412/artex-ko-plus/blob/main/hunting/research.go"
click node_hunt "https://github.com/bdg9412/artex-ko-plus/blob/main/hunting/engine.go"
click node_verify "https://github.com/bdg9412/artex-ko-plus/blob/main/hunting/verify.go"
click node_trends "https://github.com/bdg9412/artex-ko-plus/blob/main/hunting/trends.go"
click node_llm "https://github.com/bdg9412/artex-ko-plus/blob/main/agent/provider.go"
click node_traffic "https://github.com/bdg9412/artex-ko-plus/blob/main/traffic/traffic.go"

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_web toneBlue
class node_planner,node_worker,node_guard,node_finding toneAmber
class node_defense,node_closedloop,node_investigation,node_securitysource toneMint
class node_research,node_hunt,node_verify,node_trends toneRose
class node_http,node_manager,node_store,node_evidence,node_llm,node_traffic,node_operator toneIndigo
```

## Components

### User interface

- [Web console](https://github.com/bdg9412/artex-ko-plus/blob/main/web/src/app/(main)/function/tasks/page.tsx): `web/src/app/(main)/function/tasks/page.tsx`

### Assessment runtime

- [Planner](https://github.com/bdg9412/artex-ko-plus/blob/main/agent/planner.go): `agent/planner.go`
- [Assessment worker](https://github.com/bdg9412/artex-ko-plus/blob/main/agent/worker.go): `agent/worker.go`
- [Scope guard](https://github.com/bdg9412/artex-ko-plus/blob/main/guard/guard.go): `guard/guard.go`
- [Finding evidence](https://github.com/bdg9412/artex-ko-plus/blob/main/db/findings.go): `db/findings.go`

### Defense and investigation

- [Defense evaluation](https://github.com/bdg9412/artex-ko-plus/blob/main/defenseeval/evaluate.go): `defenseeval/evaluate.go`
- [Closed-loop review](https://github.com/bdg9412/artex-ko-plus/blob/main/closedloop/evaluate.go): `closedloop/evaluate.go`
- [Incident investigation](https://github.com/bdg9412/artex-ko-plus/blob/main/investigation/analyze.go): `investigation/analyze.go`
- [Security log sources](https://github.com/bdg9412/artex-ko-plus/blob/main/securitysource/splunk.go): `securitysource/splunk.go`

### Autonomous hunting

- [Threat research](https://github.com/bdg9412/artex-ko-plus/blob/main/hunting/research.go): `hunting/research.go`
- [Hunt orchestration](https://github.com/bdg9412/artex-ko-plus/blob/main/hunting/engine.go): `hunting/engine.go`
- [Evidence verification](https://github.com/bdg9412/artex-ko-plus/blob/main/hunting/verify.go): `hunting/verify.go`
- [Threat trends](https://github.com/bdg9412/artex-ko-plus/blob/main/hunting/trends.go): `hunting/trends.go`

### Platform services

- [HTTP API](https://github.com/bdg9412/artex-ko-plus/blob/main/server/server.go): `server/server.go`
- [Task manager](https://github.com/bdg9412/artex-ko-plus/blob/main/server/manager.go): `server/manager.go`
- [Persistent records](https://github.com/bdg9412/artex-ko-plus/blob/main/db/db.go): `db/db.go`
- [Evidence store](https://github.com/bdg9412/artex-ko-plus/blob/main/evidence/store.go): `evidence/store.go`
- [LLM providers](https://github.com/bdg9412/artex-ko-plus/blob/main/agent/provider.go): `agent/provider.go`
- [Traffic capture](https://github.com/bdg9412/artex-ko-plus/blob/main/traffic/traffic.go): `traffic/traffic.go`

### Other components

- **Security operator**

## Connections

- Security operator → Web console: submits scope
- Web console → HTTP API: uses API
- HTTP API → Task manager: resolves tasks (evidence: `server/server.go`)
- Task manager → Persistent records: persists tasks
- Task manager → Traffic capture: starts capture (evidence: `server/manager.go`)
- HTTP API → Planner: starts task engine (evidence: `server/server.go`)
- Planner → Assessment worker: dispatches intent
- Assessment worker → Scope guard: gates tool calls (evidence: `agent/worker.go`)
- Assessment worker → Persistent records: records results (evidence: `agent/worker.go`)
- Assessment worker → Finding evidence: reports findings
- Finding evidence → Evidence store: anchors evidence
- Security operator → Defense evaluation: reviews finding
- Defense evaluation → Closed-loop review: informs revalidation
- Security operator → Incident investigation: starts investigation
- Incident investigation → Security log sources: queries logs
- Security operator → Hunt orchestration: configures hunt
- Threat trends → Hunt orchestration: seeds review
- Hunt orchestration → Threat research: runs research (evidence: `hunting/engine.go`)
- Hunt orchestration → Evidence verification: runs verification
- Hunt orchestration → Security log sources: searches Splunk
- Hunt orchestration → Persistent records: preserves run
- Planner → LLM providers: requests completion
- Assessment worker → LLM providers: requests completion
