# Inspect Petri: An Auditing Agent for Testing Alignment Hypotheses Against Language Models

> Inspect Petri is a Python-based auditing agent that automates multi-turn audits between an auditor model and a target model to detect alignment issues, reward hacking, and concerning behaviors. Version 3.0 introduces breaking Python API changes while keeping the CLI largely compatible.

**meridianlabs-ai/inspect_petri** — An alignment auditing agent capable of quickly exploring alignment hypothesis

- Repository: https://github.com/meridianlabs-ai/inspect_petri
- Website: https://meridianlabs-ai.github.io/inspect_petri/
- Stars: 1,387 · Forks: 240
- Language: Python
- License: MIT
- Published: 2026-08-22 · Updated: 2026-08-22 · Language: en
- Canonical page: https://hysenlabs.com/projects/meridianlabs-ai-inspect-petri

## What Inspect Petri Actually Does

The design assumes you have access to multiple language models: one to act as the auditor, one as the target, and one as the judge. If you only have a single model, the tool may not be useful. The README does not specify which models are supported, so you will need to check the documentation at the homepage to see if your providers are covered. The word 'agent' in the description suggests some autonomy in generating scenarios, but the actual mechanism is driven by your seed instructions, so the output is only as good as the input you provide.

## How the Audit Pipeline Works

The core mechanism is a three-model orchestration. You start with seed instructions that define the audit scenario. Petri uses those to generate a realistic context, then it runs a multi-turn conversation where the auditor model probes the target model. The tool can simulate tools and rollbacks, which lets you test behaviors that depend on external actions, like a model that calls a search API or undoes a previous step. After the conversation ends, a judge model scores the transcript against a rubric. The rubric is consistent, meaning the same criteria apply across different runs, which is essential if you want to compare results across experiments. The README does not detail how the rubric is configured, but the phrase 'consistent rubric' implies you can define it or at least rely on a fixed one. The data flow is linear: seed instructions go in, a transcript comes out, and a score is attached. This is a batch process, not a real-time monitor. You run it when you have a hypothesis to test, not continuously.

## Getting Started: Installation and Commands

The README gives a single installation command for version 3.0, but it is indirect. You install Petri 2.0 via pip from the petri-v2 branch, which implies the default branch is for 3.0 and you install it differently, though the README does not show the 3.0 install command. For 2.0, the command is: pip install git+https://github.com/meridianlabs-ai/inspect_petri@petri-v2. That is the only concrete command in the material. The README states that most CLI commands work identically between 2.0 and 3.0, so if you have used 2.0, you can expect the same commands like run or audit, though none are listed. The internal Python API has changed, so if you write custom scripts that import Petri, you will need to update them. The documentation is hosted at https://meridianlabs-ai.github.io/inspect_petri/, which is where you would find the actual CLI flags and configuration keys. The README does not include any config file examples, so you are dependent on that site for specifics. That is a gap for a tool that claims to be quick to use.

## Version 3.0: What Changed and What It Costs You

Version 3.0, released on 2026-08-12, is the latest, and it introduces breaking changes to the Python API. The README warns that while most CLI commands work identically to 2.0, the internal Python API is incompatible. This means if you have built tooling around Petri 2.0, you cannot upgrade without modifying your code. The project maintains a petri-v2 branch for legacy users, and you can install it with the pip command shown above. This is a pragmatic approach, but it also signals that the API is not stable. The release history shows a jump from v2.0.0 in January 2026 to 3.0.11 in July, then 3.1.0 in August, indicating rapid iteration. For a tool used in safety auditing, this pace means you should pin your dependency to a specific version. The MIT license gives you freedom to modify, but you inherit the maintenance burden if the project changes direction. The last push date matches the 3.1.0 release, so the project is active, but the README does not mention any deprecation policy.

## Where Petri Falls Short and When It Is the Wrong Tool

