How to choose a PyRIT deployment model for your team
For a security team that must run AI red team scans on a schedule and hand the results to auditors, the deployment model turns on three decisions: who operates the host, where PyRIT's credentials and memory live, and how upgrades are tested before they reach the scanner. Those decisions shape the audit trail, because PyRIT records conversations and scores in SQLite or Azure SQL memory and reads credentials from ~/.pyrit/.env. A single VM or container suits a small team running scheduled or manual scans, where one named operator owns the host, the secrets file and the upgrade test. Kubernetes suits a platform team that already operates clusters and needs scheduled jobs and managed secrets. Virtual machines suit teams that want a fixed, patchable host under the server management they already run.
Each option moves a different cost onto your team. A single VM or container keeps operating effort low, but it is a single point of failure, so a missed scan or a failed host is visible only if someone checks. Kubernetes gives you scheduling and secret injection that your platform team already knows how to audit, but it adds cluster-level controls to review, and PyRIT still needs network paths to the model endpoints you test. Virtual machines fit when your server team already patches, backs up and encrypts hosts on a fixed schedule, which makes a stable host configuration easier to show an auditor. In every case, check where the memory database is written, restrict who can read the .env file, and test each PyRIT upgrade against a copy of a known scan before the scheduled job uses it.
Confirm the packaging before you choose a model on paper. The documented install path is pip: the PyPI package supports Python 3.10 up to but not including 3.15, and the PyRIT documentation recommends Python 3.13. This page does not assume that an official container image or Helm chart exists, so confirm packaging with the project documentation before you write a Dockerfile, a Helm chart or a VM build script. If you build a container or chart yourself, your team owns the image, its base layer updates and a rebuild each time PyRIT ships a release such as v1.1.0, published on 4 September 2026. Ask whether the scheduled job can read credentials from your secrets manager or only from a file, and whether scan results can be exported to the archive your auditors use.
PyRIT deployment options side by side
This table compares how PyRIT's install path, memory file, credentials, upgrades, backups, scheduled scans and operating skills change across Docker, Kubernetes and virtual machines. Read each row as the work your team owns on that option, and confirm packaging details with the project documentation before you commit. The main takeaway: virtual machines are the simplest path for a single team, while Kubernetes adds the most operating effort and pays off mainly when you already run a cluster.
| Factor | Docker | Kubernetes | VMs |
|---|---|---|---|
| Install path | Confirm with the project documentation whether an official image exists. Otherwise, build your own image around the pip package. | Confirm with the project documentation for a supported image or chart. Otherwise, your team packages the pip install. | Install with pip into a Python virtual environment. Python 3.10 through 3.14 is supported, and the documentation recommends 3.13. |
| SQLite memory file location | Stored in the container filesystem unless you mount a volume. Confirm the default path in the documentation. | Needs a persistent volume claim. SQLite is file-based, so do not share one file across replicas without a tested design. | A file on host disk under the operator's account. Confirm the default location in the documentation. |
| Credentials in ~/.pyrit/.env | Mount the .env file read-only into the container's home path, or pass values at run time. Keep keys out of the image. | Store keys in a Kubernetes Secret and project them to the expected .env path. Avoid baking keys into images. | A plain file under the operator's home directory. Restrict file permissions and rely on OS account controls. |
| Upgrade control | You pin an image tag and rebuild for each release. You control timing but own the rebuild work. | Versioned manifests or charts give rollout and rollback controls. Rehearse memory file changes on a copy first. | Pin the pip version per environment. Snapshot the host before each in-place upgrade, since v1.1.0 was released September 4, 2026. |
| High availability | Single host by default. Restart policies help, but there is no built-in failover for the memory file. | Replicas and rescheduling are possible, but the file-based memory store limits shared state. Confirm the design with the documentation. | Failover needs a second host and a current copy of the memory file. Plan recovery steps yourself. |
| Backup | Back up the mounted volume and the .env file separately. Container images are not backups of run data. | Snapshot the persistent volume and export Secrets through cluster tooling. Test restores on a schedule. | Standard file or disk backups of the memory file and ~/.pyrit directory. Simplest to script and verify. |
| Scheduled scans | Use the host scheduler to start a container that runs pyrit_scan. Each run is one invocation. | A CronJob resource runs pyrit_scan on a schedule. Confirm concurrency and retry settings for your scans. | Cron or systemd timers call pyrit_scan directly. Confirm scan options with the documentation. |
| Operating skills | Container builds, volume and secret handling, and Python dependency pinning. | Cluster operations, manifests or Helm, storage classes and secrets management. The broadest skill set. | Linux administration and Python environment management. The lowest platform overhead. |
| Main cost drivers | Engineer time to build and maintain images, plus host capacity for scans. Model API usage is billed by the provider. | Cluster platform effort, persistent storage and team time to run the cluster. Model API usage is billed by the provider. | Host capacity, patching effort and manual upgrade time. Model API usage is billed by the provider. |
What PyRIT runs as on each host type
PyRIT is one Python package, but the host decides where its memory, secrets and network paths live. The six cards show what each piece is and what changes under Docker, Kubernetes and virtual machines, so you can check the same items on every host type before you choose one.
The Python package
PyRIT installs from PyPI with pip and supports Python 3.10 up to but not including 3.15. The documentation recommends Python 3.13, so pin that version in the image or VM build you use. If you build your own container image, the interpreter and package are fixed inside it, and an upgrade means building and rolling out a new image. On Kubernetes, the same image applies to every pod, so drift is limited to the image tag. On a VM, your team installs and upgrades the package in place, so you must check each host separately. Record the PyRIT version on every host before each test window.
PyPI package pageMemory store choice
PyRIT's memory layer records conversations, scores and results in SQLite or Azure SQL. A SQLite database is a file, so its location decides what survives a restart. On a VM, it sits on host disk, and your normal host backup covers it. On Docker or Kubernetes, check that the file path sits on storage that outlives the container, or the run history disappears with it. Azure SQL moves that state into a managed database, which adds a network dependency and a second system to secure. Confirm with the vendor how multiple hosts can safely share one store before you point them at the same database.
Credentials and settings files
PyRIT reads credentials from ~/.pyrit/.env and settings from ~/.pyrit/.pyrit_conf. These files are only as protected as the home directory of the user that runs PyRIT. On a VM, that is a service account you must lock down, audit and rotate keys for. In a container, the files are either baked into the image, which risks leaking keys, or mounted at runtime from a secret store. On Kubernetes, a mounted secret is a common option, but confirm the mount path matches ~/.pyrit for the process user. Keep keys out of images and shell history on every host type.
Outbound path to model endpoints
PyRIT targets include OpenAI, Azure, Anthropic, Google and Hugging Face models, plus custom HTTP or WebSocket endpoints. Scorers can call LLMs, Azure AI Content Safety, or custom logic, so a single run can reach several external services. Every host needs an egress path to each one. On Docker and VMs, that path runs through the host firewall or a proxy you control. On Kubernetes, network policy and any egress gateway can block calls from pods by default. Test each endpoint from the actual host type you plan to use, since access from a laptop does not prove the cluster can reach the same services.
Three entry points
PyRIT runs as pyrit_scan for batch scans, as CoPyRIT, a web GUI for human-led red teaming and team collaboration, or as Python code for custom attacks. Each entry point changes the host shape. Batch scans suit a scheduled job on any of the three host types. CoPyRIT is a shared service that needs inbound access, login control and a stable address, so it belongs behind a load balancer or ingress you own. Python code runs wherever engineers run scripts, which is the hardest place to control. Choose the entry point first, then size and secure the host for it.
Playwright path to web apps
PyRIT can drive web app targets through Playwright, which opens a browser session against your application. That browser needs its system dependencies, outbound access to the app under test and any test accounts the app requires. In a container, the image must include the browser dependencies that your Playwright version needs, so confirm it runs headless before you rely on it. On Kubernetes, the pod must reach the app's internal address, not only its public one. On a VM, the browser runs on the host itself, so its patching and disk use become part of your operating effort.
Why the memory store decides backup and high availability
The memory store decides your backup, restore and high availability design before you choose Docker, Kubernetes or VMs. PyRIT records conversations, scores and results in SQLite or Azure SQL, so that choice determines whether more than one host can write to the same results and who owns recovery when something fails. Pick the store first, then the platform, because the platform mostly changes where the store lives and how it is mounted. With SQLite, the store is a single file on one host's disk. On Docker it sits on a host volume, on a VM it sits on the VM's disk, and on Kubernetes it sits on a persistent volume whose access mode and storage class you must confirm before you rely on it. Plan file-level backups taken while no run is writing, and agree a locking discipline so two processes never write to the same file.
Azure SQL moves much of the backup and availability work to the Azure service, but it does not remove that work. Your team still owns the database configuration, the firewall or private network path from each PyRIT host, and the credentials that PyRIT reads from ~/.pyrit/.env, which must be protected like any other secret. Confirm in the PyRIT documentation which connection settings the Azure SQL option expects and where they are stored. Check with your Azure administrators which backup retention and restore options apply to the service tier you plan to use. Azure SQL also adds a recurring service charge and an access model that you must map to your own identity controls before the first run. Ask for both the service charge and any network or retention add-ons in writing.
Confirm with the PyRIT documentation and your own tests how concurrent CoPyRIT users share a store. Find out whether two people can work against one database at once, whether runs started from separate hosts write to the same results, and how results are attributed to a user. Do not assume a documented clustering feature for PyRIT. For this stack, high availability mostly means restarting interrupted runs and restoring the store quickly. Test a restore onto a fresh host for each option, time it, and check that the restored store still shows the scores and conversations a reviewer will need. Write the restore steps into the runbook and test them before the first assessment.
Which PyRIT deployment path to test first
The path starts with who runs PyRIT. A single analyst is routed by whether results must survive loss of the host: if they need not, SQLite on one host may fit, and if they must, state moves to Azure SQL. A shared team GUI goes straight to an Azure SQL pilot, because shared state should not depend on one machine. A scheduled CI or batch job is routed by whether the team already operates Kubernetes, which leads to a Kubernetes job or CronJob, and otherwise to a virtual machine. Branches marked as needing confirmation should be checked against the PyRIT documentation, including how CoPyRIT stores its state, before you commit to a path.
Decision path from who runs PyRIT to a deployment target.
How upgrades, backups and monitoring differ for PyRIT hosts
This table compares what your team must do to upgrade, back up, monitor, rotate keys for and patch a PyRIT host on Docker, Kubernetes or VMs, and who does each task. Read each row as a handover list and check the owner named in each cell against your own team structure. The main takeaway is that Docker and Kubernetes move much of the host work into image builds and cluster processes, while VMs leave every step with your own operators.
| Area | Docker | Kubernetes | VMs |
|---|---|---|---|
| Upgrades: pin the PyPI version | Pin the PyPI version in the image build file and rebuild the image for each upgrade. Platform team owns the build. | Pin the PyPI version in the image tag, then roll the new tag through the deployment process. Platform engineering owns the manifest and rollout. | Pin the PyPI version in the virtual environment and upgrade after taking a snapshot. Ops team runs the change. |
| Upgrades: test against release notes | Test against the v1.0.0 and v1.1.0 release notes in a staging container. Security engineers run the scans. | Test in a non-production namespace before promotion, checking the v1.0.0 and v1.1.0 release notes. Security engineers test; platform team promotes. | Stage the upgrade on a VM clone and check the v1.0.0 and v1.1.0 release notes. Security engineers test; ops team applies. |
| Repository move to microsoft/PyRIT | Point build scripts and any git clone steps at microsoft/PyRIT, since Azure/PyRIT is archived and read-only. Platform team owns the change. | Update image sources and any Git references in manifests and pipelines to microsoft/PyRIT. Platform engineering owns the change across clusters. | Repoint install scripts and any Git checkouts on each VM to microsoft/PyRIT. Ops team owns the change on every host. |
| Backups of memory store and config | Back up the SQLite or Azure SQL memory store and config files from a mounted volume. Platform team owns the job. | Back up the memory store from its persistent volume or Azure SQL, plus the ConfigMap and Secret sources for PyRIT settings files. Platform team owns the job. | Back up the service user's .pyrit folder and the SQLite file or Azure SQL data. Ops team owns the job. |
| Monitoring scan runs and failed targets | Collect container logs and scan output for each run, and alert on failed target calls. Platform sets up collection; security reviews failures. | Ship pod logs and run results to your cluster logging stack, and alert on failed target calls. Platform engineering owns the pipeline; security reviews alerts. | Forward run output and system logs from each VM to your monitoring, and alert on failed target calls. Ops team owns the alerts; security reviews failures. |
| Model API key rotation | Inject keys at run time, never in the image, and restart containers after rotation. Platform team rotates; security approves. | Rotate keys in Kubernetes Secrets or your external secrets manager, then roll the deployment. Platform team rotates; security approves. | Update the .pyrit/.env file on each host with the new key, then restart runs. Ops team rotates; security approves and checks old keys are revoked. |
| Patching host and Python runtime | Rebuild images to pick up base image and Python fixes, keeping Python 3.13 as the PyRIT documentation recommends. Platform team owns it. | Patch node OS through the cluster upgrade cycle and rebuild images for Python fixes. Platform engineering owns node and image patching. | Patch the OS and Python interpreter on each VM, then re-run the PyRIT install check. Ops team owns host patching; security signs off. |
| Skills each option needs | Docker image builds, container networking and volume management, plus Python packaging. Usually a platform or DevOps engineer with a security engineer. | Cluster operations, manifests, Secrets, persistent volumes and rollout tooling, plus Python packaging. Usually a platform engineer with cluster access. | Linux administration, patching, scheduled backups and Python virtual environments. Usually an ops or systems administrator who can run the host alone. |
How to pilot PyRIT on one host before choosing an orchestrator
This sequence runs PyRIT as a single process on one host so you learn its install, secret handling, memory store and upgrade behavior before adding a scheduler. It produces a tested backup, an upgrade record and a written orchestrator decision based on what the pilot showed. Steps 1 through 5 suit a small in-house team, while the secret design and the final decision benefit from a platform or security engineer.
Confirm the Python version and pin the package
Check that the host runs a Python version the PyPI package supports, which is 3.10 up to but not including 3.15. The PyRIT documentation recommends Python 3.13, so start there unless your standards say otherwise. Create a virtual environment, install the pyrit package from PyPI, and pin the exact version, for example 1.1.0 (released September 4, 2026), in a requirements file kept under version control. An in-house team can do this alone. The step is done when
pip showreports the pinned version andpyrit_scanstarts from that environment.Configure ~/.pyrit files without baking in secrets
PyRIT reads credentials from
~/.pyrit/.envand settings from~/.pyrit/.pyrit_conf. Keep the.envfile only on the pilot host, restrict its file permissions to the account that runs the scan, and keep it out of container images, shared repositories and chat logs. Keep the non-secret settings file in version control so the configuration can be reviewed and reproduced. A small team can do this alone, but a security engineer should confirm how secrets will reach containers or cluster nodes later, since that choice carries into the orchestrator decision. The step is done when a search of the repository and any image build context finds no API keys and the file permissions are restricted.Run one scan against a non-production target
Choose a non-production model deployment or custom HTTP endpoint that your organization has authorized for testing, such as a staging environment or a test tenant. Run a single
pyrit_scanjob with a fixed, documented set of test objectives, and note the package version, target and settings used. Confirm that conversations, scores and results land in the memory store, which uses SQLite or Azure SQL. An in-house team can run this alone once the system owner has approved the test in writing. The step is done when you can query the memory store and find every conversation and score from that run, tied to its settings.Test backup and restore of the memory store
Stop the scan, then back up the memory store. For SQLite, copy the database file while nothing is writing to it. For Azure SQL, confirm the backup policy with the database owner before relying on it. Restore the copy to a separate location, point a second PyRIT install at it, and confirm that record counts and one sample conversation match the original. An in-house team can do the SQLite version alone, but Azure SQL needs your database owner or platform engineer. The step is done when the restored store returns the same records and the team has written down the restore procedure and who is allowed to run it.
Repeat the run after a version upgrade
Install a newer PyRIT release in a separate virtual environment, leaving the pinned install untouched, and point it at a copy of the memory store. The PyRIT releases page lists v1.0.0 (July 24, 2026) and v1.1.0 (September 4, 2026), so use the release you plan to adopt as the upgrade target. Rerun the same target and settings from the previous step and compare outcomes, scores and errors against the original run. Expect some variation from the target itself, so compare trends across repeated runs rather than single results. A security engineer should judge whether any difference changes your test conclusions. The step is done when the upgrade notes list each difference and the team agrees whether the upgrade path is acceptable.
Choose the orchestrator after the pilot
Only now decide between Docker, Kubernetes and virtual machines, using the pilot notes as requirements. Docker fits when one host is enough and the same image must run the same way each time. Kubernetes fits when you need scheduling, restart behavior and high availability across hosts, and your platform team already operates it. Virtual machines fit when your patching and backup tooling already centers on them. Ask your platform engineer who restarts a failed job, where the memory store lives and who patches the base image, and confirm each answer with your own environment. The step is done when a written decision names the option, its owner and the open risks.
What teams ask before running PyRIT on Docker, Kubernetes or VMs
Does PyRIT require Kubernetes to run?
No. The documented install path is pip install, so PyRIT can run on a single virtual machine, in a container or in a Kubernetes cluster, and the right layout depends on how your team already operates workloads. Kubernetes adds scheduling, rollout and secret handling, which matter when several people or pipelines share one deployment, but it also adds cluster upkeep. For a small team running scans from one host, a plain Python environment on a VM is often enough. PyRIT reads credentials from ~/.pyrit/.env and settings from ~/.pyrit/.pyrit_conf, so whichever host you choose needs those files in a location your secrets process controls. Confirm with the project which deployment patterns it supports for your Python version.
What drives the cost of running PyRIT yourself?
Most of the spend is people time and provider usage. The PyRIT package is MIT licensed and carries no license fee. The cost components are engineering time to install, configure, write attacks and maintain them; model and scorer API usage, billed by the providers behind the targets and scorers you choose, such as OpenAI, Azure, Anthropic, Google or Hugging Face; Azure SQL, if you pick it over SQLite for memory; and hosting, such as VMs, cluster capacity or storage. Provider usage rises with the number of multi-turn attempts and with scorers that call an LLM on every response. Setup effort is largely one-time, while API usage and hosting recur. Ask for a quote that lists each component separately, with who pays for it and whether it is one-time or recurring.
Is PyRIT highly available out of the box?
Do not assume it is. Ask the PyRIT maintainers whether they document any high availability pattern for their framework before you design around one. Plan around the parts you control: back up the memory store, whether that is a SQLite file or an Azure SQL database; keep the ~/.pyrit configuration under version control or in your secrets tooling; and write attack runs so that a rerun after a host failure is safe and does not duplicate work you need to review. Schedule scans so that a missed window does not block a release. If an outage would block a release gate, run a second host with the same configuration and a restored store, and test that restore before you need it.
How long does a PyRIT setup take to deliver?
It depends on scope and access, so the reliable answer comes from a written scope. The main variables are how many targets you connect, such as OpenAI, Azure, Anthropic, Google, Hugging Face, custom HTTP or WebSocket endpoints, or web apps driven through Playwright; whether you need custom converters or scorers; how many attack strategies you run; and how quickly your cloud, identity and security teams approve credentials and network paths. Choosing Azure SQL for memory adds database setup that SQLite does not need. DeployOpen plans, implements and documents self-hosted open-source platforms inside your own infrastructure, and most engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts. DeployOpen does not publish a price list, so ask for a timeline tied to named deliverables and the access each one needs.
Can our in-house team run PyRIT without outside help?
Yes, if the team has Python and cloud operations skills and can own the setup after go-live. PyRIT is a Python framework, so engineers who already build and deploy Python services can usually get a first scan running. Ownership gets harder over time: someone must track releases, rerun attacks after model changes and review scorer output. From security and identity teams you will need an approved service identity for each provider, credentials kept out of source control, network access to each target, and a decision on who may read the memory store, since it holds conversations and results. Confirm those approvals early. If the team lacks red teaming experience, an outside partner can help design attacks, but your team should still own them.
What breaks when we upgrade PyRIT to a new version?
Check three things: the Python version, the memory store and the release notes. The PyPI package supports Python 3.10 up to but not including 3.15, and the documentation recommends Python 3.13, so pin your interpreter and test the new release on it before you upgrade. Memory is stored in SQLite or Azure SQL, so read the release notes for memory changes before you point a new version at an existing store, and back up that store first. The project moved from the archived Azure/PyRIT repository to microsoft/PyRIT, and v1.0.0 (July 24, 2026) and v1.1.0 (September 4, 2026) both shipped recently, so review their PyRIT releases on GitHub for changed APIs that your custom attacks and converters depend on. Test upgrades on a staging copy of your scripts and configuration.
How DeployOpen scopes and runs a PyRIT deployment
DeployOpen plans, implements and supports self-hosted open-source platforms inside the client's own infrastructure, including cloud accounts, data centers and air-gapped networks. For PyRIT on Docker, Kubernetes or virtual machines, the scoping step compares the three runtimes against your team's skills and infrastructure, then the deployment is built, hardened, tested, documented and handed over in your environment. Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
How we scope
- The written scope records the runtime chosen (Docker, Kubernetes or virtual machines) and the reasons for it.
- Scope covers where PyRIT runs, its Python version, credential storage in
~/.pyrit/.envand the memory store. - Engagements are fixed-scope, and deliverables and timelines are agreed in writing before work starts.
How we build
- Deployment in your cloud account, data center or air-gapped network, using the runtime your scope selected.
- Access control, audit logging and data handling controls configured so your security team can review the setup.
- Hardening and security testing of the PyRIT setup, with findings, fixes and a retest where the scope includes them.
How we hand over
- Written documentation of the runtime, configuration, upgrade steps and backup procedure for your operators.
- Upgrade steps covering PyRIT releases such as v1.1.0 and the Python versions its package supports.
- Handover to your operators, with a record of what was tested, changed and left open.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers after handover.
- Ask whether a retainer covers PyRIT upgrades, since upgrade work differs between Docker, Kubernetes and VMs.
- Scope the retainer in writing, with its own deliverables and boundaries agreed before it starts.

