# gvpdbish/artex architecture

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

- Interactive diagram: https://gitdiagram.com/gvpdbish/artex
- Repository: https://github.com/gvpdbish/artex

## Overview

ARTEX is a self-hosted, LLM-driven penetration-testing platform. An operator creates a task; the event-driven engine plans intents, dispatches workers to use real tools, and writes discoveries into linked exploration and shared asset graphs until the goal is proven. Captured traffic grounds findings and retests in request/response evidence. The product also provides scope and approval controls, budgets, integrations, and a web UI. Edges follow the README or shown source references; several subsystems are represented from documented capabilities because their implementation was not sampled.

Main entry points: [`agent/worker.go`](https://github.com/gvpdbish/artex/blob/main/agent/worker.go) (Worker agents), [`server/server.go`](https://github.com/gvpdbish/artex/blob/main/server/server.go) (HTTP API), [`server/engine.go`](https://github.com/gvpdbish/artex/blob/main/server/engine.go) (Task engine), [`agent/planner.go`](https://github.com/gvpdbish/artex/blob/main/agent/planner.go) (Planner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Operator experience"]
  node_webui["Web UI"]
  node_api["HTTP API<br/>[server.go]"]
end

subgraph group_orchestration["Task orchestration"]
  node_engine["Task engine<br/>[engine.go]"]
  node_manager["Task manager<br/>[manager.go]"]
  node_planner["Planner<br/>[planner.go]"]
  node_workers["Worker agents<br/>[worker.go]"]
end

subgraph group_discovery["Discovery and evidence"]
  node_scan_ingest["Scan ingestion<br/>[scan_ingest.go]"]
  node_proxy["Traffic recorder<br/>[traffic.go]"]
  node_evidence["Evidence store<br/>[store.go]"]
  node_extension["Browser capture<br/>[background.js]"]
end

subgraph group_controls["Safety and integrations"]
  node_guard["Scope and safety<br/>[guard.go]"]
  node_intercept["Approval gates<br/>[intercept.go]"]
  node_egress["Network egress<br/>[egress.go]"]
  node_llmpool["LLM providers<br/>[pool.go]"]
end

subgraph group_persistence["State and reporting"]
  node_asset_graph[("Asset graph<br/>[assets.go]")]
  node_exploration[("Exploration graph<br/>[exploration.go]")]
  node_findings[("Findings and retests<br/>[findings.go]")]
  node_reports["Reports<br/>[report.go]"]
  node_archive[("S3 archive<br/>[s3.go]")]
end

node_operator(("Operator"))

node_operator -->|"uses"| node_webui
node_webui -->|"calls API"| node_api
node_api -->|"controls tasks"| node_engine
node_engine -->|"runs planner"| node_planner
node_engine -->|"runs workers"| node_workers
node_engine -->|"loads task"| node_manager
node_planner -->|"reads progress"| node_exploration
node_planner -->|"dispatches intents"| node_workers
node_workers -->|"writes assets"| node_asset_graph
node_workers -->|"writes progress"| node_exploration
node_workers -->|"writes findings"| node_findings
node_workers -->|"checks actions"| node_guard
node_workers -->|"requests approval"| node_intercept
node_workers -->|"uses egress"| node_egress
node_workers -.->|"calls models"| node_llmpool
node_workers -->|"executes through"| node_proxy
node_workers -->|"ingests scans"| node_scan_ingest
node_proxy -->|"records traffic"| node_evidence
node_extension -.->|"captures traffic"| node_evidence
node_findings -->|"links proof"| node_evidence
node_api -->|"serves assets"| node_asset_graph
node_api -->|"serves graph"| node_exploration
node_api -->|"serves findings"| node_findings
node_api -.->|"serves reports"| node_reports
node_manager -.->|"configures archive"| node_archive

click node_webui "https://github.com/gvpdbish/artex/tree/main/web/src/app/(main)"
click node_api "https://github.com/gvpdbish/artex/blob/main/server/server.go"
click node_engine "https://github.com/gvpdbish/artex/blob/main/server/engine.go"
click node_manager "https://github.com/gvpdbish/artex/blob/main/server/manager.go"
click node_planner "https://github.com/gvpdbish/artex/blob/main/agent/planner.go"
click node_workers "https://github.com/gvpdbish/artex/blob/main/agent/worker.go"
click node_scan_ingest "https://github.com/gvpdbish/artex/blob/main/agent/scan_ingest.go"
click node_proxy "https://github.com/gvpdbish/artex/blob/main/traffic/traffic.go"
click node_evidence "https://github.com/gvpdbish/artex/blob/main/evidence/store.go"
click node_extension "https://github.com/gvpdbish/artex/blob/main/extension/background.js"
click node_guard "https://github.com/gvpdbish/artex/blob/main/guard/guard.go"
click node_intercept "https://github.com/gvpdbish/artex/blob/main/intercept/intercept.go"
click node_egress "https://github.com/gvpdbish/artex/blob/main/egress/egress.go"
click node_llmpool "https://github.com/gvpdbish/artex/blob/main/llmpool/pool.go"
click node_asset_graph "https://github.com/gvpdbish/artex/blob/main/db/assets.go"
click node_exploration "https://github.com/gvpdbish/artex/blob/main/db/exploration.go"
click node_findings "https://github.com/gvpdbish/artex/blob/main/db/findings.go"
click node_reports "https://github.com/gvpdbish/artex/blob/main/report/report.go"
click node_archive "https://github.com/gvpdbish/artex/blob/main/archivestore/s3.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_webui,node_api toneBlue
class node_engine,node_manager,node_planner,node_workers toneAmber
class node_scan_ingest,node_proxy,node_evidence,node_extension toneMint
class node_guard,node_intercept,node_egress,node_llmpool toneRose
class node_asset_graph,node_exploration,node_findings,node_reports,node_archive,node_operator toneIndigo
```

## Components

### Operator experience

- [Web UI](https://github.com/gvpdbish/artex/tree/main/web/src/app/(main)): `web/src/app/(main)`
- [HTTP API](https://github.com/gvpdbish/artex/blob/main/server/server.go): `server/server.go`

### Task orchestration

- [Task engine](https://github.com/gvpdbish/artex/blob/main/server/engine.go): `server/engine.go`
- [Task manager](https://github.com/gvpdbish/artex/blob/main/server/manager.go): `server/manager.go`
- [Planner](https://github.com/gvpdbish/artex/blob/main/agent/planner.go): `agent/planner.go`
- [Worker agents](https://github.com/gvpdbish/artex/blob/main/agent/worker.go): `agent/worker.go`

### Discovery and evidence

- [Scan ingestion](https://github.com/gvpdbish/artex/blob/main/agent/scan_ingest.go): `agent/scan_ingest.go`
- [Traffic recorder](https://github.com/gvpdbish/artex/blob/main/traffic/traffic.go): `traffic/traffic.go`
- [Evidence store](https://github.com/gvpdbish/artex/blob/main/evidence/store.go): `evidence/store.go`
- [Browser capture](https://github.com/gvpdbish/artex/blob/main/extension/background.js): `extension/background.js`

### Safety and integrations

- [Scope and safety](https://github.com/gvpdbish/artex/blob/main/guard/guard.go): `guard/guard.go`
- [Approval gates](https://github.com/gvpdbish/artex/blob/main/intercept/intercept.go): `intercept/intercept.go`
- [Network egress](https://github.com/gvpdbish/artex/blob/main/egress/egress.go): `egress/egress.go`
- [LLM providers](https://github.com/gvpdbish/artex/blob/main/llmpool/pool.go): `llmpool/pool.go`

### State and reporting

- [Asset graph](https://github.com/gvpdbish/artex/blob/main/db/assets.go): `db/assets.go`
- [Exploration graph](https://github.com/gvpdbish/artex/blob/main/db/exploration.go): `db/exploration.go`
- [Findings and retests](https://github.com/gvpdbish/artex/blob/main/db/findings.go): `db/findings.go`
- [Reports](https://github.com/gvpdbish/artex/blob/main/report/report.go): `report/report.go`
- [S3 archive](https://github.com/gvpdbish/artex/blob/main/archivestore/s3.go): `archivestore/s3.go`

### Other components

- **Operator**

## Connections

- Operator → Web UI: uses (evidence: `README.md`)
- Web UI → HTTP API: calls API
- HTTP API → Task engine: controls tasks (evidence: `server/server.go`)
- Task engine → Planner: runs planner (evidence: `server/engine.go`)
- Task engine → Worker agents: runs workers (evidence: `server/engine.go`)
- Task engine → Task manager: loads task (evidence: `server/engine.go`)
- Planner → Exploration graph: reads progress (evidence: `README.md`)
- Planner → Worker agents: dispatches intents (evidence: `README.md`)
- Worker agents → Asset graph: writes assets (evidence: `README.md`)
- Worker agents → Exploration graph: writes progress (evidence: `README.md`)
- Worker agents → Findings and retests: writes findings (evidence: `README.md`)
- Worker agents → Scope and safety: checks actions (evidence: `guard/guard.go`)
- Worker agents → Approval gates: requests approval (evidence: `README.md`)
- Worker agents → Network egress: uses egress (evidence: `egress/egress.go`)
- Worker agents → LLM providers: calls models
- Worker agents → Traffic recorder: executes through (evidence: `README.md`)
- Worker agents → Scan ingestion: ingests scans
- Traffic recorder → Evidence store: records traffic (evidence: `evidence/store.go`)
- Browser capture → Evidence store: captures traffic
- Findings and retests → Evidence store: links proof (evidence: `README.md`)
- HTTP API → Asset graph: serves assets (evidence: `server/server.go`)
- HTTP API → Exploration graph: serves graph (evidence: `server/server.go`)
- HTTP API → Findings and retests: serves findings (evidence: `server/server.go`)
- HTTP API → Reports: serves reports
- Task manager → S3 archive: configures archive
