PentestAgent
An AI agent framework for black-box penetration testing, supporting bug bounty, red-team and pentesting workflows from a terminal interface, with tools such as nmap, Metasploit and sqlmap.
PentestAgent is an AI agent framework for black-box security testing, supporting bug bounty, red-team and penetration-testing workflows from a terminal user interface. It works with any LiteLLM-supported model, including OpenAI and Anthropic models, and can be pointed at a custom OpenAI- or Anthropic-compatible relay endpoint through an environment variable.
It can run against a target directly from the terminal, or inside a Docker container for isolation with pre-installed pentesting tools: a base image bundling nmap, netcat and curl, or a Kali-based image additionally bundling Metasploit, sqlmap and Hydra, with the agent driving these tools directly through its terminal tool. It offers several modes accessible through in-app commands, including a single-shot assist mode for one instruction with tool execution.
It requires Python 3.10 or newer and Playwright's Chromium browser for its browser tool, and is released under the MIT license.