agui-session-recorder
v0.1.0
Published
Session capture, snapshot reduction, playback, and repro fixture export for AG-UI event streams.
Maintainers
Readme
agui-session-recorder
agui-session-recorder captures AG-UI event streams, reduces them into deterministic snapshots, and exports repro fixtures for broken sessions.
Features
- Records text, tool, state, and lifecycle events
- Reconstructs message buffers and session state
- Stores checkpoint snapshots at configurable intervals
- Replays a session from the nearest checkpoint instead of from the beginning
Usage
import { SessionRecorder } from "agui-session-recorder";
const recorder = new SessionRecorder({ checkpointInterval: 2 });
recorder.record({ type: "run_started", runId: "run-1" });
recorder.record({ type: "text_delta", messageId: "m1", delta: "Hello" });
recorder.record({ type: "text_completed", messageId: "m1" });
const session = recorder.finalize();
console.log(session.snapshots.length);