Running promptfoo red teams with local models

Keep promptfoo red team generation and grading on models you run yourself, using redteam.provider with Ollama or vLLM, and know which plugins and strategies need hosted inference and what still needs network access.

On this page

Running promptfoo red teams with local models: when and why

promptfoo can run its red team generation and grading against models you host yourself, but not every plugin and strategy works that way. A regulated team that cannot send prompts or model outputs to a hosted generation service can point the red team configuration at a self-hosted model through redteam.provider. The catch is that some plugins and strategies depend on remote generation or grading, so they are lost or behave differently when the path stays inside your network. The constraint is the generation and grading path, not licensing.

The promptfoo documentation states that the software runs completely locally: evals run on your machine and talk directly with the LLM. The Community edition is free and includes red teaming, so a team does not need a paid edition to keep its test traffic on its own models. Before committing to a design, confirm with the promptfoo red teaming documentation which plugins and strategies need hosted inference, and test each one against your local endpoint in a non-production setup.

The decision to make first is what must stay inside your boundary: the prompts, the generated attack payloads, the target's responses and the grader's verdicts. Each of these passes through a model, so each needs an owner who can confirm where it runs. Plan for network access to be needed for package installation and any component you have not mirrored, and record which outbound calls remain so the security team can approve them before the first run.

Local generation versus hosted generation: what changes

A security engineer running promptfoo from a laptop usually works with the CLI and a config file that points the red team at the application under test. With the default hosted setup, plugin payload generation and grading go to the promptfoo hosted API, so the laptop is not the only place where test content is processed. When you move generation and grading to a local model, the CLI, the config and the results stay on the machine, and the remaining network calls are those to the target application and to the local model server.

  • What runs locally: the promptfoo CLI, the configuration file, the results directory and the local model server you point redteam.provider at.
  • What calls a model: the target application under test, plus whatever provider you set for generation and grading, which can be an Ollama or vLLM endpoint on the same network.
  • What to confirm: whether the laptop has a proxy or firewall that blocks api.promptfoo.app, which models your hardware can run at useful speed, and whether the target URL is reachable from the laptop.
  • Plugins and strategies: some plugins and strategies rely on hosted generation, so expect a smaller set of attacks in local mode and check the plugin documentation before you claim coverage.
  • Storage: results stay in local files unless you export them, so decide where scan output is kept and who can read it.

Before running a scan from a laptop, run a short test against a known endpoint and confirm the scan output shows which provider handled generation and grading.

Configuration options for local red team models

This table compares the provider and endpoint options you set for a promptfoo red team that keeps generation and grading on your own models. Read each row for when the option fits and what to confirm before the first scan, because support for specific plugins and strategies varies with the provider you choose.

OptionWhen it fitsTrade-offWhat to confirm
redteam.provider pointing at a local modelGeneration and grading must stay on infrastructure you controlEvery plugin and strategy must accept the local provider, which is not guaranteedExact provider keys in the promptfoo red teaming documentation for your version
Ollama as a local serverA single workstation or small lab serving open models for testingSuited to light use; throughput and concurrency limit how many probes finish in a runModel names pulled locally, the API endpoint in use, and whether your chosen plugins run against it
vLLM as an OpenAI-compatible serving engineA shared GPU server that many testers or pipelines call during scansNeeds accelerator capacity and model compatibility checks before scans startServed model name, endpoint path and rate limits, plus the offline docs option for air-gapped hosts
Separate provider for generationAttack prompts should come from a stronger model than the one under testGeneration quality and plugin coverage can differ from the grading providerWhich plugins and strategies use generation, and whether they need a hosted service
Separate provider for gradingGrading must be reviewed independently of the target and generatorA weaker local grader can increase false positives or missesGrader accuracy on your own borderline examples before you trust the report
Target endpoint under testThe application or model being attacked, reached over HTTP or a provider configTarget traffic is separate from red team generation and grading, so it adds its own network pathsNetwork reachability from the test host, authentication, and rate limits on the target
Hosted-only plugins and strategiesYou need a plugin or strategy that is documented as requiring hosted inferenceLocal-only setups may skip these, reducing coverageEach plugin and strategy page, and whether it runs without remote generation
Network access still requiredPackage installs, updates, and any optional hosted serviceAir-gapped hosts need offline copies of packages and model weightsWhich hosts the test machine contacts, verified in a network capture before the run

