user@gryczka.dev: ~/garden/voice-agent-helper
$ cat ~/garden/voice-agent-helper/README.md
Voice Agent Helper — Real-Time Voice Coaching screenshot

Voice Agent Helper — Real-Time Voice Coaching

July 5, 2026 | Patrick Gryczka

## Overview

A real-time voice coaching pipeline built entirely on the Cloudflare Developer Platform. The browser streams microphone audio over a WebSocket to a HelperAgent Durable Object, which feeds it into Workers AI's Nova-3 model for streaming speech-to-text. Each finalized utterance triggers a Llama 3.1 8B coaching call, and a 20-second rolling-window timer asks the LLM for proactive insights based on recent exchanges — both surfaced to the browser as typed JSON messages alongside live transcript and STT/LLM latency metrics. Because it's hosted as an open, unauthenticated public demo, a native Workers Rate Limiting binding gates new WebSocket connections per IP before they reach the Durable Object, and the agent enforces a max session duration plus a max LLM-calls-per-session cap — all centrally configured in one shared config module so the UI's Detail tab can display the exact values in effect alongside live latency numbers.

## Highlights

  • -> HelperAgent Durable Object orchestrates streaming Nova-3 STT and per-utterance + rolling-window Llama 3.1 coaching over one WebSocket
  • -> Open-demo cost guardrails: per-IP connection rate limit (Rate Limiting binding), max session duration, and a max LLM-calls-per-session cap
  • -> Single shared config module (src/shared/config.ts) is the source of truth for both server enforcement and the client's live Detail tab
  • -> STT and LLM latency measured server-side and streamed to the client as typed metrics messages — STT reported as finalization lag, not a raw model benchmark
  • -> Kumo design system UI with an animated SVG architecture diagram tab and full dark mode support

## Architecture

Voice Agent Helper architecture diagram
Browser (mic capture + WebSocket)
    ▼
Cloudflare Worker
    ├── Rate Limiting binding ── per-IP connection gate (5 / 60s)
    ▼
HelperAgent DO (WebSocket Hibernation)
    ├── Nova-3 STT (Workers AI) ── streaming transcription
    │       └── finalization-lag timing → metrics message
    ├── onTranscript() → Llama 3.1 8B (Workers AI) → suggestion
    ├── rollingAnalysis() every 20s → Llama 3.1 8B → insight
    ├── session-length + LLM-call-cap quotas → notice message
    └── shared/config.ts ── single source of truth (server + Detail tab)

## Tech Stack

WorkersDurable ObjectsWorkers AIWebSocketsRate LimitingReactTypeScript
$ _