Pentest Swarm AI uses a layered configuration system: a YAML file supplies structured defaults, and environment variables override any value at runtime without touching the file. The config file is looked up in order fromDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Armur-Ai/Pentest-Swarm-AI/llms.txt
Use this file to discover all available pages before exploring further.
./config.yaml, ~/.pentestswarm/config.yaml, and /etc/pentestswarm/config.yaml. You can also point directly to a file with --config <path> on any command. Running pentestswarm init writes a minimal starter config to ~/.pentestswarm/config.yaml and stores your API key in the OS keychain — that is the recommended starting point.
Full annotated config.yaml
Copyconfig.example.yaml from the repository root to config.yaml and fill in your values. Every field shown below can be overridden by an environment variable prefixed with PENTESTSWARM_ (dots replaced with underscores — e.g. PENTESTSWARM_ORCHESTRATOR_API_KEY).
Config sections
Orchestrator — provider, model, API key
Orchestrator — provider, model, API key
The
Claude example:Ollama (local) example:LM Studio (local) example:
orchestrator block configures the primary LLM used to coordinate the swarm. All agents inherit this provider and API key unless explicitly overridden in the agents block.| Field | Default | Description |
|---|---|---|
provider | claude | LLM backend: claude, ollama, or lmstudio |
model | claude-sonnet-4-6 | Model name passed to the provider |
api_key | "" | Claude API key — prefer the PENTESTSWARM_ORCHESTRATOR_API_KEY env var |
endpoint | "" | Required for ollama / lmstudio (e.g. http://localhost:11434) |
context_window | 200000 | Max context window in tokens |
max_tokens | 8192 | Max tokens per LLM completion |
temperature | 0.1 | Sampling temperature; lower values are more deterministic |
Agents — per-agent model overrides
Agents — per-agent model overrides
The Example: hybrid cloud + local setup:Each agent block accepts
agents block lets you assign a different model to each specialist agent. An empty provider or model field means the agent inherits from the orchestrator — which means a single Claude key is sufficient to run the whole swarm by default.Agents available: recon, classifier, exploit, report.Example: exploit agent on a heavier model, classifier on a cheaper one:provider, model, api_key, and endpoint. Any field left empty falls back to the orchestrator value.Tools — subfinder, httpx, nuclei, naabu, katana
Tools — subfinder, httpx, nuclei, naabu, katana
The
httpx — HTTP probing:
nuclei — template-based vulnerability scanning:
naabu — port scanning:
katana — web crawling:
tools block tunes the behaviour of each security tool the swarm calls out to. default_timeout applies to any tool that does not have its own timeout key.subfinder — passive subdomain discovery:| Field | Default | Description |
|---|---|---|
recursive | false | Enumerate subdomains of discovered subdomains |
timeout | 300 | Total run timeout in seconds |
rate_limit | 10 | Requests per second |
| Field | Default | Description |
|---|---|---|
follow_redirects | true | Follow HTTP redirects |
timeout | 30 | Per-request timeout in seconds |
threads | 50 | Concurrent threads |
| Field | Default | Description |
|---|---|---|
template_path | "" | Path to custom template directory; empty uses nuclei’s default templates |
severity | [critical, high, medium] | Minimum severity filter |
rate_limit | 150 | Requests per second |
timeout | 300 | Total run timeout in seconds |
| Field | Default | Description |
|---|---|---|
ports | top-1000 | Port set: top-100, top-1000, or a list like 80,443,8080 |
rate | 1000 | Packets per second |
timeout | 300 | Total run timeout in seconds |
| Field | Default | Description |
|---|---|---|
depth | 3 | Maximum crawl depth |
js_crawl | true | Parse and crawl JavaScript-rendered content |
timeout | 300 | Total run timeout in seconds |
Scope enforcement
Scope enforcement
Scope enforcement prevents the swarm from acting on targets outside the
--scope you specify at scan time.ASM — continuous attack surface monitoring
ASM — continuous attack surface monitoring
The
asm block enables scheduled re-scanning of watched scopes, building a continuous picture of an organization’s external attack surface.| Field | Default | Description |
|---|---|---|
enabled | false | Enable continuous ASM mode |
default_schedule | 24h | Re-scan interval (Go duration string: 6h, 24h, 72h) |
max_auto_campaigns | 3 | Maximum auto-triggered campaigns per scope per 24-hour window |
notification_slack | "" | Slack webhook URL for new-finding alerts |
notification_email | "" | Email address for new-finding alerts |
Bug bounty platform credentials
Bug bounty platform credentials
Supply platform API credentials to enable automatic program-scope fetching and submission helpers.Prefer environment variables for credentials — see the environment variables table below:
Integrations — Jira and Slack
Integrations — Jira and Slack
Configure Jira to auto-file issues for confirmed findings, and Slack for campaign notifications.Both integrations are optional. If
url / bot_token is empty the integration is silently disabled.Logging
Logging
format: json when aggregating logs in a SIEM or log platform. Set level: debug to see every LLM prompt and tool invocation.Environment variables
Environment variables take precedence over the config file. All YAML keys map toPENTESTSWARM_<UPPER_SNAKE> (dots become underscores).
| Environment variable | Equivalent YAML key | Description |
|---|---|---|
PENTESTSWARM_ORCHESTRATOR_API_KEY | orchestrator.api_key | Claude (or compatible) API key — primary lookup |
ANTHROPIC_API_KEY | orchestrator.api_key | Short-form alias; checked if the primary variable is unset |
PENTESTSWARM_DATABASE_PASSWORD | database.password | Postgres password — never put this in a committed file |
PENTESTSWARM_ORCHESTRATOR_PROVIDER | orchestrator.provider | Override the LLM provider at runtime |
PENTESTSWARM_ORCHESTRATOR_MODEL | orchestrator.model | Override the model name at runtime |
PENTESTSWARM_ORCHESTRATOR_ENDPOINT | orchestrator.endpoint | Override the provider endpoint (Ollama / LM Studio) |
PENTESTSWARM_BUGBOUNTY_HACKERONE_API_KEY | bugbounty.hackerone_api_key | HackerOne API key |
PENTESTSWARM_BUGBOUNTY_HACKERONE_USERNAME | bugbounty.hackerone_username | HackerOne username |
PENTESTSWARM_BUGBOUNTY_BUGCROWD_API_KEY | bugbounty.bugcrowd_api_key | Bugcrowd API key |
PENTESTSWARM_LOGGING_LEVEL | logging.level | Set log verbosity without editing the file |
LLM provider comparison
All agents inherit from a single provider config. Set one key and the entire swarm uses it. You can mix providers per-agent via theagents block.
| Provider | Setup | Privacy | Best for |
|---|---|---|---|
| Claude (default) | export PENTESTSWARM_ORCHESTRATOR_API_KEY=sk-ant-... | Cloud | Best quality, zero local setup, prompt caching on recon + classifier by default |
| Ollama | Install Ollama, ollama pull <model>, set endpoint: http://localhost:11434 | 100% local | Full data privacy, air-gapped environments, no token costs |
| LM Studio | Load a model in the LM Studio GUI, enable the local server, set endpoint: http://localhost:1234 | 100% local | GUI-based model management, easy model switching |
Per-agent model override example
The following config runs the compute-intensiveexploit agent on Claude Opus while keeping the high-volume classifier agent on a faster, cheaper model, and inheriting Claude Sonnet for everything else from the orchestrator: