pentagi
Run AI-powered penetration testing with PentAGI. Use when a user asks to automate security testing, set up autonomous pentesting, deploy an AI-driven vulnerability scanner, build a self-hosted security testing platform, or conduct penetration tests with LLM-powered agents.
What this skill does
# PentAGI
## Overview
PentAGI is a fully autonomous AI agent system for penetration testing. It deploys a multi-agent architecture where specialized AI agents (research, development, infrastructure) collaborate to plan, execute, and report security assessments. All operations run in sandboxed Docker containers with 20+ professional security tools (nmap, metasploit, sqlmap, nikto, gobuster, etc.). Features a knowledge graph (Neo4j + Graphiti) for persistent learning across engagements, web intelligence via built-in browser, and comprehensive monitoring with Grafana/Langfuse. Self-hosted — your data stays on your infrastructure.
## Instructions
### Step 1: Quick Deployment
```bash
# Clone the repository
git clone https://github.com/vxcontrol/pentagi.git
cd pentagi
# Copy and configure environment
cp .env.example .env
```
```bash
# .env — Essential configuration
# LLM Provider (choose one)
OPENAI_API_KEY=sk-... # OpenAI
# ANTHROPIC_API_KEY=sk-ant-... # Anthropic
# OLLAMA_SERVER_URL=http://host:11434 # Local Ollama
# Primary model for the main agent
LLM_MODEL=gpt-4o # or claude-3-5-sonnet, llama3.1
LLM_PROVIDER=openai # openai, anthropic, ollama, bedrock, gemini, deepseek
# Search provider for web intelligence
TAVILY_API_KEY=tvly-... # Tavily (recommended)
# GOOGLE_SEARCH_API_KEY=... # or Google Custom Search
# SEARXNG_URL=http://localhost:8080 # or self-hosted SearXNG
# Security — change these in production
POSTGRES_PASSWORD=your-secure-password
SECRET_KEY=your-secret-key-min-32-chars
```
```bash
# Deploy the full stack
docker compose up -d
# Access the web UI
open http://localhost:3000
```
The stack deploys: React frontend, Go backend (GraphQL API), PostgreSQL with pgvector, Neo4j knowledge graph, security tools container, web scraper, and monitoring (Grafana + Langfuse).
### Step 2: Configure AI Agents
PentAGI uses a team of specialized agents that collaborate on the assessment.
```yaml
# Agent architecture (configured via UI or API)
#
# Primary Agent (Orchestrator)
# ├── Researches target, plans attack phases
# ├── Delegates to specialists:
# │ ├── Research Agent — OSINT, web scraping, CVE lookup
# │ ├── Development Agent — exploit modification, payload crafting
# │ └── Infrastructure Agent — container management, tool setup
# ├── Executes security tools in sandboxed containers
# └── Generates vulnerability reports
#
# Each agent has access to:
# - 20+ security tools (nmap, metasploit, sqlmap, nikto, etc.)
# - Web browser for research
# - Knowledge graph for persistent memory
# - Previous engagement learnings
```
### Step 3: Start a Penetration Test via Web UI
```text
1. Open http://localhost:3000
2. Create a new engagement:
- Target: IP address, domain, or CIDR range
- Scope: Which services/ports to test
- Rules of engagement: What's allowed (e.g., no DoS, no data exfiltration)
- Objective: "Full security assessment" or specific focus
3. The AI agent:
- Performs reconnaissance (nmap, whois, DNS enumeration)
- Identifies services and versions
- Searches for known vulnerabilities (CVE databases)
- Attempts exploitation with appropriate tools
- Documents findings with evidence
- Generates a vulnerability report
```
### Step 4: GraphQL API Integration
```typescript
// Integrate PentAGI into your security pipeline via GraphQL
const PENTAGI_URL = 'http://localhost:3000/graphql'
// Create a new engagement
const createEngagement = await fetch(PENTAGI_URL, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${API_TOKEN}`,
},
body: JSON.stringify({
query: `
mutation CreateTask($input: CreateTaskInput!) {
createTask(input: $input) {
id
status
createdAt
}
}
`,
variables: {
input: {
target: '192.168.1.0/24',
objective: 'Perform a comprehensive security assessment of the internal network segment. Focus on identifying exposed services, default credentials, unpatched vulnerabilities, and potential lateral movement paths.',
scope: ['port-scan', 'service-enum', 'vuln-scan', 'web-app-test'],
constraints: ['no-dos', 'no-data-exfil', 'business-hours-only'],
},
},
}),
})
// Monitor progress
const checkStatus = await fetch(PENTAGI_URL, {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${API_TOKEN}` },
body: JSON.stringify({
query: `
query TaskStatus($id: ID!) {
task(id: $id) {
id
status
progress
currentPhase
findings {
severity
title
description
evidence
remediation
}
logs {
timestamp
agent
action
output
}
}
}
`,
variables: { id: engagement.id },
}),
})
```
### Step 5: Knowledge Graph — Persistent Learning
```text
# PentAGI remembers findings across engagements via Neo4j + Graphiti
#
# After each engagement, the knowledge graph stores:
# - Vulnerability patterns found per technology stack
# - Successful exploitation techniques
# - Network topology relationships
# - Service fingerprints and their known weaknesses
#
# In future engagements, the agent queries this knowledge to:
# - Prioritize attack vectors that worked before on similar targets
# - Skip techniques known to fail on specific configurations
# - Correlate findings across multiple assessments
# - Identify systemic issues across the organization
```
### Step 6: Monitoring and Reporting
```bash
# Grafana dashboards — real-time monitoring
open http://localhost:3001
# Dashboards include:
# - Active agent operations and tool execution
# - Token usage and LLM cost tracking
# - Container resource utilization
# - Engagement timeline and progress
# Langfuse — LLM observability
open http://localhost:3002
# Track:
# - Agent reasoning chains
# - Prompt effectiveness
# - Token usage per engagement phase
# - Model performance comparison
```
```bash
# Export vulnerability report
curl -H "Authorization: Bearer $API_TOKEN" \
"http://localhost:3000/api/v1/tasks/$TASK_ID/report" \
-o vulnerability-report.pdf
# Report includes:
# - Executive summary
# - Detailed findings with CVSS scores
# - Evidence (screenshots, command output)
# - Remediation recommendations
# - Risk matrix
```
## Guidelines
- **Always get written authorization** before running PentAGI against any target. Unauthorized penetration testing is illegal.
- Deploy on an isolated network segment — PentAGI's sandboxed containers contain offensive tools.
- Use `constraints` to enforce rules of engagement — prevent DoS, data exfiltration, or out-of-scope testing.
- Start with `Ollama` for local/private assessments — no data leaves your infrastructure.
- The knowledge graph improves over time — run PentAGI consistently to build organizational security intelligence.
- Review agent actions in real-time via the web UI — autonomous doesn't mean unsupervised.
- PentAGI complements manual testing — use it for initial reconnaissance and known vulnerability scanning, then have humans investigate complex logic flaws.
- Resource requirements: 8GB+ RAM, 4+ CPU cores. GPU optional (only for local LLM via Ollama).
- Langfuse integration helps optimize LLM costs — track which models give best results per phase.
Related in Cloud & DevOps
appbuilder-action-scaffolder
IncludedCreate, implement, deploy, and debug Adobe Runtime actions with consistent layout, validation, and error handling. Use this skill whenever the user needs to add actions to an App Builder project, understand action structure (params, response format, web/raw actions), configure actions in the manifest, use App Builder SDKs (State, Files, Events, database), deploy and invoke actions via CLI, debug action issues, or implement patterns such as webhook receivers, custom event providers, journaling consumers, large payload redirects, action sequence pipelines, and Asset Compute workers. Also trigger when users mention serverless functions in Adobe context, action logging, IMS authentication for actions, or cron-style scheduled actions.
orchestrating-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. Use this skill when the user needs a multi-step Data Cloud pipeline, cross-phase troubleshooting, or data space and data kit management. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase sf data360 workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching phase-specific skill), the task is STDM/session tracing/parquet telemetry (use observing-agentforce), standard CRM SOQL (use querying-soql), or Apex implementation (use generating-apex).
github-project-automation
IncludedAutomate GitHub repository setup with CI/CD workflows, issue templates, Dependabot, and CodeQL security scanning. Includes 12 production-tested workflows and prevents 18 errors: YAML syntax, action pinning, and configuration. Use when: setting up GitHub Actions CI/CD, creating issue/PR templates, enabling Dependabot or CodeQL scanning, deploying to Cloudflare Workers, implementing matrix testing, or troubleshooting YAML indentation, action version pinning, secrets syntax, runner versions, or CodeQL configuration. Keywords: github actions, github workflow, ci/cd, issue templates, pull request templates, dependabot, codeql, security scanning, yaml syntax, github automation, repository setup, workflow templates, github actions matrix, secrets management, branch protection, codeowners, github projects, continuous integration, continuous deployment, workflow syntax error, action version pinning, runner version, github context, yaml indentation error
sf-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase `sf data360` workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching sf-datacloud-* skill), the task is STDM/session tracing/parquet telemetry (use sf-ai-agentforce-observability), standard CRM SOQL (use sf-soql), or Apex implementation (use sf-apex).
fabric-cli
IncludedUse this skill for Fabric.so CLI workflows with the `fabric` terminal command: diagnose/install/login, search or browse a Fabric library, save notes/links/files, create folders, ask the Fabric AI assistant, manage tasks/workspaces, generate shell completion, check subscription usage, produce JSON output, and use Fabric as persistent agent memory. Do not use for Microsoft Fabric/Azure/Power BI `fab`, Daniel Miessler's Fabric framework, Python Fabric SSH, Fabric.js, or textile/fashion fabric.
lark
IncludedLark/Feishu CLI skills: lark-cli operations for docs, markdown, sheets, base, calendar, im, mail, task, okr, drive, wiki, slides, whiteboard, apps, approval, attendance, contact, vc, minutes, event. Use when the user needs to operate Lark/Feishu resources via lark-cli, send messages, manage documents, spreadsheets, calendars, tasks, OKRs, deploy web pages, or any Feishu/Lark workspace operations.