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
| Scenario | Use |
|---|---|
| You have a target URL, raw request, or HTTP record and want the agent to pick modules + write payloads | swarm |
| You also have the application source, want routes + auth + extensions inferred from code | swarm --source <path> |
| You want false-positive verification and targeted re-scans on the model’s say-so | swarm --triage |
| You’d rather hand the agent a shell + the codebase and let it decide everything | autopilot |
| You want a one-shot prompt with no scanning | agent query |
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 singleswarmPipelineState 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).
Phase reference
| # | Phase | Type | Purpose | Trigger |
|---|---|---|---|---|
| 1 | native-normalize | Native | Parse --input/stdin/record-uuid into HttpRequestResponse | Always |
| 2 | auth | AI/Native | Browser-driven login, writes auth headers/cookies | --browser-auth + --browser |
| 3 | source-analysis | AI | 4-call wave: explore → routes / session / extensions | --source |
| 4 | code-audit | AI | Code-level security audit, findings → DB | --code-audit (auto with --source at balanced/deep) |
| 5 | native-discover | Native | Crawl/spider/JS-scan to discover endpoints | --discover |
| 6 | plan | AI | Master agent: pick modules, focus areas, extensions spec | Always |
| 7 | native-extension | Native | Validate generated JS, write to extensions/ | Plan declared extensions |
| 8 | native-scan | Native | Hand off to runner.RunNativeScan() | Always |
| 9 | triage | AI | Verify findings; mark confirmed / FP / rescan | --triage |
| 10 | native-rescan | Native | Targeted rescan on triage request (loops) | Triage verdict = “rescan” |
--skip-phases and --start-from, which read the checkpoint file.
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.
auth-config.yaml.
Master agent and batching
Theplan phase is two sub-calls:
- Plan agent: analyses the records, returns a
SwarmPlanwith module tags/IDs, focus areas, and an extensions spec. Markdown-section output, retried up toMaxMasterRetries(default 3) on parse or transient errors. - 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).
len(records) > MasterBatchSize (default 5), planning fans out:
Triage and rescan loop
Triage is off by default. Pass--triage to enable.
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 onSwarmConfig:
| Callback | Set when | What it does |
|---|---|---|
ScanFunc | always | Runs runner.RunNativeScan() with modules/extensions from the plan |
DiscoverFunc | --discover | Crawl/spider/JS-scan; merges discovered records before planning |
SourceAnalysisCallback | --source | Writes auth-config.yaml from session config |
ScanFunc is built like:
Session artifacts and checkpoints
A swarm run creates a session directory (default~/.vigolium/agent-sessions/<run-id>/):
checkpoint.json is rewritten after every phase. Combined with --start-from, it lets a partial run resume without re-paying for earlier phases.
CLI cheat sheet
Important flags
| Flag | Effect |
|---|---|
-t, --target | Target URL for dynamic phases |
--input | Raw input (curl, HTTP, Burp XML, base64, URL), auto-detected |
--record-uuid | Use an HTTP record from the database as the seed input |
--source | Source-code path (or git URL); enables source analysis + code-audit |
--code-audit | Force code audit (auto-on with --source for balanced/deep) |
--discover | Run native discovery before planning |
--triage | Enable verify-and-rescan loop |
--skill | Force-load these skills by name into triage, bypassing planner selection (repeatable or comma-separated) |
--skill-tag | Force-load every skill carrying one of these tags into triage (e.g. xss,idor) |
--no-skill-filter | Load the full skill set into triage; ignore planner selection |
--db-isolate | Scan into a private temp DB, then merge results into --db at the end (SQLite only) |
--max-iterations | Triage rounds (preset-driven default) |
--master-batch-size | Records per master-agent batch (default 5) |
--batch-concurrency | Parallel master batches (default 3) |
--intensity | quick / balanced / deep preset bundle |
--audit | lite / balanced / deep / mock / off (parallel source audit) |
--skip-phases, --start-from | Phase control / resume |
--source-analysis-only | Stop after source analysis |
--force-extensions | Force the extension agent even when the plan returned none |
-m, --modules | Explicit module IDs to merge with the agent’s selection |
--vuln-type | Vulnerability focus (e.g. sqli, xss, ssrf) |
--focus | Broad strategic focus area hint |
--instruction / --instruction-file | Custom instructions appended to prompts |
--upload-results | Upload session bundle to cloud storage on completion |
--provider, --model, --oauth-cred, --oauth-token, --llm-api-key | Olium provider overrides |
API
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
| Concern | File |
|---|---|
| CLI flags + callback wiring | pkg/cli/agent_swarm.go |
| Phase dispatch + state | pkg/agent/swarm_pipeline.go |
| Master agent, batching, triage | pkg/agent/swarm.go |
| 4-call source analysis | pkg/agent/engine.go (RunSourceAnalysisParallel) |
| Phase constants + presets | pkg/agent/agenttypes/constants.go |
| Native scanner entry | pkg/core/executor.go, internal/runner/runner.go |