Which plugins and strategies need hosted generation

Do not assume that a local model gives you the same coverage as the hosted setup. Some promptfoo plugins and strategies depend on hosted inference or remote generation, and the set can change as the product changes. For each plugin and strategy you plan to use, check the promptfoo red teaming documentation and its plugin and strategy lists, and record whether it runs fully against your own redteam.provider or needs the hosted generation path. Run a short test scan with your chosen provider before you finalize the plan, so you see which items fail or are skipped instead of discovering the gap in the final report.

Accept the trade-off in writing. A local-only run keeps prompts, targets and grading traffic inside your boundary, but it may cover fewer attack categories than the hosted path. Name each gap in the test plan, state who accepted it and why, and link it to the risk owner. Then compensate where you can with your own material: custom intents for known abuse attempts, and custom policies that encode your product, legal and brand rules. Those extra tests are only as good as their purpose text and grading criteria, so have a reviewer read a sample of generated probes and grader verdicts before the results go into an audit or sign-off file.

Plan the review as a recurring step, not a one-time check. Promptfoo releases change plugin behavior, and a local model swap can change the quality of generated attacks and grading. Re-check the coverage list after each upgrade and after changing the model behind redteam.provider, and keep the list of accepted gaps with the scan configuration so the next run can be compared against the same baseline.

How to set up a local red team run step by step

This sequence takes a team from an installed promptfoo CLI to a small red team scan whose generation and grading calls stay on models the team controls. Each step ends with a check, so the team knows the setup works before it scales up.

  1. Install promptfoo and confirm the Node.js version

    An engineer on the team installs the promptfoo CLI from npm on a workstation or runner that the team controls. promptfoo is MIT licensed and the pillar facts record npm release 0.124.1, published on 8 October 2026, which requires Node.js 22.22.0 or newer. Confirm the version you install against the promptfoo package on npm and the release notes, because the requirement may change in later versions. The step is done when node --version reports a supported release and npx promptfoo --version prints the version you intended to install.

  2. Stand up the local model server

    Install Ollama or vLLM on hardware you control, such as a server in your data center or an isolated lab host. Choose the model that will act as the red team generator and grader, and pull or load its weights while the host still has network access, or copy them in through your approved transfer process. Whoever owns the inference host performs this step and records the model name, version and file checksum. The step is done when the server is listening on an internal address and the model files are present on the host.

  3. Confirm the model answers requests

    Send a single test prompt to the local endpoint with curl or a short script, using the OpenAI-compatible or native API that your server exposes. Check that the response returns within an acceptable time and that the output is coherent text, not an error or an empty body. Also confirm that the endpoint is reachable only from the networks you intend. The step is done when a plain request returns a complete answer from the model you selected, and the endpoint address is written down for the next step.

  4. Set redteam.provider to the local endpoint

    In the promptfoo configuration file, set redteam.provider to the local model endpoint so that attack generation and grading call your model rather than the hosted promptfoo API. Keep the model identifier and base URL in the config and store any API key for the local server in an environment variable, not in the file. Be aware that some plugins and strategies depend on hosted generation and will not run or will be skipped under this setup, so review the plugin list before the scan. The step is done when npx promptfoo redteam reads the config without a provider error and the run header shows the local provider.

  5. Point the target at the application under test

    Set the target provider in the same configuration to the application or model endpoint being tested, and write a purpose statement that describes its users, data and tools. The target can be the same local server or a separate application that your team runs. Verify that the target responds to a manual request before any attacks are sent, since a misconfigured target produces misleading results. The step is done when a single eval case returns the target's answer and the purpose field is filled in.

  6. Run a small scan with low numTests

    Limit the first run to a few plugins with a low numTests value so that the number of probes is small and the team can read every output. Run the scan from the command line and save the report. The purpose of this run is to confirm that generation, attack delivery and grading all complete locally, not to measure the application's risk. The step is done when the scan finishes, the report lists results for each selected plugin, and any errors are recorded with their cause.

  7. Check egress logs for outbound requests

    Review firewall, proxy or host egress logs for the time window of the scan and confirm that no traffic left the network toward external model providers or the promptfoo hosted API. Also check that the local inference server did not reach out to download models or telemetry during the run. Your network or security team should own this review and keep the log extract with the run record. The step is done when the logs show only traffic to approved internal addresses, or any external connection has been identified, explained and removed from the configuration.

