PyRIT implementation plan and cost

A PyRIT build is priced by the targets you test, the attack and scoring logic you need, the storage you choose and the engineering time to turn one-off runs into reusable scenarios. This page shows how to scope each part and what to ask for in a quote.

On this page

How to scope a PyRIT implementation and what drives its cost

A security or AI team that needs repeatable red teaming of one or more generative AI systems will find that PyRIT itself costs nothing to license, since it is an MIT-licensed framework from Microsoft with no paid edition. The real spend comes from scoping the targets to test, building the attack and scoring scenarios, paying for model calls used by attacks and scorers, and the reviewer time needed to triage results. Scoping is therefore the step that determines most of the budget, and it should be done before anyone estimates a quote.

Teams commonly bring in a partner for a first setup, when they have many targets to cover, or when they lack in-house Python or AI security capacity to build reusable scenarios on their own. Teams with strong Python engineers and existing red team practice often build in-house, adding only a few targets at a time. The right choice depends on existing skills, not on the license, so the first task is an honest inventory of who would write the custom targets, converters and scorers, who would maintain them after each release, and who would review the findings. Ask any partner to show which of these roles they will fill and which remain with your staff.

Scope the work in writing around a short list of questions: which generative AI systems are in scope, whether each is reachable through a supported target type or needs a custom HTTP, WebSocket or Playwright-driven target, which harm categories and datasets matter for each system, and which attack strategies and scorers the findings must rely on. Each custom target and each custom scorer adds build and test effort, so a scope that lists them explicitly is easier to price and to verify. Confirm the Python version your environment will use, since the documentation recommends Python 3.13 and the package supports Python 3.10 up to but not including 3.15.

Ask for a quote that separates one-time work (environment setup, target and scorer development, scenario validation, documentation) from recurring work (model API usage, storage of results, retesting after upgrades, and reviewer hours). Model call volume depends on how many attack objectives run per target and how often scans repeat, so request the assumed run frequency and the model endpoints used for attacks and scoring. Also confirm who holds the model API accounts and who pays for their usage, because that cost is often invoiced outside the services fee.

What a PyRIT implementation plan covers

A PyRIT setup is six pieces of work that run in parallel and share one set of decisions about what is tested and how results are judged. The install baseline is the microsoft/PyRIT project on Python 3.13, the version the documentation recommends. Migration from the archived Azure/PyRIT repository and ongoing upgrades are separate engagements and are scoped on their own.

Target inventory and access

Each system to be tested is listed with its type, owner, authentication method and the data it may touch. PyRIT supports OpenAI, Azure, Anthropic, Google and Hugging Face models, custom HTTP or WebSocket endpoints, and web apps driven through Playwright, and each type needs a different connector. Clients receive a target register, working connections in the PyRIT configuration, and written test-account permissions. Confirm which endpoints are production systems before any attack runs.

PyRIT docs

Attack strategy selection

The team chooses which attack families apply to each target, such as single-turn prompt converters or multi-turn strategies including Crescendo, TAP and Skeleton Key. Multi-turn attacks cost more model calls per objective, so the selection drives both coverage and spend. Clients receive a strategy matrix mapping each target to its attacks, objectives and expected call volume. Ask for the reasoning behind each exclusion so reviewers can see what was not tested and why.

Scorer design

Scorers decide whether a response is harmful, leaked or off-policy. PyRIT can use LLM-based scorers, Azure AI Content Safety or custom logic, and each has different false positive and false negative patterns. Clients receive a scorer configuration per harm category, a labeled sample set used to check scorer agreement, and a rule for when a human reviews a result. Plan this before the first full run, because changing scorers later makes results hard to compare.

Memory and storage setup

PyRIT memory records conversations and results in SQLite or Azure SQL. The choice sets who can read stored prompts and harmful outputs, how long they persist and how many people can work on one database. Clients receive a configured memory backend, a retention decision agreed with their security team, and a documented location for the credentials file at ~/.pyrit/.env. Store the results with the same access controls as other sensitive test evidence.

