How exael74/diagramspentestai works
PentestAI is a research prototype for authorized, scope-bounded penetration testing. The operator configures an engagement in the terminal interface; the Technical Agent proposes actions across reconnaissance, scanning, web analysis, and exploitation. The deterministic policy gate and human checkpoints govern execution through tool adapters. The Validation Agent filters untrusted output into evidence, which feeds later decisions and the Reporting Agent. The README documents these principal relationships; sampled orchestrator code confirms adapter dispatch, while unsampled orchestration details are represented only where the README supports them.
Main entry points: orchestrator.py Orchestrator · base.py Adapter Boundary · technical.py Technical Agent · cli.py CLI
Components 24
Operator Interface
- CLI
src/pentestai/interface/cli.py - Setup Wizard
src/pentestai/interface/wizard.py - Human Approval
src/pentestai/interface/approval.py - Terminal Theme
src/pentestai/interface/theme.py
Assessment Coordination
- Orchestrator
src/pentestai/orchestration/orchestrator.py - Proposed Action
src/pentestai/orchestration/action.py - Policy Engine
src/pentestai/orchestration/policy.py - Engagement Scope
src/pentestai/orchestration/scope.py - Control Decisions
src/pentestai/orchestration/control.py
Agent Layer
- Technical Agent
src/pentestai/agents/technical.py - Validation Agent
src/pentestai/agents/validation.py - Reporting Agent
src/pentestai/agents/reporting.py - Agent Guardrails
src/pentestai/agents/guardrails.py - LLM Client
src/pentestai/agents/llm.py - LLM Providers
src/pentestai/agents/providers.py
Tools and Evidence
- Adapter Boundary
src/pentestai/adapters/base.py - Nmap Adapter
src/pentestai/adapters/nmap_adapter.py - Nuclei Adapter
src/pentestai/adapters/nuclei_adapter.py - ZAP Adapter
src/pentestai/adapters/zap_adapter.py - sqlmap Adapter
src/pentestai/adapters/sqlmap_adapter.py - Evidence Model
src/pentestai/evidence/model.py - Evidence and Audit
src/pentestai/evidence/repository.py - Vulnerable Lab
lab/vulnmart/app.py
Other components
- Operator
Connections 34
- Operator → CLI: starts assessment
README.md - CLI → Setup Wizard: launches setup
src/pentestai/interface/cli.py - Operator → Setup Wizard: configures engagement
README.md - Operator → Human Approval: reviews actions
README.md - CLI → Orchestrator: starts run
src/pentestai/interface/cli.py - Setup Wizard → Engagement Scope: configures scope
README.md - Setup Wizard → Policy Engine: configures policy
README.md - Orchestrator → Technical Agent: requests proposals
README.md - Technical Agent → LLM Client: requests decisions
src/pentestai/agents/technical.py - Validation Agent → LLM Client: requests analysis
src/pentestai/agents/validation.py - Reporting Agent → LLM Client: requests report
src/pentestai/agents/reporting.py - LLM Client → LLM Providers: delegates calls
src/pentestai/agents/llm.py - Technical Agent → Proposed Action: proposes action
README.md - Orchestrator → Policy Engine: evaluates action
README.md - Policy Engine → Engagement Scope: checks authorization
src/pentestai/orchestration/policy.py - Orchestrator → Human Approval: requests approval
README.md - Human Approval → Control Decisions: returns choice
src/pentestai/interface/approval.py - Orchestrator → Control Decisions: applies controls
README.md - Orchestrator → Adapter Boundary: dispatches action
src/pentestai/orchestration/orchestrator.py - Adapter Boundary → Nmap Adapter: executes tool
src/pentestai/adapters/__init__.py - Adapter Boundary → Nuclei Adapter: executes tool
src/pentestai/adapters/__init__.py - Adapter Boundary → ZAP Adapter: executes tool
src/pentestai/adapters/__init__.py - Adapter Boundary → sqlmap Adapter: executes tool
src/pentestai/adapters/__init__.py - Validation Agent → Evidence Model: creates records
src/pentestai/agents/validation.py - Orchestrator → Validation Agent: filters tool output
README.md - Orchestrator → Evidence and Audit: stores validated records
src/pentestai/orchestration/orchestrator.py - Orchestrator → Evidence and Audit: records audit events
src/pentestai/evidence/repository.py - Orchestrator → Technical Agent: feeds evidence back
README.md - Orchestrator → Reporting Agent: requests final report
README.md - Reporting Agent → Evidence and Audit: reads validated evidence
README.md - Orchestrator → Vulnerable Lab: assesses controlled target
README.md - Technical Agent → Agent Guardrails: uses constrained outputs
src/pentestai/agents/technical.py - Validation Agent → Agent Guardrails: uses constrained outputs
src/pentestai/agents/validation.py - CLI → Terminal Theme: renders interface
src/pentestai/interface/cli.py