# cleytonsilva/artex architecture

> Architecture diagram of the GitHub repository cleytonsilva/artex, 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/cleytonsilva/artex
- Repository: https://github.com/cleytonsilva/artex

## Overview

ARTEX is a self-hosted, LLM-driven penetration-testing platform. Users define a task goal; the planner decomposes it into intents, workers execute tools, and results update the per-task exploration graph and shared asset graph. Findings can retain request/response evidence and be retested, while scope, approval, and budget controls constrain autonomous actions. The graph also includes traffic capture and the management UI. Relationships among unsampled subsystems are included only where the README documents them; source excerpts provide additional evidence for selected engine, API, and ingestion links.

Main entry points: [`agent/worker.go`](https://github.com/cleytonsilva/artex/blob/main/agent/worker.go) (Intent workers), [`server/engine.go`](https://github.com/cleytonsilva/artex/blob/main/server/engine.go) (Event-driven engine), [`server/server.go`](https://github.com/cleytonsilva/artex/blob/main/server/server.go) (HTTP API), [`agent/planner.go`](https://github.com/cleytonsilva/artex/blob/main/agent/planner.go) (Goal planner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_control["Task orchestration"]
  node_manager["Task manager<br/>[manager.go]"]
  node_engine["Event-driven engine<br/>[engine.go]"]
  node_planner["Goal planner<br/>[planner.go]"]
  node_worker["Intent workers<br/>[worker.go]"]
end

subgraph group_execution["Testing and safeguards"]
  node_tools["Security tools<br/>[tools.go]"]
  node_scan_ingest["Scan ingestion<br/>[scan_ingest.go]"]
  node_guard["Action guard<br/>[guard.go]"]
  node_intercept["Approval gates<br/>[intercept.go]"]
  node_egress["Scoped egress<br/>[egress.go]"]
end

subgraph group_data["Graphs and evidence"]
  node_traffic["Traffic recorder<br/>[traffic.go]"]
  node_asset_graph[("Shared asset graph<br/>[assets.go]")]
  node_exploration_graph[("Exploration graph<br/>[exploration.go]")]
  node_evidence[("Traffic evidence<br/>[store.go]")]
  node_findings["Finding reports<br/>[findings.go]"]
end

subgraph group_interfaces["User interfaces"]
  node_ui["Web console<br/>[page.tsx]"]
  node_http_api["HTTP API<br/>[server.go]"]
  node_findings_ui["Findings explorer<br/>[page.tsx]"]
  node_asset_tree["Asset tree<br/>[asset-tree.tsx]"]
  node_findings_table["Findings table<br/>[findings-table.tsx]"]
  node_traffic_ui["Traffic console<br/>[page.tsx]"]
end

subgraph group_operations["Platform services"]
  node_llm_recording["LLM recorder<br/>[llmrec.go]"]
  node_llm_pool["LLM providers<br/>[pool.go]"]
  node_notifications["Notifications<br/>[notify.go]"]
end

node_operator(("Security operator"))

node_operator -->|"manages tasks"| node_ui
node_ui -.->|"uses API"| node_http_api
node_http_api -.->|"manages tasks"| node_manager
node_manager -.->|"runs tasks"| node_engine
node_engine -->|"runs planning"| node_planner
node_engine -->|"dispatches intents"| node_worker
node_planner -->|"reads progress"| node_exploration_graph
node_planner -->|"dispatches intents"| node_worker
node_worker -->|"executes tools"| node_tools
node_worker -->|"writes assets"| node_asset_graph
node_worker -->|"writes results"| node_exploration_graph
node_worker -->|"records findings"| node_findings
node_tools -->|"checks actions"| node_guard
node_guard -->|"applies approvals"| node_intercept
node_tools -.->|"sends requests"| node_egress
node_scan_ingest -->|"writes assets"| node_asset_graph
node_traffic -.->|"stores captures"| node_evidence
node_findings -->|"attaches proof"| node_evidence
node_llm_pool -.->|"records calls"| node_llm_recording
node_engine -->|"meters usage"| node_llm_recording
node_http_api -->|"reads graph"| node_exploration_graph
node_findings_ui -->|"renders"| node_asset_tree
node_findings_ui -->|"renders"| node_findings_table
node_ui -.->|"views findings"| node_findings_ui
node_traffic_ui -.->|"requests traffic"| node_http_api
node_engine -.->|"emits events"| node_notifications

click node_ui "https://github.com/cleytonsilva/artex/blob/main/web/src/app/(main)/function/tasks/page.tsx"
click node_http_api "https://github.com/cleytonsilva/artex/blob/main/server/server.go"
click node_manager "https://github.com/cleytonsilva/artex/blob/main/server/manager.go"
click node_engine "https://github.com/cleytonsilva/artex/blob/main/server/engine.go"
click node_planner "https://github.com/cleytonsilva/artex/blob/main/agent/planner.go"
click node_worker "https://github.com/cleytonsilva/artex/blob/main/agent/worker.go"
click node_tools "https://github.com/cleytonsilva/artex/blob/main/agent/tools.go"
click node_scan_ingest "https://github.com/cleytonsilva/artex/blob/main/agent/scan_ingest.go"
click node_guard "https://github.com/cleytonsilva/artex/blob/main/guard/guard.go"
click node_intercept "https://github.com/cleytonsilva/artex/blob/main/intercept/intercept.go"
click node_egress "https://github.com/cleytonsilva/artex/blob/main/egress/egress.go"
click node_traffic "https://github.com/cleytonsilva/artex/blob/main/traffic/traffic.go"
click node_asset_graph "https://github.com/cleytonsilva/artex/blob/main/db/assets.go"
click node_exploration_graph "https://github.com/cleytonsilva/artex/blob/main/db/exploration.go"
click node_evidence "https://github.com/cleytonsilva/artex/blob/main/evidence/store.go"
click node_findings "https://github.com/cleytonsilva/artex/blob/main/report/findings.go"
click node_llm_recording "https://github.com/cleytonsilva/artex/blob/main/llmrec/llmrec.go"
click node_llm_pool "https://github.com/cleytonsilva/artex/blob/main/llmpool/pool.go"
click node_notifications "https://github.com/cleytonsilva/artex/blob/main/notify/notify.go"
click node_findings_ui "https://github.com/cleytonsilva/artex/blob/main/web/src/app/(main)/function/findings/page.tsx"
click node_asset_tree "https://github.com/cleytonsilva/artex/blob/main/web/src/app/(main)/function/findings/_components/asset-tree.tsx"
click node_findings_table "https://github.com/cleytonsilva/artex/blob/main/web/src/app/(main)/function/findings/_components/findings-table.tsx"
click node_traffic_ui "https://github.com/cleytonsilva/artex/blob/main/web/src/app/(main)/function/traffic/page.tsx"

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_manager,node_engine,node_planner,node_worker toneBlue
class node_tools,node_scan_ingest,node_guard,node_intercept,node_egress toneAmber
class node_traffic,node_asset_graph,node_exploration_graph,node_evidence,node_findings toneMint
class node_ui,node_http_api,node_findings_ui,node_asset_tree,node_findings_table,node_traffic_ui toneRose
class node_llm_recording,node_llm_pool,node_notifications,node_operator toneIndigo
```

## Components

### Task orchestration

- [Task manager](https://github.com/cleytonsilva/artex/blob/main/server/manager.go): `server/manager.go`
- [Event-driven engine](https://github.com/cleytonsilva/artex/blob/main/server/engine.go): `server/engine.go`
- [Goal planner](https://github.com/cleytonsilva/artex/blob/main/agent/planner.go): `agent/planner.go`
- [Intent workers](https://github.com/cleytonsilva/artex/blob/main/agent/worker.go): `agent/worker.go`

### Testing and safeguards

- [Security tools](https://github.com/cleytonsilva/artex/blob/main/agent/tools.go): `agent/tools.go`
- [Scan ingestion](https://github.com/cleytonsilva/artex/blob/main/agent/scan_ingest.go): `agent/scan_ingest.go`
- [Action guard](https://github.com/cleytonsilva/artex/blob/main/guard/guard.go): `guard/guard.go`
- [Approval gates](https://github.com/cleytonsilva/artex/blob/main/intercept/intercept.go): `intercept/intercept.go`
- [Scoped egress](https://github.com/cleytonsilva/artex/blob/main/egress/egress.go): `egress/egress.go`

### Graphs and evidence

- [Traffic recorder](https://github.com/cleytonsilva/artex/blob/main/traffic/traffic.go): `traffic/traffic.go`
- [Shared asset graph](https://github.com/cleytonsilva/artex/blob/main/db/assets.go): `db/assets.go`
- [Exploration graph](https://github.com/cleytonsilva/artex/blob/main/db/exploration.go): `db/exploration.go`
- [Traffic evidence](https://github.com/cleytonsilva/artex/blob/main/evidence/store.go): `evidence/store.go`
- [Finding reports](https://github.com/cleytonsilva/artex/blob/main/report/findings.go): `report/findings.go`

### User interfaces

- [Web console](https://github.com/cleytonsilva/artex/blob/main/web/src/app/(main)/function/tasks/page.tsx): `web/src/app/(main)/function/tasks/page.tsx`
- [HTTP API](https://github.com/cleytonsilva/artex/blob/main/server/server.go): `server/server.go`
- [Findings explorer](https://github.com/cleytonsilva/artex/blob/main/web/src/app/(main)/function/findings/page.tsx): `web/src/app/(main)/function/findings/page.tsx`
- [Asset tree](https://github.com/cleytonsilva/artex/blob/main/web/src/app/(main)/function/findings/_components/asset-tree.tsx): `web/src/app/(main)/function/findings/_components/asset-tree.tsx`
- [Findings table](https://github.com/cleytonsilva/artex/blob/main/web/src/app/(main)/function/findings/_components/findings-table.tsx): `web/src/app/(main)/function/findings/_components/findings-table.tsx`
- [Traffic console](https://github.com/cleytonsilva/artex/blob/main/web/src/app/(main)/function/traffic/page.tsx): `web/src/app/(main)/function/traffic/page.tsx`

### Platform services

- [LLM recorder](https://github.com/cleytonsilva/artex/blob/main/llmrec/llmrec.go): `llmrec/llmrec.go`
- [LLM providers](https://github.com/cleytonsilva/artex/blob/main/llmpool/pool.go): `llmpool/pool.go`
- [Notifications](https://github.com/cleytonsilva/artex/blob/main/notify/notify.go): `notify/notify.go`

### Other components

- **Security operator**

## Connections

- Security operator → Web console: manages tasks (evidence: `README.md`)
- Web console → HTTP API: uses API
- HTTP API → Task manager: manages tasks
- Task manager → Event-driven engine: runs tasks
- Event-driven engine → Goal planner: runs planning (evidence: `README.md`)
- Event-driven engine → Intent workers: dispatches intents (evidence: `README.md`)
- Goal planner → Exploration graph: reads progress (evidence: `README.md`)
- Goal planner → Intent workers: dispatches intents (evidence: `README.md`)
- Intent workers → Security tools: executes tools (evidence: `README.md`)
- Intent workers → Shared asset graph: writes assets (evidence: `README.md`)
- Intent workers → Exploration graph: writes results (evidence: `README.md`)
- Intent workers → Finding reports: records findings (evidence: `README.md`)
- Security tools → Action guard: checks actions (evidence: `README.md`)
- Action guard → Approval gates: applies approvals (evidence: `README.md`)
- Security tools → Scoped egress: sends requests
- Scan ingestion → Shared asset graph: writes assets
- Traffic recorder → Traffic evidence: stores captures
- Finding reports → Traffic evidence: attaches proof (evidence: `README.md`)
- LLM providers → LLM recorder: records calls
- Event-driven engine → LLM recorder: meters usage
- HTTP API → Exploration graph: reads graph (evidence: `server/server.go`)
- Findings explorer → Asset tree: renders (evidence: `web/src/app/(main)/function/findings/page.tsx`)
- Findings explorer → Findings table: renders (evidence: `web/src/app/(main)/function/findings/page.tsx`)
- Web console → Findings explorer: views findings
- Traffic console → HTTP API: requests traffic
- Event-driven engine → Notifications: emits events