Reusable scenario and dataset build

Scenarios bundle a target, attack strategy, scorer and objective dataset so a run can be repeated after a model or prompt change. PyRIT datasets cover content harms, psychosocial risks and data leakage, and custom objectives are usually needed for the client's own policies. Clients receive versioned scenario definitions, custom objective datasets, and a baseline run that shows the scenarios behave as designed. Effort rises with the number of custom objectives and targets.

Handover and run instructions

The final stage passes the setup to the team that will run it. PyRIT can run as a scanner through the pyrit_scan command, through CoPyRIT for human-led testing, or as a Python framework for custom attacks, and the team needs to know which mode fits each task. Clients receive run instructions, a short operator guide, a findings template and a walkthrough with the people who will run the scenarios. Confirm who owns scenario updates after handover.

How PyRIT components connect to the system under test

The run starts with an operator or a scheduled scan calling PyRIT attack logic, which passes prompts through converters to the target. The target sits on the far side of the trust boundary, so every request leaves the PyRIT host for the model API, HTTP or WebSocket endpoint, or Playwright-driven web app. Responses return to scorers, which judge them with an LLM, Azure AI Content Safety, or custom logic, and all conversations and results are written to memory. Check where .env credentials are read on the host and what memory stores before reviewing findings.

Data flow from attack logic through the target and back to memory and review.

What makes a PyRIT build longer and more expensive

This table compares the factors that expand a PyRIT red teaming build and explains why each one changes the work. Read each row as a lever: the right column shows how to keep that driver contained before the scope is agreed. The main takeaway is that the number of targets and the depth of multi-turn testing usually matter more than the framework itself.

DriverWhy it changes the workHow to keep it down
Number and type of targetsEach model, custom HTTP or WebSocket endpoint, or web app driven through Playwright needs its own connection, credentials and response handling.Start with the targets that carry the most risk and add others in later phases with written scope.
Single-turn versus multi-turn attacksMulti-turn strategies such as Crescendo, TAP and Skeleton Key need conversation state, more model calls and careful review of each branch.Begin with single-turn coverage and add multi-turn strategies only for targets where conversation context matters.
Scorer type and custom logicLLM-based scorers, Azure AI Content Safety and custom logic each need calibration against known good and bad outputs.Use the built-in scorers first and write custom logic only where the business rule cannot be expressed otherwise.
Dataset coverageContent harms, psychosocial risks and data leakage each use different prompts, expected outcomes and reviewers.Agree the harm categories in writing and map each one to a named owner before building attack sets.
Storage choiceSQLite suits a single operator, while Azure SQL adds provisioning, access control and backup responsibilities.Pick the storage option against how many people must share results, and confirm the retention rules first.
Number of environmentsSeparate test, staging and production-like targets each need their own configuration, secrets and validation runs.Keep one reusable configuration with environment-specific settings and limit the number of environments in scope.
Web app targets via PlaywrightBrowser-driven targets depend on page structure, login flows and session handling, which change with each release of the tested app.Limit browser targets to the flows that matter and confirm test accounts and stable selectors before work starts.
Reporting and compliance evidenceAssessors and internal reviewers may ask for traceable prompts, scores, reviewer decisions and retest records.Define the evidence fields and report format in the scope so that memory design and reviews are built for them.

Which targets to test first and how each one changes the build

Start with a short target inventory before anyone writes an attack. For each system a red team might test, record its owner, what it is (a managed model API, a custom HTTP or WebSocket endpoint, or a chat interface reached through a browser), how the test host will authenticate, and who can approve testing against it. Then choose the first two or three targets from that list. PyRIT supports OpenAI, Azure, Anthropic, Google and Hugging Face models, custom HTTP or WebSocket endpoints, and web app targets driven through Playwright, so the inventory decides which of these integration paths you need to build and maintain.

