Planning a first promptfoo red team

A first promptfoo red team needs a defined target, a written purpose, a small starting plugin set and an agreed definition of a finding before any probe is sent. This page covers how to plan each of those.

On this page

Planning a first promptfoo red team before the first probe is sent

Planning a first promptfoo red team means fixing five things before anything runs: the target endpoint, the purpose that describes the application, the starting plugins and strategies, the probe budget, and a written definition of what counts as a finding. A team that skips these decisions usually gets a long list of results that nobody can triage, grade consistently or compare with the next run. The rest of this section explains what promptfoo does and when a first pass is worth the effort.

promptfoo is an open-source tool, licensed under MIT, for evaluating and red teaming LLM applications. According to its documentation, it covers evaluation, automated red teaming and code scanning, and it can be used as a CLI, as a library or inside CI/CD pipelines. The documentation also states that the software runs locally: evals run on your machine and talk directly with the LLM. Confirm with your own data flow review which parts of a red team, such as attack generation and grading, call a hosted service, because that answer determines what your security reviewers need to approve before the first run.

A first red team is worth doing before a release that changes user-facing behavior, and again after a major change to the system prompt, the model, or the tools and data sources the application can reach. Treat the first run as a baseline. Record the target endpoint, the purpose text, the plugin list and the finding rules in a file the team can version, so the second run measures change rather than producing a new, unrelated set of results. Confirm the current release and Node.js requirement with your installation source before you pin a version.

How the planning decisions connect

The path starts at the target endpoint, because promptfoo can only probe what it can reach. The purpose comes next and shapes which plugins and strategies make sense. Before the first run, the team estimates probes against the target's rate limits and agrees in writing what counts as a finding. If the first results show the scope is unclear, the team returns to the purpose and tightens it before rerunning.

The planning order for a first red team, with a loop back to the purpose.

Which planning choices fit which application

This table compares the four planning choices that shape a first promptfoo red team: target type, starting plugin set, starting strategies and grading owner. Read each row against your application to see when a choice fits, what it adds to probe count or review effort, and what to confirm before the first run.

Planning choiceWhen it fitsCost in probes or effortWhat to confirm first
Chat endpointA single model or assistant that takes user messages and returns text, with no retrieval or tool callsLowest setup effort; probe count is driven mainly by plugin numTests and strategiesRequest and response format, session handling and any system prompt the endpoint applies
RAG pipelineAn application that retrieves documents or records and answers from themNeeds test documents or retrieval behavior described in the purpose; grading reviews more source-dependent answersWhich document sources the retriever can reach, who can upload content and whether results are tenant-scoped
Agent with toolsAn application that calls internal APIs, databases or actions on a user's behalfAdds authorization and tool-misuse cases; reviewers need to read tool call traces, not only final textEach tool's permissions, which identity it runs as, and which actions require approval
MCP-connected assistantAn assistant that reaches external or internal tools through Model Context Protocol serversAdds tool-scope and token-handling cases; the scan covers the server and client configuration as well as the modelWhich MCP servers are connected, how each authenticates and whether any run locally on user machines
Narrow security setA first run where the goal is a short list of high-impact attack classes and a fast review cycleFewer probes per run and fewer findings to triage; gaps in coverage are expected and should be recordedWhich two or three risks matter most to the owner, such as prompt injection or sensitive data disclosure
Broad collectionA first run meant to map the application's exposure across many categories before deciding prioritiesSubstantially more probes and findings; plan review time and check Community probe limits before runningWhether the team can triage a large result set and whether the target rate limits can absorb the load
Plain plugin payloadsA baseline run that shows how the application responds to direct attack promptsLower probe count; the baseline is easy to compare across later runsWhether the baseline is enough to answer the first business question or whether delivery methods are needed
Added encodings or multi-turn attacksWhen a baseline shows refusals that may be bypassed by obfuscation, or a chat application keeps conversation stateMultiplies probes per plugin and adds run time; multi-turn attacks need session handling on the targetWhich strategies need hosted inference, whether the target keeps sessions and how many turns the team will accept per run
Grading owner: engineering, security or businessEngineering suits functional and tool-behavior findings; security suits attack and exposure findings; a business owner suits policy and brand rulesEach owner adds review time for borderline results; unclear ownership is the most common cause of stalled reportsWho signs off on a finding, who handles disputed grades and where the agreed definition of a finding is recorded

