Local models
Run PentAGI on models served from your own hardware, so prompts, tool output and findings stay on your servers.
PentAGI can run entirely on models you serve yourself. The agentsagentAn AI agent of PentAGI: a model with its own prompt, settings and tools that does one kind of work in a flow, such as testing, writing code or searching the web.' prompts, the tooltoolWhat an agent acts through: a built-in capability such as the terminal, the isolated browser or web search, or a program in the sandbox such as nmap, metasploit or sqlmap. output they read and the findingsfindingSomething the test discovered and recorded, such as a host, a running service or a vulnerability. they reportreportThe document PentAGI writes about a flow and its findings. In Enterprise, it is a customer-ready document built from a template. then stay on your servers, and a long flowflowOne run of PentAGI: a goal, the tasks created from your messages, and everything the agents did along the way. costs GPU time instead of tokens. Two kinds of model servers are supported: Ollama, the quickest to set up, and vLLM or any other server with an OpenAI-compatible API, for higher throughput.
Ollama
Point PentAGI at the Ollama server in .env:
OLLAMA_SERVER_URL=http://ollama-server:11434
OLLAMA_SERVER_CONFIG_PATH=/opt/pentagi/conf/ollama-qwen332b-fp16-tc.provider.yml
OLLAMA_SERVER_PULL_MODELS_ENABLED=false # true downloads missing models at startup
OLLAMA_SERVER_LOAD_MODELS_ENABLED=false # true lists the models the server already hasThe config file assigns a model and its parameters to each agent typeagent typeThe role an agent plays, such as pentester, coder or searcher. Model settings are chosen per agent type.; without one, OLLAMA_ sets the default model. The image ships ready configs in /, among them ollama-qwen332b-fp16-tc.provider.yml and ollama-qwq32b-fp16-tc.provider.yml.
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 only when it creates a model, so build a variant from a Modelfile:
FROM qwen3:32b-fp16
PARAMETER num_ctx 110000
PARAMETER temperature 0.3
PARAMETER top_p 0.8
PARAMETER min_p 0.0
PARAMETER top_k 20
PARAMETER repeat_penalty 1.1ollama create qwen3:32b-fp16-tc -f ModelfilevLLM and other OpenAI-compatible servers
vLLM, LocalAI and other servers with an OpenAI-compatible API connect as the custom provider:
LLM_SERVER_URL=http://vllm-server:8000/v1
LLM_SERVER_KEY=local # any non-empty value when the server has no key
LLM_SERVER_MODEL=Qwen/Qwen3.6-27B-FP8
LLM_SERVER_CONFIG_PATH=/opt/pentagi/conf/vllm-qwen3.6-27b-fp8.provider.ymlThe image ships configs for several Qwen builds on vLLM; the -no-think variants turn reasoning off. Agents work through tool callstool callA request from the model to run one of the agent's tools, such as a terminal command or a web search., so start the server with the tool-call parser and chat templatetemplateSaved text that PentAGI reuses. A template saved in Templates fills in the first message of a new flow; in Enterprise, a report template sets the sections of a report and their order, so different templates produce different documents for the customer, the engineers and management. recommended for your model: with a wrong parser, tool-call arguments come back broken and a flow stops after a few steps.
Choosing a model
- Give your strongest model to
primary_,agent pentesterandadviserin the config file; lighter ones can servesearcher,enricherand summarization. - For models under 32B parameters, turn on execution monitoring and task planning. They roughly double result quality at the cost of two to three times more tokens and time.
- Plan for the memorymemoryWhat agents keep so they can build on earlier work instead of starting from scratch: long-term, working and episodic memory.: QwQ 32B in FP16, for example, needs about 71 GB of GPU memory.
Keep the rest of the stack local
| Part | Setting |
|---|---|
| Embeddings | EMBEDDING_ with an embedding model in EMBEDDING_ uses the same Ollama server; a local OpenAI-compatible server works with EMBEDDING_, its address in EMBEDDING_ and any non-empty EMBEDDING_ |
| Web search | Search sends the agents' queries to the internet. DuckDuckGo is on by default; turn it off with DUCKDUCKGO_ and keep only the engines you accept, such as your own SearXNG |
| Knowledge graphknowledge graphThe graph of hosts, services, vulnerabilities and the access between them that PentAGI builds during a test when this optional feature is enabled. It shows how findings connect. | Off by default. When on, Graphiti calls OpenAI unless GRAPHITI_ sends it to the server in LLM_, which it then also asks for embeddings with the model named in EMBEDDING_, or text-embedding-3-small when that is empty. If that server does not serve that model, set GRAPHITI_: Graphiti then takes EMBEDDING_, EMBEDDING_ and EMBEDDING_, the values PentAGI uses, and they must point at an OpenAI-compatible server — see Knowledge graph |
| Observability | The bundled Langfuse and Grafana stacks run on your host — see Observability |
| Update check | UPDATE_ turns it off; Security lists what it sends |
| Images | Docker pulls the sandboxsandboxThe isolated Docker container in which agents run their tools. The interface shows it as Terminal. images from Docker Hub with its own settings; in a closed network, point the Docker daemon at a registry mirror |
Last updated on