Skip to main content

Reenact

Regression testing for LLM agents. Record an agent run once, replay it deterministically offline at $0 with no API key, and gate regressions on every pull request.

Think VCR.py, but for full multi-step agent trajectories: record -> replay -> evaluate -> gate.

reenact replays a recorded agent run offline: a model swap turns the gate red, reverting it turns green again

Install

pip install reenact

Quickstart

Wrap the client your agent already uses — reenact records each call and returns the real response unchanged, so the agent behaves exactly as before:

import reenact
from reenact.store import save_cassette

with reenact.recording(client) as run:   # an Anthropic or OpenAI client
    answer = run_agent(client)            # your agent, unchanged

save_cassette(run.trajectory, "scenarios/run.json")

Then scaffold the harness, draft a suite from the recording, and set a baseline:

reenact init                                                    # scaffold evals/ + a PR workflow
reenact suggest evals/scenarios/run.json -o evals/suite.toml    # draft the checks
reenact eval evals/suite.toml --write-baseline evals/baseline.json

On every PR the committed GitHub Action replays the suite offline and blocks the merge only when a check regresses against the baseline, posting a sticky comment and a merge-gating check-run.

What it checks

  • Assertions — deterministic and free: called_tool, did_not_call_tool, answer_contains, no_mutating_tool_reexecuted (a mutating tool is never re-run on replay), and more.
  • Criteria — model-judged, evidence-cited yes/no questions for faithfulness and grounding (needs an API key at gate time).

Works with the Anthropic SDK, OpenAI SDK, and LangGraph.

Documentation

Full docs, examples, and the demo repo: https://github.com/Manas-33/Reenact

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reenact-0.1.0.tar.gz (261.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reenact-0.1.0-py3-none-any.whl (76.9 kB view details)

Uploaded Python 3

File details

Details for the file reenact-0.1.0.tar.gz.

File metadata

  • Download URL: reenact-0.1.0.tar.gz
  • Upload date:
  • Size: 261.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for reenact-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1469ff1e843b97b0e44798d9cba7da5c7f594a2c9112925dde909e234ed93c7b
MD5 9aba549fb78b719192688bf8e0d39abf
BLAKE2b-256 03bc42050db27946fbdd9b9c2da4a65c9a8a6d6ef7787ef4c6afbab41ec340b7

See more details on using hashes here.

File details

Details for the file reenact-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: reenact-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 76.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for reenact-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 156a070ee6f08392c888db15361cbc7d68a27148ab7bc264c667a1fdf5b4d8c5
MD5 cb2db44aebd5285577631b5c5f9f2af1
BLAKE2b-256 89dedf6df83264bafed12376390e0547cc829d0d997bd84399ed610e9f2fe39d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page