Where requests go in a local red team run

The run starts on the workstation or CI runner where the promptfoo CLI executes. Attack generation and grading calls go to the models you configure under redteam.provider and the grader, which can be Ollama or vLLM inside your network. Probes then reach the application under test. The optional outbound path to the hosted promptfoo API is shown as something to disable and verify, not assume. Check that path with network logs or egress rules before you sign off.

Local red team traffic stays inside the trust boundary when the hosted path is disabled.

Security and operational controls for local red teams

A local promptfoo red team moves model traffic, prompts and results inside your perimeter, which shifts the risk from a vendor's hosted service to your own hosts and files. The cards below cover the controls that keep that boundary intact and make the results usable as evidence.

Model hosting access control

Your local generation and grading models become a high-value target, because every probe and judgment passes through them. Restrict who can call the Ollama or vLLM endpoint, bind it to an internal interface, and separate the red team host from general user access. Confirm which accounts can load, pull or replace models, since a swapped grader changes every verdict in the report. Record which model name and version graded each run.

Prompts and results on disk

Generated attack prompts, target responses and grader notes are written to local storage, often in plain files or the local SQLite database. Decide where the output directory lives, who can read it, and whether it is encrypted at rest. Treat these files as sensitive, because attack payloads can reveal how your application handles customer data. Check that scratch copies and CI artifacts follow the same rules.

Verified promptfoo and dependencies

Anything carried across an isolated boundary needs a check of what it is and where it came from. Pin the promptfoo version, Node.js runtime and npm dependencies, then verify checksums or lockfile hashes before import. NERC CIP-013-2 asks utilities to verify the integrity and authenticity of vendor software before it is trusted, and the same habit applies to a red team toolchain moved into a sealed environment. Keep a record of each transfer.

promptfoo on npm

Network egress verification

Local mode should not need outbound calls to the hosted promptfoo API, but other paths can still reach the internet, such as telemetry, update checks or a provider left in the configuration. Run the scan from a host with egress blocked and log any connection attempts. Confirm the behavior against the current documentation for your version, because hosted features may change. Failed connections are findings to resolve, not noise to ignore.

Target endpoint secrets handling

The target application often needs an API key, session cookie or bearer token for the red team to reach it. Store these in your secret manager or environment variables supplied at runtime, never in the promptfoo configuration committed to a repository. Use a dedicated test account with the minimum permissions the target needs, and rotate its credentials after the engagement ends. Confirm that logs redact headers.

Retention of red team reports

A red team report is evidence of what was tested, against which model version and with which purpose. Define how long reports, configurations and grader outputs are kept, who approves deletion, and where they are stored under your records policy. Save the exact command, promptfoo version and model identifiers with each report so a later retest can be compared fairly. Ask your compliance team which retention rules apply before the first run.

Questions teams ask before running promptfoo red teams locally

Is running promptfoo red teams with local models free under the MIT license?

The promptfoo software is licensed under the MIT license, and the Community edition is free and includes red teaming with 10k probes per month, with community support. Running red teams against your own models does not add a promptfoo license fee. Your costs are the compute to host the model, the staff time to configure and review results, and any support you buy separately. Confirm the probe allowance and feature set against the current promptfoo pricing page before you plan, because Enterprise and On-Premise are sold on custom terms and add team sharing, SSO and centralized monitoring that the Community edition does not include.

What drives the cost of local red teaming?