A managed model API is usually the simplest target. The PyRIT target for that provider handles request format, and the main setup work is credentials, model selection and confirming that the provider's terms allow the testing you plan. A custom endpoint or a Playwright-driven chat interface costs more. You will need adapter code to map PyRIT's requests onto the application's interface, authentication handling for session tokens or single sign-on flows, and response parsing that extracts the model's text from the page or payload. Test each adapter on benign prompts and confirm that the parsed output matches what a human sees before any attack or scorer runs. Otherwise a broken parser can look like a model that is safe.

Expect the adapter work to recur. Web interfaces change layout, endpoints change schema, and tokens expire, so each custom target needs its own regression check whenever the application or PyRIT changes. Ask whether the application owner will provide a test account, a non-production environment and a contact for when the target misbehaves under load. Those answers decide how many targets you can support in the first phase and whether the cost sits with your team or a partner.

How attack strategies and scorers change the scenario build

Single-turn attacks send one prompt to the target and record one response. Converters transform the prompt before it is sent, for example by changing encoding, language or phrasing, so the same seed content can be tested in several forms. The build work is mostly dataset preparation and converter selection, and it is the lowest-effort path to a first working scenario. Its main cost is the number of prompts and converter combinations, because each one is a separate model call against the target.

  • Seed datasets: Decide which of the datasets bundled with PyRIT (content harms, psychosocial risks, data leakage) fit your use case, and which prompts you must write yourself.
  • Converter chain: Each converter adds a transformation step. Document which ones are applied and in what order so results can be reproduced.
  • Request volume: Multiply seed prompts by converters and repetitions to estimate target calls before you run anything.
  • Custom targets: An HTTP or WebSocket target needs its own request mapping and error handling, which is often the largest build item in this tab.
  • Repeatability: Pin the converter configuration in version control so a rerun after an upgrade compares like with like.

Before trusting results, confirm that converters preserve the intent of the prompt and that the target receives what you think it receives. Check a sample of transformed prompts by hand.

PyRIT implementation phases and what each one produces

This sequence moves a PyRIT red teaming setup from an agreed list of targets to a tested environment, validated scenarios, a shared results workflow and a handover the client's own team can run. Each phase closes with a named artifact so the client can check progress before the next phase starts.

  1. Scope targets and build the inventory

    Start by listing every AI system in scope: model endpoints, custom HTTP or WebSocket APIs, and web applications that PyRIT would drive through Playwright. For each target, record the owner, the access method, the data it handles, and which harm categories matter, such as content harms, psychosocial risks or data leakage. DeployOpen works through this with the client's product and security owners. The output is a signed-off target list with the test objectives and rules of engagement for each target. The step is done when every owner has approved their entry in writing.

  2. Install PyRIT on a pinned Python version

    Set up a dedicated test host or virtual environment using a pinned Python version within the range the PyPI package supports, with the documentation's recommended version used as the default unless the client's standards require otherwise. Install the package from PyPI at a pinned version, and record the lockfile and the release used. The client receives a reproducible environment build record and a short note on which PyRIT release line is in use. Confirm the current release and any compatibility notes against the official release notes before pinning.

  3. Configure credentials and settings securely

    Create the credential file and configuration file that PyRIT reads from the user's home directory, keeping secrets out of source control and scoping each key to the minimum access a target needs. Define which model endpoints the attacker and scorer roles use, and set rate and spend limits with the provider where the platform allows. The output is a configuration baseline and a credential inventory that names each key, its owner and its rotation process. The step closes when a connectivity check passes for every target on the approved list.

  4. Build and validate scenarios and scorers

    Translate the approved objectives into reusable scenarios that combine targets, converters, attack strategies such as Crescendo, TAP or Skeleton Key where they fit, and scorers based on LLM judgment, Azure AI Content Safety or custom logic. Before any result is trusted, run each scorer against a labeled set of known safe and unsafe responses and record how often it agrees with the labels. The outputs are a versioned scenario repository and a scorer validation record that shows the agreement results and the decisions made on any disagreement.

  5. Set up memory and the results workflow

    Choose SQLite for a single operator or Azure SQL where several people need shared results, then define who can read, export and delete stored prompts and harmful outputs. Decide whether the team will run the pyrit_scan command, the CoPyRIT GUI for human-led sessions, or the Python framework for custom attacks, and document the triage path from a flagged result to a reviewed finding. The output is a results workflow document, an access list for the memory store and a retention rule agreed with the client. Confirm the storage and retention requirements with the client's data protection team before live testing starts.

  6. Hand over with a runbook and a test cycle

    Run one full test cycle with the client's team observing and doing the triage, so they can repeat it without DeployOpen. Then deliver a runbook covering the environment build, credential rotation, how to validate custom targets, converters and scorers after each PyRIT release, and how to report a vulnerability in PyRIT itself through the Microsoft Security Response Center under the project's security policy. The client receives the runbook, the versioned repository, a completed test cycle report and a list of open items with owners. The step is complete when the client's named operator has run the cycle with no DeployOpen staff on the call.

