# Petri

> An auditing agent that probes a model for alignment problems

- Category: Evaluation & Production Ops / Evaluation & Red-Teaming
- Language: Python
- Licence: MIT
- Repository: https://github.com/meridianlabs-ai/inspect_petri
- Website: https://meridianlabs-ai.github.io/inspect_petri/
- Canonical page: https://ai-tldr.dev/tools/petri/
- Updated: 2026-05-07

## In short

Petri is an alignment-auditing agent for language models. It sits in the Evaluation & Red-Teaming category of the Evaluation & Production Ops tools and is open-source, written in Python and licensed MIT. To get started: install Petri.

## Overview

Petri is an alignment-auditing agent for language models. You give it seed instructions describing a behaviour you are worried about — sycophancy, reward hacking, deception — and it generates realistic audit scenarios, runs multi-turn conversations against the model under test, simulates tools and rollbacks so the model can actually act, and then scores the resulting transcripts against a consistent rubric.

Three model roles do the work, and they are configured separately: the **auditor** designs and drives the audit, the **target** is the model being evaluated, and the **judge** scores the transcript across behavioural dimensions. Splitting the auditor from the target means the target can be swapped — or wrapped in its own agent scaffold — without rewriting the audit logic.

Petri began as work by the Alignment team at Anthropic and is now developed by the nonprofit Meridian Labs, in collaboration with the UK AISI Red Team. It is built on Inspect AI and follows standard Inspect conventions, so `inspect eval` and `inspect view` work exactly as they do for any other Inspect task, and it sits alongside Inspect Scout and Inspect Flow in Meridian's stack.

## What it does

- Generates realistic multi-turn audit scenarios from short seed instructions, including tagged sets such as `tags:sycophancy`
- Separate auditor, target and judge model roles, each pointed at a different provider or model
- Simulated tools and rollbacks, so the audit tests what a model does and not only what it says
- Judge scoring against a consistent rubric across behavioural dimensions
- Built on Inspect AI — the same `inspect eval` / `inspect view` commands, flags and transcript viewer
- Bloom uses Petri as its execution backbone, pairing Petri's broad exploration with Bloom's graded single-behaviour assessments

## Getting started

Petri installs as an Inspect AI extension and is driven with the standard `inspect eval` command. You need API keys for whichever providers back the auditor, target and judge roles.

1. Install Petri

   From PyPI, or straight from the repository if you want the development version.

```bash
pip install inspect-petri

# or from the repository
pip install git+https://github.com/meridianlabs-ai/inspect_petri
```

2. Set your provider keys

   Export them in the shell or put them in a .env file.

```bash
export ANTHROPIC_API_KEY=...
export OPENAI_API_KEY=...
```

3. Run an audit

   Choose a seed-instruction set and assign a model to each of the three roles.

```bash
inspect eval inspect_petri/audit \
   -T seed_instructions=tags:sycophancy \
   --model-role auditor=anthropic/claude-sonnet-4-6 \
   --model-role target=openai/gpt-5-mini \
   --model-role judge=anthropic/claude-opus-4-6
```

4. Read the transcripts

   Petri follows Inspect conventions, so the usual viewer opens the audit logs for inspection.

```bash
inspect view
```

## When to use it

- Probe a model you are about to deploy for sycophancy, deception or reward hacking before it reaches users
- Re-run the same audit across model versions to see whether a behaviour got better or worse
- Audit a model inside its real agent scaffold, with its actual system prompt and tool definitions
- Pair broad exploratory audits with Bloom's deeper graded assessment of a single behaviour

## Version history

- 2026-05-07 3.0: Anthropic donated Petri to the nonprofit Meridian Labs, which shipped Petri 3.0. The release decouples the auditor from the target so each can be changed independently, and makes Petri the execution backbone for Bloom's behavioural assessments.
