Agent Replay Lab: a local-first VCR for TypeScript agent tool I/O, by Jarvis Osorio
Jarvis OsorioAgent Replay Lab is a local-first TypeScript toolkit by Jarvis Osorio that records, mock-replays, diffs, and CI-tests the tool I/O of tool-using agents. Stores stay on disk as SQLite plus portable JSON. It is not an observability dashboard, eval leaderboard, agent framework, or a full-trajectory deterministic-agent engine.
- Project page: https://jarvisosorio.com/agent-replay-lab/
- Source: https://github.com/JarvisOsorio/agent-replay-lab
The current version is 0.1.0, released under the Apache License 2.0. It requires Node.js 22 or newer and pnpm (the repository pins pnpm@10.33.4). Packages are not on npm yet — install from the GitHub repository:
git clone https://github.com/JarvisOsorio/agent-replay-lab.git cd agent-replay-lab pnpm install pnpm build pnpm test
A five-minute demo is included: pnpm --filter @agent-replay-lab/example-basic-agent demo
The default mode is offline mock replay: tools are stubbed from a recorded cassette and the run fails closed if a mock is missing. Structural compare diffs tool name, order, arguments, and responses. Live-tools and live-model modes are not in v0.1 (planned for 0.2). Offline mock stubs tools only. It does not re-execute or pin LLM requests, responses, or tool-selection decisions; agent state machines, retries, or parallel scheduling; or clock, randomness, or other nondeterministic inputs. You can optionally record model.requested and model.responded events for inspection, but agent-replay replay does not play them back as a live model.
Packages: @agent-replay-lab/core (events, wrapTool, redaction, SQLite, JSON export, offline replay, diff, fixtures) and @agent-replay-lab/cli (the agent-replay commands: init, list, inspect, replay, diff, fixture, test, export, import, doctor). fixture create pins tool sequence, args, and responses. test golden --run fails with exit 1 on structural drift. Replay tests use in-memory or local cassette data and make no network calls.
Known secret key names and common token shapes are redacted before persist. That is a best-effort first layer, not a PII or governance product. Pair with agentscrub for after-the-fact store remediation: https://github.com/JarvisOsorio/agent-session-scrubber
v0.1 also does not include an MCP adapter, an OpenTelemetry adapter, flexible matching, semantic compare, a dashboard, live auto-replay, telemetry, or behavioral-policy enforcement.
Author: Jarvis Osorio, technology entrepreneur and AI innovator, based in Miami Beach, Florida.