VulnBot is a multi-agent penetration testing framework from a research team whose paper, VulnBot: Autonomous Penetration Testing for a Multi-Agent Collaborative Framework, splits a test into roles the way a human team would. The OffSec Blog walked through it on November 10, and the question that follows is always the same: can you run VulnBot with an OpenAI-compatible API instead of OpenAI itself? Yes. This post shows the exact VulnBot custom LLM settings, how base_url and the model name map to RedRouter, and what breaks first.
What we checked, on November 18, 2026: the VulnBot repository at commit 9a12eff (November 8, 2026, MIT license). We generated its config templates, loaded a RedRouter model_config.yaml through VulnBot's own config classes, and sent requests through its OpenAIChat client to a local mock server and to https://redrouter.org/v1 with a placeholder key. We did not run a full pentest session against a Kali host for this post. Treat the run section as a recipe, not a reported result.
Use VulnBot only against systems you own, an isolated lab, or targets you have written permission to test.
What VulnBot setup needs
VulnBot is not a single binary. Plan for four pieces before you touch the model settings:
- Python 3.11.11 and
pip install -r requirements.txt, per the README. - A Kali Linux host reachable over SSH. VulnBot sends commands there through Paramiko with a username and password. The default in the code is
10.10.0.5,root/root. - A MySQL database for sessions, plans, tasks and conversation history.
- Optional RAG with Milvus and a local embedding model, off unless you set
enable_rag: true.
The work runs through three roles in order: a Collector for information gathering, a Scanner, and an Exploiter. Each role asks the model for a plan, validates the task list, and runs tasks until the plan is empty or it hits max_interactions.
Step 1: Generate the VulnBot config files
Clone and install as the README says, then run:
python cli.py init
init creates the log and knowledge-base folders, creates the MySQL tables and writes four YAML templates into PENTEST_ROOT (the current directory unless you set the PENTEST_ROOT environment variable): basic_config.yaml, db_config.yaml, kb_config.yaml and model_config.yaml. Because init also creates tables, fill in db_config.yaml first if MySQL isn't on the defaults.
One snag from our run: in a fresh virtualenv with only VulnBot's LLM and config packages, loading an existing YAML file failed with PyYAML is not installed, run pip install pydantic-settings[yaml]. PyYAML isn't pinned in requirements.txt. A full install may pull it in through another package; if you see that error, pip install pyyaml fixes it.
Step 2: Point model_config.yaml at an OpenAI-compatible API
This is the generated model_config.yaml, unedited:
api_key: ''
llm_model: openai
base_url: ''
llm_model_name: ''
embedding_models: maidalun1020/bce-embedding-base_v1
embedding_type: local
context_length: 120000
embedding_url: ''
rerank_model: maidalun1020/bce-reranker-base_v1
temperature: 0.5
history_len: 5
timeout: 600
max_tokens: 8192
max_retries: 3
max_plan_attempts: 3
max_plan_tasks: 30
proxies: {}
For RedRouter, four keys matter:
llm_model: openai
base_url: https://redrouter.org/v1
api_key: '' # leave empty and use the API_KEY environment variable (below)
llm_model_name: glm-5.3-flash-red
max_tokens: 8192
llm_model picks the client, not the model. openai uses the OpenAI Python SDK with your base_url; ollama uses the Ollama client. Anything else stops the run with Unsupported model type. The model ID goes in llm_model_name.
Keep /v1 on the VulnBot base_url. The SDK appends /chat/completions, and our mock server logged this request from VulnBot's client:
{"path": "/v1/chat/completions",
"body": {"messages": [{"role": "user", "content": "Reply with ok."}],
"model": "glm-5.3-flash-red", "max_tokens": 8192, "temperature": 0.5}}
That's a plain Chat Completions call with no tools and no streaming, which is about as compatible as an OpenAI-compatible API request gets.
Keep the key out of the YAML
VulnBot's settings classes read environment variables before the YAML file, with no prefix. We confirmed it: with api_key set in the file, launching with API_KEY=... in the environment replaced it, and LLM_MODEL_NAME=red-cyber-1 switched the model without editing anything. So:
read -rs API_KEY && export API_KEY
python cli.py vulnbot -m 5
The flip side: a stray API_KEY, BASE_URL or LLM_MODEL_NAME in your shell from another tool will silently override model_config.yaml. If VulnBot hits the wrong endpoint, check env first.
Step 3: Lock VulnBot down for a lab run
In basic_config.yaml, set the Kali host and change the mode before the first run:
mode: manual # auto | semi | manual
kali:
hostname: 10.10.0.5
port: 22
username: kali
password: '...'
The modes are the part to read twice. In auto, VulnBot runs the model's commands on Kali over SSH with no approval step. The only built-in block is a short list that stops apt and apt-get. semi runs shell actions automatically and asks you for anything else. manual shows you each command and waits for you to run it yourself and paste the result.
Start in manual until you trust the plans on your target. Put Kali and the target on an isolated network, and write the scope into the task description, because VulnBot's prompts are built around a target IP from that description. RedRouter's scope builder produces a rules-of-engagement sheet you can paste in. VulnBot's SSH client also accepts any host key (Paramiko AutoAddPolicy), which is one more reason to keep it on a lab network.
Step 4: Run VulnBot
python cli.py vulnbot -m 5
-m is max_interactions per role. VulnBot asks whether to resume a saved session, then asks you to describe the task. Give it the lab target's IP and what's in and out of scope. Keep -m low on the first run so a bad plan costs a few requests, not fifty.
Which model to use with VulnBot
Two RedRouter models fit the role. Prices are from the Models & pricing docs on November 18, 2026; check them again before a long run.
- GLM 5.3 Flash Red (
glm-5.3-flash-red): $0.25 input, $0.10 cached input, $1.00 output per 1M tokens. A good default for an agent that sends many short planning and summarizing calls. - red-cyber-1 (
red-cyber-1, Beta): $0.28 input, $0.10 cached input, $1.10 output per 1M tokens. RedRouter's featured model for authorized pentesting and red-team work.
Both list a 1,048,576-token context window and an 8,192-token maximum output in the public catalog, so VulnBot's default max_tokens: 8192 already sits at the ceiling. Plan and subscription details are on /pricing.
Reduced refusals is not zero refusals. Models can still decline, hallucinate commands or misread tool output, as RedRouter's security page says. A person still reviews every finding.
Troubleshooting VulnBot with a custom LLM
HTTP 401. With a placeholder key, RedRouter answered 401 invalid_api_key: Missing, invalid, or revoked API key. VulnBot raised LLMRequestFailed and did not retry it. Per its Configuration Guide, the run stops, saves the session and exits with status 1. Check the key and the environment overrides above.
"The reply was cut off at the token limit." VulnBot treats finish_reason: length as an error (LLMTruncated) instead of parsing half a plan. We triggered it against the mock. You can't fix it by raising max_tokens past 8,192 on these models. Lower -m, keep the task description tight, and ask for shorter plans.
Timeouts, 429s and 5xx. max_retries (default 3) covers dropped connections, timeouts and HTTP 408, 409, 429 and 5xx, with exponential backoff. If a role keeps stalling, see RedRouter's errors and retries and rate limits docs.
Long tool output disappears. context_length is not a token count. In server/chat/chat.py it cuts the query string by characters, and once a conversation exists the cut is 10,000 characters. Only the last history_len exchanges (default 5) are sent back. Big Nmap or dirb output gets trimmed before the model sees it, whatever the model's context window is.
No plan. After an empty, truncated or invalid plan, VulnBot asks again up to max_plan_attempts times, then stops. An empty reply to a plan update is normal: it means the stage is done.
The wrong model answers. Check for an LLM_MODEL_NAME environment variable.
Where the data goes
VulnBot stores sessions, plans and conversation text in your MySQL database. That copy is yours to manage. On RedRouter's side, zero data retention is an opt-in setting, off by default. Eligibility and details are in the data handling docs, and What RedRouter keeps covers the rest.
If you run other agents too, the same base URL and key work in PentAGI, Strix and ARTEX. The general client setup is in OpenAI-compatible API for security agents, and the end-to-end process is in authorized pentest workflows with red-cyber-1.
FAQ
Does VulnBot work with an OpenAI-compatible API?
Yes. Set llm_model: openai, put the provider's /v1 URL in base_url, the key in api_key or the API_KEY environment variable, and the model ID in llm_model_name. VulnBot sends standard Chat Completions requests through the OpenAI Python SDK.
What is the VulnBot base_url for RedRouter?
https://redrouter.org/v1. Keep the /v1; the SDK adds /chat/completions.
Where does VulnBot keep its LLM settings?
In model_config.yaml in PENTEST_ROOT, which python cli.py init creates. Environment variables with the same names (API_KEY, BASE_URL, LLM_MODEL_NAME) override the file.
Can VulnBot use a local model?
Yes. Set llm_model: ollama and point base_url at your Ollama server. The rest of this post covers the hosted OpenAI-compatible path.
Does VulnBot ask before running commands?
Only in semi mode (for non-shell actions) or manual mode. In the default auto mode it runs the model's commands on the Kali host over SSH without asking. Use manual on early runs.
Is it legal to run VulnBot?
Running it against systems you own, an isolated lab or an authorized, in-scope target is normal security testing. Running it against anything else is not. RedRouter's terms prohibit unauthorized testing.
Sources
- VulnBot repository (README, Configuration Guide, source at commit 9a12eff): https://github.com/KHenryAegis/VulnBot
- Kong et al., VulnBot: Autonomous Penetration Testing for a Multi-Agent Collaborative Framework, arXiv:2501.13411: https://arxiv.org/abs/2501.13411
- OffSec Blog, Inside VulnBot: a multi-agent LLM framework that mimics human pentest workflows (Nov 10, 2026): https://www.offsecblog.com/2026/11/inside-vulnbot-multi-agent-llm.html
- RedRouter docs, Quickstart: https://docs.redrouter.org/quickstart
- RedRouter docs, OpenAI and Anthropic API compatibility: https://docs.redrouter.org/compatibility
- RedRouter docs, Models & pricing: https://docs.redrouter.org/models
- RedRouter public model catalog (JSON): https://redrouter.org/api/catalog
- RedRouter docs, Errors & retries: https://docs.redrouter.org/errors
- RedRouter docs, Rate limits & usage tiers: https://docs.redrouter.org/rate-limits
- RedRouter docs, Data handling: https://docs.redrouter.org/data-handling
- RedRouter security page: https://redrouter.org/security