v0.3.0
mahimailabs/voicegatewayv0.3.0May 11, 2026by mahimairaja
AI Summary
This release introduces a comprehensive conversation replay and debugging feature, allowing developers to scrub through past sessions to view detailed event data and live cost tracking, while also implementing automatic retention policies for captured replay data.
Key Highlights
- Timeline scrubbing interface for viewing past conversations and events.
- Detailed capture of STT chunks, LLM tokens, TTS frames, and conversation state snapshots.
- Live cost tracking showing per-modality breakdown as the timeline is scrubbed.
- Automatic retention policies (default 90 days) and privacy controls for replay data.
New Features
- Conversation replay dashboard with timeline control
- Live cost calculation and per-modality breakdown
- Event capture buffers for STT, LLM, and TTS
- State snapshotting for debugging agent decisions
Full Release Notes
**v0.3.0 — Conversation replay and debugging**
The universal "this saved me hours" feature for voice-agent developers lands here. Open any past conversation in the dashboard, scrub through it like a video timeline, see every STT chunk, every LLM token, every TTS frame, plus the agent's conversation state at every moment — with cost accruing live as you scrub. Replay captures by default for every session at full fidelity, with per-project retention (default 90 days) ageing rows out automatically.
**Highlights**
- **REQ-VG-REPLAY-001 (Open any past conversation)** — Dashboard `Replay` page reachable from every Sessions-row "Open replay" button. Pre-v0.3.0 sessions render a clear "recorded before replay capture existed" banner with a link to the session detail page.
- **REQ-VG-REPLAY-002 (Scrub the timeline)** — Range scrubber + arrow keys step to prev/next event, Shift+Arrow jumps 1s, Home/End jump to call boundaries.
- **REQ-VG-REPLAY-003 (Every captured event)** — Per-session asyncio buffer in `ReplayCapture` records STT chunks, LLM tokens, TTS frames; bounded backpressure drops oldest with a counter that surfaces as "events dropped here" in the dashboard.
- **REQ-VG-REPLAY-004 (Cost accruing live)** — `RunningCostCounter` shows per-modality breakdown + top-3 costliest events tooltip; total updates per scrubber position.
- **REQ-VG-REPLAY-005 (Conversation state at every moment)** — `StateSnapshotter` captures the system prompt + message history + in-flight tool call + structured outputs at LLM message-add, tool-invoke, and tool-resolve boundaries. Rate-capped to one per second; tool-resolve bypasses the cap.
- **REQ-VG-REPLAY-006 (Privacy + retention)** — Per-project `replay.retention_days` (default 90); hourly `RetentionWorker` ages rows out, `replay.enabled: false` opts whole projects out. `DELETE /api/sessions/{id}/replay` cascades across all four `replay_*` tables.
**Storage**
A 60-second conversation captures roughly 100-300 KB on disk under default settings. Per-minute estimates, worked solo-dev (~$0.21/month S3 at 90-day retention) and agency (~$70/month) examples, and the three per-project tuning knobs are documented in [docs/storage/replay-storage-costs.md](https://github.com/mahimailabs/voicegateway/blob/main/docs/storage/replay-storage-costs.md). The OQ1 storage-cost smoke test (`tests/storage/test_replay_storage_smoke.py`) asserts the upper bound at 600 KB/min on a synthetic conversation; well-below at the time of release.
**Foundry Open Questions resolved**
- **OQ1 (storage-cost target)** — RESOLVED AFFIRMATIVE per the smoke. Fallback (`replay.enabled: false`) documented and in place.
- **OQ2-5** — Tuning calls locked: message-add snapshot granularity, pre-fetch over streaming, capture-by-default for short calls, per-character TTS cost distributed in time-weighted slices.
**Migration notes**
No code changes required for v0.2.0 callers. Migration 0004 runs automatically; v0.2.0 sessions are preserved with NULL on `replay_size_bytes` and surface as "recorded before replay capture existed" in the Replay page (linked back to session detail).
The `voicegateway/combined_server.py` re-export shim previously flagged for v0.2.0 removal stayed in place again; bundling a back-compat break with the replay-feature release would be a bad signal. Schedule remains tentatively v0.4.0.
**Refinery and Foundry**
- Refinery: https://linear.app/mahimairaja/document/v030-conversation-replay-and-debugging-refinery-02fdfbb5a241
- Foundry: https://linear.app/mahimairaja/document/v030-conversation-replay-and-debugging-foundry-blueprint-f6e62120f85a