AgentReplay
Turn a failed agent run into a replayable test that blocks the same mistake in CI
- Area
- Agent infrastructure
- Language
- JavaScript
- License
- Apache-2.0
- Latest
- v0.2.0-alpha.1
- Plate
- No. 05 of 14
What came back
- 20 of 20
vulnerable agent runs caught by the gates, and 20 of 20 hardened runs passed.source
AgentReplay freezes a production agent run as plain JSON: tool calls, arguments, state before and after, approvals and side effects. You replay it, diff it against a fix, and gate every future model, prompt or tool change on the same failure. Gates are deterministic assertions, so a regression test never depends on a judge model.
How it works
- 01
Wrap each tool with the harness so every call is recorded with its state before and after, and the side-effect diff.
- 02
Save the run as a trace, add assertions such as never sending an email without approval, and replay it against recorded tool responses.
- 03
Run agentreplay gate in CI with --json; a changed model, prompt or tool that brings the failure back fails the build.
What it does
- Records tool calls, arguments, responses, pre and post state snapshots, approvals and side-effect diffs as agentreplay.trace.v1 JSON
- Deterministic gates such as tool_not_called, requires_approval, tool_order, arg_matches and side_effect_count
- Diffs a bad run against a fixed run: changed tool order, arguments and side effects
- Node reference SDK plus Python and Go SDKs that emit matching trace hashes, and raw JSON for any other language
- Redacts secrets and PII, and scaffolds a CI workflow with agentreplay init
More from the bench
All projectsfaultline
A live architecture map that stops agents crossing the boundaries you drew
guardian
Reviews every agent action before it runs, in ~400ms at about $0.00001 each
Pact
Let agents prove who sent them and what they may do, verified offline with no server