How sickwell/pentestgpt-v2 works
Excalibur is a CLI-driven, CTF-focused penetration-testing agent. The documented workflow starts with a target and task, then uses an LLM agent and EGATS attack-tree planning to select work, invoke security tools, track findings and flags, and persist resumable sessions. Memory assembles attack context; events and the optional TUI expose run activity. The README documents model routing and lab use, but the sampled runtime sources do not establish every provider or deployment connection, so uncertain integrations are omitted or dashed.
Main entry points: controller.py Run controller · agent.py Pentest agent · main.py CLI entry · tui.py Interactive TUI
Components 23
CLI and interaction
- CLI entry
excalibur/interface/main.py - Interactive TUI
excalibur/interface/tui.py - Activity display
excalibur/interface/components/activity_feed.py
Agent runtime
- Pentest agent
excalibur/core/agent.py - Run controller
excalibur/core/controller.py - LLM backend
excalibur/core/backend.py - Run configuration
excalibur/core/config.py - CTF prompts
excalibur/prompts/pentesting.py - Run events
excalibur/core/events.py - Tracing
excalibur/core/tracer.py - Langfuse telemetry
excalibur/core/langfuse.py
Attack planning
- EGATS planner
excalibur/planner/egats.py - Attack-tree models
excalibur/planner/models.py
Pentest operations
- Tool registry
excalibur/tools/registry.py - Typed tool interface
excalibur/tools/base.py - Security tool categories
excalibur/tools/categories - Tool skills
excalibur/tools/skills
Memory and sessions
- Pentest state store
excalibur/memory/state_store.py - Context assembler
excalibur/memory/context_assembler.py - Context compressor
excalibur/memory/context_compressor.py - Branch summaries
excalibur/memory/branch_summary.py - Session persistence
excalibur/core/session.py
Other components
- Operator
Connections 25
- Operator → CLI entry: starts run
README.md - CLI entry → Pentest agent: invokes
excalibur/interface/main.py - CLI entry → Interactive TUI: starts
excalibur/interface/main.py - Interactive TUI → Activity display: updates
excalibur/interface/tui.py - Pentest agent → Run controller: delegates run
excalibur/core/agent.py - Pentest agent → Run configuration: uses
excalibur/core/agent.py - Pentest agent → Tracing: tracks status
excalibur/core/agent.py - Pentest agent → CTF prompts: uses prompt
excalibur/core/agent.py - Run controller → LLM backend: queries
excalibur/core/controller.py - Run controller → EGATS planner: drives planning
excalibur/core/controller.py - EGATS planner → Attack-tree models: builds tree
excalibur/planner/egats.py - Run controller → Tool registry: selects tools
excalibur/core/controller.py - Tool registry → Security tool categories: registers
excalibur/tools/registry.py - Security tool categories → Typed tool interface: implements
excalibur/tools/categories/active_directory.py - Tool skills → Tool registry: references registry
- Run controller → Context assembler: assembles context
excalibur/core/controller.py - Context assembler → Pentest state store: reads state
excalibur/memory/context_assembler.py - Context assembler → Branch summaries: summarizes branches
excalibur/memory/context_assembler.py - Run controller → Context compressor: compresses context
excalibur/core/controller.py - Context compressor → Branch summaries: uses summaries
excalibur/memory/context_compressor.py - Run controller → Session persistence: persists run
excalibur/core/controller.py - Run controller → Run events: emits updates
excalibur/core/controller.py - Interactive TUI → Run events: subscribes
excalibur/interface/tui.py - CLI entry → Langfuse telemetry: initializes
excalibur/interface/main.py - Langfuse telemetry → Run events: uses events
excalibur/core/langfuse.py