Record and replay
Capture a real agent run once, then replay it in tests without a key.
-
Record. Run your test suite or app against the real provider through the recorder:
OPENAI_API_KEY=sk-... npx loremllm record --mock support-bot --provider openai -- pnpm test -
Review. Recordings land in
loremllm/recordings/support-bot/. Each file is one conversation: the requests, and the chunks that came back, with their timing. -
Replay. Run the same command without a key:
npx loremllm dev OPENAI_BASE_URL=http://localhost:4010/m/support-bot/v1 pnpm test -
Promote.
npx loremllm pushturns recordings into scenarios on the hosted mock, where you can edit them in the dashboard.
Keeping recordings fresh
Recordings drift as your prompts change. Run in auto mode locally, so new prompts record and old ones replay, and in replay mode in CI so drift fails loudly. loremllm record --prune deletes recordings no test used.
Original timing
Replays keep the recorded chunk timing by default. Use --latency none for speed, or real to keep the provider's real feel for demos.