# orangedan00-ai/asep architecture

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

- Interactive diagram: https://gitdiagram.com/orangedan00-ai/asep
- Repository: https://github.com/orangedan00-ai/asep

## Overview

ASEP is an authorized security-assessment platform whose operator-facing workflow turns objectives and targets into scoped discovery, identity and service evidence, analysis, validation, attack paths, actions, sessions, and reports. The Flask routes expose operations and the UX layer aggregates stored evidence for the browser. The graph preserves documented intelligence, wireless, Metasploit, session, and self-healing capabilities. Some connections reflect README-level architecture; unsampled implementation details are not asserted beyond indexed references.

Main entry points: [`app/routes.py`](https://github.com/orangedan00-ai/asep/blob/main/app/routes.py) (Flask API), [`app/assessment_engine.py`](https://github.com/orangedan00-ai/asep/blob/main/app/assessment_engine.py) (Assessment Chain), [`app/tool_orchestrator.py`](https://github.com/orangedan00-ai/asep/blob/main/app/tool_orchestrator.py) (Tool Orchestrator), [`app/nmap_executor.py`](https://github.com/orangedan00-ai/asep/blob/main/app/nmap_executor.py) (Nmap Executor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Operator Interface"]
  node_browser["Browser UX<br/>[app.js]"]
  node_routes["Flask API<br/>[routes.py]"]
  node_ux["UX Aggregation<br/>[ux.py]"]
end

subgraph group_discovery["Scope &amp; Discovery"]
  node_scope["Scope Policy<br/>[scope.py]"]
  node_environment["Environment State"]
  node_discovery_engine["Network Discovery"]
  node_nmap["Nmap Executor<br/>[nmap_executor.py]"]
  node_identity["Host Identity"]
end

subgraph group_analysis["Analysis &amp; Validation"]
  node_assessment["Assessment Chain"]
  node_adaptive["Adaptive Reasoning"]
  node_replanner["Attack Path Replanning<br/>[replanner.py]"]
  node_candidates["Exploit Candidates"]
  node_wireless_path["Wireless Attack Paths"]
end

subgraph group_execution["Actions &amp; Sessions"]
  node_orchestrator["Tool Orchestrator"]
  node_registry["Tool Registry<br/>[tool_registry.py]"]
  node_metasploit["Metasploit Capability<br/>[metasploit.py]"]
  node_wireless["Wireless Assessment<br/>[wireless.py]"]
  node_sessions["Session Intelligence"]
  node_post_session["Post-Session Analysis"]
end

subgraph group_platform["Evidence &amp; Intelligence"]
  node_store[("Evidence &amp; Inventory DB<br/>[db.py]")]
  node_intelligence["Intelligence Engine<br/>[intelligence.py]"]
  node_llm["LLM Router<br/>[llm.py]"]
  node_research["Internet Research"]
  node_skills["Skill Library<br/>[skill_library.py]"]
  node_self_heal["Self-Healing<br/>[self_heal.py]"]
  node_self_modify["Self-Modifying Engine<br/>[self_modifying.py]"]
end

node_operator(("Security Operator"))
node_external_tools{{"Kali Tools"}}

node_operator -->|"sets objectives"| node_browser
node_browser -->|"requests operations"| node_routes
node_routes -->|"aggregates for UX"| node_ux
node_routes -->|"starts discovery"| node_discovery_engine
node_routes -->|"enriches hosts"| node_identity
node_routes -->|"requests service scan"| node_nmap
node_discovery_engine -->|"runs scans"| node_nmap
node_discovery_engine -->|"enriches inventory"| node_identity
node_nmap -->|"checks target"| node_scope
node_assessment -->|"asserts target"| node_scope
node_assessment -->|"collects scan evidence"| node_nmap
node_assessment -->|"runs profiles"| node_orchestrator
node_assessment -->|"checks tool"| node_registry
node_assessment -->|"executes tools"| node_external_tools
node_orchestrator -->|"validates target"| node_scope
node_orchestrator -->|"gets tool metadata"| node_registry
node_orchestrator -->|"runs profiles"| node_external_tools
node_routes -->|"persists evidence"| node_store
node_ux -->|"reads evidence"| node_store
node_intelligence -->|"requests reasoning"| node_llm
node_candidates -->|"checks modules"| node_metasploit
node_candidates -->|"looks up vulnerabilities"| node_research
node_routes -->|"exposes assessment"| node_wireless
node_routes -->|"builds attack paths"| node_wireless_path
node_routes -->|"serves session data"| node_sessions
node_routes -->|"exposes post-session analysis"| node_post_session
node_self_heal -->|"requests repair"| node_self_modify
node_skills -->|"loads skills"| node_store
node_llm -->|"uses skill registry"| node_skills
node_routes -.->|"uses environment state"| node_environment
node_adaptive -.->|"supports replanning"| node_replanner
node_metasploit -.->|"provides sessions"| node_sessions

click node_browser "https://github.com/orangedan00-ai/asep/blob/main/static/app.js"
click node_routes "https://github.com/orangedan00-ai/asep/blob/main/app/routes.py"
click node_ux "https://github.com/orangedan00-ai/asep/blob/main/app/ux.py"
click node_scope "https://github.com/orangedan00-ai/asep/blob/main/app/scope.py"
click node_environment "https://github.com/orangedan00-ai/asep/blob/main/app/environment_state.py"
click node_discovery_engine "https://github.com/orangedan00-ai/asep/blob/main/app/network_discovery.py"
click node_nmap "https://github.com/orangedan00-ai/asep/blob/main/app/nmap_executor.py"
click node_identity "https://github.com/orangedan00-ai/asep/blob/main/app/identity_enrichment.py"
click node_assessment "https://github.com/orangedan00-ai/asep/blob/main/app/assessment_engine.py"
click node_adaptive "https://github.com/orangedan00-ai/asep/blob/main/app/adaptive_reasoning.py"
click node_replanner "https://github.com/orangedan00-ai/asep/blob/main/app/replanner.py"
click node_candidates "https://github.com/orangedan00-ai/asep/blob/main/app/exploit_candidates.py"
click node_wireless_path "https://github.com/orangedan00-ai/asep/blob/main/app/wireless_attack_path.py"
click node_orchestrator "https://github.com/orangedan00-ai/asep/blob/main/app/tool_orchestrator.py"
click node_registry "https://github.com/orangedan00-ai/asep/blob/main/app/tool_registry.py"
click node_metasploit "https://github.com/orangedan00-ai/asep/blob/main/app/metasploit.py"
click node_wireless "https://github.com/orangedan00-ai/asep/blob/main/app/wireless.py"
click node_sessions "https://github.com/orangedan00-ai/asep/blob/main/app/session_intelligence.py"
click node_post_session "https://github.com/orangedan00-ai/asep/blob/main/app/post_session_intelligence.py"
click node_store "https://github.com/orangedan00-ai/asep/blob/main/app/db.py"
click node_intelligence "https://github.com/orangedan00-ai/asep/blob/main/app/intelligence.py"
click node_llm "https://github.com/orangedan00-ai/asep/blob/main/app/llm.py"
click node_research "https://github.com/orangedan00-ai/asep/blob/main/app/internet_research.py"
click node_skills "https://github.com/orangedan00-ai/asep/blob/main/app/skill_library.py"
click node_self_heal "https://github.com/orangedan00-ai/asep/blob/main/app/self_heal.py"
click node_self_modify "https://github.com/orangedan00-ai/asep/blob/main/app/self_modifying.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_browser,node_routes,node_ux toneBlue
class node_scope,node_environment,node_discovery_engine,node_nmap,node_identity toneAmber
class node_assessment,node_adaptive,node_replanner,node_candidates,node_wireless_path toneMint
class node_orchestrator,node_registry,node_metasploit,node_wireless,node_sessions,node_post_session toneRose
class node_store,node_intelligence,node_llm,node_research,node_skills,node_self_heal,node_self_modify,node_operator,node_external_tools toneIndigo
```

## Components

### Operator Interface

- [Browser UX](https://github.com/orangedan00-ai/asep/blob/main/static/app.js): `static/app.js`
- [Flask API](https://github.com/orangedan00-ai/asep/blob/main/app/routes.py): `app/routes.py`
- [UX Aggregation](https://github.com/orangedan00-ai/asep/blob/main/app/ux.py): `app/ux.py`

### Scope & Discovery

- [Scope Policy](https://github.com/orangedan00-ai/asep/blob/main/app/scope.py): `app/scope.py`
- [Environment State](https://github.com/orangedan00-ai/asep/blob/main/app/environment_state.py): `app/environment_state.py`
- [Network Discovery](https://github.com/orangedan00-ai/asep/blob/main/app/network_discovery.py): `app/network_discovery.py`
- [Nmap Executor](https://github.com/orangedan00-ai/asep/blob/main/app/nmap_executor.py): `app/nmap_executor.py`
- [Host Identity](https://github.com/orangedan00-ai/asep/blob/main/app/identity_enrichment.py): `app/identity_enrichment.py`

### Analysis & Validation

- [Assessment Chain](https://github.com/orangedan00-ai/asep/blob/main/app/assessment_engine.py): `app/assessment_engine.py`
- [Adaptive Reasoning](https://github.com/orangedan00-ai/asep/blob/main/app/adaptive_reasoning.py): `app/adaptive_reasoning.py`
- [Attack Path Replanning](https://github.com/orangedan00-ai/asep/blob/main/app/replanner.py): `app/replanner.py`
- [Exploit Candidates](https://github.com/orangedan00-ai/asep/blob/main/app/exploit_candidates.py): `app/exploit_candidates.py`
- [Wireless Attack Paths](https://github.com/orangedan00-ai/asep/blob/main/app/wireless_attack_path.py): `app/wireless_attack_path.py`

### Actions & Sessions

- [Tool Orchestrator](https://github.com/orangedan00-ai/asep/blob/main/app/tool_orchestrator.py): `app/tool_orchestrator.py`
- [Tool Registry](https://github.com/orangedan00-ai/asep/blob/main/app/tool_registry.py): `app/tool_registry.py`
- [Metasploit Capability](https://github.com/orangedan00-ai/asep/blob/main/app/metasploit.py): `app/metasploit.py`
- [Wireless Assessment](https://github.com/orangedan00-ai/asep/blob/main/app/wireless.py): `app/wireless.py`
- [Session Intelligence](https://github.com/orangedan00-ai/asep/blob/main/app/session_intelligence.py): `app/session_intelligence.py`
- [Post-Session Analysis](https://github.com/orangedan00-ai/asep/blob/main/app/post_session_intelligence.py): `app/post_session_intelligence.py`

### Evidence & Intelligence

- [Evidence & Inventory DB](https://github.com/orangedan00-ai/asep/blob/main/app/db.py): `app/db.py`
- [Intelligence Engine](https://github.com/orangedan00-ai/asep/blob/main/app/intelligence.py): `app/intelligence.py`
- [LLM Router](https://github.com/orangedan00-ai/asep/blob/main/app/llm.py): `app/llm.py`
- [Internet Research](https://github.com/orangedan00-ai/asep/blob/main/app/internet_research.py): `app/internet_research.py`
- [Skill Library](https://github.com/orangedan00-ai/asep/blob/main/app/skill_library.py): `app/skill_library.py`
- [Self-Healing](https://github.com/orangedan00-ai/asep/blob/main/app/self_heal.py): `app/self_heal.py`
- [Self-Modifying Engine](https://github.com/orangedan00-ai/asep/blob/main/app/self_modifying.py): `app/self_modifying.py`

### Other components

- **Security Operator**
- **Kali Tools**

## Connections

- Security Operator → Browser UX: sets objectives (evidence: `README.md`)
- Browser UX → Flask API: requests operations (evidence: `README.md`)
- Flask API → UX Aggregation: aggregates for UX (evidence: `README.md`)
- Flask API → Network Discovery: starts discovery (evidence: `app/routes.py`)
- Flask API → Host Identity: enriches hosts (evidence: `app/routes.py`)
- Flask API → Nmap Executor: requests service scan (evidence: `app/routes.py`)
- Network Discovery → Nmap Executor: runs scans (evidence: `app/network_discovery.py`)
- Network Discovery → Host Identity: enriches inventory (evidence: `app/network_discovery.py`)
- Nmap Executor → Scope Policy: checks target (evidence: `app/nmap_executor.py`)
- Assessment Chain → Scope Policy: asserts target (evidence: `app/assessment_engine.py`)
- Assessment Chain → Nmap Executor: collects scan evidence (evidence: `app/assessment_engine.py`)
- Assessment Chain → Tool Orchestrator: runs profiles (evidence: `app/assessment_engine.py`)
- Assessment Chain → Tool Registry: checks tool (evidence: `app/assessment_engine.py`)
- Assessment Chain → Kali Tools: executes tools (evidence: `app/assessment_engine.py`)
- Tool Orchestrator → Scope Policy: validates target (evidence: `app/tool_orchestrator.py`)
- Tool Orchestrator → Tool Registry: gets tool metadata (evidence: `app/tool_orchestrator.py`)
- Tool Orchestrator → Kali Tools: runs profiles (evidence: `app/tool_orchestrator.py`)
- Flask API → Evidence & Inventory DB: persists evidence (evidence: `app/routes.py`)
- UX Aggregation → Evidence & Inventory DB: reads evidence (evidence: `app/ux.py`)
- Intelligence Engine → LLM Router: requests reasoning (evidence: `app/intelligence.py`)
- Exploit Candidates → Metasploit Capability: checks modules (evidence: `app/exploit_candidates.py`)
- Exploit Candidates → Internet Research: looks up vulnerabilities (evidence: `app/exploit_candidates.py`)
- Flask API → Wireless Assessment: exposes assessment (evidence: `app/routes.py`)
- Flask API → Wireless Attack Paths: builds attack paths (evidence: `app/routes.py`)
- Flask API → Session Intelligence: serves session data (evidence: `app/routes.py`)
- Flask API → Post-Session Analysis: exposes post-session analysis
- Self-Healing → Self-Modifying Engine: requests repair (evidence: `app/self_heal.py`)
- Skill Library → Evidence & Inventory DB: loads skills
- LLM Router → Skill Library: uses skill registry (evidence: `app/llm.py`)
- Flask API → Environment State: uses environment state
- Adaptive Reasoning → Attack Path Replanning: supports replanning
- Metasploit Capability → Session Intelligence: provides sessions
