MCPcopy
hub / github.com/vxcontrol/pentagi

github.com/vxcontrol/pentagi @v2.1.0 sqlite

repository ↗ · DeepWiki ↗ · release v2.1.0 ↗
16,080 symbols 44,114 edges 833 files 4,074 documented · 25%
README

PentAGI

<strong>P</strong>enetration testing <strong>A</strong>rtificial <strong>G</strong>eneral <strong>I</strong>ntelligence

Join the Community! Connect with security researchers, AI enthusiasts, and fellow ethical hackers. Get support, share insights, and stay updated with the latest PentAGI developments.

DiscordTelegram

vxcontrol%2Fpentagi | Trendshift

Table of Contents

Overview

PentAGI is an innovative tool for automated security testing that leverages cutting-edge artificial intelligence technologies. The project is designed for information security professionals, researchers, and enthusiasts who need a powerful and flexible solution for conducting penetration tests.

You can watch the video PentAGI overview: PentAGI Overview Video

Features

  • Secure & Isolated. All operations are performed in a sandboxed Docker environment with complete isolation.
  • Fully Autonomous. AI-powered agent that automatically determines and executes penetration testing steps with optional execution monitoring and intelligent task planning for enhanced reliability.
  • Professional Pentesting Tools. Built-in suite of 20+ professional security tools including nmap, metasploit, sqlmap, and more.
  • Smart Memory System. Long-term storage of research results and successful approaches for future use.
  • Knowledge Graph Integration. Graphiti-powered knowledge graph using Neo4j for semantic relationship tracking and advanced context understanding.
  • Web Intelligence. Built-in browser via scraper for gathering latest information from web sources.
  • External Search Systems. Integration with advanced search APIs including Tavily, Traversaal, Perplexity, DuckDuckGo, Google Custom Search, Sploitus Search and Searxng for comprehensive information gathering.
  • Team of Specialists. Delegation system with specialized AI agents for research, development, and infrastructure tasks, enhanced with optional execution monitoring and intelligent task planning for optimal performance with smaller models.
  • Comprehensive Monitoring. Detailed logging and integration with Grafana/Prometheus for real-time system observation.
  • Detailed Reporting. Generation of thorough vulnerability reports with exploitation guides.
  • Smart Container Management. Automatic Docker image selection based on specific task requirements.
  • Modern Interface. Clean and intuitive web UI for system management and monitoring.
  • Comprehensive APIs. Full-featured REST and GraphQL APIs with Bearer token authentication for automation and integration.
  • Persistent Storage. All commands and outputs are stored in PostgreSQL with pgvector extension.
  • Scalable Architecture. Microservices-based design supporting horizontal scaling.
  • Self-Hosted Solution. Complete control over your deployment and data.
  • Flexible Authentication. Support for 10+ LLM providers (OpenAI, Anthropic, Google AI/Gemini, AWS Bedrock, Ollama, DeepSeek, GLM, Kimi, Qwen, Custom) plus aggregators (OpenRouter, DeepInfra). For production local deployments, see our vLLM + Qwen3.5-27B-FP8 guide.
  • API Token Authentication. Secure Bearer token system for programmatic access to REST and GraphQL APIs.
  • Quick Deployment. Easy setup through Docker Compose with comprehensive environment configuration.

Current Capability Boundaries

  • PentAGI today is an autonomous and assistant-guided penetration testing platform, not a CALDERA-style Breach and Attack Simulation (BAS) or adversary emulation product with predefined campaigns or attack plans.
  • BAS-like agent-authored attack scripts should be treated as conceptual or future work, not as a feature that is implemented today.
  • The current flow report UI supports web view, copy to clipboard, Markdown download, and PDF download. JSON flow-report export is not documented as a supported output format today.
  • Provider flexibility is available today through built-in providers and custom/OpenAI-compatible endpoints. See Custom LLM Provider Configuration and the vLLM + Qwen3.5-27B-FP8 guide.

Architecture

System Context

