Skip to main content
vigolium agent swarm is the AI-guided agentic scan mode. The master agent reads the target’s request/response surface (and optionally its source code), picks the right scanner modules, generates custom JavaScript extensions when needed, runs the native scanner, and optionally triages the results in a verify-and-rescan loop. It sits between two extremes: it is more directed than autopilot (which gives the agent free reign with full tool access) and more flexible than a hand-tuned vigolium scan (modules and extensions are chosen by the model, not the user). This document covers what the pipeline looks like, how data flows between phases, and where the AI / native boundary sits.

When to use swarm

Swarm is the right mode when you want the AI to drive the native scanner, not replace it.

Pipeline at a glance

Ten phases run in strict order. Each phase is either native (deterministic Go) or AI (LLM call via the olium engine). Most phases are conditional, they only fire when their inputs are present or the user opts in.

Data flow

The pipeline is driven by a single swarmPipelineState that all phases read from and write to. The two main payloads that move through it are records (HTTP request/response pairs) and the plan (module selection + extensions spec).
Records grow as the pipeline runs: source analysis appends discovered routes, and native discovery merges crawl/spider results before planning. The plan, once produced, is the single source of truth for what the native scanner will run.

Phase reference

Phase control is available through --skip and --start-from. --start-from creates a synthetic checkpoint for a new run, marking earlier phases complete; it does not reopen an existing session.

Source-aware mode: the 4-call wave

When --source <path> is given, source analysis runs as a single explore call followed by three parallel format calls.
Why split it this way: explore output is large (capped at 64 KB), per-topic format calls only see a 48 KB slice. Provider session caching keeps the explore context cheap to reuse across the three follow-ups instead of re-paying for it. The discovered session config can come back malformed; the engine round-trips invalid entries through the LLM for repair before hydration into auth headers and persistence to auth-config.yaml.

Master agent and batching

The plan phase is two sub-calls:
  1. Plan agent: analyses the records, returns a SwarmPlan with module tags/IDs, focus areas, and an extensions spec. Markdown-section output, retried up to MaxMasterRetries (default 3) on parse or transient errors.
  2. Extension agent (conditional), only fires if the plan declared extensions. Generates JS scanner code. If this call fails, the plan from step 1 is still valid (graceful degradation).
When len(records) > MasterBatchSize (default 5), planning fans out:
The first batch error cancels the rest; partial-success merge is only attempted if the caller chooses to continue. When records are filtered for the prompt, a compact summary table of all endpoints is appended so the agent still sees the full surface even if only the top-N have full headers/bodies.

Triage and rescan loop

Triage follows the intensity preset: it is off for quick and on for balanced (the default) and deep. Use --triage=false to disable it explicitly, or --triage to enable it when another setting would leave it off.
MaxIterations defaults to 1 (quick), 3 (balanced), 5 (deep). Triage processes findings in batches of 25 per round. Rescans set IsRescan=true on the ScanRequest, which forces OnlyPhase = "dynamic-assessment" and SkipIngestion = true so only the targeted modules execute.

Native scanner handoff

The swarm runner does not call modules itself, it hands off via callbacks the CLI installs on SwarmConfig: ScanFunc is built like:
This is the AI / native boundary: everything above is AI-shaped (prompt, plan, JS code, verdicts), everything below this call is the standard executor running the registered modules.

Session artifacts and checkpoints

A swarm run creates a session directory (default ~/.vigolium/agent-sessions/<run-id>/):
checkpoint.json is rewritten after every phase for observability and internal recovery. The public CLI has no swarm --resume flag. --start-from <phase> begins a new run with earlier phases marked complete, so make sure the required database/source inputs already exist.

CLI cheat sheet

Important flags

The CLI no longer exposes --focus, --instruction, --instruction-file, --browser, or --credentials. Use --prompt (or the positional prompt) for broad guidance and login details. Browser tooling is always enabled for swarm. The REST schema retains its structured focus, instruction, browser, and credential fields.

API

At least one of input, inputs, or http_request_base64 is required (url is an optional hint). timeout defaults to 12h when omitted. See API Reference, Agent for the full schema.

Where things live

For the broader architecture (olium runtime, providers, common engine), see How It Works.