How the target endpoint shapes the red team scope

The target is the exact endpoint promptfoo will call, so the scope has to match what users and attackers can actually reach. That means the production-like API, the system prompt that is deployed, the retrieval sources the application queries, any tools or actions the model can invoke, and any guardrail or filter sitting in front of the model. If you test the bare model and leave out the layer users talk to, the results describe a system nobody runs. Write down each component in the target inventory before the first scan, and record which of them a red team run will exercise and which it will not.

The harder question is whether to test a staging environment that carries production configuration. Staging is safer for probes that may trigger tool calls, write records or send messages, but it only tells you something if its system prompt, model version, retrieval index, permissions and guardrail settings match production. Ask the owning team to confirm those differences in writing, and treat any gap as a scope limit in the report. Test credentials should be separate from production credentials, and test accounts should hold only synthetic or masked data. Probes are designed to elicit sensitive output, so a successful attack against a real customer record is a data incident, not a finding.

promptfoo's introduction documentation describes local execution, with evals running on your machine and talking directly with the LLM. Confirm which network path your target sits on before the first run. Check whether the machine running promptfoo can reach the endpoint directly, whether traffic must pass a proxy, gateway or VPN, and whether the endpoint is reachable from outside the production network at all. Record the answer, because it decides where the CLI runs, which credentials it holds and which firewall rules it needs.

Which plugin families a first red team should start with

A first red team works best with a small set of plugin families matched to what the application can do. The cards below map each family to an OWASP LLM Top 10 2026 identifier and note whether it matters most for a tool-using agent or a plain chat assistant.

Prompt injection and jailbreak resistance

Covers LLM01 Prompt Injection, where user input or retrieved content overrides the instructions the application was given. For any application, this is the baseline family to start with. Check whether the purpose field names the rules the model must keep, such as refusal topics and scope limits, because grading depends on it. For a plain chat assistant this is usually the first family to run. For an agent, pair it with tool-related families so injected instructions are tested against actions, not only text.

OWASP LLM Top 10 2026

Sensitive information disclosure

Maps to LLM02 Sensitive Information Disclosure, which tests whether the application reveals personal data, credentials or confidential business records in its answers. Decide early which data categories exist in the application's context, such as customer records or internal documents, and confirm what the target is allowed to return. This family suits both chat assistants and agents that read data sources, and it is often the family a privacy or legal reviewer asks about first.

Excessive agency for tool use

Maps to LLM03 Excessive Agency, which covers cases where the model can take actions beyond what the task needs, such as sending messages, changing records or calling tools with broad permissions. This family applies to agents with tools and does not add much for a plain chat assistant without actions. Before the run, list each tool, its permissions and any action that needs human approval, so you can tell whether a finding is a true permission failure or an expected behavior.

System prompt and hidden context exposure

Maps to LLM08 Hidden Context Exposure, which tests whether the application reveals its system prompt, hidden instructions or internal configuration when asked. Hidden context is the part of the application most likely to be sensitive in a first review, so include it early. It is relevant to chat assistants and agents alike. Confirm which prompts, tool descriptions and internal settings exist and should stay hidden, since the grader needs that boundary written in the purpose.

Unsafe or harmful output

Covers output that is harmful, dangerous or inappropriate for your users, and the handling of model output by downstream systems that is connected to LLM10 Improper Output Handling. Agree with the business owner which content categories are unacceptable for the audience, such as medical or financial advice boundaries. This family applies to both chat assistants and agents whose output feeds other systems. Keep the category list short so reviewers can judge each finding quickly.

Domain plugins for regulated sectors

Domain plugins add tests for rules specific to an industry, such as financial, healthcare or insurance content boundaries. Add them only when the application operates in that sector and a named owner can state the rules being tested. Domain plugins are most useful for chat assistants that answer customers directly. For a first red team, use one domain set at most, and confirm the rule list with the compliance or product owner before generation so that grading reflects real obligations.

