How replay fits in
VevalTestSdk is a test double for IVevalSdk. Load a trace with WithReplay, inject the test SDK into your agent in place of the real one, and call it normally. When your agent calls TrackStepAsync, the test SDK returns the recorded output for that step name.
Have your agent accept the IVevalSdk interface, not the concrete class, so your tests can swap in VevalTestSdk.
Replay also powers trace-backed scenario items.
Strict mocking
VevalTestSdk never falls through to the live LLM. If your agent calls TrackStepAsync with a step name that isn’t in the recorded trace, it throws:
Guarding against drift
Replay serves recorded outputs by step name. If your agent’s control flow changes, a recorded output can be handed to the wrong call while every assertion still passes. Turn onCompareWithRecording in ReplayOptions and the replay also fails when its step sequence or inputs drift from the trace it’s replaying.
Reporting
VevalTestSdk still reports traces and scenario results to the dashboard, so replay runs count in your history.
Deep dives
Test with replay
Set up
VevalTestSdk in your test project.Snapshots
Compare replays against a known-good baseline.