Cost follows from four drivers. Hardware or cloud capacity to run the models, which depends on the size of the model you choose and how many probes you send. Model selection, since a larger model can grade more accurately but needs more memory and time. Staff time for writing the purpose, reviewing borderline findings and tuning graders. Plugin coverage gaps, because some plugins and strategies depend on hosted generation and will not run locally, so you may need to build custom tests or accept lower coverage. Ask your team to estimate each driver for your own environment and compare it with a quoted scope.

Which plugins and strategies do we lose without remote generation?

Some plugins and strategies depend on hosted generation or grading that promptfoo runs through its API, so they may not run when you keep generation on your own models. Check the plugin and strategy documentation for each one you plan to use, and mark any that require hosted inference as gaps. Run a small pilot with your chosen local model first and record which probes produce usable payloads. Gaps should be documented in your scan purpose so reviewers know what was not tested.

How long does it take to set up local red teaming?

No duration has been established for this work, so scope it with your own environment in view. The time depends on whether a model server already exists, how many network rules must be approved, how many models you need to compare, and how many plugins you need to validate. Ask any partner or internal team for a written plan with milestones, and confirm which steps depend on approvals outside your control, such as firewall changes or model onboarding.

What network access does a local promptfoo red team still need?

Local generation and grading keep prompts and responses on your own hosts, but the setup still needs to be verified. Confirm that the promptfoo CLI and its dependencies can be installed from an internal mirror, that the model server is reachable only from the test runner, and that no telemetry or hosted calls leave the network unless you approve them. Document every outbound address your team tested. Your security team will want that list before they sign off.

What must our side provide for an air-gapped or restricted deployment?

You provide the target endpoint, the model hosting environment, the approved list of packages and container images, and the people who can approve network rules and model downloads. Teams running Kubernetes or other platforms in isolated networks often pre-pull images and move packages across a controlled boundary. Under NERC CIP-013-2, procurement processes must address verification of software integrity and authenticity, which is the same control behind checking packages carried across an isolated boundary. Plan the transfer and checksum process before the build starts.

Can our own engineers run local red teams without outside help?

Yes, if you have engineers who can host a model with Ollama or vLLM, configure promptfoo's redteam provider settings, and review findings critically. The harder parts are usually the purpose definition, grader tuning and deciding which gaps are acceptable. Test the setup on a non-production target first and record what your team can and cannot do. If the team lacks capacity or the security review needs independent documentation, a partner can plan, implement and document the setup, and DeployOpen can run the testing and deliver a findings report with a retest.

What still needs network access in an air-gapped setup

Moving promptfoo red teaming onto local models does not make the whole setup offline by default. Several steps still reach outside the boundary, and the first decision is to list them explicitly: package installation, container image pulls, promptfoo updates, model weight downloads, and any plugin or dataset assets your scans depend on. Each one needs a named owner and an approved transfer path. Start by confirming with promptfoo, through its documentation or direct contact, which of its features run fully without outside calls in your version. The promptfoo pricing page describes Enterprise On-Premise as running with complete data isolation, but it does not give the offline install procedure for the open-source CLI, so do not assume the Community setup has the same properties until you have tested it.

Air-gapped support is often sold as a paid-edition feature by other vendors. Mattermost, Rocket.Chat and Metabase each tie air-gapped deployment to higher tiers, and Element and Plane separate offline editions from their community releases. Ask promptfoo whether any offline or isolated deployment guidance exists for the open-source tool, and whether it is covered by the MIT license or by a commercial agreement. Kubernetes, GitLab and Wazuh publish offline installation guidance, with pre-pulled images, private registries and offline vulnerability data, and that pattern is worth copying. It does not mean promptfoo offers the same, so treat their documents as a checklist of what to plan, not as a promise about promptfoo.

Use a three-step offline artifact process: mirror, verify, transfer. On the connected side, mirror the npm package with its Node.js 22.22.0 or newer runtime, container images, and the model weights for Ollama or vLLM, and record each artifact with a version and checksum. Verify every item against its source, including the release notes for the promptfoo version you chose, before it crosses the boundary. Then transfer the set through your approved media process and repeat the checksum check on the inside. Keep a manifest for each release so that later upgrades follow the same path. Under NERC CIP-013-2, which covers verification of software integrity and authenticity for vendor software and patches, this manifest is the evidence a regulated team would need, so build it from the start.

