AI pentesting and red teaming tools: open source (2026)
Our pick
Start with PentAGI if you want an AI agent that runs authorised penetration tests on your own infrastructure. It is a self-hosted, MIT-licensed multi-agent system that plans the work and runs tools such as nmap, Metasploit and sqlmap in a sandboxed Docker environment, set up by an interactive installer with Docker Compose. It works with cloud LLM providers, an OpenAI-compatible gateway, or local models through Ollama or vLLM. To test an LLM app or agent itself rather than a network, see promptfoo, PyRIT and AI-Infra-Guard in the table, which also shows each tool's last commit and latest release.
Best for
- A terminal agent for CTFs and pentests
GreyDGL/PentestGPTAn autonomous agent that drives Claude Code or Codex through staged phases. It installs from a checkout with make install and needs Python 3.12 or newer, uv, and the Claude Code or Codex CLI signed in.
- Giving your own AI client a set of security tools
0x4m4/hexstrike-aiAn MCP server that lets AI agents such as Claude, GPT and Copilot run cybersecurity tools.
- A terminal UI that works with any model
GH05TCREW/pentestagentRuns from a TUI (pentestagent) with any LiteLLM-supported model, and can run its tools in a Docker container.
- Red teaming an LLM app or agent
promptfoo/promptfooA CLI and library for evaluating and red-teaming LLM apps. It installs with npm, Homebrew or pip, or runs with npx promptfoo@latest, and it is MIT licensed.
- Testing generative AI systems for weaknesses
microsoft/PyRITA Microsoft AI Red Team toolkit with a command-line scanner, a browser GUI and a Python framework for automated scans and multi-turn attacks.
- Scanning AI agents, MCP servers and AI infrastructure
Tencent/AI-Infra-GuardAn Apache-2.0 AI red teaming platform with agent, skill, MCP and AI infrastructure scans and LLM jailbreak evaluation. It runs with Docker Compose and has no built-in authentication, so it is meant for internal networks only.
The repos compared
Checked on Nov 30, 2026: the oldest day any repo in the table was last read from GitHub.
| Repo | Stars | Last commit | Latest release | Licence | Needs |
|---|---|---|---|---|---|
| vxcontrol / pentagi A self-hosted multi-agent system that runs penetration tests with security tools such as nmap and sqlmap. | 35,445 GitHub (opens in new tab) | Active Oct 22, 2026 | v2.2.0, Oct 5, 2026 | MIT | Docker and Docker Compose (or Podman - see Podman configuration); Minimum 2 vCPU… |
| GreyDGL / PentestGPT An autonomous penetration testing agent that drives Claude Code or Codex. | 16,696 GitHub (opens in new tab) | Active Jul 14, 2026 | v1.0.0, Dec 24, 2025 | MIT | Python 3.12+; uv - Python package manager; Claude Code CLI (claude) - installed and… |
| 0x4m4 / hexstrike-ai An MCP server that lets AI agents run cybersecurity tools. | 14,074 GitHub (opens in new tab) | Active Aug 3, 2026 | - | MIT | |
| GH05TCREW / pentestagent An AI agent framework for black-box security testing, bug bounty and pentest workflows. | 3,356 GitHub (opens in new tab) | Active Nov 9, 2026 | - | MIT | Python 3.10+; API key for OpenAI, Anthropic, or other LiteLLM-supported provider |
| promptfoo / promptfoo A CLI and library for evaluating and red-teaming LLM apps. | 27,908 GitHub (opens in new tab) | Active Dec 2, 2026 | code-scan-action-0.2.3, Nov 18, 2026 | MIT | |
| microsoft / PyRIT Microsoft's open-source toolkit for red teaming generative AI systems. | 5,238 GitHub (opens in new tab) | Active Dec 2, 2026 | v1.2.1, Nov 18, 2026 | MIT | |
| Tencent / AI-Infra-Guard An AI red teaming platform with agent, skill, MCP and AI infrastructure scans and jailbreak tests. | 7,825 GitHub (opens in new tab) | Active Dec 1, 2026 | v4.6.12, Nov 26, 2026 | Apache-2.0 |
Install commands
Copied from each repo. Read its setup steps before you run anything.
vxcontrol/pentagi
sudo ./installer GreyDGL/PentestGPT
git clone https://github.com/GreyDGL/PentestGPT.git
cd PentestGPT
make install
# runs uv sync Questions
What is an AI pentesting tool?
Software that uses an LLM to plan and carry out parts of a penetration test, such as recon and running scanners. PentAGI, PentestGPT and PentestAgent are agents of this kind. HexStrike AI is an MCP server that gives an AI client access to security tools.
What is the difference between a pentest agent and an AI red teaming tool?
A pentest agent attacks a target such as a network or a web app. An AI red teaming tool tests an AI system itself, for example by probing an LLM app for jailbreaks. Promptfoo, PyRIT and AI-Infra-Guard are in the second group.
Are there free open-source AI pentesting tools?
Yes. Every tool on this page is open source, and the Licence column shows each licence. PentAGI, PentestGPT, HexStrike AI, PentestAgent, promptfoo and PyRIT are MIT licensed, and AI-Infra-Guard is Apache-2.0.
Can I run an AI pentest agent with a local model?
Some can. PentAGI works with local models through Ollama or vLLM. PentestAgent works with any model that LiteLLM supports.
Is it legal to use these tools?
Use them only on systems you own or have explicit permission to test. PentAGI, PentestAgent and HexStrike AI are each meant for authorised testing only.
