LibreAI / AI Agents / PentestGPT
// agents · GreyDGL/PentestGPT

PentestGPT

Automated penetration-testing agent framework powered by LLMs, published at USENIX Security 2024.

★ 15.8k stars⑂ 2.8k forksMITupdated 2026-07
▦ visual — this project's README ships no embeddable screenshot,
so here's a placeholder. The guide below is complete regardless.
// project facts

Project facts

PentestGPT is an open-source ai agents project by GreyDGL (GreyDGL/PentestGPT on GitHub). It has 15,834 GitHub stars and 2,761 forks, is released under the MIT license, and was last updated on GitHub on 14 July 2026.

GitHub stars
15,834
Forks
2,761
License
MIT
Last updated on GitHub
14 July 2026
Category
AI Agents
Listing
Full install guide
// how it works

How it works

  1. Confirm your scope and authorization

    Only test systems you own or are explicitly authorized to assess; note the target address and any instructions for the engagement.

  2. Clone and install

    Clone the repo and run make install, which uses uv to sync dependencies; a self-contained Docker image is also provided.

  3. Connect an agent backend

    Install and authenticate the Claude Code or Codex CLI for autonomous runs, or configure a provider for the interactive multi-LLM mode.

  4. Run your first task

    Point pentestgpt at a target in CTF or pentest mode, watch the staged pipeline work, and resume later from a saved session if needed.

// features

Why people love it

Multi-stage pipeline

The agent works through staged phases and feeds each stage's findings into the next, for both CTF and penetration-test workflows.

Autonomous agent mode

Drives Claude Code or Codex to run tools and reason through a target without human intervention at each step.

Multi-category CTF support

Covers Web, Crypto, Reversing, Forensics, PWN and Privilege Escalation challenge categories.

Session persistence

Save and resume penetration testing sessions instead of restarting long engagements from scratch.

Live walkthrough and feedback

Tracks steps in real time with live activity updates as the agent works through a challenge.

Interactive multi-LLM mode

The modernized legacy mode supports OpenAI, Anthropic, Gemini, DeepSeek, xAI, Qwen, Moonshot and local Ollama providers.

Advertisement
// run it

Run it yourself

  1. Clone the repository

    Clone PentestGPT and enter the project directory.

    git clone https://github.com/GreyDGL/PentestGPT.git
    cd PentestGPT
  2. Install dependencies

    Install the project with the Makefile target, which runs uv sync (Python 3.12+ and uv required).

    make install
  3. Run against an authorized target

    Start the agent against a target you are authorized to test; CTF mode is the default.

    pentestgpt --target 10.10.11.234
// use cases

What you can build

Advertisement
// faq

Questions, answered

Who maintains PentestGPT?

It is maintained by GreyDGL and contributors, and the underlying research was published at USENIX Security 2024.

Is PentestGPT free to use?

The code is MIT-licensed and free. Only use it against systems you own or are authorized to test.

Does it need a paid API key?

Usually: autonomous mode needs an authenticated Claude Code or Codex CLI, and interactive mode uses your own provider keys, though local Ollama is supported there at no API cost.

How does it compare with running a plain LLM chat?

PentestGPT adds a staged pipeline, tool execution, live walkthrough tracking and session persistence around the model, instead of one-off chat answers you must act on manually.

How do I get started?

Clone the repo, run make install, authenticate a backend CLI, then run pentestgpt --target <ip> against an authorized lab target.

// keep exploring

Similar tools

AI Agents

pentagi

Autonomous AI agents for penetration testing — self-hosted, multi-agent, with a full web UI

★ 25.3k starsMIT
View guide →
AI Agents

AstrBot

AI Agent Assistant & development framework that integrates lots of IM platforms, LLMs, plugins and AI feature, and can be your openclaw alternative. ✨

★ 41.3k starsAGPL-3.0
View guide →
AI Agents

SkillSpector

NVIDIA's security scanner for AI agent skills - check before you install

★ 19.7k starsApache-2.0
View guide →
Agents

AgentDock

Retired agent framework: its prompts and guides live on in successor repos.

★ 1.8k starsMIT
View guide →
AI Agents

NarraNexus

A framework for agent nexuses where intelligence emerges from interaction.

★ 88 starsApache-2.0
View guide →
AI Agents

embabel-agent

Agent framework for the JVM. Pronounced Em-BAY-bel /ɛmˈbeɪbəl/

★ 4.5k starsApache-2.0
View guide →
// alternatives

Alternatives in AI Agents

The most-starred other AI Agents projects in the LibreAI catalogue — the realistic shortlist if PentestGPT is not the right fit.

Get PentestGPT

Free and open — grab the source, star the repo, and start creating.