How to run the first scoping session and first scan

This sequence takes a team from an unscoped idea to a small first promptfoo red team scan, with a written purpose, a starting plugin set, a probe estimate and an agreed definition of a finding. Each step closes with a check so the team knows it can move on.

  1. Confirm the runtime and installed version

    Someone on the team checks the machine or runner that will drive the scan. promptfoo's npm release 0.124.1 requires Node.js 22.22.0 or newer, so run the Node version command and the promptfoo version command and compare both against those figures. If the version is older, upgrade before continuing. The step is done when both commands return versions that meet the requirement and the person who will run scans has confirmed the same versions on their machine. Note the promptfoo version in the scoping record so later results can be traced to it.

  2. Identify the target endpoint and its owner

    Name the application endpoint promptfoo will call, such as an HTTP, WebSocket or Python endpoint, and the team that owns it. Record the environment (staging or production-like), the authentication it expects, and who can change it or take it offline during testing. Ask the owner to confirm that test traffic is permitted and that rate limits or logging will not block the run. The step is done when a named owner has signed off on the endpoint, the environment and the test window in writing.

  3. Draft the purpose with users, data and tools

    Write the purpose as a short description of what the application is for. Cover who uses it, what data it can see or return, and which tools, APIs or actions it can invoke. Include what it must refuse, such as disclosing other customers' data or taking actions outside its role. Ask a product owner and a security reviewer to read the draft. The step is done when both reviewers agree the purpose describes the real application and its boundaries, and the text is saved in the configuration that the scan will use.

  4. Pick the starting plugins and strategies

    Choose a small starting set of plugins that match the risks in the purpose, such as prompt injection, sensitive information disclosure or a domain-specific policy. Pair them with a few basic strategies rather than the full catalog. Record which plugins need hosted generation or grading, since data handling sign-off may depend on it. The step is done when the plugin and strategy list is written down with one sentence of reasoning per item, and the security reviewer has accepted it.

  5. Estimate probes against the Community limit

    Calculate the expected probe count from the chosen plugins, the numTests value for each plugin and the strategy multipliers. If the team uses the Community edition, compare the total with its limit of 10k probes per month, which the promptfoo pricing page lists alongside all other Community features. Account for repeated runs during tuning. The step is done when the estimate, the monthly budget of probes and the plan for any extra scans are recorded, and someone has confirmed which edition the team is using.

  6. Agree the finding definition and severity owner

    Define in writing what counts as a finding, such as a response that discloses restricted data, follows an injected instruction or performs an unauthorized tool action. Set the severity scale the team will use and name one person who assigns severity and decides whether a result is a true finding. Agree who receives findings and how fast they are triaged. The step is done when the definition, the severity scale and the severity owner are recorded and every reviewer has acknowledged them.

  7. Run a small first scan

    Run a deliberately small scan with the agreed plugins, strategies and probe budget against the endpoint. Keep the run short, watch the target for errors, rate limiting or unexpected side effects, and save the output with the promptfoo version and configuration. The step is done when the scan completes without target outages, the results file is saved, and the operator has confirmed the probe count matches the estimate.

  8. Review borderline results before expanding

    Have the severity owner and one technical reviewer go through every failed probe and every result the grader marked uncertain. Check whether the grader's verdict matches the agreed finding definition and whether the purpose needs clearer boundaries. Record corrections and adjust the purpose or plugin set before widening coverage. The step is done when borderline results have a recorded decision, the reviewers agree on the next scan scope, and the team can explain each change to the definition or configuration.

Which strategies to add first, by application type

A single-turn chat assistant answers each message without carrying conversation state, so the first scan should focus on direct attack payloads and simple delivery wrappers. Start with the plugin categories that match your purpose, then add encoding-style strategies, which transform the same payload into formats such as Base64 or leetspeak. These are cheap to reason about and reveal whether the model or a filter in front of it reads obfuscated input differently from plain text.

  • Add first: the baseline strategy set with direct payloads, plus encodings, since they are single-request and easy to review.
  • Wait for a second scan: meta-agent attacks, which generate adaptive prompts and consume more probes and, depending on configuration, may need hosted inference.
  • Wait for a second scan: multi-turn strategies, because a single-turn target gives them little to build on unless the endpoint keeps history.
  • Confirm before adding: whether the endpoint is stateless, so each request carries the full context you expect the model to see.
  • Confirm before adding: whether a moderation or guardrail layer sits in front of the model, since encodings may be blocked before they reach it.

