# lstalet04/pentesting-ai architecture

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

- Interactive diagram: https://gitdiagram.com/lstalet04/pentesting-ai
- Repository: https://github.com/lstalet04/pentesting-ai

## Overview

Pentesting AI coordinates a human-facing AutoGen team to gather website information, perform reconnaissance and vulnerability research or scans, interact with pages, review command output, and save findings and reports. The sampled source confirms tool registration and several helper implementations; the README describes additional agent roles, while omitted parts of main.py prevent reconstructing the full chat orchestration. The Docker runtime is documented but excluded as deployment infrastructure.

Main entry points: [`main.py`](https://github.com/lstalet04/pentesting-ai/blob/main/main.py) (Agent team), [`web_interaction.py`](https://github.com/lstalet04/pentesting-ai/blob/main/web_interaction.py) (Browser actions), [`website_request.py`](https://github.com/lstalet04/pentesting-ai/blob/main/website_request.py) (Page fetch), [`CVE_searching_tool.py`](https://github.com/lstalet04/pentesting-ai/blob/main/CVE_searching_tool.py) (CVE lookup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_coordination["Agent coordination"]
  node_team["Agent team<br/>[main.py]"]
  node_proxy["User proxy<br/>[main.py]"]
  node_command_runner["Command executor<br/>[main.py]"]
  node_file_reader_agent["File reader agent<br/>[main.py]"]
  node_code_checker["Code checker<br/>[main.py]"]
end

subgraph group_assessment["Security assessment"]
  node_scanner["Recon and scan agents<br/>[main.py]"]
  node_cve_agent["CVE search agent<br/>[main.py]"]
  node_cve_lookup["CVE lookup"]
  node_exploiter["Exploitation agent<br/>[main.py]"]
end

subgraph group_web["Website interaction"]
  node_web_fetch_agent["Web fetch agent<br/>[main.py]"]
  node_page_fetch["Page fetch<br/>[website_request.py]"]
  node_web_communicator["Web communicator<br/>[main.py]"]
  node_browser_actions["Browser actions<br/>[web_interaction.py]"]
end

subgraph group_records["Findings and reports"]
  node_vuln_output["Vulnerability list reader"]
  node_vuln_append["Scan result recorder"]
  node_vuln_store[("Vulnerability list<br/>[Vuln_list.txt]")]
  node_output_reader["Output file reader"]
  node_report_writer["Report writer<br/>[main.py]"]
  node_report_save["Report saver<br/>[report_save.py]"]
end

node_operator(("Human operator"))
node_nvd["NVD website"]
node_target_site["Target website"]

node_operator -->|"starts session"| node_team
node_team -->|"coordinates"| node_proxy
node_proxy -->|"dispatches commands"| node_command_runner
node_proxy -->|"requests file reads"| node_file_reader_agent
node_team -->|"assigns assessment"| node_scanner
node_team -->|"assigns research"| node_cve_agent
node_cve_agent -->|"calls lookup"| node_cve_lookup
node_cve_lookup -->|"queries"| node_nvd
node_team -->|"assigns exploitation"| node_exploiter
node_team -->|"reviews commands"| node_code_checker
node_team -->|"assigns fetching"| node_web_fetch_agent
node_web_fetch_agent -->|"calls fetch"| node_page_fetch
node_page_fetch -->|"requests page"| node_target_site
node_team -->|"assigns interaction"| node_web_communicator
node_web_communicator -->|"calls browser tools"| node_browser_actions
node_browser_actions -->|"interacts with"| node_target_site
node_browser_actions -->|"fetches page"| node_page_fetch
node_team -->|"registers tool"| node_vuln_output
node_vuln_output -->|"reads"| node_vuln_store
node_team -->|"registers tool"| node_vuln_append
node_vuln_append -->|"appends findings"| node_vuln_store
node_team -->|"registers tool"| node_output_reader
node_team -->|"assigns reporting"| node_report_writer
node_report_writer -->|"calls save"| node_report_save

click node_team "https://github.com/lstalet04/pentesting-ai/blob/main/main.py"
click node_proxy "https://github.com/lstalet04/pentesting-ai/blob/main/main.py"
click node_command_runner "https://github.com/lstalet04/pentesting-ai/blob/main/main.py"
click node_file_reader_agent "https://github.com/lstalet04/pentesting-ai/blob/main/main.py"
click node_code_checker "https://github.com/lstalet04/pentesting-ai/blob/main/main.py"
click node_scanner "https://github.com/lstalet04/pentesting-ai/blob/main/main.py"
click node_cve_agent "https://github.com/lstalet04/pentesting-ai/blob/main/main.py"
click node_cve_lookup "https://github.com/lstalet04/pentesting-ai/blob/main/CVE_searching_tool.py"
click node_exploiter "https://github.com/lstalet04/pentesting-ai/blob/main/main.py"
click node_web_fetch_agent "https://github.com/lstalet04/pentesting-ai/blob/main/main.py"
click node_page_fetch "https://github.com/lstalet04/pentesting-ai/blob/main/website_request.py"
click node_web_communicator "https://github.com/lstalet04/pentesting-ai/blob/main/main.py"
click node_browser_actions "https://github.com/lstalet04/pentesting-ai/blob/main/web_interaction.py"
click node_vuln_output "https://github.com/lstalet04/pentesting-ai/blob/main/Vulnerability_list_out.py"
click node_vuln_append "https://github.com/lstalet04/pentesting-ai/blob/main/vulnaribility_list.py"
click node_vuln_store "https://github.com/lstalet04/pentesting-ai/blob/main/groupchat/Vuln_list.txt"
click node_output_reader "https://github.com/lstalet04/pentesting-ai/blob/main/Reading_function.py"
click node_report_writer "https://github.com/lstalet04/pentesting-ai/blob/main/main.py"
click node_report_save "https://github.com/lstalet04/pentesting-ai/blob/main/report_save.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_team,node_proxy,node_command_runner,node_file_reader_agent,node_code_checker toneBlue
class node_scanner,node_cve_agent,node_cve_lookup,node_exploiter toneAmber
class node_web_fetch_agent,node_page_fetch,node_web_communicator,node_browser_actions toneMint
class node_vuln_output,node_vuln_append,node_vuln_store,node_output_reader,node_report_writer,node_report_save toneRose
class node_operator,node_nvd,node_target_site toneIndigo
```

## Components

### Agent coordination

- [Agent team](https://github.com/lstalet04/pentesting-ai/blob/main/main.py): `main.py`
- [User proxy](https://github.com/lstalet04/pentesting-ai/blob/main/main.py): `main.py`
- [Command executor](https://github.com/lstalet04/pentesting-ai/blob/main/main.py): `main.py`
- [File reader agent](https://github.com/lstalet04/pentesting-ai/blob/main/main.py): `main.py`
- [Code checker](https://github.com/lstalet04/pentesting-ai/blob/main/main.py): `main.py`

### Security assessment

- [Recon and scan agents](https://github.com/lstalet04/pentesting-ai/blob/main/main.py): `main.py`
- [CVE search agent](https://github.com/lstalet04/pentesting-ai/blob/main/main.py): `main.py`
- [CVE lookup](https://github.com/lstalet04/pentesting-ai/blob/main/CVE_searching_tool.py): `CVE_searching_tool.py`
- [Exploitation agent](https://github.com/lstalet04/pentesting-ai/blob/main/main.py): `main.py`

### Website interaction

- [Web fetch agent](https://github.com/lstalet04/pentesting-ai/blob/main/main.py): `main.py`
- [Page fetch](https://github.com/lstalet04/pentesting-ai/blob/main/website_request.py): `website_request.py`
- [Web communicator](https://github.com/lstalet04/pentesting-ai/blob/main/main.py): `main.py`
- [Browser actions](https://github.com/lstalet04/pentesting-ai/blob/main/web_interaction.py): `web_interaction.py`

### Findings and reports

- [Vulnerability list reader](https://github.com/lstalet04/pentesting-ai/blob/main/Vulnerability_list_out.py): `Vulnerability_list_out.py`
- [Scan result recorder](https://github.com/lstalet04/pentesting-ai/blob/main/vulnaribility_list.py): `vulnaribility_list.py`
- [Vulnerability list](https://github.com/lstalet04/pentesting-ai/blob/main/groupchat/Vuln_list.txt): `groupchat/Vuln_list.txt`
- [Output file reader](https://github.com/lstalet04/pentesting-ai/blob/main/Reading_function.py): `Reading_function.py`
- [Report writer](https://github.com/lstalet04/pentesting-ai/blob/main/main.py): `main.py`
- [Report saver](https://github.com/lstalet04/pentesting-ai/blob/main/report_save.py): `report_save.py`

### Other components

- **Human operator**
- **NVD website**
- **Target website**

## Connections

- Human operator → Agent team: starts session (evidence: `README.md`)
- Agent team → User proxy: coordinates (evidence: `main.py`)
- User proxy → Command executor: dispatches commands (evidence: `README.md`)
- User proxy → File reader agent: requests file reads (evidence: `README.md`)
- Agent team → Recon and scan agents: assigns assessment (evidence: `README.md`)
- Agent team → CVE search agent: assigns research (evidence: `README.md`)
- CVE search agent → CVE lookup: calls lookup (evidence: `main.py`)
- CVE lookup → NVD website: queries (evidence: `CVE_searching_tool.py`)
- Agent team → Exploitation agent: assigns exploitation (evidence: `README.md`)
- Agent team → Code checker: reviews commands (evidence: `README.md`)
- Agent team → Web fetch agent: assigns fetching (evidence: `README.md`)
- Web fetch agent → Page fetch: calls fetch (evidence: `main.py`)
- Page fetch → Target website: requests page (evidence: `website_request.py`)
- Agent team → Web communicator: assigns interaction (evidence: `README.md`)
- Web communicator → Browser actions: calls browser tools (evidence: `main.py`)
- Browser actions → Target website: interacts with (evidence: `web_interaction.py`)
- Browser actions → Page fetch: fetches page (evidence: `web_interaction.py`)
- Agent team → Vulnerability list reader: registers tool (evidence: `main.py`)
- Vulnerability list reader → Vulnerability list: reads (evidence: `Vulnerability_list_out.py`)
- Agent team → Scan result recorder: registers tool (evidence: `main.py`)
- Scan result recorder → Vulnerability list: appends findings (evidence: `vulnaribility_list.py`)
- Agent team → Output file reader: registers tool (evidence: `main.py`)
- Agent team → Report writer: assigns reporting (evidence: `README.md`)
- Report writer → Report saver: calls save (evidence: `main.py`)