Which PyRIT build work teams keep in-house and which they outsource

This table compares each PyRIT build activity against what teams usually keep internal and what they commonly hand to a partner, plus the skills each one needs. Read it as a starting point for scoping, not a fixed split. The system owners who accept residual risk usually stay in-house, while the engineering and validation work can move either way depending on Python and AI security skills on the team.

Work areaUsually kept in-houseUsually outsourcedSkill required
Target ownershipNaming the systems under test, owners, access paths and who approves testing windowsMapping target endpoints and documenting how each one is reachedProduct and system ownership, plus change management
Threat model and harm categoriesDeciding which harms matter for the business, such as content harms, psychosocial risk or data leakageDrafting a threat model from the organization's inputs and proposing harm categories to reviewAI risk assessment and familiarity with PyRIT dataset categories
Attack and scorer engineeringApproving which attack strategies and scorers run against production-facing systemsWriting custom converters, multi-turn attacks and scorers for Crescendo, TAP or Skeleton Key style runsPython, LLM API integration and adversarial prompt design
Environment setupProviding hosts, network access, API keys and secret storage policyInstalling PyRIT, pinning versions and configuring the .env and .pyrit_conf settingsPython packaging, Linux administration and secrets handling
Scenario reuse and test librariesOwning the regression suite and deciding what counts as a passBuilding parameterized scenarios and shared test libraries that run on each releasePython test design and maintainability practices
Findings triage and severity decisionsMaking severity and risk acceptance calls, and deciding remediation priorityReproducing findings, clustering results and writing evidence notes for reviewSecurity judgment, plus familiarity with scorer output and false positives
Handover trainingAssigning operators and reviewers who will run the suite after handoverDelivering runbooks and training sessions for operators and reviewersTechnical writing, teaching and PyRIT operations experience

What goes wrong in PyRIT red teaming builds and how to prevent it

Most PyRIT red teaming problems are not caused by the framework itself. They come from unchecked scoring, shifting targets, loose credentials, setups that only one person can run, unclear finding owners and testing without authority. Each card below names one risk and the check that prevents it.

Unvalidated scorers mislead results

PyRIT scorers judge responses with an LLM, Azure AI Content Safety or custom logic. A scorer that has not been checked against labeled examples can mark harmful output as safe or flag harmless text, so the report looks clean or alarming for the wrong reasons. Before a scorer is trusted, run it against a set of responses that a human has already labeled, record its agreement rate, and repeat that check whenever the scorer model or its prompt changes. Budget reviewer time for this in the plan, because it is the main ongoing human cost in scoring.

PyRIT docs

Targets change between runs

If the model behind a target is updated, a system prompt is edited or a filter is switched on, results from last month cannot be compared with results from today. Record the target name, model version, endpoint, system prompt and any content filter settings in the run metadata for every test. Pin model versions where the provider allows it, and when a version must change, rerun a fixed baseline set of attacks so the team can separate a real change in risk from a change in the test setup.

Credentials stored in the wrong place

