# crowinnovations/artex architecture

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

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

## Overview

ARTEX is a self-hosted autonomous penetration-testing platform. An operator starts a task; the engine coordinates planner and worker agents, which use real tools to explore targets and write findings and observations into linked asset and exploration graphs. Captured traffic supports evidence-backed findings and retests. Scope controls, approvals, budgets, and egress safeguards constrain execution. The Go server exposes task, findings, traffic, and system features to the embedded web UI. The README documents the principal workflow and capabilities; several implementation links below rely on those statements because the relevant source was not excerpted.

Main entry points: [`agent/worker.go`](https://github.com/crowinnovations/artex/blob/main/agent/worker.go) (Worker agents), [`server/server.go`](https://github.com/crowinnovations/artex/blob/main/server/server.go) (HTTP service), [`server/engine.go`](https://github.com/crowinnovations/artex/blob/main/server/engine.go) (Task engine), [`web/src/app/(main)/function/findings/page.tsx`](https://github.com/crowinnovations/artex/blob/main/web/src/app/(main)/function/findings/page.tsx) (Findings views)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Task orchestration"]
  node_engine["Task 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_scan["Scan ingestion<br/>[scan_ingest.go]"]
  node_llm["LLM provider<br/>[provider.go]"]
end

subgraph group_controls["Execution controls"]
  node_scope["Scope and egress<br/>[egress.go]"]
  node_guard["Action guard<br/>[guard.go]"]
  node_approval["Interception approvals<br/>[intercept.go]"]
end

subgraph group_evidence["Evidence and data"]
  node_llmrecord["LLM recording<br/>[llmrec.go]"]
  node_proxy["Recording proxy<br/>[traffic.go]"]
  node_assetgraph[("Shared asset graph<br/>[assets.go]")]
  node_exploration[("Task exploration graph<br/>[exploration.go]")]
  node_evidence["Traffic evidence<br/>[store.go]"]
  node_store[("PostgreSQL store<br/>[db.go]")]
end

subgraph group_interface["User interface"]
  node_entry["HTTP service<br/>[server.go]"]
  node_ui["Web console<br/>[page.tsx]"]
  node_taskui["Task management<br/>[page.tsx]"]
  node_findingsui["Findings views<br/>[page.tsx]"]
  node_trafficui["Traffic views<br/>[page.tsx]"]
end

node_operator(("Operator"))
node_target(("Test target"))

node_operator -->|"uses"| node_ui
node_ui -->|"requests"| node_entry
node_entry -->|"coordinates"| node_engine
node_engine -->|"runs planning"| node_planner
node_planner -->|"dispatches intents"| node_worker
node_worker -->|"executes tools"| node_tools
node_worker -->|"writes progress"| node_exploration
node_worker -->|"writes observations"| node_assetgraph
node_worker -->|"routes egress"| node_scope
node_worker -->|"checks actions"| node_guard
node_worker -->|"requests review"| node_approval
node_tools -->|"ingests scans"| node_scan
node_target -->|"sends traffic"| node_proxy
node_proxy -->|"records exchanges"| node_evidence
node_evidence -->|"persists evidence"| node_store
node_llm -->|"streams completions"| node_llmrecord
node_llmrecord -->|"records usage"| node_store
node_findingsui -->|"requests findings"| node_entry
node_trafficui -->|"requests traffic"| node_entry
node_taskui -->|"manages tasks"| node_entry
node_findingsui -.->|"shows asset context"| node_assetgraph
node_engine -->|"reads situation"| node_exploration

click node_entry "https://github.com/crowinnovations/artex/blob/main/server/server.go"
click node_ui "https://github.com/crowinnovations/artex/blob/main/web/src/app/(main)/dashboard/page.tsx"
click node_taskui "https://github.com/crowinnovations/artex/blob/main/web/src/app/(main)/function/tasks/page.tsx"
click node_findingsui "https://github.com/crowinnovations/artex/blob/main/web/src/app/(main)/function/findings/page.tsx"
click node_trafficui "https://github.com/crowinnovations/artex/blob/main/web/src/app/(main)/function/traffic/page.tsx"
click node_engine "https://github.com/crowinnovations/artex/blob/main/server/engine.go"
click node_planner "https://github.com/crowinnovations/artex/blob/main/agent/planner.go"
click node_worker "https://github.com/crowinnovations/artex/blob/main/agent/worker.go"
click node_tools "https://github.com/crowinnovations/artex/blob/main/agent/tools.go"
click node_scan "https://github.com/crowinnovations/artex/blob/main/agent/scan_ingest.go"
click node_scope "https://github.com/crowinnovations/artex/blob/main/egress/egress.go"
click node_guard "https://github.com/crowinnovations/artex/blob/main/guard/guard.go"
click node_approval "https://github.com/crowinnovations/artex/blob/main/intercept/intercept.go"
click node_llm "https://github.com/crowinnovations/artex/blob/main/agent/provider.go"
click node_llmrecord "https://github.com/crowinnovations/artex/blob/main/llmrec/llmrec.go"
click node_proxy "https://github.com/crowinnovations/artex/blob/main/traffic/traffic.go"
click node_assetgraph "https://github.com/crowinnovations/artex/blob/main/db/assets.go"
click node_exploration "https://github.com/crowinnovations/artex/blob/main/db/exploration.go"
click node_evidence "https://github.com/crowinnovations/artex/blob/main/evidence/store.go"
click node_store "https://github.com/crowinnovations/artex/blob/main/db/db.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_engine,node_planner,node_worker,node_tools,node_scan,node_llm toneBlue
class node_scope,node_guard,node_approval toneAmber
class node_llmrecord,node_proxy,node_assetgraph,node_exploration,node_evidence,node_store toneMint
class node_entry,node_ui,node_taskui,node_findingsui,node_trafficui toneRose
class node_operator,node_target toneIndigo
```

## Components

### Task orchestration

- [Task engine](https://github.com/crowinnovations/artex/blob/main/server/engine.go): `server/engine.go`
- [Planner](https://github.com/crowinnovations/artex/blob/main/agent/planner.go): `agent/planner.go`
- [Worker agents](https://github.com/crowinnovations/artex/blob/main/agent/worker.go): `agent/worker.go`
- [Agent tools](https://github.com/crowinnovations/artex/blob/main/agent/tools.go): `agent/tools.go`
- [Scan ingestion](https://github.com/crowinnovations/artex/blob/main/agent/scan_ingest.go): `agent/scan_ingest.go`
- [LLM provider](https://github.com/crowinnovations/artex/blob/main/agent/provider.go): `agent/provider.go`

### Execution controls

- [Scope and egress](https://github.com/crowinnovations/artex/blob/main/egress/egress.go): `egress/egress.go`
- [Action guard](https://github.com/crowinnovations/artex/blob/main/guard/guard.go): `guard/guard.go`
- [Interception approvals](https://github.com/crowinnovations/artex/blob/main/intercept/intercept.go): `intercept/intercept.go`

### Evidence and data

- [LLM recording](https://github.com/crowinnovations/artex/blob/main/llmrec/llmrec.go): `llmrec/llmrec.go`
- [Recording proxy](https://github.com/crowinnovations/artex/blob/main/traffic/traffic.go): `traffic/traffic.go`
- [Shared asset graph](https://github.com/crowinnovations/artex/blob/main/db/assets.go): `db/assets.go`
- [Task exploration graph](https://github.com/crowinnovations/artex/blob/main/db/exploration.go): `db/exploration.go`
- [Traffic evidence](https://github.com/crowinnovations/artex/blob/main/evidence/store.go): `evidence/store.go`
- [PostgreSQL store](https://github.com/crowinnovations/artex/blob/main/db/db.go): `db/db.go`

### User interface

- [HTTP service](https://github.com/crowinnovations/artex/blob/main/server/server.go): `server/server.go`
- [Web console](https://github.com/crowinnovations/artex/blob/main/web/src/app/(main)/dashboard/page.tsx): `web/src/app/(main)/dashboard/page.tsx`
- [Task management](https://github.com/crowinnovations/artex/blob/main/web/src/app/(main)/function/tasks/page.tsx): `web/src/app/(main)/function/tasks/page.tsx`
- [Findings views](https://github.com/crowinnovations/artex/blob/main/web/src/app/(main)/function/findings/page.tsx): `web/src/app/(main)/function/findings/page.tsx`
- [Traffic views](https://github.com/crowinnovations/artex/blob/main/web/src/app/(main)/function/traffic/page.tsx): `web/src/app/(main)/function/traffic/page.tsx`

### Other components

- **Operator**
- **Test target**

## Connections

- Operator → Web console: uses (evidence: `README.md`)
- Web console → HTTP service: requests
- HTTP service → Task engine: coordinates (evidence: `server/server.go`)
- Task engine → Planner: runs planning (evidence: `README.md`)
- Planner → Worker agents: dispatches intents (evidence: `README.md`)
- Worker agents → Agent tools: executes tools (evidence: `README.md`)
- Worker agents → Task exploration graph: writes progress (evidence: `README.md`)
- Worker agents → Shared asset graph: writes observations (evidence: `README.md`)
- Worker agents → Scope and egress: routes egress
- Worker agents → Action guard: checks actions
- Worker agents → Interception approvals: requests review (evidence: `README.md`)
- Agent tools → Scan ingestion: ingests scans
- Test target → Recording proxy: sends traffic (evidence: `README.md`)
- Recording proxy → Traffic evidence: records exchanges (evidence: `README.md`)
- Traffic evidence → PostgreSQL store: persists evidence (evidence: `evidence/store.go`)
- LLM provider → LLM recording: streams completions (evidence: `llmrec/llmrec.go`)
- LLM recording → PostgreSQL store: records usage (evidence: `llmrec/llmrec.go`)
- Findings views → HTTP service: requests findings (evidence: `server/server.go`)
- Traffic views → HTTP service: requests traffic (evidence: `server/server.go`)
- Task management → HTTP service: manages tasks (evidence: `web/src/app/(main)/function/tasks/page.tsx`)
- Findings views → Shared asset graph: shows asset context
- Task engine → Task exploration graph: reads situation (evidence: `README.md`)