flowchart TB
    classDef person fill:#08427B,stroke:#073B6F,color:#fff
    classDef system fill:#1168BD,stroke:#0B4884,color:#fff
    classDef external fill:#666666,stroke:#0B4884,color:#fff

    pentester["👤 Security Engineer
    (User of the system)"]

    pentagi["✨ PentAGI
    (Autonomous penetration testing system)"]

    target["🎯 target-system
    (System under test)"]
    llm["🧠 llm-provider
    (OpenAI/Anthropic/Ollama/Bedrock/Gemini/Custom)"]
    search["🔍 search-systems
    (Google/DuckDuckGo/Tavily/Traversaal/Perplexity/Sploitus/Searxng)"]
    langfuse["📊 langfuse-ui
    (LLM Observability Dashboard)"]
    grafana["📈 grafana
    (System Monitoring Dashboard)"]

    pentester --> |Uses HTTPS| pentagi
    pentester --> |Monitors AI HTTPS| langfuse
    pentester --> |Monitors System HTTPS| grafana
    pentagi --> |Tests Various protocols| target
    pentagi --> |Queries HTTPS| llm
    pentagi --> |Searches HTTPS| search
    pentagi --> |Reports HTTPS| langfuse
    pentagi --> |Reports HTTPS| grafana

    class pentester person
    class pentagi system
    class target,llm,search,langfuse,grafana external

    linkStyle default stroke:#ffffff,color:#ffffff

Container Architecture (click to expand)

graph TB
    subgraph Core Services
        UI[Frontend UI

React + TypeScript]
        API[Backend API

Go + GraphQL]
        DB[(Vector Store

PostgreSQL + pgvector)]
        MQ[Task Queue

Async Processing]
        Agent[AI Agents

Multi-Agent System]
    end

    subgraph Knowledge Graph
        Graphiti[Graphiti

Knowledge Graph API]
        Neo4j[(Neo4j

Graph Database)]
    end

    subgraph Monitoring
        Grafana[Grafana

Dashboards]
        VictoriaMetrics[VictoriaMetrics

Time-series DB]
        Jaeger[Jaeger

Distributed Tracing]
        Loki[Loki

Log Aggregation]
        OTEL[OpenTelemetry

Data Collection]
    end

    subgraph Analytics
        Langfuse[Langfuse

LLM Analytics]
        ClickHouse[ClickHouse

Analytics DB]
        Redis[Redis

Cache + Rate Limiter]
        MinIO[MinIO

S3 Storage]
    end

    subgraph Security Tools
        Scraper[Web Scraper

Isolated Browser]
        PenTest[Security Tools

20+ Pro Tools

Sandboxed Execution]
    end

    UI --> |HTTP/WS| API
    API --> |SQL| DB
    API --> |Events| MQ
    MQ --> |Tasks| Agent
    Agent --> |Commands| PenTest
    Agent --> |Queries| DB
    Agent --> |Knowledge| Graphiti
    Graphiti --> |Graph| Neo4j

    API --> |Telemetry| OTEL
    OTEL --> |Metrics| VictoriaMetrics
    OTEL --> |Traces| Jaeger
    OTEL --> |Logs| Loki

    Grafana --> |Query| VictoriaMetrics
    Grafana --> |Query| Jaeger
    Grafana --> |Query| Loki

    API --> |Analytics| Langfuse
    Langfuse --> |Store| ClickHouse
    Langfuse --> |Cache| Redis
    Langfuse --> |Files| MinIO

    classDef core fill:#f9f,stroke:#333,stroke-width:2px,color:#000
    classDef knowledge fill:#ffa,stroke:#333,stroke-width:2px,color:#000
    classDef monitoring fill:#bbf,stroke:#333,stroke-width:2px,color:#000
    classDef analytics fill:#bfb,stroke:#333,stroke-width:2px,color:#000
    classDef tools fill:#fbb,stroke:#333,stroke-width:2px,color:#000

    class UI,API,DB,MQ,Agent core
    class Graphiti,Neo4j knowledge
    class Grafana,VictoriaMetrics,Jaeger,Loki,OTEL monitoring
    class Langfuse,ClickHouse,Redis,MinIO analytics
    class Scraper,PenTest tools

Entity Relationship (click to expand)

erDiagram
    Flow ||--o{ Task : contains
    Task ||--o{ SubTask : contains
    SubTask ||--o{ Action : contains
    Action ||--o{ Artifact : produces
    Action ||--o{ Memory : stores

    Flow {
        string id PK
        string name "Flow name"
        string description "Flow description"
        string status "active/completed/failed"
        json parameters "Flow parameters"
        timestamp created_at
        timestamp updated_at
    }

    Task {
        string id PK
        string flow_id FK
        string name "Task name"
        string description "Task description"
        string status "pending/running/done/failed"
        json result "Task results"
        timestamp created_at
        timestamp updated_at
    }

    SubTask {
        string id PK
        string task_id FK
        string name "Subtask name"
        string description "Subtask description"
        string status "queued/running/completed/failed"
        string agent_type "researcher/developer/executor"
        json context "Agent context"
        timestamp created_at
        timestamp updated_at
    }

    Action {
        string id PK
        string subtask_id FK
        string type "command/search/analyze/etc"
        string status "success/failure"
        json parameters "Action parameters"
        json result "Action results"
        timestamp created_at
    }

    Artifact {
        string id PK
        string action_id FK
        string type "file/report/log"
        string path "Storage path"
        json metadata "Additional info"
        timestamp created_at
    }

    Memory {
        string id PK
        string action_id FK
        string type "observation/conclusion"
        vector embedding "Vector representation"
        text content "Memory content"
        timestamp created_at
    }

Agent Interaction (click to expand)

sequenceDiagram
    participant O as Orchestrator
    participant R as Researcher
    participant D as Developer
    participant E as Executor
    participant VS as Vector Store
    participant KB as Knowledge Base

    Note over O,KB: Flow Initialization
    O->>VS: Query similar tasks
    VS-->>O: Return experiences
    O->>KB: Load relevant knowledge
    KB-->>O: Return context

    Note over O,R: Research Phase
    O->>R: Analyze target
    R->>VS: Search similar cases
    VS-->>R: Return patterns
    R->>KB: Query vulnerabilities
    KB-->>R: Return known issues
    R->>VS: Store findings
    R-->>O: Research results

    Note over O,D: Planning Phase
    O->>D: Plan attack
    D->>VS: Query exploits
    VS-->>D: Return techniques
    D->>KB: Load tools info
    KB-->>D: Return capabilities
    D-->>O: Attack plan

    Note over O,E: Execution Phase
    O->>E: Execute plan
    E->>KB: Load tool guides
    KB-->>E: Return procedures
    E->>VS: Store results
    E-->>O: Execution status

Memory System (click to expand)

```mermaid graph TB subgraph "Long-term Memory" VS[(Vector Store

Embeddings DB)] KB[Knowledge Base

Domain Expertise] Tools[Tools Knowledge

Usage Patterns] end

subgraph "Working Memory"
    Context[Current Context

Task State] Goals[Active Goals

Objectives] State[System State

Resources] end

subgraph "Episodic Memory"
    Actions[Past Actions

Commands History] Results[Action Results

Outcomes] Patterns[Success

Extension points exported contracts — how you extend this code

RequestOption (Interface)
RequestOption adapts the behavior of the client or an individual request. [7 implementers]
backend/pkg/observability/langfuse/api/core/request_option.go
ListScreenHandler (Interface)
ListScreenHandler defines methods that concrete list screens must implement [6 implementers]
backend/cmd/installer/wizard/models/list_screen.go
Provider (Interface)
(no doc) [11 implementers]
frontend/src/models/provider.tsx
ImportMeta (Interface)
(no doc)
frontend/types/vite-env.d.ts
SSLPaths (Interface)
(no doc)
frontend/scripts/generate-ssl.ts
IValid (Interface)
IValid is interface to control all models from user code [67 implementers]
backend/pkg/server/models/init.go
BaseScreenModel (Interface)
BaseScreenModel defines methods that concrete screens must implement [6 implementers]
backend/cmd/installer/wizard/models/base_screen.go
ResourcesViewOptions (Interface)
* Per-page persisted toggles for FileManager view options: * - `size` / `modified` — optional column visibility *
frontend/src/pages/resources/resources.tsx

Core symbols most depended-on inside this repo

Error
called by 2820
backend/pkg/server/response/http.go
Run
called by 993
backend/pkg/controller/task.go
Contains
called by 602
backend/pkg/providers/provider/provider.go
Render
called by 395
backend/cmd/installer/wizard/models/base_screen.go
GetStyles
called by 305
backend/cmd/installer/wizard/models/list_screen.go
Scan
called by 257
backend/pkg/database/models.go
cn
called by 250
frontend/src/lib/utils.ts
Set
called by 250
backend/cmd/installer/loader/file.go

Shape

Method 10,340
Function 3,682
Struct 1,310
Interface 459
TypeAlias 226
FuncType 42
Enum 19
Class 2

Languages

Go92%
TypeScript8%

Modules by API surface

backend/pkg/graph/generated.go1,717 symbols
backend/pkg/observability/langfuse/api/ingestion.go1,096 symbols
backend/pkg/observability/langfuse/api/scorev2.go832 symbols
backend/pkg/observability/langfuse/api/types.go426 symbols
backend/pkg/observability/langfuse/api/trace.go415 symbols
backend/pkg/database/querier.go251 symbols
backend/pkg/observability/langfuse/api/scim.go248 symbols
frontend/src/graphql/types.ts196 symbols
backend/pkg/graph/model/models_gen.go166 symbols
backend/pkg/observability/langfuse/api/annotationqueues.go159 symbols
backend/pkg/graph/subscriptions/controller.go146 symbols
backend/pkg/observability/langfuse/api/prompts.go145 symbols

Dependencies from manifests, versioned

cloud.google.com/gov0.121.0 · 1×
cloud.google.com/go/aiplatformv1.85.0 · 1×
cloud.google.com/go/authv0.16.2 · 1×
cloud.google.com/go/auth/oauth2adaptv0.2.8 · 1×
cloud.google.com/go/compute/metadatav0.9.0 · 1×
cloud.google.com/go/longrunningv0.6.7 · 1×
cloud.google.com/go/vertexaiv0.12.0 · 1×
github.com/99designs/gqlgenv0.17.57 · 1×
github.com/AssemblyAI/assemblyai-go-sdkv1.3.0 · 1×
github.com/KyleBanks/depthv1.2.1 · 1×
github.com/Microsoft/go-winiov0.6.2 · 1×

Datastores touched

pentagidbDatabase · 1 repos
dbDatabase · 1 repos
olddbDatabase · 1 repos

For agents

$ claude mcp add pentagi \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact