Record a passing run
Capture tool calls and responses in a cassette. Review the results and promote a known-good baseline.
--mode recordPut your agent through failures that matter: duplicate refunds, skipped approvals, and success claims that don't match reality. Reproduce the failure. Verify the fix.
Download and extract first. Python 3.9+. No account or API key.
Have a production failure? Import and replay it.Would your agent refund the customer twice? Inject a timeout after a payment commits, inspect the actual effects, and check the fix against the same scenario.
Inspect the before and after2 committed refunds
FAIL · duplicate effect1 committed refund
PASS · fix verifiedResults from the included $49 synthetic refund scenario. Local simulation; no payments or model API calls.
New in 0.3.0 · Production incident imports
Import a production trace, redact sensitive values locally, and rerun your agent against the recorded tool responses. Keep the failure as a regression check your team can inspect.
Install or upgrade from PyPI:
python -m pip install --upgrade runledgerExplore incident replay Import locallyIncident JSON or a RunLedger JSONL trace.
Redact and reviewReplace sensitive values; preserve trace relationships.
Replay in orderThe first timeout stays first. Unrecorded calls stop replay.
Your logs stay local. Review the bundle before sharing; replay covers the recorded tool boundary.
An intentionally stricter schema catches the demo agent returning an incomplete answer. The report shows the contract, output, and tool trace together.
SCHEMA VALIDATION FAILED
Missing required field: next_steps
The CLI exits with code 1. Make this check required in your repository to block the merge.
schema.json · required fields
{
"required": [
"category",
"reply",
"next_steps"
]
}The updated schema requires next_steps in every final output.
The workflow
Use the scenario pack for stateful failures. Use the existing CLI to record tool interactions and enforce your contracts on every change.
Capture tool calls and responses in a cassette. Review the results and promote a known-good baseline.
--mode recordReuse those recorded tool responses in CI. Mismatched calls surface without depending on the live tool service.
--mode replayFail the check on schema violations, tool-order errors, enforced budget limits, or a drop from the baseline.
--baseline baselines/demo.jsonAlready using quality evaluations? Keep your scoring framework alongside these CI checks. See how they fit together.
Connect your agent
RunLedger launches your agent as a subprocess. Add an adapter that exchanges JSONL messages over standard input and output, then route the tool calls you want to record or replay through it.
Choose an integration walkthroughGet started
Run the free support-agent pack, or get help adding RunLedger checks to your repository.
Reproduce a duplicate refund, inspect its committed effects, and verify the fixed policy against five support scenarios.
Have RunLedger wired into one agent repository so the agreed tool-call regressions fail your pull-request check.
Need broader implementation or ongoing help? Compare all services.