# usestrix/strix architecture

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

- Interactive diagram: https://gitdiagram.com/usestrix/strix
- Repository: https://github.com/usestrix/strix
- Video tour (about a minute): https://gitdiagram.com/usestrix/strix/video

## Overview

Strix is an AI penetration-testing product: users configure and launch scans, agents coordinate reconnaissance and exploitation in a sandbox, and findings are validated and saved as reports for CLI, TUI, or browser review. The graph preserves the documented toolkit and reporting capabilities, plus MCP and live-view branches. Relationships are limited to README statements and source-index references; where wiring is not shown, links are omitted rather than inferred.

Main entry points: [`strix/interface/main.py`](https://github.com/usestrix/strix/blob/main/strix/interface/main.py) (CLI entry), [`strix/agents/factory.py`](https://github.com/usestrix/strix/blob/main/strix/agents/factory.py) (Agent factory), [`strix/report/state.py`](https://github.com/usestrix/strix/blob/main/strix/report/state.py) (Report state), [`strix/tools/reporting/tool.py`](https://github.com/usestrix/strix/blob/main/strix/tools/reporting/tool.py) (Finding tools)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User interfaces"]
  node_cli["CLI entry<br/>[main.py]"]
  node_tui["Interactive TUI<br/>[controller.py]"]
  node_tui_server["TUI server<br/>[server.py]"]
  node_viewer["Run viewer<br/>[server.py]"]
  node_frontend["Viewer frontend<br/>[App.tsx]"]
end

subgraph group_engine["Scan engine"]
  node_config_loader["Config loading<br/>[loader.py]"]
  node_config_models["Settings models<br/>[models.py]"]
  node_codex["Codex auth<br/>[codex.py]"]
  node_agent_factory["Agent factory<br/>[factory.py]"]
  node_agents["Agent orchestration<br/>[agents.py]"]
  node_execution["Scan execution<br/>[execution.py]"]
  node_paths["Run paths<br/>[paths.py]"]
  node_llm_log["LLM request log<br/>[request_log.py]"]
end

subgraph group_capabilities["Agent capabilities"]
  node_skills["Pentest skills<br/>[__init__.py]"]
  node_coverage_tools["Coverage tools<br/>[tools.py]"]
  node_proxy_tools["Proxy tools<br/>[tools.py]"]
  node_report_tools["Finding tools<br/>[tool.py]"]
  node_mcp["MCP integrations"]
end

subgraph group_results["Findings and reports"]
  node_report_state[("Report state<br/>[state.py]")]
  node_dedupe["Finding dedupe<br/>[dedupe.py]"]
  node_coverage_report["Coverage records<br/>[coverage.py]"]
  node_writer["Report writer<br/>[writer.py]"]
end

subgraph group_runtime["Runtime and services"]
  node_runtime_sessions["Sandbox sessions<br/>[session_manager.py]"]
  node_docker["Docker runtime<br/>[docker_client.py]"]
  node_telemetry["Telemetry<br/>[posthog.py]"]
  node_logging["Scan logging<br/>[logging.py]"]
end

node_user(("Operator"))

node_user -->|"launches scan"| node_cli
node_cli -->|"loads settings"| node_config_loader
node_config_loader -->|"uses models"| node_config_models
node_cli -->|"configures auth"| node_codex
node_agent_factory -->|"loads config"| node_config_loader
node_agent_factory -->|"registers tools"| node_coverage_tools
node_agent_factory -->|"registers tools"| node_proxy_tools
node_agent_factory -->|"registers tools"| node_report_tools
node_agent_factory -.->|"loads skills"| node_skills
node_agents -->|"uses sessions"| node_runtime_sessions
node_execution -.->|"starts runtime"| node_runtime_sessions
node_runtime_sessions -->|"uses Docker"| node_docker
node_proxy_tools -->|"reads agent context"| node_agents
node_coverage_tools -->|"reads agent graph"| node_agents
node_report_tools -->|"uses proxy tools"| node_proxy_tools
node_report_tools -->|"updates findings"| node_report_state
node_report_tools -->|"deduplicates"| node_dedupe
node_mcp -.->|"dispatches tools"| node_agents
node_report_state -->|"writes coverage"| node_coverage_report
node_report_state -->|"writes reports"| node_writer
node_report_state -->|"reads usage"| node_llm_log
node_cli -.->|"finalizes run"| node_report_state
node_cli -->|"ends telemetry"| node_telemetry
node_cli -.->|"sets up logging"| node_logging
node_user -.->|"interacts"| node_tui
node_tui_server -->|"dispatches commands"| node_tui
node_tui -->|"serves live view"| node_viewer
node_user -->|"opens run"| node_viewer
node_frontend -.->|"requests run data"| node_viewer

click node_cli "https://github.com/usestrix/strix/blob/main/strix/interface/main.py"
click node_tui "https://github.com/usestrix/strix/blob/main/strix/interface/tui/backend/controller.py"
click node_tui_server "https://github.com/usestrix/strix/blob/main/strix/interface/tui/backend/server.py"
click node_viewer "https://github.com/usestrix/strix/blob/main/strix/interface/viewer/server.py"
click node_frontend "https://github.com/usestrix/strix/blob/main/strix/interface/viewer/frontend/src/App.tsx"
click node_config_loader "https://github.com/usestrix/strix/blob/main/strix/config/loader.py"
click node_config_models "https://github.com/usestrix/strix/blob/main/strix/config/models.py"
click node_codex "https://github.com/usestrix/strix/blob/main/strix/config/codex.py"
click node_agent_factory "https://github.com/usestrix/strix/blob/main/strix/agents/factory.py"
click node_agents "https://github.com/usestrix/strix/blob/main/strix/core/agents.py"
click node_execution "https://github.com/usestrix/strix/blob/main/strix/core/execution.py"
click node_paths "https://github.com/usestrix/strix/blob/main/strix/core/paths.py"
click node_llm_log "https://github.com/usestrix/strix/blob/main/strix/llm/request_log.py"
click node_skills "https://github.com/usestrix/strix/blob/main/strix/skills/__init__.py"
click node_coverage_tools "https://github.com/usestrix/strix/blob/main/strix/tools/coverage/tools.py"
click node_proxy_tools "https://github.com/usestrix/strix/blob/main/strix/tools/proxy/tools.py"
click node_report_tools "https://github.com/usestrix/strix/blob/main/strix/tools/reporting/tool.py"
click node_mcp "https://github.com/usestrix/strix/tree/main/strix/tools/mcp"
click node_runtime_sessions "https://github.com/usestrix/strix/blob/main/strix/runtime/session_manager.py"
click node_docker "https://github.com/usestrix/strix/blob/main/strix/runtime/docker_client.py"
click node_report_state "https://github.com/usestrix/strix/blob/main/strix/report/state.py"
click node_dedupe "https://github.com/usestrix/strix/blob/main/strix/report/dedupe.py"
click node_coverage_report "https://github.com/usestrix/strix/blob/main/strix/report/coverage.py"
click node_writer "https://github.com/usestrix/strix/blob/main/strix/report/writer.py"
click node_telemetry "https://github.com/usestrix/strix/blob/main/strix/telemetry/posthog.py"
click node_logging "https://github.com/usestrix/strix/blob/main/strix/telemetry/logging.py"

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_cli,node_tui,node_tui_server,node_viewer,node_frontend toneBlue
class node_config_loader,node_config_models,node_codex,node_agent_factory,node_agents,node_execution,node_paths,node_llm_log toneAmber
class node_skills,node_coverage_tools,node_proxy_tools,node_report_tools,node_mcp toneMint
class node_report_state,node_dedupe,node_coverage_report,node_writer toneRose
class node_runtime_sessions,node_docker,node_telemetry,node_logging,node_user toneIndigo
```

## Components

### User interfaces

- [CLI entry](https://github.com/usestrix/strix/blob/main/strix/interface/main.py): `strix/interface/main.py`
- [Interactive TUI](https://github.com/usestrix/strix/blob/main/strix/interface/tui/backend/controller.py): `strix/interface/tui/backend/controller.py`
- [TUI server](https://github.com/usestrix/strix/blob/main/strix/interface/tui/backend/server.py): `strix/interface/tui/backend/server.py`
- [Run viewer](https://github.com/usestrix/strix/blob/main/strix/interface/viewer/server.py): `strix/interface/viewer/server.py`
- [Viewer frontend](https://github.com/usestrix/strix/blob/main/strix/interface/viewer/frontend/src/App.tsx): `strix/interface/viewer/frontend/src/App.tsx`

### Scan engine

- [Config loading](https://github.com/usestrix/strix/blob/main/strix/config/loader.py): `strix/config/loader.py`
- [Settings models](https://github.com/usestrix/strix/blob/main/strix/config/models.py): `strix/config/models.py`
- [Codex auth](https://github.com/usestrix/strix/blob/main/strix/config/codex.py): `strix/config/codex.py`
- [Agent factory](https://github.com/usestrix/strix/blob/main/strix/agents/factory.py): `strix/agents/factory.py`
- [Agent orchestration](https://github.com/usestrix/strix/blob/main/strix/core/agents.py): `strix/core/agents.py`
- [Scan execution](https://github.com/usestrix/strix/blob/main/strix/core/execution.py): `strix/core/execution.py`
- [Run paths](https://github.com/usestrix/strix/blob/main/strix/core/paths.py): `strix/core/paths.py`
- [LLM request log](https://github.com/usestrix/strix/blob/main/strix/llm/request_log.py): `strix/llm/request_log.py`

### Agent capabilities

- [Pentest skills](https://github.com/usestrix/strix/blob/main/strix/skills/__init__.py): `strix/skills/__init__.py`
- [Coverage tools](https://github.com/usestrix/strix/blob/main/strix/tools/coverage/tools.py): `strix/tools/coverage/tools.py`
- [Proxy tools](https://github.com/usestrix/strix/blob/main/strix/tools/proxy/tools.py): `strix/tools/proxy/tools.py`
- [Finding tools](https://github.com/usestrix/strix/blob/main/strix/tools/reporting/tool.py): `strix/tools/reporting/tool.py`
- [MCP integrations](https://github.com/usestrix/strix/tree/main/strix/tools/mcp): `strix/tools/mcp`

### Findings and reports

- [Report state](https://github.com/usestrix/strix/blob/main/strix/report/state.py): `strix/report/state.py`
- [Finding dedupe](https://github.com/usestrix/strix/blob/main/strix/report/dedupe.py): `strix/report/dedupe.py`
- [Coverage records](https://github.com/usestrix/strix/blob/main/strix/report/coverage.py): `strix/report/coverage.py`
- [Report writer](https://github.com/usestrix/strix/blob/main/strix/report/writer.py): `strix/report/writer.py`

### Runtime and services

- [Sandbox sessions](https://github.com/usestrix/strix/blob/main/strix/runtime/session_manager.py): `strix/runtime/session_manager.py`
- [Docker runtime](https://github.com/usestrix/strix/blob/main/strix/runtime/docker_client.py): `strix/runtime/docker_client.py`
- [Telemetry](https://github.com/usestrix/strix/blob/main/strix/telemetry/posthog.py): `strix/telemetry/posthog.py`
- [Scan logging](https://github.com/usestrix/strix/blob/main/strix/telemetry/logging.py): `strix/telemetry/logging.py`

### Other components

- **Operator**

## Connections

- Operator → CLI entry: launches scan
- CLI entry → Config loading: loads settings (evidence: `strix/interface/main.py`)
- Config loading → Settings models: uses models
- CLI entry → Codex auth: configures auth (evidence: `strix/interface/main.py`)
- Agent factory → Config loading: loads config (evidence: `strix/agents/factory.py`)
- Agent factory → Coverage tools: registers tools (evidence: `strix/agents/factory.py`)
- Agent factory → Proxy tools: registers tools (evidence: `strix/agents/factory.py`)
- Agent factory → Finding tools: registers tools (evidence: `strix/agents/factory.py`)
- Agent factory → Pentest skills: loads skills
- Agent orchestration → Sandbox sessions: uses sessions (evidence: `strix/core/agents.py`)
- Scan execution → Sandbox sessions: starts runtime
- Sandbox sessions → Docker runtime: uses Docker (evidence: `strix/runtime/session_manager.py`)
- Proxy tools → Agent orchestration: reads agent context (evidence: `strix/tools/proxy/tools.py`)
- Coverage tools → Agent orchestration: reads agent graph (evidence: `strix/tools/coverage/tools.py`)
- Finding tools → Proxy tools: uses proxy tools (evidence: `strix/tools/reporting/tool.py`)
- Finding tools → Report state: updates findings (evidence: `strix/tools/reporting/tool.py`)
- Finding tools → Finding dedupe: deduplicates (evidence: `strix/tools/reporting/tool.py`)
- MCP integrations → Agent orchestration: dispatches tools
- Report state → Coverage records: writes coverage (evidence: `strix/report/state.py`)
- Report state → Report writer: writes reports (evidence: `strix/report/state.py`)
- Report state → LLM request log: reads usage (evidence: `strix/report/state.py`)
- CLI entry → Report state: finalizes run (evidence: `strix/interface/main.py`)
- CLI entry → Telemetry: ends telemetry (evidence: `strix/interface/main.py`)
- CLI entry → Scan logging: sets up logging (evidence: `strix/interface/main.py`)
- Operator → Interactive TUI: interacts
- TUI server → Interactive TUI: dispatches commands (evidence: `strix/interface/tui/backend/server.py`)
- Interactive TUI → Run viewer: serves live view (evidence: `strix/interface/tui/backend/controller.py`)
- Operator → Run viewer: opens run
- Viewer frontend → Run viewer: requests run data