PyRIT reads credentials from ~/.pyrit/.env, which is easy to copy into a repository, a shared drive or a chat thread. Keep the file out of version control, restrict its file permissions to the account that runs tests, and use a secrets manager or short-lived tokens for shared runners. Confirm which keys the team's scripts read and rotate any key that has appeared in logs, notebooks or screenshots of a run.

Scenarios work on one machine only

A red teaming setup often starts as a notebook on one developer laptop with local Python packages, a local SQLite file and personal settings in ~/.pyrit/.pyrit_conf. When that person leaves or changes machines, nobody can rerun the suite. Pin the Python version (the documentation recommends Python 3.13), lock dependencies, keep settings in a versioned project file rather than only in the home directory, and run the full scenario from a clean environment before handover.

Unclear ownership of findings

Attack results contain harmful prompts and outputs, and someone must decide whether each one is a real weakness, a scorer error or an accepted risk. Without a named owner, findings sit in memory storage and are never fixed or retested. Assign an owner for triage, one for the fix and one for retest sign-off, define severity levels in advance, and record each decision in a tracker that links back to the stored conversation.

Testing without written authorization

PyRIT can send large volumes of adversarial requests to a web app, a custom HTTP endpoint or a third-party model API. Testing a system that the team does not own or has not been approved to test can breach provider terms, trigger incident response and create legal exposure. Before the first run, get written authorization that names the targets, test window, permitted attack types and contacts, and confirm that any hosted model provider allows this kind of testing. Keep the authorization with the run record.

Questions buyers ask about PyRIT implementation cost and effort

What does a PyRIT implementation cost?

The cost is mostly engineering and review time, plus model API spend that runs during testing. DeployOpen does not publish a price list, so the cost follows from a written scope that lists the targets to test, the attack strategies and scorers to build, the storage choice and the reporting you need. Ask any partner, including DeployOpen, to split the quote into one-time build work, recurring run costs and the items you supply yourself, so you can compare options on equal terms.

Is PyRIT itself paid software?

No. PyRIT is an open source framework from Microsoft released under the MIT license, and it installs with pip from PyPI. You do not buy a license or a paid edition to run it. Your costs come from the infrastructure and model calls that attacks and scoring consume, the engineers who build reusable scenarios, the storage holding results, and the people who review findings. Confirm the license text in the repository before you rely on it in a contract or internal policy.

How long does a PyRIT build take?

Duration depends on how many targets you need to test, how different their interfaces are, and how many custom attacks, converters and scorers you want. A single chat endpoint with a standard scorer is a much smaller job than a set of custom HTTP or WebSocket targets, a web app driven through Playwright, and a team workflow in CoPyRIT. Ask for the duration of each work package in the written quote, along with the milestones at which you review and accept the results, rather than a single overall figure.

What do we need to provide before the work starts?

You need to provide access to the systems under test, a sandbox or staging copy where possible, test accounts with defined roles, and a named owner who can approve test scope and harmful-content handling. Your team should also supply a Python environment that meets the supported range, which is Python 3.10 up to but not including 3.15, with Python 3.13 recommended by the documentation. Agree in advance where credentials will live, since PyRIT reads them from ~/.pyrit/.env, and who may view stored prompts and outputs.

Can our own team implement PyRIT without a partner?

Yes, many teams can, because PyRIT is open source and installs with pip. The work that tends to take the most effort is not the installation but designing repeatable scenarios: defining targets, writing custom converters and scorers, validating them against known good and bad responses, and documenting results so they can be rerun. Assess whether your team has Python engineering skills, security testing experience and time to maintain the code after each release. A partner is useful when you need the build finished on a fixed schedule or when you want an independent view of the setup.

How do we estimate model API costs for attacks and scoring?

Model API spend scales with the number of attack objectives, the number of conversation turns in multi-turn strategies such as Crescendo, TAP and Skeleton Key, the number of responses each scorer evaluates, and how often you rerun the suite. For a rough planning model, multiply the expected calls per objective by the number of objectives and by the price per call from your provider's current rate card. Illustrative example: a suite with 50 objectives, 10 turns each, and one LLM scorer call per turn produces about 550 model calls per run. Request the assumptions in the quote and confirm the provider rates yourself.

