Mode Overview
| Mode | Command | Scope | AI Calls | Best For |
|---|---|---|---|---|
| Run/Query | vigolium agent | Source code | 1 | Code review, endpoint discovery, SAST |
| Autopilot | vigolium agent autopilot | Entire target | Many | Agentic scan: exploratory scanning, ad-hoc research |
| Swarm | vigolium agent swarm | Full target or specific endpoints | 2-4+ | Agentic scan: targeted testing, full-scope scanning with --discover |
Quick Start
Run / Query
Single-shot prompt execution. Send a prompt template or inline prompt to an AI agent and get structured output (findings or HTTP records) saved to the database.What It Does
- Loads a prompt template, enriches it with source code and database context, sends it to the agent
- Agent returns structured JSON (findings or HTTP records)
- Results are parsed and saved to the database
- No network scanning — purely analyzes what you give it
CLI
| Flag | Description |
|---|---|
--prompt-template | Template ID (e.g., security-code-review) |
--prompt-file | Path to a custom prompt markdown file |
--source | Path to source code repository |
--files | Specific files to include (relative to --source) |
--agent | Agent backend to use (default from config) |
--append | Extra text appended to the rendered prompt |
--output | Write agent output to file |
--dry-run | Render prompt without executing |
API
prompt_template, prompt_file, or prompt is required.
Pros and Cons
| Pros | Cons |
|---|---|
| Fast — single AI call, seconds to complete | No network scanning — code analysis only |
| Low cost — one prompt, one response | Requires source code access |
| Deterministic — same template = consistent scope | Findings are unverified (no live confirmation) |
| Good for CI/CD integration | Limited to what the template asks for |
When to Use
- Code review before deployment — catch injection sinks, hardcoded secrets, auth bypasses
- Endpoint discovery from source code — extract API routes for manual or automated testing
- Quick triage — ask the agent about a specific security question
- You have source code but no running target
Autopilot (Agentic Scan)
Full autonomous control. The AI agent drives the vigolium CLI through a sandboxed terminal, deciding what to scan, interpreting results, and iterating.What It Does
- Spawns an AI agent with terminal execution capability via ACP (Agent Communication Protocol)
- Agent autonomously runs vigolium commands: discovery, targeted scans, traffic browsing, finding review
- All commands execute inside a strict security sandbox (only
vigoliumcommands, no shell, no destructive ops) - Agent decides its own workflow — discover, scan, review, iterate, report
CLI
| Flag | Default | Description |
|---|---|---|
-t, --target | (required) | Target URL |
--source | — | Path to application source code |
--focus | — | Focus area hint (e.g., “API injection”) |
--timeout | 30m | Overall timeout |
--max-commands | 100 | Maximum CLI commands the agent can execute |
--dry-run | false | Render system prompt without launching |
API
Security Sandbox
The agent can only executevigolium commands. Shell metacharacters, destructive subcommands (db clean, db drop), and non-vigolium binaries are blocked. Each command has a 5-minute timeout and 256KB output cap.
Pros and Cons
| Pros | Cons |
|---|---|
| Most flexible — agent adapts strategy dynamically | Highest AI cost — long agent session with many calls |
| Can discover unexpected attack vectors | Unpredictable runtime and coverage |
Source-aware workflow when --source provided | Results depend heavily on agent quality |
| No prior knowledge of target needed | Harder to reproduce — agent may take different paths |
When to Use
- Exploratory testing of unfamiliar targets — let the AI figure out what’s there
- Research and experimentation — trying creative attack strategies
- You want hands-off scanning and don’t mind variable runtime
- Source-aware scanning — agent reads code, identifies sinks, crafts targeted attacks
Swarm (Agentic Scan)
Multi-phase agentic scan that combines targeted AI-driven testing with optional full-scope discovery. A master AI agent analyzes inputs, selects scanner modules, generates custom attack payloads as JavaScript extensions, runs SAST analysis, and executes focused scans. With--discover, it also runs content discovery and spidering before planning, providing the same full-scope coverage that the legacy pipeline mode offered.
Note:vigolium agent pipelineis a backward-compatible alias forvigolium agent swarm --discover. Existing scripts and CI/CD configurations using the pipeline subcommand will continue to work.
What It Does
- Takes heterogeneous input (URL, curl command, raw HTTP request, Burp XML export, or database record UUID)
- Optionally runs content discovery and spidering (
--discover) for full-scope target coverage - Runs source analysis when
--sourceis provided — extracts routes, auth flows, and generates custom scanner extensions - Runs SAST analysis (ast-grep) with AI review for source-level vulnerability detection
- Master agent analyzes requests, selects modules, and generates custom JS scanner extensions
- Runs dynamic assessment with agent-selected modules + generated extensions
- Triages extension-generated findings (built-in module findings pass through as-is)
- Supports triage-rescan loop up to
--max-iterations
CLI
| Flag | Default | Description |
|---|---|---|
-t, --target | — | Target URL |
--input | — | Raw input (curl, raw HTTP, Burp XML). Use - for stdin |
--record-uuid | — | HTTP record UUID from database |
--focus | — | Broad strategic focus area hint (e.g., “API injection”, “auth bypass”) |
--vuln-type | — | Vulnerability type focus (e.g., sqli, xss, ssrf) |
-m, --modules | — | Explicit module names to include |
--discover | false | Run discovery + spidering before planning (enables full-scope scanning) |
--max-iterations | 3 | Maximum triage-rescan iterations |
--max-rescan-rounds | — | Hidden alias for --max-iterations (backward compat with pipeline) |
--start-from | — | Resume from a specific phase |
--source | — | Path to application source code (enables source analysis + SAST) |
--timeout | 15m | Maximum swarm duration |
--profile | — | Scanning profile to use |
--dry-run | false | Render prompts without executing |
--target, --input, or --record-uuid.
Phases
--source is not provided. Phase 5 (discover) is skipped unless --discover is passed.
Supported Input Types
| Type | Example | Detection |
|---|---|---|
| URL | https://example.com/api/users | Starts with http:// or https:// |
| Curl | curl -X POST https://... | Starts with curl |
| Raw HTTP | POST /api HTTP/1.1\r\n... | Starts with HTTP method + path |
| Burp XML | <?xml...><items>...</items> | Starts with <?xml or <items |
| Record UUID | 550e8400-e29b-... | Matches UUID format |
API
input or inputs is required. Use inputs (array) for multi-request flows like login + protected endpoint.
ThePOST /api/agent/run/pipelineendpoint still works as an alias for backward compatibility. It maps to a swarm run withdiscover: true.
Pros and Cons
| Pros | Cons |
|---|---|
| Deep testing — custom payloads tailored to specific endpoints | Extension quality depends on agent capability |
| Accepts any input format — URL, curl, raw HTTP, Burp XML, DB record | Requires meaningful input when not using --discover |
| AI-generated extensions catch what built-in modules miss | Longer runtime for large targets with --discover |
Full-scope scanning with --discover — discovery through triage | |
Source-aware — route extraction, auth config, SAST when --source provided | |
| Cost-efficient — 2-4 AI calls for focused results | |
| Triage scoped to extensions — built-in findings pass through | |
Resumable — --start-from for phase-level control | |
| SAST integration — ast-grep + AI review for source-level findings |
When to Use
- Deep testing of a specific endpoint — you found an interesting request and want to throw everything at it
- Full-scope scanning with
--discover— comprehensive target coverage with AI-driven planning and triage - Custom payload generation — when built-in modules don’t cover a specific pattern
- Re-testing from Burp/curl — paste a request from your proxy and get targeted scanning
- Source-aware scanning — have source code and want automatic route extraction, auth setup, SAST, and custom extensions
- Focused vulnerability hunting — combine
--vuln-typeor--focuswith agent-generated extensions - CI/CD integration —
--discovermode provides stable phases with predictable runtime - You already know what to test, you want the AI to figure out how
Side-by-Side Comparison
| Aspect | Run/Query | Autopilot (Agentic) | Swarm (Agentic) |
|---|---|---|---|
| Input | Source code | Target URL | URL, curl, raw HTTP, Burp XML, DB record |
| Scope | Code analysis | Full target | Specific endpoints, or full target with --discover |
| AI calls | 1 | Many (agent-driven) | 2-4+ |
| AI cost | Low | High | Low-Medium |
| Network scanning | No | Yes (agent-driven) | Yes (native) |
| Custom payloads | No | No | Yes — always generates extensions |
| Discovery | No | Agent decides | Optional (--discover) |
| Triage | No | Agent decides | Yes (extension findings only) |
| SAST | No | No | Yes (ast-grep + AI review, with --source) |
| Source code support | Required | Optional (--source) | Optional (--source) |
| Default timeout | — | 30m | 15m |
| Predictability | High | Low | Medium-High |
| Runtime | Seconds | Minutes | Minutes-hours |
Common API Patterns
Streaming (Server-Sent Events)
All run endpoints support"stream": true for real-time SSE output:
data: lines with JSON payloads:
| Event | Description | Modes |
|---|---|---|
chunk | Real-time text from the agent | All |
phase | Phase transition (e.g., {"type":"phase","phase":"discover"}) | Swarm |
done | Agent finished successfully | All |
error | Agent failed | All |
Check Run Status
running, completed, or failed.
List All Runs
agent_runs database table.
Concurrency
Only one agent run can be active at a time across all modes. Concurrent requests return409 Conflict.
OpenAI-Compatible Chat Completions
model field maps to agent names in config. Works with any OpenAI-compatible client:
Decision Guide
“I have source code and want to find vulnerabilities” -> Use Run with--prompt-template security-code-review
“I have a target URL and want comprehensive scanning”
-> Use Swarm with --discover for predictable, cost-efficient full-scope coverage
-> Use Autopilot if you want the AI to explore creatively
“I have source code AND a running target”
-> Use Swarm with --discover --source — gets route extraction, auth config, SAST, and custom extensions automatically
“I have a specific request I want to attack deeply”
-> Use Swarm — paste the URL, curl command, or raw request
“I found an interesting endpoint in Burp and want targeted testing”
-> Use Swarm with --input (paste the curl/raw request) or --record-uuid
“I need this in CI/CD”
-> Use Swarm with --discover (stable phases, predictable runtime) or Run (fast code review)
Mode Comparison & Overlap Analysis
Architectural Relationships
All three modes share a common execution engine (pkg/agent/engine.go). Query is a standalone mode; the two agentic scan modes (autopilot, swarm) add varying levels of orchestration on top:
- Query is the primitive — Swarm calls
Engine.Run()at each AI checkpoint, making Query effectively its building block. - Autopilot is architecturally separate — it gives the agent terminal access and lets it drive, rather than orchestrating phases programmatically.
- Swarm subsumes the former pipeline mode. With
--discover, it runs content discovery and spidering before planning, providing the same full-scope coverage. Without--discover, it focuses on targeted endpoint testing.
Feature Matrix
| Feature | Query | Autopilot | Swarm |
|---|---|---|---|
| AI-driven module selection | — | Agent decides | Master agent plan |
| Custom extension generation | — | — | Always (quick_checks + snippets) |
| Source analysis (routes/auth) | Context only | Context + CLI | Parallel sub-agents |
| SAST (ast-grep) | — | — | Native + AI review |
| Discovery/spidering | — | Agent decides | Optional (--discover) |
| Triage + rescan loop | — | Agent decides | Phases 9-10 |
| Input batching | — | — | >5 records batched |
| Terminal access | No | Yes (sandboxed via ACP) | No |
| Full CLI tool access (SDK) | Yes | Yes (SDK) or sandboxed (ACP) | Yes |
| Structured output schema | findings, http_records | Unstructured | SwarmPlan, TriageResult |
| Warm session pooling | Optional | Enabled | Forced |
| Resumable phases | — | — | --start-from, --source-analysis-only |
Autopilot vs Swarm (Agentic Scan Tradeoffs)
Both are agentic scan modes. With SDK protocol, autopilot agents get full CLI tool access (Read, Grep, Glob, Bash, Edit, Write) for unrestricted autonomous workflows. With ACP protocol, autopilot uses a sandboxed terminal that only allowsvigolium commands. The tradeoff:
- Autopilot advantage: Can adapt strategy mid-scan, try creative approaches, and handle unexpected findings. SDK mode provides full coding agent capability.
- Swarm advantage: Agentic scan with native Go handling the scanning phases (faster, cheaper), AI only called at strategic points
When Modes Genuinely Differ
Despite the overlaps, each mode has a clear sweet spot:| Mode | Unique Value | Cannot Be Replaced By |
|---|---|---|
| Query | Zero-scan code analysis, CI/CD-friendly single-shot | Any other mode (they all require a target or do more than needed) |
| Autopilot | Adaptive, exploratory testing with no predefined workflow | Swarm (it follows fixed phases) |
| Swarm | Custom payload generation + SAST + multi-format input + optional full-scope discovery | Query (no scanning), Autopilot (no extension generation, higher cost) |
Configuration
Agent backends are configured in~/.vigolium/vigolium-configs.yaml:
| Protocol | Tool Access | Description |
|---|---|---|
sdk | Full (Read, Grep, Glob, Bash, Edit, Write) | Claude Agent SDK — JSON-lines protocol. Default and recommended. Highest output quality. |
acp | ReadTextFile only | Agent Communication Protocol — structured bidirectional communication, supports terminal execution. |
codex-sdk | Full tools | Codex native JSON-RPC v2 protocol. |
opencode-sdk | Full tools | OpenCode native REST + SSE streaming protocol. |
pipe | None (text only) | Classic stdin/stdout — prompt piped to stdin, output read from stdout. Legacy fallback. |