Before the second scan, check that the first results show which encodings were graded as successful attacks and why.

What counts as a finding and who decides

A finding is a probe that the target answered in a way the agreed policy forbids. That definition only works if the team writes it down before the first scan, because promptfoo's graders will label results against whatever purpose and policy text they are given, and nobody on the team should learn the rules from a report. Before the run, list the outputs that count as failures (for example, a reply that reveals another customer's record or a system prompt), the refusals that count as acceptable, and the middle ground. Partial disclosure is the hardest case: a reply that confirms a field exists but withholds its value needs an explicit score, otherwise the same response will be marked differently across plugins and strategies. Write those rules into the purpose field and grader guidance so the record of the decision travels with the scan.

Severity decides who must review a result. A jailbreak that produces mildly off-brand text can usually be reviewed by the application owner, but findings in data disclosure, or in which the target triggers an unauthorized tool action, should be routed to security owners and, where the application touches personal or regulated data, to the privacy or compliance lead. Agree this routing with named people before the run, along with who reviews borderline grader results and how quickly. Ask your security team which severity scale they already use, since promptfoo's risk scores are a separate input to that decision and are covered elsewhere on this page.

For governance, promptfoo's red teaming documentation cites the OWASP LLM Top 10 and the NIST AI Risk Management Framework as frameworks that support systematic testing before deployment, and it also references the EU AI Act. Map each agreed failure category to the relevant OWASP LLM entry, such as LLM01 Prompt Injection or LLM02 Sensitive Information Disclosure, so that findings can be read by people outside the test team. Confirm with your risk or compliance function which framework your own governance uses and whether it requires a specific mapping, because that choice determines how findings are labeled in the report.

Security and data handling to settle before the first run

A first promptfoo red team sends prompts to your target, generates attacks and grades responses, so each step has a data path. Agree these controls in writing before any scan, and confirm the data flow for your environment rather than assuming it.

Where the CLI runs and its network paths

Promptfoo evals run on the machine that starts them and talk directly with the model under test. Generation and grading can use promptfoo's hosted API or a model you configure, so the run host and its outbound paths need to be named. Ask which hosts the CLI reaches in your environment, and confirm them with your network team before the first run.

Promptfoo introduction

Test credentials for the target

The target receives credentials so that promptfoo can reach the application under test. Use a dedicated test account with the lowest role that still exercises the flows you want to test, and keep its keys out of the config file committed to source control. Rotate the test credentials after the engagement ends.

Keeping secrets out of the purpose

The purpose field shapes attack generation, so anything written there may be reflected in generated prompts and stored results. Describe roles, tools and data categories in general terms, such as "support agents can view order status", and leave out API keys, customer names, account numbers and internal hostnames.

Who can read results

Red team results include the attack prompts, target responses and grader reasoning, which can themselves contain sensitive text if a finding is real. Decide who may open the report, where exported files go and how long they stay. The Community edition has community support only, so access control for shared results needs a separate decision.

Protecting a self-hosted server's data

If you run the self-hosted server, its data sits in a local SQLite database. The documentation says this database cannot be shared across replicas, that the server has no RBAC or built-in authentication or SSO, and that it is not recommended for production. Confirm that the host disk is encrypted, access is restricted at the network layer, and the server is kept off shared networks.

Self-hosting docs

Logs and report storage

Logs, cached responses and exported reports are written to disk or to the server, and they may hold probe text and model output. Set a retention rule for each location, restrict file permissions on the run host, and check whether CI logs or artifacts store these files. Confirm the retention and deletion approach with your security team before the first run.

What buyers ask before planning a first promptfoo red team

How much effort does a first promptfoo red team scoping take?

