█

AI/TLDR

Buy me a coffee
Buy me a coffee

sapper-v2

A commander agent and a worker swarm that run a pentest together

Security AgentsOpen source
Language
Python
License
MIT
$git clone https://github.com/N1nEmAn/sapper-v2.git
IN SHORT

What is sapper-v2?

sapper-v2 is a multi-agent orchestration harness for penetration testing, not a single agent. It sits in the Security Agents category of the Agents & Automation tools and is open-source, written in Python and licensed MIT. To get started: install the CLI and set a goal.

Overview

sapper-v2 is a multi-agent orchestration harness for penetration testing, not a single agent. One AI commander reads the board, decides and dispatches; generals, scouts and soldiers attack targets in parallel in their own tmux panes; and a script-only watchdog relaunches a crashed commander, rotates API keys and wraps up at the deadline. It does not bind to one model or CLI — the agent behind each role can be Claude Code, Codex, Code Buddy or any interactive CLI, and each role can run a different model.

Diagram (in Chinese) of the three foundation capabilities: 01 Create (spawn new AIs), 02 Language (type into each other's input box), 03 History (an append-only fact and intent memory), with human wisdom as a fourth ingredient.
The three capabilities sapper is built on: Create (spawn), Language (speak) and History (memory).sapper-v2 README ↗

The harness rests on three capabilities its author calls Create, Language and History. Create opens new agents by typing the CLI command into a fresh tmux pane; Language lets agents type into each other's input boxes; History is a layered fact-intent graph (title, summary, evidence document) that outlives any single agent session, so a successor reads the graph and carries on. The pentest strategy itself lives in a 426-line commander doctrine, `docker/commander/SKILL.md`, which you can replace to point the same mechanism at another long-horizon task; the author publishes the general-purpose base separately as nvwabase.

The project was built for the 3rd Tencent Cloud Intelligent Attack-Defense Challenge, where its README reports a first place in the online qualifier (80.18/100 over 8 unattended hours) on about 1B tokens. It is offensive-security tooling for authorised testing only — the repository ships a DISCLAIMER.md — and should be scoped like any operator holding the same tools.

What it does

  • Commander / general / scout / soldier roles, each running in its own tmux pane under one dispatching commander
  • Model- and CLI-agnostic: swap the agent with `--agent` and the model with `--model` or `SAPPER_MODEL`, per role
  • Layered fact-intent graph (title / summary / evidence) as shared memory that survives agent restarts
  • Zero-strategy watchdog that relaunches a crashed commander, rotates keys and recycles agents whose context saturates
  • Replaceable doctrine file, so the orchestration can be reused beyond pentesting
  • Pre-built Docker image with a Kali toolchain, the sapper CLI and an offline knowledge base

Getting started

The CLI is standard-library Python with no dependencies; the full legion runs in Docker. Model gateways, the key pool and budget are set through environment variables documented in docker/ENV.md. Only run it against systems you are authorised to test.

Install the CLI and set a goal

install.sh symlinks the sapper CLI. setup creates the board for a goal; status shows the board and the ready-to-work frontier.

bashbash
git clone https://github.com/N1nEmAn/sapper-v2.git
cd sapper-v2
bash install.sh
sapper setup --goal "assess http://target" --agents
sapper status

Build the full legion image

Builds the commander image from source.

bashbash
docker build -f docker/Dockerfile.commander -t sapper:latest .

Or load the pre-built image

Download sapper-v18-mixed.tar.gz (about 1.2 GB) from the v18-champion GitHub release, then load it.

bashbash
docker load < sapper-v18-mixed.tar.gz

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Reach for it in timed CTF or attack-defense competitions where many targets must be worked in parallel without a human at the keyboard
  • Reach for it when one agent's context keeps saturating on a long engagement and you want findings to persist across agent restarts
  • Reach for it to split work between an expensive planning model and a cheap model for mass execution
  • Reach for it as a template for other long-horizon multi-agent work, by swapping the commander doctrine

How sapper-v2 compares

sapper-v2 alongside other open-source security agents tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
REA★ 485kOpen-source CLI and MCP server that lets coding agents reverse engineer apps locally, decompiling native binaries via Hopper or Ghidra and analysing JavaScript/Electron apps, recording each finding as reproducible evidence.
PentAGI★ 35.3kPentAGI is a self-hosted AI security platform that plans and runs penetration tests autonomously using a team of agents and 20+ built-in pentesting tools.
PentestGPT★ 16.7kAn open-source agent that uses large language models to run penetration tests and solve security challenges, either fully autonomously or with a human in the loop.
HexStrike AI★ 14kAn MCP server that gives an AI agent a single interface to 150+ installed security tools — Nmap, Nuclei, SQLMap, Ghidra, Hashcat and more — so it can drive reconnaissance, scanning and binary analysis itself.
IDA Pro MCP★ 13.6kAn MCP server and IDA Pro plugin that exposes decompilation, cross-references, renaming and type editing to an LLM client, letting an agent read and annotate a binary inside your IDA database.
CAI★ 9.9kCAI (Cybersecurity AI) is an open-source Python framework for building AI agents that automate offensive and defensive security tasks like recon, vulnerability discovery, and exploitation.
AiSOC★ 8.6kA self-hostable AI Security Operations Center that ingests security telemetry, correlates detections into incidents and has LLM agents triage them, logging every step to an auditable ledger.
sapper-v2★ 2.7kA commander agent and a worker swarm that run a pentest together