SYS.STATUS: ROUTER ONLINE — v0.1.0

STOP WIRING.
START SHIPPING.

HZRelay is the routing layer between your app and every real-time provider. Voice, tokens, webhooks — normalized to one session model, one SDK.

We own codecs, reconnects, and routing. You own what you're actually building.

2–3wk

INTEGRATION SAVED

8+

PROVIDER ADAPTERS

1 SDK

VOICE + TOKENS + EVENTS

SIGNAL_FLOW

[ SOURCES ]

TwilioPSTN
PlivoPSTN
WebRTCBROWSER
WebSocketRAW
StripeWEBHOOK
GitHubWEBHOOK
INBOUND

HZRELAY

ROUTER

CODEC
RECONNECT
ROUTE
VAD
OBSERVE
OUTBOUND

[ SINKS ]

ElevenLabsTTS
DeepgramSTT
OpenAILLM
CartesiaTTS
AnthropicLLM
Your AppCUSTOM
WIREtwilio:mulaw8k → pcm16k → deepgram
EVTstripe:payment_intent.succeeded → [3 sinks]
TOKopenai:stream → ws:client_a + ws:client_b
VADspeech.end +680ms → transcript routed
OKsession a3f9b2c1 ▪ 762ms ▪ 3 adapters live
_
TWILIO → PCM 16kHzMULAW 8kHz → NORMALIZEDWS RECONNECT AUTOWEBHOOK FAN-OUTSESSION ACTIVETOKEN STREAM ROUTEDPLIVO INBOUNDCODEC NORMALIZEDPROVIDER SWAPPED ZERO CODEELEVENLABS STREAMDEEPGRAM VADWEBRTC BRIDGESTRIPE → CRM + SLACK762ms MOUTH→EARAGENT LOOP RUNNINGTWILIO → PCM 16kHzMULAW 8kHz → NORMALIZEDWS RECONNECT AUTOWEBHOOK FAN-OUTSESSION ACTIVETOKEN STREAM ROUTEDPLIVO INBOUNDCODEC NORMALIZEDPROVIDER SWAPPED ZERO CODEELEVENLABS STREAMDEEPGRAM VADWEBRTC BRIDGESTRIPE → CRM + SLACK762ms MOUTH→EARAGENT LOOP RUNNING
[ WHAT_WE_ROUTE ]

Three pains.
One fix.

Every real-time integration has the same problems underneath — codec hell, fragile reconnects, N×M provider wiring. We solve them once, for all three.

[VOICE]

Voice Streams

Twilio sends mulaw 8kHz. Deepgram wants PCM 16kHz. ElevenLabs returns PCM. You don't. We transcode, reconnect, and normalize. One session whether it's a phone call or a browser mic.

Codec normalization — mulaw↔PCM, any rate
Turn detection + barge-in handled
Twilio, Plivo, WebRTC under one API
Drop-in: swap ElevenLabs for Cartesia in config
TwilioPlivoElevenLabsDeepgramWebRTC
[TOKENS]

Token Streams

LLM streams are SSE. Your UI wants WebSocket. Your mobile app wants something else. We fan-out one source to multiple subscribers simultaneously — no re-architecture.

OpenAI stream → web + mobile + logs
Agent A output → Agent B input
Parallel consumers from one source
Swap OpenAI for Anthropic in config
OpenAIAnthropicGemini *SlackWebSocket
[EVENTS]

Webhook Events

Every provider has a different payload shape. You write N parsers, maintain N schemas, debug N signature verifications. We normalize inbound events and fan-out to any number of targets.

Stripe → CRM + Slack + your AI agent
GitHub → CI + notify + audit log
One signature check, not N
Provider-agnostic routing rules
StripeGitHubTwilioCustomAny HTTP
[ OBSERVABILITY ]

See every
hop.

Standard APM is blind to real-time streams. HZRelay traces every stage across every session — where latency is added, which provider caused it, per session not just aggregate.

01

Per-session, not aggregate

Know exactly which call had the 1.4s STT spike. Debug the incident, not the average.

02

Provider comparison data

Route across sessions — see if ElevenLabs degraded vs Cartesia today. Switch in config.

03

Auto-failover on SLA breach

Set thresholds. When primary provider exceeds them, route to backup automatically.

[ LATENCY_TRACE ] session: a3f9b2c1 LIVE
audio_received
+0ms
stt_start
+12msDEEPGRAM
stt_final
+310ms
llm_start
+312msOPENAI
llm_first_token
+680ms
tts_start
+685msELEVENLABS
tts_first_audio
+760ms
audio_sent
+762ms← CALLER HEARS

298ms

STT

370ms

LLM

75ms

TTS

mouth → ear total762ms
[ HOW_TO_USE ]

Plug in deep
or shallow.

01
INFRA_ONLYDepth 1

Just routing and normalization. Stream events into your own LangGraph, CrewAI, custom loop — we stay out of your logic.

02
MANAGED_LOOPDepth 2

Add an agent: block and we run transcript→LLM→TTS automatically. Useful when you want working output in an hour.

03
SWAP_ANYTIMENo migration

Start fast at Depth 2, drop to Depth 1 when you need control. Same session, same billing, no re-wiring.

route.ts — DEPTH 1 EXAMPLE

import { createSession } from '@hzrelay/sdk'

const session = await createSession({

apiKey: 'hz_live_...',

// ─── wire sources ────────────

inbound: { type: 'twilio' }, // or 'plivo' | 'webrtc'

outbound: { type: 'twilio' },

// ─── route to providers ──────

stt: { provider: 'deepgram', apiKey: env.DG },

tts: { provider: 'elevenlabs', apiKey: env.EL },

});

// codecs, reconnects, VAD — handled.

// bring your own agent loop:

session.on('transcript', async ( { text, isFinal }) => {

// your LangGraph, CrewAI, custom — anything

if (isFinal) { session.speak(await myLLM(text)) }

});

_

[ ADAPTER_REGISTRY ]

v0.1 — more shipping

[TELEPHONY]

Twilio
Plivo
VonageSOON

[TTS]

ElevenLabs
CartesiaSOON
OpenAI RTSOON

[STT]

Deepgram
AssemblyAISOON
WhisperSOON

[LLM / EVENTS]

OpenAI
AnthropicSOON
Stripe WH

Stop Wiring.
Ship.

Free tier. No credit card. Connect Twilio → Deepgram → your logic in 30 minutes — not 3 weeks.