The most obvious limitation is the lack of detail in the README. You get a high-level description but no concrete configuration examples, no list of supported models, and no explanation of the rubric format. That forces you to visit the homepage and reverse-engineer the tool. For a project aimed at rapid hypothesis testing, this friction is a real cost. Another limitation is the reliance on seed instructions. If your seed instructions are not realistic, the generated scenarios will not be either, and the audit results will be meaningless. The tool cannot invent scenarios from scratch. Also, because it uses three separate models, the cost and latency are non-trivial. You are running multiple conversations and a scoring pass, so this is not a lightweight check. It is the wrong tool if you need a quick one-off sanity check or if you want to monitor a model in production. It is designed for batch audits, not real-time oversight. The README does not mention any streaming or continuous mode, so treat it as an offline analysis tool.

## Alternative Approaches to Alignment Auditing

A common alternative is to build a custom evaluation harness using a framework like LangChain or LlamaIndex, where you manually construct the multi-turn conversation and call a judge model yourself. The difference is that with a custom harness, you control every step, but you spend time writing glue code for tool simulation and transcript scoring. Inspect Petri packages those steps into a single tool, so you save development time but lose flexibility. Another alternative is to use a dedicated red-teaming library like Garak or PyRIT, which focus on generating adversarial prompts rather than testing specific hypotheses via multi-turn interactions. Garak, for example, runs a battery of predefined probes, while Petri lets you define your own scenarios. The trade-off is breadth versus specificity. Garak gives you broad coverage out of the box, but Petri gives you control over the exact hypothesis you want to test. If you need to test a hypothesis that is not in an existing probe set, Petri is more direct. If you want generic robustness testing, a probe-based tool is faster.

## Maintenance, Upgrade Cost, and License

The project is MIT licensed, which means you can use, modify, and distribute it freely, but the license does not come with support or warranty. The maintenance cost is real: version 3.0 broke the Python API, so any custom code you write against 2.0 will need changes. The README explicitly says 2.0 is still available on the petri-v2 branch, so you can stay on 2.0 if you prefer stability. However, the project's active release cadence suggests that new features land on 3.x, so staying on 2.0 means missing updates. The upgrade path is not documented in the README beyond the install command for 2.0. You will need to check the release notes on GitHub to see what changed. The last push is after the 3.1.0 release, so the project is not archived, but there is no mention of a changelog in the README. Plan for a few hours to migrate any custom Python scripts if you move from 2.0 to 3.0. The CLI compatibility helps, but anything that imports the library will break.

## Conclusion

Adopt Inspect Petri if you need a repeatable, scriptable way to test concrete alignment hypotheses against language models without building your own orchestration layer. Skip it if you require a stable Python API across versions, since 3.0 breaks compatibility with 2.0 and you will need to pin versions or use the petri-v2 branch. Before adopting, verify that the judge model's rubric matches your definition of alignment, and test the tool on a small set of seed instructions to confirm the generated scenarios are realistic enough for your threat model. The project is under active development with recent releases, so check the changelog for API changes before upgrading.

## FAQ

### How do I install Inspect Petri?

The package is published for Python 3.12 or newer and installs through the framework's plugin entry point rather than as a standalone command. Version 2.0 remains available from a branch, installed with pip install git+https://github.com/meridianlabs-ai/inspect_petri@petri-v2.

### Does Inspect Petri need an API key to run?

The runtime depends on Inspect plus anyio, pydantic, click, shortuuid and pyyaml, and no provider SDK is a runtime dependency. The Anthropic, Google and OpenAI SDKs sit in the development group, so credentials are needed for the test suite rather than for the package itself.

### What does Inspect Petri actually simulate during an audit?

The auditor model and target model hold a multi-turn conversation, and the tools they use and the rollbacks they perform are simulated. The README describes scoring the resulting transcript with a judge model against a consistent rubric.

### Is Inspect Petri compatible with version 2.0?

The README says most CLI commands behave identically between the two, while some internal Python API changes are incompatible. The earlier version stays available on the petri-v2 branch, and the last push to the repository is dated 2 October 2026.

## Sources

- [Official documentation](https://meridianlabs-ai.github.io/inspect_petri/)
- [Official README](https://github.com/meridianlabs-ai/inspect_petri#readme)
- [Project repository](https://github.com/meridianlabs-ai/inspect_petri)
- [Release notes](https://github.com/meridianlabs-ai/inspect_petri/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/meridianlabs-ai-inspect-petri
