Record scrubbed events
You supply the argument scrubber. Raw secrets and payloads never enter the trace by default.
01 Deterministic agent testing
Pin down critical tool calls, retries, and ordering in CI—without transcript snapshots or an LLM judge.
npm i -D trajectory-test-cases
Zero runtime dependencies· ESM + CJS · Typed · MIT
Required calls
Ordering edges
Forbidden actions
Retry counts
02 Local trace bench
Edit either JSON panel or load a seeded mutation. The same matcher shipped in the npm package runs here, entirely in your browser.
03 A smaller test primitive
You supply the argument scrubber. Raw secrets and payloads never enter the trace by default.
Name required actions, attach only meaningful “after” edges, and forbid dangerous calls.
Get stable exit codes, structured JSON, and a line-by-line trace that explains the mismatch.
04 Tiny public surface
The library is model-agnostic and dependency-free. Use the recorder, matcher, fault injector, or renderer independently.
Read the full APIimport {
checkTrajectory,
createRecorder,
injectRetryFault
} from "trajectory-test-cases";
const trace = createRecorder({
scrubArgs: (tool, args) => redact(args)
});
const result = checkTrajectory(
fixture,
trace.events()
);
expect(result.pass).toBe(true);