Open-Sourced Voice Agent Cost Profiler
mahimairaja · reddit · 2026-07-18
The author open-sourced a profiler for voice agents called VoiceGateway. It specifically addresses the issue where voice agents like LiveKit or Pipecat concurrently call STT, LLM, and TTS during a single conversation, making cost and latency attribution extremely difficult.
It only requires a single line to integrate: voicegateway.attach(session), and it will log for every call:
- Per-call cost for each vendor/model
- Latency distribution (p50 / p95)
- Single-call replay
- guard(): daily budget limits and downgrade/fallback mechanisms
The author emphasizes that it is self-hosted, uses your own keys, and its telemetry does not sit directly in the audio path. It is MIT-licensed and compatible with any provider. They are also asking for feedback at the end of the post on what other metrics should be tracked per call.
More from coding & agent
- HeyGen adds a media-sourcing skill for coding agents with 75k images and 10k tracks — HeyGen · 2026-07-22
- Agent search bottlenecks are now about variance, not raw latency — rohanpaul_ai · 2026-07-22
- LangSmith adds tracing for Pipecat, LiveKit, OpenAI Realtime, and Gemini Live — LangChain · 2026-07-22
- An MCP server signs every AI agent tool call into a verifiable Merkle chain — Funky_Chicken_22 · 2026-07-22
- Annotated transcript of a Claude Code team interview is now available — trq212 · 2026-07-22
- Claude Code skill uses 10 Markdown rules to make outputs ADHD-friendly — alex_verem · 2026-07-22