The effort depends on how many targets are in scope and how much each one has to be understood before attack generation makes sense. A single chat endpoint with one owner and a short list of tools is a small exercise. Effort rises with each additional target type, each tool the application can call, each data source it reads and each team that owns part of the system. Scoping covers agreeing the target endpoint, writing the purpose, choosing a starting plugin set and strategies, estimating probe volume and defining what counts as a finding. Ask any partner to break the estimate down by these items so you can see which ones drive the number.

Can an internal engineer plan a first red team without outside help?

Yes, a capable internal engineer can plan a first red team, particularly for a single application with a clear owner. promptfoo's documentation covers the target configuration, purpose field, plugins and strategies, and the Community edition includes red teaming with 10k probes per month. The harder parts are usually not tooling. They are agreeing what the application is allowed to do, who decides whether a response is a real failure, and how the results will be reviewed. Many teams start internally and bring in a partner for the first complex target, for the review of grading decisions, or when several products need consistent scopes.

What does the red team need from our side before scoping starts?

Four things need to be in place before scoping starts. First, a named target owner who can describe what the application does, its users, the data it sees and the tools it can call. Second, test credentials with the access level real users would have, plus any test accounts needed for multi-user or role-based behavior. Third, a finding owner who will decide what counts as a failure and who receives the results. Fourth, network access to the endpoint from the machine that runs promptfoo, which may be a staging environment rather than production. Confirm these with your own security and platform teams, because access rules differ between organizations.

Which parts of a red team scoping are one-time and which recur?

Scoping is a one-time activity for each target: the purpose, plugin selection, strategy choices and finding criteria are written down and then reused. Recurring work comes from change. A new model version, a changed system prompt, a new tool or a modified guardrail means the attack suite should be run again, and the scope may need small updates. Teams that want to track results over time should expect repeated runs against the same fixed test set. Ask any partner to separate the one-time setup from any retainer or rescan work, so the recurring part is visible in the quote.

What does a first promptfoo red team cost?

promptfoo's Community edition is free according to its pricing page, and it includes all LLM evaluation features and red teaming with 10k probes per month, with community support. Other costs are separate and should be requested in writing. Services, such as scoping, configuration, testing and reporting, are priced according to the written scope. Hosted usage, where applicable, depends on the features and volume you choose. promptfoo Enterprise and On-Premise are sold at custom pricing and add team sharing, SSO, continuous monitoring and priority support with SLAs. Ask for a quote that lists each cost component, what it covers and what recurs, and check whether any cost depends on probe volume or model usage on your side.

How long does a first red team scoping take?

The duration depends on the scope, so no fixed number applies across applications. The main factors are the number of target endpoints, the complexity of tools and data sources, how quickly owners respond with answers and credentials, and how many grading decisions need review. A timeline should come from the written scope, which should list the targets, the deliverables and the dependencies on your side. If a provider cannot tie its timeline to named inputs and owners, ask for the assumptions behind it before accepting any date.

How DeployOpen scopes and delivers a promptfoo red team

DeployOpen plans and runs the first promptfoo red team as a fixed-scope engagement, starting with the target endpoint, the written purpose and the agreed definition of a finding. The work runs inside your infrastructure, and the written scope sets deliverables and timelines before any probes are sent.

How we scope

  • Confirm the target endpoint, its users, data sources and tools before any configuration begins.
  • Draft the purpose field with your product and security owners and agree which plugins and strategies apply.
  • Agree in writing what counts as a finding, the severity bands and the probe budget for the first scan.

How we build

  • Configure the promptfoo target, redteam settings and grading against your agreed scope in your environment.
  • Run a bounded first scan, review borderline results with your team and adjust grading guidance where needed.
  • Record every configuration decision so the same attack suite can be repeated after later changes.

How we hand over

  • Deliver a written report listing findings, evidence, severity and suggested fixes tied to the agreed scope.
  • Document the configuration files, data flows and the decisions behind plugin and strategy selection.
  • Walk your engineering and security teams through the setup so they can rerun the scan themselves.

How we support

  • Engagements are fixed-scope, and ongoing support, upgrades and continuous testing are available as a retainer.
  • Retesting after fixes is scoped in the same written agreement so the team can confirm each remediation.
  • Ask for the retainer terms and retest coverage in your quote so recurring effort is clear before work starts.

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.