How to deploy an AI team that runs penetration tests on approved targets
Describe the target system and objectives in plain language, and you can watch specialized AI agents plan, execute tools, and write reports. PentAGI is an open-source system that enables this autonomous security testing to run safely on your infrastructure. It is used by security engineers and red teams to reduce repetitive tasks in approved tests and handle complex attack scenarios.
How the autonomous agent team works
PentAGI operates with a structure where multiple specialized agents collaborate. An orchestrator manages the overall flow, a researcher gathers information, a developer plans the attack, and an executor performs the actual commands. Each agent uses PostgreSQL and pgvector to remember past successful cases and learning content, using this to determine the next steps. Optionally, connecting a Neo4j-based knowledge graph allows for deeper tracking of relationships between hosts, services, and vulnerabilities. All work is performed within isolated Docker sandboxes to maintain system safety.
Built-in security tools and external information gathering
The system includes more than 20 specialized penetration testing tools, such as nmap, Metasploit, and sqlmap. Agents automatically select and execute the necessary tools based on the nature of the task. It gathers the latest information through web scrapers and integrates with various search APIs like Tavily, Firecrawl, and Perplexity to collect broad information. This information-gathering capability helps agents identify the latest vulnerabilities and attack vectors. All collected data is recorded for use in subsequent analysis and report writing.
Supervision mechanisms for stable small model execution
PentAGI provides two supervision features: execution monitoring and intelligent task planning. Execution monitoring detects when an agent repeatedly calls the same tool or gets stuck in an infinite loop, prompting a mentor agent to intervene and suggest alternatives. Task planning prevents out-of-scope work by planning 3 to 7 specific steps before starting a task. These features are essential when using small open-source models with fewer than 32B parameters. According to test results, enabling these features increases execution time and token usage by 2 to 3 times, but improves the quality of the output by 2 times.
Flexibility in installation and model selection
An interactive installer for Linux, macOS, and Windows allows for easy deployment via Docker Compose. It supports around 10 cloud LLM providers (including OpenAI, Anthropic, Google AI, and AWS Bedrock) and can use local models via Ollama or vLLM. OpenAI-compatible endpoints, including Azure OpenAI, can also be connected via custom settings. It provides REST and GraphQL APIs for automation and external system integration, ensuring security with Bearer token authentication. System status can also be monitored in real time through integration with Grafana and Prometheus.
Boundaries to check before use
PentAGI is an autonomous penetration testing platform, not a BAS (Breach and Attack Simulation) product that executes pre-defined campaigns. The attack scripts written by the agents are at a conceptual level and should not be viewed as currently implemented features. Report output formats only support web view, clipboard copy, Markdown, and PDF download; exporting flow reports in JSON format is currently not documented. This tool must only be used on approved test targets, as unauthorized access may lead to legal issues. When using small models, execution monitoring and task planning must be enabled to obtain stable results.