Printing and exporting PyRIT attack conversations for review
Once a red team has run PyRIT, the reviewers, risk owners and auditors who need to read the conversations often do not run Python and should not have to. PyRIT's output module prints attack results with an optional image blur, and CoPyRIT exports conversations as HTML. The first path is a Python step the red team runs: since v0.14.0, PyRIT prints attack results with output_attack_async from the pyrit.output module, which includes a blur_images flag. The second path is a browser-based export for people working in CoPyRIT, PyRIT's web GUI for human-led red teaming. Both produce a readable record of prompts and responses for review. Neither is an audit report, and neither is a substitute for the scoring and evidence work that shows whether an attack succeeded.
Before you share either output, decide who the audience is and what they may see. Blurring is an option you set on the printed output, so confirm in your own environment that the flag behaves as you expect on the images your targets return, and check a sample before distribution. Confirm also that the HTML export carries the same content you reviewed, including any text that a model generated in response to harmful objectives, and that the file is stored and transferred under your data handling rules. Ask the red team to state which engagement, target version and run each export came from, so that a reviewer can match the conversation to the results. Plan for the reviewer's questions by keeping the original memory records, since an exported copy shows what was said but not how it was scored.
Which export path fits which reviewer
Use this path when an operator with Python access runs attacks from a notebook or script and wants the results printed in the same session. PyRIT prints attack results with output_attack_async from the pyrit.output module, a capability available since v0.14.0. Check the Output Module documentation for the signature and options in your version before you write code against it.
- What it needs: a Python environment with PyRIT installed from PyPI on a supported Python version, with credentials in
~/.pyrit/.envand settings in~/.pyrit/.pyrit_conf. - Who runs it: the engineer who ran the attack, on the machine where the memory database lives, so the printed output matches what was tested.
- What it shows: printed attack results for the conversations selected in that session, rendered in the notebook or terminal.
- The blur_images flag: blurs images in the printed output. It does not alter text, so prompts and model replies remain fully readable.
- Where content leaks: saved notebooks keep cell outputs, and terminal logs or shared screens capture printed text. Clear outputs before sharing a notebook.
Confirm the exact parameters and layout of the output in your PyRIT version before you build a review step around them.
Use this path when a reviewer who does not run Python needs to read conversations. CoPyRIT is PyRIT's web GUI for human-led red teaming and team collaboration, so the export starts from a shared instance that an operator with access can open. Confirm the export control, the file layout and what the HTML includes in your CoPyRIT version, because these details vary by release and deployment.
- What it needs: a running CoPyRIT instance that the operator and reviewer can reach, with group access set by the team that hosts it.
- Who runs it: an operator with access to the conversations exports and sends the file. The reviewer opens it in a browser without installing PyRIT.
- What it shows: the conversations the operator selects, saved as an HTML file. Confirm whether scores, labels and attack metadata are included.
- Where content leaks: the HTML holds full prompt and response text, so it can travel by email, chat or shared drives. Apply the same handling rules you use for the source system.
- Image handling: do not assume blurring applies here, because the blur_images flag belongs to the Python output module. Check how CoPyRIT treats images before exporting sensitive material.
Confirm what the export contains and where the file is stored before the reviewer receives it.
Use this path when an export will become evidence, such as a file kept with a test report. An exported file is a snapshot, while the conversations and scores remain in PyRIT memory, which stores them in SQLite or Azure SQL. Decide early which copy is the record and how each export links back to the run that produced it.
- What to record: the PyRIT version, the export date, the operator and the run labels, so each snapshot can be traced to its source.
- Who holds the source: the team that owns the engagement keeps the memory database. Reviewers receive copies that follow a defined retention period.
- Redaction: an export does not remove content from memory. Decide whether reviewers see full exchanges or a limited set, and document that choice.
- Version drift: an export from one PyRIT version may differ in layout from another, so store the version beside each file.
- Access: keep exports in the same controlled location as other sensitive test records, with access logged where your environment supports it.
Confirm with your compliance lead which copy an auditor will accept as the record before you export anything.
Options for printing and exporting, and when each fits
This table compares three ways to share PyRIT attack conversations: printed output from output_attack_async with blurring on or off, the CoPyRIT HTML export, and raw memory or database files. Read each row for what the option contains, who can open it, how sensitive it is and its main risk, then choose the least exposed option that meets the reviewer's need.
| Option | What it contains and who can open it | Sensitivity and main risk |
|---|---|---|
| output_attack_async with blur_images on | Printed attack results from the pyrit.output module with images blurred. Anyone with access to the printed or displayed output can read the text, so it suits a reviewer working in the same Python session or report. | Medium. Text of prompts and responses is still visible, and blurring does not remove harmful wording. Check text before sharing outside the test team. |
| output_attack_async with blur_images off | Printed attack results with images shown unblurred. Only people who can run the script or read its output on the operator's machine can see it. | High. Images may contain harmful or sensitive content. Keep to the operators who need the raw material and restrict where the output is stored. |
| CoPyRIT HTML export | Conversations exported as HTML from the CoPyRIT web GUI for reviewers who do not run Python. Anyone who can open an HTML file in a browser can read it, so distribution control matters. | High. A static file can be copied, forwarded or archived outside the access controls of CoPyRIT. Confirm with your team whether images and scores are included before sending. |
| Raw memory or database files | The SQLite file or Azure SQL data that PyRIT memory uses, with every conversation, score and label. Only people with database or file access and PyRIT skills can query it. | Highest. Contains complete unfiltered records and may hold credentials or identifiers. Treat as restricted data, avoid copying it to laptops and confirm retention rules first. |
Setting up a print or HTML export run
This sequence takes you from a clean PyRIT install to a blurred, printable transcript of attack results and an HTML export that reviewers can open without running Python. Each step ends with a check so you know the output is ready to circulate.
Install PyRIT on a supported Python version
Create a virtual environment on Python 3.10 or later, but earlier than 3.15, and install PyRIT with pip from the PyPI package. The PyRIT documentation recommends Python 3.13, so use that version if your platform team supports it. Confirm the install by running python -c "import pyrit" and checking the reported version against the release you intend to use, which is v1.1.0 or your pinned version. The step is done when the import succeeds without errors in the same environment you will run attacks from.
Load the environment and settings
Confirm that PyRIT reads your credentials from ~/.pyrit/.env and your settings from ~/.pyrit/.pyrit_conf before the run starts. Keep target keys out of notebooks and shared scripts, and check that the file permissions limit access to the operator who owns the run. Your check is a short test run against the target that returns a response without printing any secret values. Do not proceed until the target responds, because an export built from a failed configuration will hold no useful results.
Confirm attack results are in memory
Before you print anything, query PyRIT memory to confirm the attack results you want to export are stored, including the conversations and their scores. Use the memory interface your team already relies on, and note the run or label identifiers so the export covers only the intended attacks. The check is a count and a spot read of a few conversations, confirming that the prompts, responses and scores match what the run reported. If a conversation is missing, resolve it first, since the export reflects only what memory holds.
Read the output module signature in v0.14.0
Open the v0.14.0 release notes and the Output Module documentation to confirm the exact signature of output_attack_async in the pyrit.output module and the spelling of the blur_images flag in your installed version. The release notes state that this function has been the way PyRIT prints attack results since v0.14.0. Record the signature in your run notes so reviewers can reproduce the output. The step is complete when the parameter names in your code match the documentation for the version you installed.
Call output_attack_async with blur_images set
Call output_attack_async for the attack results you confirmed in memory and set blur_images deliberately, to True when the conversations include images that reviewers outside the test team should not see, and to False only when that exposure is acceptable and documented. Decide this before the run rather than after, and write the choice into the run label or hand-off note. Check the printed output for the attack identifiers and the expected number of conversations. Do not circulate the output until you have checked the image handling in the next step.
Verify blurring before circulating the output
Open the printed output and inspect every page that contains an image, confirming the images are blurred where you set blur_images to True. Scan the text sections as well, since blurring applies to images and does not remove sensitive text from prompts or responses. Ask a second operator to check a sample, and record who approved the output and the date it was reviewed. The output is ready when the image check passes and the approval is recorded, and you should treat any unblurred image as a reason to regenerate the file.
Export conversations from CoPyRIT as HTML
For reviewers who will not run Python, open the attack in CoPyRIT, the PyRIT web GUI for human-led red teaming, and export the conversation as HTML. Select only the conversations in scope for the review, and confirm that the export preserves the message order, scores and labels. Open the HTML file in a browser on a machine without the PyRIT environment to verify it renders correctly. The export is complete when the file opens offline and a reviewer can read each turn without access to the database.
Record the export and share it with reviewers
Store the printed output and the HTML export together with the run label, the blur_images setting, the reviewer approval and the PyRIT version used. Confirm with your security or compliance lead where the file may be stored and who may receive it, since transcripts can contain harmful content and sensitive data. Send the reviewers the file through the channel your organization approves, and log the hand-off. The step is done when the record can be traced back to the memory entries it came from.
How attack results move from memory to a reviewer
The flow starts with a PyRIT run that writes conversations and scores into memory, which is either SQLite or Azure SQL. From there, a Python user calls the pyrit.output module to print results, with an optional flag to blur images. A reviewer who does not run Python receives an HTML export produced from CoPyRIT. The operator's workstation is the trust boundary: anything that leaves it, including the exported file and any shared copy, carries the prompts, responses and images, so check where the file is stored and who can open it.
Attack results flow from memory to either a printed Python view or an HTML export for review.
Protecting sensitive conversations in exported output
Exported PyRIT output carries harmful prompts, model responses and sometimes images, and it leaves the environment where the run happened. The cards below cover the controls that keep that material contained, from the export itself through the memory database, the credential files and the CoPyRIT instance that reviewers use.
Exported files hold harmful content
A printed or HTML conversation contains the adversarial prompt and the model's full reply, including any harmful text the attack drew out. Treat every exported file as sensitive material with the same classification as the raw memory records. Before sharing, confirm which conversations are included, who receives the file, and whether the reviewer needs the full transcript or only the scored turns that support a finding.
Blur images before review
The blur_images flag in the output module hides image content in the printed result, which matters for multimodal attacks where a model returns or accepts pictures. Blurring is a presentation control, not a guarantee: the original image remains in memory and any unblurred copy made elsewhere is still exposed. Check the rendered output on a sample run before a wider review, and confirm that the source files are stored with the same access rules as the transcript.
Output module docsCopies outlive the review
Exported files are copied into email, ticket attachments, shared drives and audit folders, and they are rarely deleted when the review closes. Set a written retention rule for exports, name an owner who removes them, and record where each copy went. Ask whether the evidence pack must be kept for an assessment period, since a reviewer's download folder is not an approved record store.
Protect memory databases
PyRIT memory stores conversations and results in SQLite or Azure SQL, so a copied database file gives the same content as an export, in bulk. Keep the database in an encrypted location with restricted file permissions, back it up under the same policy as the source data, and confirm which operators can read it. Ask who can run queries against the memory store, since the async memory API makes bulk extraction easy.
Lock down credential files
PyRIT reads credentials from ~/.pyrit/.env and settings from ~/.pyrit/.pyrit_conf, so anyone who can read a shared workstation's home directory can use the target keys. Restrict these files to the operating user, keep keys out of shell history and shared scripts, and rotate any key that appears in a log or a copied configuration. Use a managed secret store where your team has one.
Control access to CoPyRIT
CoPyRIT lets several reviewers work in one web instance, so its authentication and group membership decide who can open conversations and export them. Confirm that each deployment is reachable only from approved networks, that access follows named groups, and that separate teams run separate instances where engagements must stay apart. Review the membership list at the end of each engagement and remove accounts that no longer need it.
Questions teams ask before exporting PyRIT conversations
Can a reviewer who does not use Python open exported PyRIT conversations?
Yes, if the export is produced as HTML. A reviewer who will not run Python needs a file or page they can open in a browser, not a script or a memory database. The printing path in the pyrit.output module is written for Python users who run output_attack_async, so the reviewer depends on someone on the team producing the file. CoPyRIT, the PyRIT web GUI, is the other route, since reviewers can read conversations there without running code. Confirm in your own environment which export format your PyRIT version produces and test it with a reviewer before relying on it for a review cycle.
What does the team need in place before exporting conversations?
The team needs a working PyRIT installation with completed attack runs stored in memory, plus someone who can run a short Python script against that memory. PyRIT installs with pip and the documentation recommends Python 3.13, with PyPI supporting Python 3.10 up to but not including 3.15. Credentials and settings are read from ~/.pyrit/.env and ~/.pyrit/.pyrit_conf, so the person running the export needs those files configured. Decide up front who owns the export step, where the output files are stored, and who may see conversations that contain harmful content.
How much effort does the export setup take, and what makes it larger?
The core export call is short, but the effort depends on how much your team needs to wrap around it. Effort rises with the number of runs and labels you need to export, the number of reviewers and how they access the files, the review format your compliance or security team expects, and how much checking the output needs before it leaves the team. Ask any partner for a written scope that lists which runs are exported, the output format, the storage location and the review workflow, because those items drive the quote more than the export call itself.
Can our own team set up exports without outside help?
A team with Python experience and access to PyRIT memory can usually build a basic export on its own, using the Output Module documentation and the v0.14.0 release notes as starting points. Outside help is most useful where the export must fit a review process, be repeatable across engagements, or be checked against a documented blur and access policy. Be honest about who will maintain the script after a PyRIT upgrade, since the export code can change across releases.
How do we verify that blurred images are actually blurred?
Treat the blur_images flag as a setting to test, not a guarantee. Export a set of known attack results that include images, open the output as a reviewer would, and confirm every image is blurred, including images inside multi-part or multimodal messages. Keep the test inputs and the checked output as evidence. Re-run the check after each PyRIT upgrade and after any change to the export script, and record which PyRIT version produced the files. Confirm the exact behavior for your media types with the documentation for your release.
Does an exported conversation count as audit evidence?
An export is a record of what the tests produced, but it does not make a system compliant and it is not an audit report. DeployOpen prepares systems, controls and evidence for compliance assessments, and independent auditors and certification bodies decide whether that evidence is sufficient. For an export to support an assessment, it should show the run, the target, the date, the PyRIT version and the labels, and it should be reproducible from memory. Ask your assessor which records they expect before you design the export.
How should we scope outside help for exporting PyRIT conversations?
Scope the work in writing before anything starts. The scope should name the PyRIT version, the runs or labels to export, the output format and template, the blur requirement and how it will be tested, where files are stored and who can access them, and the handover of the export script. DeployOpen works on fixed-scope engagements, with scope, deliverables and timelines agreed in writing before work begins, and it does not publish a price list, so a quote follows from that written scope. Ask for the verification steps and the retest plan to be listed as deliverables.
Where exports fit in a PyRIT results workflow
Exports belong at the end of a PyRIT run, after the findings already exist. By the time you print attack results or hand conversations to a reviewer, the attacks have run, the scorers have written their judgments, and the labels that identify the engagement, operator and target version are in place. An export is a view of that work, so its quality depends on the records underneath it. Decide first which findings the export must support, then pull only the conversations that answer them. Skipping this step usually produces a large dump of transcripts that a reviewer cannot navigate and that nobody can later tie back to a specific memory record.
A reviewer's questions should set the export scope. A security lead may ask for the conversations behind one harm category, a compliance reviewer may want every attack against a single target version, and a product owner may only need the examples that scored as successful. Each question maps to a filter on the findings you already queried from memory, and you should write that filter down before exporting. Confirm in your own environment which conversation identifiers and label values your memory store returns, because the export has to carry those identifiers forward. Where a reviewer asks for images, check whether the output with blur_images set is acceptable for their purpose, since the blurred view is a presentation choice, not a redaction record you can rely on without review.
Keep each export traceable by recording the conversation identifiers, the labels and the query used to select them alongside the file. Store the export with the memory store version, the PyRIT version (the current release at the time of writing is v1.1.0) and the run labels, so a reviewer can rerun the same query and reach the same conversations. Treat the HTML or printed file as a derived artifact and keep the original memory database under your retention policy. If an auditor later asks how a figure in a report was produced, the answer should lead back to a query and a set of records, not to a file that cannot be reproduced. Confirm with your security and compliance teams how long each export and its source records must be kept.
How DeployOpen works on this
DeployOpen scopes printing and exporting of PyRIT attack conversations as a written piece of work, covering which runs, which reviewers and which output formats are in play. We then build and document the reporting path inside your own environment, so the results reach reviewers who do not run Python.
How we scope
- Agree in writing which PyRIT runs, attack results and conversations the output must cover
- Define which reviewers need printed or HTML output and whether CoPyRIT is in use
- Set how images are handled, including when blur_images must be enabled before sharing
- Engagements are fixed-scope, with deliverables and timelines agreed before work starts
How we build
- Build the output_attack_async script against your memory store and attack results
- Confirm blurred and unblurred output behaves as expected on sample conversations from your own runs
- Set up conversation export from CoPyRIT for reviewers who will not run Python
- Test the output with your reviewers before the reporting path is treated as ready
How we hand over
- Document the script, its inputs, flags and how to rerun it for a new engagement
- Record where exported files are stored, who can access them and how they are retained
- Provide a short reviewer guide explaining how to read and check the exported conversations
- Walk your engineers through the reporting path so they can maintain it without us
How we support
- Ongoing support, upgrades and continuous testing are available as a retainer
- Review the reporting path when PyRIT releases change the output module or CoPyRIT
- Re-verify blurring and export after your PyRIT version or environment changes
- Confirm support terms and response expectations in the written scope before work begins

