sapper-v2 Pentest Legion
Orchestrates a legion of AI agents that run unattended penetration tests and share one fact graph across models and CLIs.
- Source repo
- N1nEmAn/sapper-v2
- Stars
- ★ 2.6k
- Last updated
- 12d ago
- FARS reviewed
- Nov 05, 2026
- License
- MIT
- Primary language
- Python
- FA score
- 47/100 · Major gaps
At a glance
- How it runs
- Works with
- Universal · cross-platformClaude CodeCodex · Claude API (Partial support)
- Cost
- Free software; you pay for model usage
- Setup effort
- Medium · a few setup steps
- You'll need
- Typical use
- CTF or attack-defense teams that want multiple agents grinding targets in parallel and submitting flags over an eight-hour unattended run.
- Not a fit if
- Teams without written authorization for the systems they test
- Users wanting an out-of-the-box office or research agent — doctrine and arena wiring must be rewritten
- Maintenance
- Commits in the last 30 dayslast commit 2026-11-11+65.0 ★/day over 7 days
- Source review
- 47/100 · Major gaps
What does this agent do, and when should you use it?
sapper-v2 is a multi-agent orchestration harness for autonomous penetration testing, built on the Nüwa Foundation's three capabilities: Create (open new AIs through tmux), Language (type into each other's input boxes) and History (a layered fact-intent graph). At runtime there are only three windows — a commander that reads the board, judges and dispatches but never attacks itself; generals, scouts and soldiers executing in tmux panes; and a pure-script watchdog that relaunches a crashed commander with --continue, rotates keys and wraps up at the deadline. Role composition is model- and CLI-agnostic: nuwa spawn --agent <cmd> plus --model / SAPPER_MODEL let the commander and generals run GLM-5.3 while soldiers run DeepSeek V4.1 Flash, or swap in Claude Code, Codex or any interactive CLI. Output is flags submitted to an arena whose API is hard-verified at boot through BENCHMARK_BASE_URL, alongside a 426-line doctrine in docker/commander/SKILL.md and a BATTLE-REPORT.md retrospective. It ships as a stdlib-only CLI install and as a Docker image carrying a full Kali toolchain (~1.2GB).
Provisioning starts with sapper setup --goal ... --agents, which lays out a work board and agent crew over the nvwabase graph; sapper status prints the board and the ready-to-work frontier. The commander then loops: read the board, judge target difficulty, and dispatch a mission into a general's or soldier's tmux pane. A scout first spends about four minutes sizing up a target, then chooses between a soldier mass attack and a general making a hard assault and hiring its own squads. Every conclusion is written back through the nvwabase CLI — nvwabase fact for confirmed observations, nvwabase intent --from f001 to derive new units of work, nvwabase recall for retrieval, and nvwabase dispatch reason for the propose/execute/verify cycle — so sessions can die while the graph survives. The watchdog is pure script with zero strategy: it relaunches the commander with --continue, rotates keys through SAPPER_KEY_POOL on quota death, and closes out at the buzzer. Final artifacts are submitted flags plus retrospective and handover documents in the style of BATTLE-REPORT.md; the architecture contract lives in docker/commander/SPEC.md and the doctrine in docker/commander/SKILL.md.
- CTF or attack-defense teams that want multiple agents grinding targets in parallel and submitting flags over an eight-hour unattended run.
- Authorized pentest teams splitting recon, mass attempts and hard-target assaults across differently priced models to control token spend.
- Multi-agent researchers who need a real long-horizon case where division of labor, communication, shared memory and self-healing all actually run.
- Teams porting long-horizon coordination to their own domain by rewriting the doctrine and wiring on top of the nvwabase foundation.
- Engineers who want a reusable commander / legion / watchdog runtime plus a layered fact graph rather than a single-agent prompt.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Environment variables
ANTHROPIC_BASE_URLANTHROPIC_AUTH_TOKENSAPPER_MODELSAPPER_KEY_POOLBENCHMARK_BASE_URL- Install notes cover
- Docker
How do you install or deploy this agent?
You need a shell with tmux, Python for the stdlib-only CLI, and model gateway credentials. Install the CLI first:
git clone https://github.com/N1nEmAn/sapper-v2
cd sapper-v2
bash install.sh # symlink the sapper CLI (stdlib-only, zero deps)For the full legion, build the Docker image:
docker build -f docker/Dockerfile.commander -t sapper:latest .Or load the ~1.2GB prebuilt image (full Kali toolchain + sapper + offline KB) from the v18-champion release:
docker load < sapper-v18-mixed.tar.gzThen set model gateways, key pool and budget per docker/ENV.md: ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, SAPPER_MODEL, SAPPER_KEY_POOL. The arena address BENCHMARK_BASE_URL is hard-verified at boot — configuring only a model key without a platform address fails with BENCHMARK_BASE_URL is not set. Running off the competition platform means providing or stubbing that platform interface yourself; the source documents no stub.
How do you use this agent?
After install, create the goal and crew, then inspect the board:
sapper setup --goal "assess http://target" --agents
sapper status # board & frontierInside the Docker image the commander reads the board and dispatches, generals and soldiers work in tmux panes, and the watchdog keeps the run alive — no manual intervention. The underlying facts and intents are read and written through the nvwabase CLI:
nvwabase fact "confirmed observation"
nvwabase intent --from f001 "what to do"
nvwabase dispatch reasonSee SKILL.md for single-graph operation, the fact-intent CLI and multi-challenge sweeps. Swap roles by pointing nuwa spawn --agent <cmd> at an agent CLI and setting --model or SAPPER_MODEL. Use only within the authorized-testing limits in DISCLAIMER.md.
Safety boundaries, hardening & integrations
Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.
Declared capability surface (blast radius)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Modifies local files; work on a clean Git branch or dedicated worktree.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
What are this agent's strengths and limitations?
- Role composition crosses models and CLIs:
nuwa spawn --agent <cmd>plus--model/SAPPER_MODELput the commander and generals on GLM-5.3 and soldiers on DeepSeek V4.1 Flash, or swap in Claude Code, Codex or any interactive CLI. - Cost efficiency with published evidence: the champion run scored 80.18 with 85 flags on 1.0B tokens, while the runner-up spent 4.5B on the same 85 flags.
- Survives agent death: the title/summary/evidence fact graph lets successors read what predecessors learned, and the zero-strategy watchdog relaunches the commander with
--continueand rotates keys. - Evolvable doctrine rather than fixed code: the signalman role, performance reviews, ALL-CAPS norms and shellcode templates emerged from post-mortems and were written into docker/commander/SKILL.md.
- MIT licensed, installed by a Python-stdlib-only script, with a ~1.2GB prebuilt Docker image containing a full Kali toolchain for offline loading.
- Tied to the competition arena: BENCHMARK_BASE_URL is enforced at boot, and off-platform runs require you to provide or stub the arena API, which is not documented.
- The 426-line doctrine targets CTF pentesting; moving to another domain means rewriting strategy, environment wiring, watchdog budgets and report templates together.
- The software is free but model tokens are not: you supply gateway keys, maintain a key pool and absorb the token bill, with no documented zero-cost local path.
- Offensive-security constraints: authorized testing only, and the proposed taggant traceability mechanism is still a proposal, not a shipped feature.
- No test suite or CI is described in the source, and setup knowledge is spread across README, docker/ENV.md and SKILL.md.
How does this agent compare with similar options?
The source names nvwabase (the Nüwa Foundation) as the sibling path: it delivers the same Create / Language / History capabilities without a pentest doctrine, aimed at offices, research, engineering or any long-horizon multi-agent work. sapper-v2 is the pentest-doctrine branch grown on that base. The README also credits Cairn by Lèxiào as a reference approach for recording history for AI agents.
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| sapper-v2 Pentest Legion This agent | 47 · Major gaps | CLIFree + model costs | ★ 2.6k | 12d ago | Python | Claude Code |
| RedTeam Agent | 45 · Major gaps | CLIFree + model costs | ★ 165 | 6mo ago | Python | Claude Code |
| Strix AI Pentesting | 69 · Some gaps | CLIFreemium | ★ 77k | 1d ago | Python | ChatGPT · Codex · Claude Code · OpenAI API · Claude API |
| EpicStaff Agent Workflow Platform | 78 · Good | Self-hosted service | ★ 513 | 3d ago | Python | — |
How does FollowAgents rate this agent?
Why each dimension lost points
Evidence shows real write-boundary confirmation (requires_confirmation enforced in conclude_with_new_fact, claim lease checks, path-traversal guards, static HTML escaping) — genuine positives. But the product is an autonomous pentest orchestration harness that drives arbitrary CLIs via tmux and freely swaps models/roles; least-privilege constraints are not documented, data flow (key pools, model gateways, target interaction) is opaque, dependency security has no lock/audit evidence, and rollback relies only on the fact graph and watchdog restarts with no recovery design for destructive actions. Most trust criteria score 1; confirmation and attribution reach 2.
Tests cover graph integrity, atomic writes, duplicate-completion rejection, atomic settings patching, and Arena API contract, giving decent self-consistency (2). Dependency availability is asserted as stdlib-only but the Docker image, Kali toolchain, and external model gateways are unpinned/unverified (1). Failure messages are explicit FGError texts evidenced in tests (2).
README clearly separates competition scenarios from general use and points to nvwabase as a general base (2). Trigger precision depends on doctrine and prompts with no mechanism-level guard against misfire (1). Environment fit requires tmux, Docker, specific CLIs and model gateways, raising portability cost (1).
Information architecture is clear (sectioned README, SPEC, BATTLE-REPORT references) and install notes cover install.sh and Docker (2). Naming stability (v18-champion tags, evolving role names) and changelog are informal (1); examples are promotional and FAQ is absent (1); known limitations appear only as a disclaimer (1); MIT license is complete (3); maintenance responsibility is a personal/lab attribution with unverified publisher (1).
Output usability includes CLI status board, fact-graph rendering, and flag ledger (2). Marginal value is tightly coupled to the competition scenario and external models; general reuse requires rewriting the doctrine (1). Cost-benefit rests on a self-reported 1B vs 4.5B token claim without reproducible accounting (1).
Competition results, token comparison, and emergent behaviors are README self-claims without verifiable raw logs or third-party corroboration (1). Cross-source corroboration is partial via tests and code but does not cover core claims (1). Fact/inference separation exists in the fact-graph design, but the README narrative presents inference as fact (1).
- This is an autonomous pentest orchestration harness; authorized testing only. The README disclaimer does not substitute for the user's own legal and authorization review.
- It drives arbitrary CLI agents via tmux and freely swaps models, creating a large permission and external-effect surface with no documented least-privilege or sandbox constraints.
- Competition results, token comparison, and emergent behaviors are self-reported without verifiable logs; do not infer reliability or safety from them.
- Docker image, Kali toolchain, and model gateway dependencies are unpinned and unaudited; assess supply-chain risk yourself.
- Publisher identity is unverified and the maintenance/update path is unclear.
FAQ
Can I run it without the Tencent competition platform?
What does it cost beyond the free license?
Can I reuse it for work outside penetration testing?
What happens when an agent crashes, saturates its context or runs out of quota?
--continue and rotates keys through the key pool; a soldier whose context saturates (measured around 260K tokens) is recycled and leaves a written playbook for its successor.Is the taggant safety mechanism already included?
Is sapper-v2 Pentest Legion still maintained?
Who makes sapper-v2 Pentest Legion?
Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.