What happens after handover, and what recurs?

After handover the recurring work is keeping PyRIT current, validating custom targets, converters and scorers after each release, paying model API bills, and reviewing new findings. The latest release in the supplied facts is v1.1.0, released on 4 September 2026, and upgrades can change behavior that your custom code depends on, so plan a retest after each upgrade. Ask in the quote whether support is a fixed retainer, a per-incident arrangement, or left to your team, and who owns the code, the stored results and the runbooks at the end of the engagement.

What your team must provide before a PyRIT build starts

Before any PyRIT build starts, your team should decide where PyRIT will run and who may access its results, because those two answers shape every credential you issue. Run it on a dedicated test host inside your network, and limit access to the stored prompts and harmful outputs to named reviewers. Only then should you issue API keys, endpoints or test accounts. Expect to provide test environments that are safe to attack: a staging deployment or sandboxed tenant with no production data, no live payment or customer actions, and tool permissions that match what you are willing to see exercised. Confirm with each system owner whether rate limits and provider usage policies allow automated adversarial traffic.

Each tested system also needs written authorization and scope signed by its system owner, and a named owner for each target who can answer questions during testing and approve any change in scope. The owner should state which endpoints, models and multi-turn flows are in bounds, and which are excluded. Your team must also decide which harm categories matter for each target and what level of residual risk is acceptable, since PyRIT's datasets cover content harms, psychosocial risks and data leakage, and the scorer thresholds you choose determine what gets flagged. Record these decisions, because they become the baseline for judging later results.

Finally, agree storage and retention rules for prompts and harmful outputs before the first run, since PyRIT memory will hold full conversations in SQLite or Azure SQL. Define where that database lives, how long it is kept, who can export it, and how it is deleted at the end of the engagement. Name a reviewer who will triage findings, reproduce them and decide what goes to the system owner. Without that person, scorer output piles up unreviewed, and the cost of the engagement grows with no decision at the end of it. Confirm reviewer capacity with your own team before you commit to a volume of runs.

How DeployOpen scopes, builds and hands over PyRIT red teaming setups

DeployOpen plans, builds and documents PyRIT red teaming setups inside the client's own infrastructure, starting from a written scope that names the targets, attack strategies, scorers and storage to be used. The work follows a fixed sequence so that the client's team can review each decision, run the scenarios without us, and keep the setup current after handover.

How we scope

  • Inventory the AI targets to test, including hosted model APIs, custom HTTP or WebSocket endpoints and web apps driven through Playwright.
  • Agree which attack strategies, such as Crescendo, TAP or Skeleton Key, and which scorers apply to each target and harm category.
  • Confirm the model API budget, storage choice between SQLite and Azure SQL, and who reviews findings, then set these out in the written scope.

How we build

  • Install PyRIT on a supported Python version, confirming the release line and Python version with the current documentation before work starts.
  • Configure credentials through ~/.pyrit/.env and settings through ~/.pyrit/.pyrit_conf, keeping secrets out of shared repositories and test scripts.
  • Build reusable scenarios as Python attacks on targets, converters, scorers and memory, then test each scenario against known-safe responses before it runs on a live system.

How we hand over

  • Deliver the scenario code, configuration templates and a runbook covering how to run the pyrit_scan command, CoPyRIT or custom Python attacks.
  • Document each target, scorer and dataset used, with the reasons for each choice, so the client's team can audit the setup during review.
  • Walk the client's red team through a live run and record open items, owners and the procedure for handling harmful outputs.

How we support

  • Offer ongoing support and upgrades as a retainer, covering validation of custom targets, converters and scorers after each PyRIT release.
  • Retest custom attacks after dependency or framework changes, including moves from the archived Azure/PyRIT repository to microsoft/PyRIT.
  • Route vulnerabilities found in PyRIT itself through the project's private reporting process with the Microsoft Security Response Center.

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.