Add a diagnostic layer to your voice agent
You already run a voice agent — for triage, intake, follow-up, or routine monitoring. Voxtar rides alongside it: fork the same call audio into one streaming endpoint, and every conversation also becomes a biomarker screening. No change to what your agent says, no second call, no extra step for the patient.
The pattern
Whatever framework your agent uses, the integration is the same three moves — and none of them touch your agent's dialogue:
The linchpin is /analyze/stream: a WebSocket that takes live audio frames and streams back incremental readings, then a final analysis when the call ends. You tee your agent's existing audio into it — the patient hears nothing different.
The shape of it
Open the socket once per call, authenticate, forward audio frames as they arrive, and react to events. This is the whole integration in pseudocode — the framework recipes just show where each agent hands you the audio:
// 1. Open one Voxtar stream per callconst vox = new WebSocket("wss://api.voxtar.hallelx2.com/v1/analyze/stream");vox.onopen = () => vox.send(JSON.stringify({type: "start",api_key: process.env.VOXTAR_API_KEY,patient_id: session.patientId,encoding: "pcm_s16le",sample_rate: 16000,panels: ["respiratory", "neurological"],write_to_ehr: true,}));// 2. Fork your agent's inbound audio into itagent.on("audio", (frame) => vox.send(frame));// 3. React to biomarker events — without interrupting the conversationvox.onmessage = (e) => {const evt = JSON.parse(e.data);if (evt.type === "complete" && evt.flags.length) {notifyCareTeam(session.patientId, evt.flags);}};
What you should know
Analyze only the patient — fork the inbound/participant track, not your agent's TTS output. Audio is discarded — Voxtar keeps only derived, pseudonymized features, so you're not creating a new recording liability. Baselines are per-patient — pass a stable patient_id so readings are scored against that person's own history over calls. It's additive — if the stream drops, your agent keeps running untouched.
Pick your framework
Each recipe shows exactly where your agent hands you the audio frames to forward.