# wpsec/artex-pro architecture

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

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

## Overview

ARTEX-Pro is an AI-assisted autonomous penetration-testing system. An operator configures a task and authorized scope, then the backend’s event-driven engine coordinates planning and worker agents that use tools to explore targets and record assets, evidence, and findings. Users can inspect task activity, traffic, reports, and findings, and initiate vulnerability retests. The README documents these product capabilities; sampled source confirms key backend dependencies, but many route-level connections and unsampled subsystems cannot be verified here, so those links are omitted or marked unverified.

Main entry points: [`server/server.go`](https://github.com/wpsec/artex-pro/blob/main/server/server.go) (HTTP API), [`agent/worker.go`](https://github.com/wpsec/artex-pro/blob/main/agent/worker.go) (Worker agents), [`server/engine.go`](https://github.com/wpsec/artex-pro/blob/main/server/engine.go) (Exploration engine), [`server/manager.go`](https://github.com/wpsec/artex-pro/blob/main/server/manager.go) (Task manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_webui["Web UI<br/>[page.tsx]"]
  node_api["HTTP API<br/>[server.go]"]
  node_reports["Reports<br/>[report.go]"]
end

subgraph group_execution["Task execution"]
  node_taskmgr["Task manager<br/>[manager.go]"]
  node_engine["Exploration engine<br/>[engine.go]"]
  node_planner["Planner<br/>[planner.go]"]
  node_worker["Worker agents<br/>[worker.go]"]
  node_tools["Agent tools<br/>[tools.go]"]
  node_guard["Action guard<br/>[guard.go]"]
end

subgraph group_security["Security workflow"]
  node_exploration[("Exploration state<br/>[exploration.go]")]
  node_assets[("Asset scope<br/>[assets.go]")]
  node_traffic[("Traffic capture<br/>[traffic.go]")]
  node_evidence[("Finding evidence<br/>[store.go]")]
  node_findings[("Findings<br/>[findings.go]")]
  node_retest["Vulnerability retests<br/>[retester.go]"]
end

subgraph group_platform["Platform services"]
  node_mcpzap["MCP and ZAP<br/>[zap.go]"]
  node_llm["LLM services"]
  node_database[("PostgreSQL<br/>[db.go]")]
  node_notifications["Notifications<br/>[notify.go]"]
end

node_operator(("Operator"))

node_operator -->|"uses"| node_webui
node_webui -.->|"requests API"| node_api
node_api -->|"handles tasks"| node_taskmgr
node_taskmgr -->|"coordinates tasks"| node_engine
node_engine -->|"plans work"| node_planner
node_engine -->|"runs workers"| node_worker
node_worker -->|"invokes tools"| node_tools
node_worker -->|"gates actions"| node_guard
node_worker -->|"records exploration"| node_exploration
node_worker -->|"updates assets"| node_assets
node_tools -.->|"uses MCP tools"| node_mcpzap
node_planner -.->|"requests plans"| node_llm
node_worker -.->|"requests completion"| node_llm
node_engine -->|"checks active intent"| node_exploration
node_taskmgr -->|"connects PostgreSQL"| node_database
node_api -->|"serves findings"| node_findings
node_api -->|"reads graph"| node_exploration
node_traffic -->|"indexes exchanges"| node_database
node_evidence -->|"snapshots traffic"| node_traffic
node_evidence -->|"binds evidence"| node_findings
node_api -.->|"starts retest"| node_retest
node_api -->|"provides reports"| node_reports
node_api -.->|"configures delivery"| node_notifications

click node_webui "https://github.com/wpsec/artex-pro/blob/main/web/src/app/(main)/function/tasks/page.tsx"
click node_api "https://github.com/wpsec/artex-pro/blob/main/server/server.go"
click node_taskmgr "https://github.com/wpsec/artex-pro/blob/main/server/manager.go"
click node_engine "https://github.com/wpsec/artex-pro/blob/main/server/engine.go"
click node_planner "https://github.com/wpsec/artex-pro/blob/main/agent/planner.go"
click node_worker "https://github.com/wpsec/artex-pro/blob/main/agent/worker.go"
click node_tools "https://github.com/wpsec/artex-pro/blob/main/agent/tools.go"
click node_guard "https://github.com/wpsec/artex-pro/blob/main/guard/guard.go"
click node_mcpzap "https://github.com/wpsec/artex-pro/blob/main/cmd/artex/zap.go"
click node_database "https://github.com/wpsec/artex-pro/blob/main/db/db.go"
click node_exploration "https://github.com/wpsec/artex-pro/blob/main/db/exploration.go"
click node_assets "https://github.com/wpsec/artex-pro/blob/main/db/assets.go"
click node_traffic "https://github.com/wpsec/artex-pro/blob/main/traffic/traffic.go"
click node_evidence "https://github.com/wpsec/artex-pro/blob/main/evidence/store.go"
click node_findings "https://github.com/wpsec/artex-pro/blob/main/db/findings.go"
click node_retest "https://github.com/wpsec/artex-pro/blob/main/agent/retester.go"
click node_reports "https://github.com/wpsec/artex-pro/blob/main/report/report.go"
click node_notifications "https://github.com/wpsec/artex-pro/blob/main/notify/notify.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,node_reports toneBlue
class node_taskmgr,node_engine,node_planner,node_worker,node_tools,node_guard toneAmber
class node_exploration,node_assets,node_traffic,node_evidence,node_findings,node_retest toneMint
class node_mcpzap,node_llm,node_database,node_notifications toneRose
class node_operator toneIndigo
```

## Components

### User experience

- [Web UI](https://github.com/wpsec/artex-pro/blob/main/web/src/app/(main)/function/tasks/page.tsx): `web/src/app/(main)/function/tasks/page.tsx`
- [HTTP API](https://github.com/wpsec/artex-pro/blob/main/server/server.go): `server/server.go`
- [Reports](https://github.com/wpsec/artex-pro/blob/main/report/report.go): `report/report.go`

### Task execution

- [Task manager](https://github.com/wpsec/artex-pro/blob/main/server/manager.go): `server/manager.go`
- [Exploration engine](https://github.com/wpsec/artex-pro/blob/main/server/engine.go): `server/engine.go`
- [Planner](https://github.com/wpsec/artex-pro/blob/main/agent/planner.go): `agent/planner.go`
- [Worker agents](https://github.com/wpsec/artex-pro/blob/main/agent/worker.go): `agent/worker.go`
- [Agent tools](https://github.com/wpsec/artex-pro/blob/main/agent/tools.go): `agent/tools.go`
- [Action guard](https://github.com/wpsec/artex-pro/blob/main/guard/guard.go): `guard/guard.go`

### Security workflow

- [Exploration state](https://github.com/wpsec/artex-pro/blob/main/db/exploration.go): `db/exploration.go`
- [Asset scope](https://github.com/wpsec/artex-pro/blob/main/db/assets.go): `db/assets.go`
- [Traffic capture](https://github.com/wpsec/artex-pro/blob/main/traffic/traffic.go): `traffic/traffic.go`
- [Finding evidence](https://github.com/wpsec/artex-pro/blob/main/evidence/store.go): `evidence/store.go`
- [Findings](https://github.com/wpsec/artex-pro/blob/main/db/findings.go): `db/findings.go`
- [Vulnerability retests](https://github.com/wpsec/artex-pro/blob/main/agent/retester.go): `agent/retester.go`

### Platform services

- [MCP and ZAP](https://github.com/wpsec/artex-pro/blob/main/cmd/artex/zap.go): `cmd/artex/zap.go`
- **LLM services**
- [PostgreSQL](https://github.com/wpsec/artex-pro/blob/main/db/db.go): `db/db.go`
- [Notifications](https://github.com/wpsec/artex-pro/blob/main/notify/notify.go): `notify/notify.go`

### Other components

- **Operator**

## Connections

- Operator → Web UI: uses
- Web UI → HTTP API: requests API
- HTTP API → Task manager: handles tasks (evidence: `server/server.go`)
- Task manager → Exploration engine: coordinates tasks (evidence: `server/manager.go`)
- Exploration engine → Planner: plans work (evidence: `server/engine.go`)
- Exploration engine → Worker agents: runs workers (evidence: `server/engine.go`)
- Worker agents → Agent tools: invokes tools (evidence: `agent/worker.go`)
- Worker agents → Action guard: gates actions (evidence: `agent/worker.go`)
- Worker agents → Exploration state: records exploration (evidence: `agent/worker.go`)
- Worker agents → Asset scope: updates assets (evidence: `agent/worker.go`)
- Agent tools → MCP and ZAP: uses MCP tools
- Planner → LLM services: requests plans
- Worker agents → LLM services: requests completion
- Exploration engine → Exploration state: checks active intent (evidence: `server/engine.go`)
- Task manager → PostgreSQL: connects PostgreSQL (evidence: `server/manager.go`)
- HTTP API → Findings: serves findings (evidence: `server/server.go`)
- HTTP API → Exploration state: reads graph (evidence: `server/server.go`)
- Traffic capture → PostgreSQL: indexes exchanges (evidence: `traffic/traffic.go`)
- Finding evidence → Traffic capture: snapshots traffic (evidence: `evidence/store.go`)
- Finding evidence → Findings: binds evidence (evidence: `evidence/store.go`)
- HTTP API → Vulnerability retests: starts retest
- HTTP API → Reports: provides reports (evidence: `server/server.go`)
- HTTP API → Notifications: configures delivery
