VevalTestSdk is a test double for IVevalSdk. It replays a recorded trace so your agent code runs with mocked LLM responses: deterministic, fast, and free.
Unlike calling VevalSdk directly with a trace, VevalTestSdk guarantees no live LLM fallthrough. If a step name doesn’t match the recorded trace, it throws immediately.
Setup
VevalTestSdk still reports traces and scenario results to the dashboard, so runs count in your history.In a test project
Strict mock mode
If your agent callsTrackStepAsync with a step name that isn’t in the recorded trace, VevalTestSdk throws:
Live replay
To test a prompt change against a recorded trace, replay live: steps recorded asllm call the model, and every other step returns its recorded output, so tools never reach a real system. See Live replay for the rules.
VevalSdk replay live by default; VevalTestSdk keeps them mocked.
Skip side effects
Only code inside a step is served from the recording. Work your agent does outside a step runs again on every replay, so checkIsReplay before it. IsReplay is true in every replay, mocked or live, and false in a normal run.
SetMeta("type", "tool") instead: replay then returns the recorded result without running it.
ReplayAsync directly
For lower-level control, useReplayAsync with explicit assertions:
LastStatus / LastError
AfterRunAsync, inspect the outcome without catching exceptions:
What’s next
Catch regressions with snapshots
Fail a replay when prompts or steps change.
Write assertions
Check cost, steps, outputs, and tool calls.