VXControl team5 min read
Pick your own AI engine for every pentest flow
How PentAGI connects hosted and local models, gives each agent role its own model, falls back on a failed call and caps a flow before it starts.
- llm-providers
- self-hosted
- local-models
- enterprise
A pentest agent is only as good as the model behind it, and the right model depends on the target, the budget and where the data may go. PentAGI does not pick the model for you: each flow runs on the provider you choose, and each agent role can run on its own model. This post walks through the setup, from an API key to a model on your own GPU, and the checks worth running before a long flow.
Everything in this post works in the open-source edition. Sections and passages marked Enterprise need PentAGI Enterprise.
Built-in providers
Credentials live on the server, in .env. The built-in providers are OpenAI, Anthropic, Gemini, AWS Bedrock, Ollama, DeepSeek, GLM, Kimi, Qwen, MiniMax, Mistral and xAI; the LLM providers documentation lists the variable for each, with endpoint overrides.
ANTHROPIC_API_KEY=your_key
DEEPSEEK_API_KEY=your_key
OLLAMA_SERVER_URL=http://ollama-server:11434On top of the configured types, Settings → Providers holds provider profiles: a named configuration with its own models, which the profile form tests before you save it. When you create a flow, you pick the provider it runs on, so two flows on the same server can use different vendors.
Any OpenAI-compatible endpoint
vLLM, LiteLLM, OpenRouter, DeepInfra or an Azure OpenAI deployment connect as the custom provider:
LLM_SERVER_URL=https://your-endpoint/v1
LLM_SERVER_KEY=your_key
LLM_SERVER_MODEL=model-name
LLM_SERVER_CONFIG_PATH=/opt/pentagi/conf/custom.provider.ymlTwo details save an evening. LLM_ must not be empty: for a server without authentication, such as vLLM by default, set any value, because an empty key disables the custom provider. And LLM_ switches it to Azure OpenAI.
One model per agent role
A flow is run by a team of agents, and a provider config file assigns a model and its parameters to each agent type. The image ships ready configs in /, for OpenRouter, DeepInfra, Bedrock, several Qwen builds on vLLM and more. An excerpt in the format of openrouter.provider.yml:
simple:
model: "deepseek/deepseek-v4-flash"
max_tokens: 8192
reasoning:
effort: low
primary_agent:
model: "deepseek/deepseek-v4.1-flash"
max_tokens: 16384
reasoning:
effort: highPut your strongest model on primary_, pentester and adviser, the roles that reason about the target. Lighter models are enough for searcher, enricher and summarization, which keeps a long flow affordable. The agents page lists every role.
A flow runs on one provider, chosen when you create it. Which model each agent gets is decided by that provider's config file, not by the flow.
A map, not a timeline: the steps are a reading order. The dot shows who calls whom or where data goes.
Models on your own hardware
The local models guide covers two kinds of servers: Ollama, the quickest to set up, and vLLM or any OpenAI-compatible server for higher throughput. With both, the prompts, the tool output the agents read and the findings stay on your servers, and a long flow costs GPU time instead of tokens.
Ollama's default context window is far smaller than a flow needs: agents typically use around 64K tokens, and PentAGI is set up for 110K. Ollama sets the context size when it creates a model, so build a variant from a Modelfile:
FROM qwen3:32b-fp16
PARAMETER num_ctx 110000ollama create qwen3:32b-fp16-tc -f ModelfileOn vLLM, start the server with the tool-call parser and chat template recommended for your model. Agents work through tool calls, and with a wrong parser the arguments come back broken and the flow stops after a few steps.
One networking detail causes most "Ollama is running but PentAGI cannot reach it" reports: inside the pentagi container, localhost is the container itself. Point OLLAMA_ at an address the container can reach, such as the host's LAN address or host.docker.internal on Docker Desktop.
For open models under 32B parameters, turn on execution monitoring and task planning:
EXECUTION_MONITOR_ENABLED=true
AGENT_PLANNING_STEP_ENABLED=trueThey roughly double result quality for such models, at the cost of two to three times more tokens and time.
Test before a long run
ctester runs the tool-calling agent types against a provider configuration, so a wrong model id or a model without proper tool calling shows up before a three-hour flow does:
docker exec -it pentagi /opt/pentagi/bin/ctester -verbose
docker exec -it pentagi /opt/pentagi/bin/ctester -config /opt/pentagi/conf/openrouter.provider.ymlWithout -config, it tests the file LLM_ names.
When a provider fails
A provider outage used to end the agent chain. Set LLM_ to a second provider, a built-in one with credentials in .env or a profile from Settings → Providers, and a failed call is repeated once on it. The switch is recorded in the trace, and the next call starts on the flow's own provider again.
LLM_FALLBACK_PROVIDER=anthropicEmbeddings are configured separately, with EMBEDDING_ and its own key: the default openai needs OPEN_ or EMBEDDING_ even when the agents run on another vendor. The embeddings page has the options, including Ollama for a fully local stack.
Limits before the first command (Enterprise)
In PentAGI Enterprise, a new flow comes with limits set before the target: a time budget handed down from the task to each subtask, a cap on subtasks per task, a ceiling on concurrent sub-agents and a context preset for the summarizer. Their defaults come from .env:
AGENT_TIME_BUDGET_SECONDS=10800 # three hours of agent work per task
AGENT_MAX_SUBTASKS=15
AGENT_MAX_CONCURRENT_SUBAGENTS=10On a running flow, change them under Preferences; changes apply from the next task. The Enterprise walkthrough opens with exactly this step: the model and the flow settings, then a run on a locally hosted model.
Limitations
- Tool calling decides. An autonomous flow is a long chain of tool calls. A model with weak or missing tool calling, or a wrong model id, is the most common reason a flow stalls, which is why
ctestercomes first. - Hosted models have policies. Some vendors restrict offensive-security prompts unless the account is approved for security work. Check your vendor's policy before you plan a run on it.
- Free tiers run out. A long Automation flow makes many calls, and free-tier quotas and rate limits end it early. Use a paid tier for real runs.
Try it
PentAGI is open source under the MIT license: start with the repository on GitHub and the first flow guide. Time budgets, sub-agents and the rest of the team features are part of PentAGI Enterprise.
We are bringing PentAGI to GITEX GLOBAL 2026 in Dubai: 8–10 December at Expand North Star, Scale-It! zone, Dubai Exhibition Centre, Expo City Dubai. Come by for a live demo or book a meeting with the team.