sapper-v2

Multi-agent orchestration harness for coordinated, long-horizon security testing

Overview

sapper-v2 is a multi-agent orchestration harness for autonomous penetration testing, developed under the name 未知聚变 (VarFusion). It is not a single agent and it is not bound to one model or command-line tool: the operator can swap the agent CLI, the underlying model, and the role composition behind each participant while the coordination mechanism stays intact. The project's value is described as lying in that mechanism, not in any individual agent.

The system is built around a layered structure. Three base capabilities handle spawning new AI sessions, communication between them, and a persistent history. On top of those, the project adds a written doctrine, an economic model that assigns stronger and lighter models to different ranks, and a division of labor across commander, generals, scouts, soldiers, and a communications role the system produced during competition play. A script-based watchdog keeps sessions alive, rotates keys, and enforces the deadline without making tactical decisions.

What distinguishes this product is its stated emphasis on evolvability and on adaptation through post-mortems rather than fixed rules. The materials frame it as the first fruit of a broader open foundation, and the repository invites operators to start from the general-purpose base or fork the project for office work, research pipelines, or engineering. The authors also pair the code with an authorized-testing-only disclaimer and describe an accountability tracer under development. The project reports competition results, described in the review below as claims from the project's own materials.

Best for

  • Penetration testers
  • Security researchers
  • Red team operators
  • Multi-agent system engineers
  • Capture-the-flag competitors
  • Cybersecurity
  • Information technology

How to use

  1. Install the command-line tool by running the install script.
  2. Set the engagement goal and specify the agents.
  3. Check the board and the available frontier.
  4. Build the commander container from source, or load the prebuilt image.
  5. Configure the model gateway, key pool, and budget through the documented environment variables.

What it can do

Multi-agent role orchestration

A commander reads the board, decides, and dispatches work while generals and soldiers attack in parallel; the doctrine defines roles and the operator can assign different models to each rank. The commander is barred from running recon, scanning, exploitation, or flag submission directly, and may only run the worker script, read-only commands, read pane output, edit the handover file, and sleep.

Layered fact graph memory

Knowledge settles into a three-layer fact and intent graph organized as title, summary, and evidence document, so a reader gets an overview from titles and drills down only when needed. The graph is shared across agents working on the same target, and the project notes that individual agents may end while the graph persists. This aims to avoid one error propagating everywhere and needless context consumption.

Spawn, speak, and recall tooling

The underlying foundation opens new AI sessions through tmux, types into other sessions' input boxes to hold conversations, and records facts and intents for later recall. Any agent able to run shell commands can read and write the same graph through the CLI, so the base is not tied to a particular agent or scenario.

Watchdog supervision and key rotation

A separate scripted watchdog performs no strategy work. It restarts a commander that has crashed, rotates provider keys, and ends the run when the deadline arrives. It rotates keys within a provider family first and may then cross to another family; the commander is instructed to re-dispatch affected work or kill it when a family's keys appear exhausted.

Context handover and worker replacement

When a commander's context is exhausted, a handover file serves as the only continuity, and the watchdog can bring the commander back with a continuation flag. Soldiers whose context saturates are recycled and leave a written work manual for their successor. The project describes this as a lesson-transfer mechanism that emerged during play.

Tiered model economics

Ranks are matched to models: the commander and generals use a stronger model while soldiers and scouts use a lighter, faster one. The project attributes its reported token efficiency to this split between decision-making brains and mass-production brains, and allows the gateway and model to be selected per worker.

Operator-swappable agents and models

The agent CLI, model, and role composition can each be changed through command flags or environment variables. Examples named in the materials include several interactive CLIs for the agent and several models for the backing brain, and the doctrine may place the commander, soldiers, and scouts on different models.

How it works

Setup begins with an install script that links the command-line tool, after which the operator sets a goal and names agents; a Docker image can also be built from source or loaded from a prebuilt release that includes a penetration-testing toolchain and an offline knowledge base. The competition engine performs a hard check of the platform address at boot, so configuring only a model key without a platform address fails with an explicit error, and running outside the competition platform requires providing or stubbing that interface. Model gateway, key pool, and budget are set through documented environment variables.

At runtime three windows are described: the commander reads the board, judges, and dispatches orders; the AI legion of generals and soldiers works inside tmux panes; and the scripted watchdog keeps sessions alive and enforces the deadline. Pane communication happens by typing into input boxes. Humans still set the goal and the scene wiring, decide where iteration should go, and, per the project's own account, supply taste during this primary stage. Replacing the doctrine is not enough on its own, because environment wiring must change with it.

Supervised

Within a configured engagement the commander dispatches workers and the watchdog restarts and rotates keys without per-step approval, but humans set the goal, scene wiring, and doctrine, and the system is limited to authorized testing.

Where it fits

  • Run an authorized assessment against a designated target with a commander dispatching parallel worker agents.
  • Track confirmed observations, proposed intents, and evidence in a shared fact graph across multiple agents.
  • Recover from a crashed or context-exhausted commander by reading the handover file and continuing.
  • Test the role-allocation mechanism by assigning different models to commanders, soldiers, and scouts.

Good fit

  • Authorized CTF-style attack-defense competitions where a coordinated multi-agent setup can be tested against a scored arena
  • Autonomous long-horizon penetration testing on systems you own or have written permission to test
  • Teams that want to swap agent CLIs and models per role while keeping the orchestration mechanism
  • Iterating a custom division-of-labor doctrine on top of the Nüwa Foundation for other cooperative work

Not a fit

  • Use outside authorized security testing or educational research, per the project disclaimer
  • Drop-in use without the competition platform interface: the engine verifies BENCHMARK_BASE_URL at boot, and running off-platform requires providing or stubbing that interface
  • Running without configuring a model gateway and key pool environment (such as ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, SAPPER_MODEL, SAPPER_KEY_POOL)

How to evaluate

  1. Confirm you have written authorization for every system the engagement touches and that your use fits the stated authorized-testing scope
  2. Check that a competition platform interface is available or can be stubbed, since boot-time checks require BENCHMARK_BASE_URL
  3. Verify model gateway and key pool environment variables are set for each provider family you plan to use
  4. Confirm whether DEEPSEEK_API_KEY is configured, because ds gateway spawns fail without it
  5. Review the 426-line commander doctrine in docker/commander/SKILL.md and decide whether your scenario needs it rewritten or replaced with the general-purpose Nüwa Foundation

Alternatives

AgentPricingAutonomyBest for
hermes-agent—SupervisedAI researchers, Developers, System administrators, DevOps engineers, Technical founders
deer-flow—SupervisedSoftware developers, AI and agent engineers, Research engineers, Technical teams building agent workflows, Data pipeline builders
OpenMausBot—SupervisedDevelopers and engineers, Technical founders and small product teams, DevOps and IT administrators, Operations specialists who coordinate recurring tasks, AI power users comfortable with command-line tools
Toonflow-app—SupervisedShort drama creators, Comic video producers, Storyboard artists, Previsualization artists, Video editors, Independent animators, Content studio operators
rowboat—SupervisedSoftware engineers, Engineering managers, Product managers, Support teams, Operations leads, Founders, Research and knowledge workers
artemis—SupervisedMobile QA engineers, Test automation engineers, AI coding assistant users, Android developers, CI and DevOps engineers

Comments

No comments yet.

Embed a listing badge

Featured on AI Agents Marketplace
<a href="https://aiagentsmarketplace.dev/agents/sapper-v2"><img src="https://aiagentsmarketplace.dev/badges/featured.svg" alt="Featured on AI Agents Marketplace" width="262" height="36"></a>
See badge options