← all repositories
GH05TCREW/pentestagent

Self-spawning AI agents for black-box security testing

PentestAgent automates black-box pentesting by handing an LLM a terminal and browser, then letting it recursively delegate tasks to isolated child copies of itself.

2.8k stars Python AgentsDomain Apps
pentestagent
Not currently ranked — collecting fresh signals.
star history

What it does

PentestAgent is a Python TUI framework that puts an LLM in the driver’s seat of a penetration test. It gives the model a terminal, a browser, a note pad, and a web-search tool, then lets it operate in modes ranging from single-shot assistance to fully autonomous task execution. A multi-agent “crew” mode adds an orchestrator that can divvy up work across specialized workers, and prebuilt attack playbooks provide structured runbooks for common assessments.

The interesting bit

The real trick is spawn_mcp_agent: a running agent can spin up fully isolated child copies of itself over stdio, each with its own runtime, LLM client, conversation history, and notes store, then delegate scoped subtasks asynchronously. If an external MCP server dumps more than 128 tools into the context window, an automatic RAG optimizer swaps the full catalogue for a single embedding-driven retrieval tool, keeping the parent agent focused without trimming its arsenal.

Key highlights

  • Hierarchical multi-agent workflows via self-spawning child MCP servers, with no external orchestrator required.
  • Built-in tool set includes terminal, browser, notes, and web search; can consume external MCP servers or expose itself as one over stdio or SSE.
  • Automatic RAG-based tool optimizer caps MCP tool noise when servers expose >128 tools.
  • Prebuilt attack playbooks for structured black-box testing.
  • Optional Docker variants ship with nmap, netcat, Metasploit, sqlmap, and hydra pre-installed for isolated tool execution.

Verdict

Security researchers and red-teamers who want an LLM to actually run reconnaissance and exploitation tools rather than merely suggest commands will find this useful. Skip it if you need a fully offline, closed-loop system, since it relies on external LLM APIs and embedding services.

Frequently asked

What is GH05TCREW/pentestagent?
PentestAgent automates black-box pentesting by handing an LLM a terminal and browser, then letting it recursively delegate tasks to isolated child copies of itself.
Is pentestagent open source?
Yes — GH05TCREW/pentestagent is open source, released under the MIT license.
What language is pentestagent written in?
GH05TCREW/pentestagent is primarily written in Python.
How popular is pentestagent?
GH05TCREW/pentestagent has 2.8k stars on GitHub.
Where can I find pentestagent?
GH05TCREW/pentestagent is on GitHub at https://github.com/GH05TCREW/pentestagent.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.