This project, AdaptiveFuzz, presents an LLM-powered multi-agent framework designed to automate the reconnaissance phase of penetration testing. The system emulates the adaptive, step-by-step reasoning of a human red-team operator by moving beyond static scripts. It leverages a team of five specialized agents orchestrated by LangGraph to intelligently plan tasks, execute them using custom tools via the Model Context Protocol (MCP), analyze findings, and propose new strategies. A critical Human-in-the-Loop (HITL) component ensures a human operator retains final approval over the "adaptive" workflow, directing the system's next steps.
This project fulfills the Module 2 requirements for the Agentic AI Developer Certification by demonstrating multi-agent collaboration, advanced tool integration, and orchestration.
Architecting Multi-Agent Systems
Traditional penetration testing often relies on static scripts or manual, predefined patterns. The true skill of a human red-team operator, however, is their adaptive, step-by-step reasoning. They run a tool, analyze the results, form a new hypothesis, and then choose their next tool and target based on those findings.
The goal of AdaptiveFuzz is to emulate this human-centric, adaptive workflow, moving beyond static scripts to create an intelligent assistant for security professionals.
AdaptiveFuzz functions as a team of specialized AI agents. It intelligently plans enumeration tasks, executes them by calling real security tools, analyzes the results, and proposes new strategies. Crucially, it keeps a human operator in the loop for final approval before proceeding.
This entire system is built on two key technologies:
LangGraph: The entire multi-agent workflow is orchestrated using LangGraph. Each agent and step in the reconnaissance process is a node in a stateful graph, making the system modular, debuggable, and capable of complex, cyclical reasoning.
Model Context Protocol (MCP): MCP serves as the communication bridge that allows the LangGraph agents to interact with the actual security tools. The project uses FastMCP to serve Python-based tools, which the agents can then call to scan targets and gather live information.
The system's logic is defined in code/graph.py
and operates as a team of five specialized agents, plus one human control point.
--- config: flowchart: curve: CARDINAL --- graph TD; __start__([<p>__start__</p>]):::first conversational_handler(conversational_handler) recon_executor(recon_executor) web_analyzer(web_analyzer) result_interpreter(result_interpreter) strategy_advisor(strategy_advisor) human_in_loop(human_in_loop) __end__([<p>__end__</p>]):::last __start__ --> conversational_handler; conversational_handler -. review .-> human_in_loop; conversational_handler -. proceed .-> recon_executor; human_in_loop -. stop .-> __end__; human_in_loop -. continue .-> recon_executor; recon_executor --> web_analyzer; result_interpreter --> strategy_advisor; strategy_advisor --> human_in_loop; web_analyzer --> result_interpreter; classDef default fill:,line-height:1.2 classDef first fill-opacity:0 classDef last fill:
port_scanner
or banner_grabber
) to gather raw data from the target.web_search
tool to gather external context, such as identifying service versions or searching for known CVEs.The process does not auto-run. The three strategies proposed by the Strategy Advisor are presented to the human operator.
This Human-in-the-Loop
node is the critical control point. The system pauses its execution (using langgraph.types.interrupt
) and waits for the user to choose which strategy to pursue (1, 2, or 3) or to type 'stop' to end the test.
If the user chooses a strategy, the graph routes back to the Recon Executor to run the new tasks. This iterative cycle of Execute -> Analyze -> Strategize -> Get Human Approval is what makes the system truly "adaptive".
The system's capabilities are extended beyond the LLM's knowledge by integrating three custom tools via FastMCP:
port_scanner
: A custom tool built with Python's socket library to scan a target IP for a list of open ports.banner_grabber
: Connects to open ports to grab service banners, helping to identify running software.web_search
: A tool that performs a Google web search using aiohttp to gather external intelligence on findings.AdaptiveFuzz demonstrates a practical, powerful implementation of a multi-agent system. By combining the stateful orchestration of LangGraph, the real-world tool-use of MCP, and the critical reasoning of a human-in-the-loop, it creates an adaptive framework that effectively assists with the complex, dynamic process of cybersecurity reconnaissance.
You can explore the project here: AdaptiveFuzz on GitHub