What drives the effort of a local or air-gapped red team

A local red team is shaped less by the promptfoo configuration than by the models, hardware and boundaries around it. The cards below cover the decisions that expand or shrink the work, and each one should be settled in the written scope before the first scan runs.

Plugin and strategy selection

Every plugin and strategy you enable adds probes, and some depend on hosted generation or grading that a local setup may not provide. Map each choice to a model you actually run, then list the plugins that will be dropped or replaced. Ask whether the local model can produce the payloads and grade them with acceptable accuracy, since a smaller model may need more review time per finding.

promptfoo red teaming docs

Model hardware and serving setup

Generation and grading throughput depend on the accelerators, memory and serving engine behind the endpoint. Ollama and vLLM differ in concurrency, batching and model format support, so a scan that runs in an hour on one stack may take far longer on another. Confirm the context length and concurrency your chosen model needs, and benchmark a small plugin set before sizing the full scan.

Offline package and model transfer

Everything the team installs must cross the isolation boundary, including the promptfoo package, Node.js runtime, model weights and any container images. Each transfer needs a documented source, a checksum and an approver. Plan the process for model updates as well as the first install, because a new model version means another transfer and another round of grading checks.

Grading quality review

Local graders can mislabel results, so the team needs time to review borderline findings against the purpose and grading rules. Plan a calibration pass on known-good and known-bad responses before the first report, and record which grader model produced each verdict. Expect this review to scale with the number of plugins and with how often the grader disagrees with human reviewers.

Assessor evidence requirements

Auditors and internal assessors often ask where each test ran, which model graded it, and how results were stored and reviewed. Agree the evidence list early, such as configuration files, model identifiers, run logs and reviewer sign-off. Each extra artifact adds collection work, so confirm the format with the assessor before the scan starts.

CI and SIEM integration

If results must flow into existing pipelines or security monitoring, the team has to connect promptfoo outputs to tools that also run inside the boundary. Check which CI runners, report stores and alert paths are reachable without internet access, and who maintains the connectors. Integration work recurs with every upgrade, so include it in the ongoing support plan.

How DeployOpen scopes and delivers local promptfoo red teams

DeployOpen plans, configures and tests promptfoo red teams that run generation and grading on models inside your own infrastructure. The work is scoped in writing before it starts, built against your inference endpoint, and handed over with documented settings, a list of what was lost or changed, and the network paths that still need approval.

How we scope

  • Confirm which applications, endpoints and plugin collections are in the red team and which model serves generation and grading
  • Inventory every plugin and strategy the planned run needs and mark which ones depend on hosted generation
  • Record the network paths the scan still needs, such as the target endpoint and any package or image mirrors
  • Agree the scope, deliverables and timeline in writing before any work begins, as engagements are fixed-scope

How we build

  • Configure redteam.provider for your local model and check that generation and grading return usable output
  • Set up the local inference server, such as Ollama or vLLM, inside the environment you control with the models you approved
  • Test the configuration against a small probe set and confirm the grader's verdicts on known pass and fail examples
  • Verify package versions and container images against the sources your organization trusts before they cross into the isolated network

How we hand over

  • Deliver the promptfoo configuration, provider settings and a runbook for running and re-running the red team locally
  • Document the plugins and strategies that were removed or replaced, with the coverage gap each one leaves
  • Provide a data-flow record that lists what stays inside your environment and what, if anything, still reaches external services
  • Walk your security and platform teams through the results, the findings report and the handover material

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer after the initial handover
  • Re-check the configuration after promptfoo, model or inference server upgrades and report any changes in behavior
  • Repeat the red team on a fixed test set when models, prompts or guardrails change, if the retainer covers it
  • Ask for a quote built from the written scope, which sets out the one-time setup and any recurring support separately

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.