# nixiakai/artex architecture

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

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

## Overview

ScopeWeaver is a Go-backed, multi-agent penetration-testing system with a Next.js control interface. The central workflow is to create a scoped task, coordinate planner and worker agents over an exploration graph, record assets, evidence and findings, then review results and reports. The backend also manages LLM providers, task controls and approvals; documented capabilities include traffic capture, asset synchronization, MCP tools, notifications and localized exports. Arrows are limited to relationships explicit in the excerpts or README; several feature paths are represented by their exact directories because their implementation excerpts were not supplied.

Main entry points: [`server/server.go`](https://github.com/nixiakai/artex/blob/main/server/server.go) (HTTP API), [`server/manager.go`](https://github.com/nixiakai/artex/blob/main/server/manager.go) (Task manager), [`agent/worker.go`](https://github.com/nixiakai/artex/blob/main/agent/worker.go) (Agent worker), [`server/engine.go`](https://github.com/nixiakai/artex/blob/main/server/engine.go) (Coordinator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Operator interface"]
  node_web["Web console"]
end

subgraph group_control["Task control"]
  node_api["HTTP API<br/>[server.go]"]
  node_manager["Task manager<br/>[manager.go]"]
  node_engine["Coordinator<br/>[engine.go]"]
  node_taskdb[("Task records<br/>[tasks.go]")]
  node_intercept["Tool approvals<br/>[intercept.go]"]
end

subgraph group_explore["Agent exploration"]
  node_planner["Planner<br/>[planner.go]"]
  node_worker["Agent worker<br/>[worker.go]"]
  node_agenttools["Security tools<br/>[tools.go]"]
end

subgraph group_evidence["Evidence and results"]
  node_graph[("Exploration graph")]
  node_findings["Findings and reports"]
  node_traffic["Traffic capture<br/>[traffic.go]"]
  node_evidence_store[("Evidence store<br/>[store.go]")]
end

subgraph group_integrations["Services and extensions"]
  node_llmpool["LLM pool<br/>[pool.go]"]
  node_mcp["MCP integration<br/>[client.go]"]
  node_notify["Notifications"]
  node_sync["ScopeSentry sync"]
  node_adapter["Agent adapter<br/>[client.js]"]
  node_postgres[("PostgreSQL")]
end

node_operator(("Operator"))
node_target(("Authorized target"))

node_operator -->|"uses"| node_web
node_web -.->|"requests"| node_api
node_api -.->|"resolves tasks"| node_manager
node_manager -.->|"coordinates"| node_engine
node_engine -->|"runs rounds"| node_planner
node_engine -->|"runs intents"| node_worker
node_worker -->|"invokes tools"| node_agenttools
node_worker -->|"gates calls"| node_intercept
node_manager -.->|"persists tasks"| node_taskdb
node_worker -->|"records exploration"| node_graph
node_api -->|"serves graph"| node_graph
node_api -.->|"serves reports"| node_findings
node_manager -->|"starts proxy"| node_traffic
node_traffic -.->|"stores evidence"| node_evidence_store
node_api -.->|"configures pool"| node_llmpool
node_worker -.->|"uses tools"| node_mcp
node_api -.->|"configures delivery"| node_notify
node_api -.->|"imports assets"| node_sync
node_adapter -->|"calls API"| node_api
node_target -.->|"generates traffic"| node_traffic
node_manager -->|"connects"| node_postgres

click node_web "https://github.com/nixiakai/artex/tree/main/web/src/app/(main)"
click node_api "https://github.com/nixiakai/artex/blob/main/server/server.go"
click node_manager "https://github.com/nixiakai/artex/blob/main/server/manager.go"
click node_engine "https://github.com/nixiakai/artex/blob/main/server/engine.go"
click node_taskdb "https://github.com/nixiakai/artex/blob/main/db/tasks.go"
click node_planner "https://github.com/nixiakai/artex/blob/main/agent/planner.go"
click node_worker "https://github.com/nixiakai/artex/blob/main/agent/worker.go"
click node_agenttools "https://github.com/nixiakai/artex/blob/main/agent/tools.go"
click node_graph "https://github.com/nixiakai/artex/tree/main/db"
click node_findings "https://github.com/nixiakai/artex/tree/main/report"
click node_traffic "https://github.com/nixiakai/artex/blob/main/traffic/traffic.go"
click node_evidence_store "https://github.com/nixiakai/artex/blob/main/evidence/store.go"
click node_intercept "https://github.com/nixiakai/artex/blob/main/intercept/intercept.go"
click node_llmpool "https://github.com/nixiakai/artex/blob/main/llmpool/pool.go"
click node_mcp "https://github.com/nixiakai/artex/blob/main/mcphttp/client.go"
click node_notify "https://github.com/nixiakai/artex/tree/main/notify"
click node_sync "https://github.com/nixiakai/artex/blob/main/server/sync_scopesentry.go"
click node_adapter "https://github.com/nixiakai/artex/blob/main/adapters/agent/src/client.js"

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 toneBlue
class node_api,node_manager,node_engine,node_taskdb,node_intercept toneAmber
class node_planner,node_worker,node_agenttools toneMint
class node_graph,node_findings,node_traffic,node_evidence_store toneRose
class node_llmpool,node_mcp,node_notify,node_sync,node_adapter,node_postgres,node_operator,node_target toneIndigo
```

## Components

### Operator interface

- [Web console](https://github.com/nixiakai/artex/tree/main/web/src/app/(main)): `web/src/app/(main)`

### Task control

- [HTTP API](https://github.com/nixiakai/artex/blob/main/server/server.go): `server/server.go`
- [Task manager](https://github.com/nixiakai/artex/blob/main/server/manager.go): `server/manager.go`
- [Coordinator](https://github.com/nixiakai/artex/blob/main/server/engine.go): `server/engine.go`
- [Task records](https://github.com/nixiakai/artex/blob/main/db/tasks.go): `db/tasks.go`
- [Tool approvals](https://github.com/nixiakai/artex/blob/main/intercept/intercept.go): `intercept/intercept.go`

### Agent exploration

- [Planner](https://github.com/nixiakai/artex/blob/main/agent/planner.go): `agent/planner.go`
- [Agent worker](https://github.com/nixiakai/artex/blob/main/agent/worker.go): `agent/worker.go`
- [Security tools](https://github.com/nixiakai/artex/blob/main/agent/tools.go): `agent/tools.go`

### Evidence and results

- [Exploration graph](https://github.com/nixiakai/artex/tree/main/db): `db`
- [Findings and reports](https://github.com/nixiakai/artex/tree/main/report): `report`
- [Traffic capture](https://github.com/nixiakai/artex/blob/main/traffic/traffic.go): `traffic/traffic.go`
- [Evidence store](https://github.com/nixiakai/artex/blob/main/evidence/store.go): `evidence/store.go`

### Services and extensions

- [LLM pool](https://github.com/nixiakai/artex/blob/main/llmpool/pool.go): `llmpool/pool.go`
- [MCP integration](https://github.com/nixiakai/artex/blob/main/mcphttp/client.go): `mcphttp/client.go`
- [Notifications](https://github.com/nixiakai/artex/tree/main/notify): `notify`
- [ScopeSentry sync](https://github.com/nixiakai/artex/blob/main/server/sync_scopesentry.go): `server/sync_scopesentry.go`
- [Agent adapter](https://github.com/nixiakai/artex/blob/main/adapters/agent/src/client.js): `adapters/agent/src/client.js`
- **PostgreSQL**

### Other components

- **Operator**
- **Authorized target**

## Connections

- Operator → Web console: uses (evidence: `README.md`)
- Web console → HTTP API: requests (evidence: `README.md`)
- HTTP API → Task manager: resolves tasks
- Task manager → Coordinator: coordinates
- Coordinator → Planner: runs rounds (evidence: `server/engine.go`)
- Coordinator → Agent worker: runs intents (evidence: `server/engine.go`)
- Agent worker → Security tools: invokes tools (evidence: `agent/worker.go`)
- Agent worker → Tool approvals: gates calls (evidence: `agent/worker.go`)
- Task manager → Task records: persists tasks
- Agent worker → Exploration graph: records exploration (evidence: `agent/worker.go`)
- HTTP API → Exploration graph: serves graph (evidence: `server/server.go`)
- HTTP API → Findings and reports: serves reports (evidence: `server/server.go`)
- Task manager → Traffic capture: starts proxy (evidence: `server/manager.go`)
- Traffic capture → Evidence store: stores evidence
- HTTP API → LLM pool: configures pool
- Agent worker → MCP integration: uses tools
- HTTP API → Notifications: configures delivery
- HTTP API → ScopeSentry sync: imports assets
- Agent adapter → HTTP API: calls API (evidence: `adapters/agent/src/client.js`)
- Authorized target → Traffic capture: generates traffic
- Task manager → PostgreSQL: connects (evidence: `server/manager.go`)
