# icebergn2026/artex-ld architecture

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

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

## Overview

artex-ld is an AI-assisted penetration-testing platform. An operator configures a task and target in the web console; the backend manages the task, then its planner creates work for workers to execute, with findings and evidence available for review and reporting. The README also documents configurable scenarios, intent approval, custom executors, and finding-triggered follow-up tasks or retests. The graph combines these documented capabilities with sampled engine and preference code; several subsystem links are documented rather than verified in source excerpts.

Main entry points: [`agent/worker.go`](https://github.com/icebergn2026/artex-ld/blob/master/agent/worker.go) (Worker), [`server/engine.go`](https://github.com/icebergn2026/artex-ld/blob/master/server/engine.go) (Execution Engine), [`db/findings.go`](https://github.com/icebergn2026/artex-ld/blob/master/db/findings.go) (Findings), [`web/src/app/(main)/function/tasks/page.tsx`](https://github.com/icebergn2026/artex-ld/blob/master/web/src/app/(main)/function/tasks/page.tsx) (Web Console)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_console["Operator Console"]
  node_web["Web Console<br/>[page.tsx]"]
  node_webapi["Web API Client<br/>[tasks.ts]"]
  node_preferences["UI Preferences"]
end

subgraph group_control["Task Control"]
  node_http["HTTP API<br/>[server.go]"]
  node_manager["Task Manager<br/>[manager.go]"]
  node_engine["Execution Engine<br/>[engine.go]"]
end

subgraph group_execution["Agent Execution"]
  node_planner["Planner<br/>[planner.go]"]
  node_worker["Worker<br/>[worker.go]"]
  node_tools["Agent Tools<br/>[tools.go]"]
end

subgraph group_review["Review and Findings"]
  node_guard["Tool Guard<br/>[guard.go]"]
  node_approval["Intent Approval<br/>[intercept.go]"]
  node_findings[("Findings<br/>[findings.go]")]
  node_orchestration["Finding Orchestration"]
  node_report["Finding Reports<br/>[findings.go]"]
end

subgraph group_persistence["State and Integrations"]
  node_taskstore[("Task Registry<br/>[tasks.go]")]
  node_exploration[("Exploration Graph<br/>[exploration.go]")]
  node_traffic[("Traffic Evidence<br/>[traffic.go]")]
  node_evidence[("Evidence Store<br/>[store.go]")]
end

node_operator(("Operator"))
node_llm{{"LLM Provider"}}
node_mcp{{"MCP Services"}}

node_operator -->|"configures tasks"| node_web
node_web -.->|"requests task data"| node_webapi
node_webapi -->|"calls API"| node_http
node_http -.->|"handles requests"| node_manager
node_manager -.->|"manages tasks"| node_taskstore
node_engine -->|"dispatches work"| node_taskstore
node_engine -->|"runs planner"| node_planner
node_engine -->|"dispatches intents"| node_worker
node_planner -.->|"requests plans"| node_llm
node_worker -.->|"executes agent turns"| node_llm
node_worker -.->|"uses tools"| node_tools
node_worker -.->|"gates tool calls"| node_guard
node_guard -.->|"checks review policy"| node_approval
node_worker -.->|"records discoveries"| node_exploration
node_worker -.->|"reports findings"| node_findings
node_findings -.->|"triggers follow-up"| node_orchestration
node_orchestration -.->|"creates follow-up work"| node_engine
node_findings -.->|"feeds reports"| node_report
node_worker -.->|"captures traffic"| node_traffic
node_worker -.->|"stores evidence"| node_evidence
node_worker -.->|"uses integrations"| node_mcp
node_operator -->|"sets preferences"| node_preferences

click node_web "https://github.com/icebergn2026/artex-ld/blob/master/web/src/app/(main)/function/tasks/page.tsx"
click node_webapi "https://github.com/icebergn2026/artex-ld/blob/master/web/src/lib/api/tasks.ts"
click node_http "https://github.com/icebergn2026/artex-ld/blob/master/server/server.go"
click node_manager "https://github.com/icebergn2026/artex-ld/blob/master/server/manager.go"
click node_taskstore "https://github.com/icebergn2026/artex-ld/blob/master/db/tasks.go"
click node_engine "https://github.com/icebergn2026/artex-ld/blob/master/server/engine.go"
click node_planner "https://github.com/icebergn2026/artex-ld/blob/master/agent/planner.go"
click node_worker "https://github.com/icebergn2026/artex-ld/blob/master/agent/worker.go"
click node_tools "https://github.com/icebergn2026/artex-ld/blob/master/agent/tools.go"
click node_guard "https://github.com/icebergn2026/artex-ld/blob/master/guard/guard.go"
click node_approval "https://github.com/icebergn2026/artex-ld/blob/master/intercept/intercept.go"
click node_exploration "https://github.com/icebergn2026/artex-ld/blob/master/db/exploration.go"
click node_findings "https://github.com/icebergn2026/artex-ld/blob/master/db/findings.go"
click node_orchestration "https://github.com/icebergn2026/artex-ld/blob/master/server/finding_workflow.go"
click node_report "https://github.com/icebergn2026/artex-ld/blob/master/report/findings.go"
click node_traffic "https://github.com/icebergn2026/artex-ld/blob/master/traffic/traffic.go"
click node_evidence "https://github.com/icebergn2026/artex-ld/blob/master/evidence/store.go"
click node_preferences "https://github.com/icebergn2026/artex-ld/blob/master/web/src/lib/preferences/preferences-storage.ts"

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,node_webapi,node_preferences toneBlue
class node_http,node_manager,node_engine toneAmber
class node_planner,node_worker,node_tools toneMint
class node_guard,node_approval,node_findings,node_orchestration,node_report toneRose
class node_taskstore,node_exploration,node_traffic,node_evidence,node_operator,node_llm,node_mcp toneIndigo
```

## Components

### Operator Console

- [Web Console](https://github.com/icebergn2026/artex-ld/blob/master/web/src/app/(main)/function/tasks/page.tsx): `web/src/app/(main)/function/tasks/page.tsx`
- [Web API Client](https://github.com/icebergn2026/artex-ld/blob/master/web/src/lib/api/tasks.ts): `web/src/lib/api/tasks.ts`
- [UI Preferences](https://github.com/icebergn2026/artex-ld/blob/master/web/src/lib/preferences/preferences-storage.ts): `web/src/lib/preferences/preferences-storage.ts`

### Task Control

- [HTTP API](https://github.com/icebergn2026/artex-ld/blob/master/server/server.go): `server/server.go`
- [Task Manager](https://github.com/icebergn2026/artex-ld/blob/master/server/manager.go): `server/manager.go`
- [Execution Engine](https://github.com/icebergn2026/artex-ld/blob/master/server/engine.go): `server/engine.go`

### Agent Execution

- [Planner](https://github.com/icebergn2026/artex-ld/blob/master/agent/planner.go): `agent/planner.go`
- [Worker](https://github.com/icebergn2026/artex-ld/blob/master/agent/worker.go): `agent/worker.go`
- [Agent Tools](https://github.com/icebergn2026/artex-ld/blob/master/agent/tools.go): `agent/tools.go`

### Review and Findings

- [Tool Guard](https://github.com/icebergn2026/artex-ld/blob/master/guard/guard.go): `guard/guard.go`
- [Intent Approval](https://github.com/icebergn2026/artex-ld/blob/master/intercept/intercept.go): `intercept/intercept.go`
- [Findings](https://github.com/icebergn2026/artex-ld/blob/master/db/findings.go): `db/findings.go`
- [Finding Orchestration](https://github.com/icebergn2026/artex-ld/blob/master/server/finding_workflow.go): `server/finding_workflow.go`
- [Finding Reports](https://github.com/icebergn2026/artex-ld/blob/master/report/findings.go): `report/findings.go`

### State and Integrations

- [Task Registry](https://github.com/icebergn2026/artex-ld/blob/master/db/tasks.go): `db/tasks.go`
- [Exploration Graph](https://github.com/icebergn2026/artex-ld/blob/master/db/exploration.go): `db/exploration.go`
- [Traffic Evidence](https://github.com/icebergn2026/artex-ld/blob/master/traffic/traffic.go): `traffic/traffic.go`
- [Evidence Store](https://github.com/icebergn2026/artex-ld/blob/master/evidence/store.go): `evidence/store.go`

### Other components

- **Operator**
- **LLM Provider**
- **MCP Services**

## Connections

- Operator → Web Console: configures tasks
- Web Console → Web API Client: requests task data
- Web API Client → HTTP API: calls API
- HTTP API → Task Manager: handles requests
- Task Manager → Task Registry: manages tasks
- Execution Engine → Task Registry: dispatches work (evidence: `server/engine.go`)
- Execution Engine → Planner: runs planner
- Execution Engine → Worker: dispatches intents (evidence: `server/engine.go`)
- Planner → LLM Provider: requests plans
- Worker → LLM Provider: executes agent turns
- Worker → Agent Tools: uses tools
- Worker → Tool Guard: gates tool calls
- Tool Guard → Intent Approval: checks review policy
- Worker → Exploration Graph: records discoveries
- Worker → Findings: reports findings
- Findings → Finding Orchestration: triggers follow-up
- Finding Orchestration → Execution Engine: creates follow-up work
- Findings → Finding Reports: feeds reports
- Worker → Traffic Evidence: captures traffic
- Worker → Evidence Store: stores evidence
- Worker → MCP Services: uses integrations
- Operator → UI Preferences: sets preferences (evidence: `web/src/lib/preferences/preferences-storage.ts`)
