Realtime Voice Agent Workflow
Build or evaluate a duplex voice agent as a measured stateful system—not a model demo. Freeze the complete path, prove each latency/quality/privacy boundary, and promote only a receipt-bearing route.
Trigger
Use this workflow when a product needs live microphone input, turn detection, speech recognition or native audio understanding, model/tool execution, and streamed speech output. Do not use it for ordinary file transcription, prerecorded voice generation, or interface sound effects.
Output
A completed run produces:
- a feasibility classification, route decision, and frozen component manifest;
- an authority/privacy/security manifest;
- a representative evaluation corpus and network/device matrix;
- per-stage and end-to-end traces, quality scores, tool receipts, cost, and failure taxonomy;
- a UI state-machine and accessibility proof;
- a promote, hold, replace, or reject decision with rollback/fallback.
Route Before Building
| Product constraint | Route |
|---|---|
| Next/React product, managed provider switching, browser tokens, gateway observability/spend | Vercel AI SDK plus AI Gateway |
| OpenAI-centered realtime agent behavior and SDK-native tools/tracing/guardrails | OpenAI Agents SDK; currently start a new reasoning voice-agent evaluation with gpt-realtime-2.1, not the May GPT-Realtime-2 launch alias |
| Modular Python orchestration across many STT, LLM, TTS, speech-to-speech, WebRTC/WebSocket/telephony transports, or multi-agent handoffs | Pipecat at a pinned revision; freeze each selected provider/transport separately because Pipecat's BSD-2-Clause framework license does not cover provider terms, model licenses, data handling, or operating cost |
| Python/device backend, swappable VAD/STT/LLM/TTS, self-hosted/local components, OpenAI-Realtime-compatible clients | Hugging Face Speech to Speech |
| Wearable or first-person camera plus realtime voice and delegated actions | Use VisionClaw as a source-level architecture/counterexample reference, then run this entire contract; do not install it as the default |
| Existing product already has a proven voice stack | Preserve the incumbent; compare candidates behind the same test and interface |
Do not choose a stack because one demo feels fast. The selected route must match language/runtime, client, hosting, privacy, hardware, model/provider, tools, and operator constraints.
Capability Signal → Product Route
A compelling use-case list is discovery input, not a build decision. Before a voice idea enters implementation, classify and prove five independent layers:
| Layer | Question | Required proof |
|---|---|---|
| Model | Can the selected current model understand, reason, interrupt, speak, and request the required tool calls? | Pinned model/session type plus representative task, entity-capture, interruption, latency, and failure evals |
| Sensor | Does the system receive the evidence the claim requires? | Exact microphone/image/frame/telephony source and semantics; a spoken description is not visual inspection, and image input is not video support |
| Data and tools | Are authoritative, fresh data and executable services actually available? | Tool schemas, source authority/freshness, identity, errors/timeouts, cost, and test receipts |
| Action authority | Who may commit money, terms, appointments, messages, access, safety judgments, or records? | Typed policy, proposal digest, spend/scope limits, approval actor, idempotency, and audit receipt |
| Product proof | Is the complete service lawful, safe, affordable, accessible, and better than the incumbent? | Domain corpus, p50/p95/p99, task success, safety/privacy review, unit economics, recovery, human escalation, and rollback |
Failure in one layer cannot be repaired by more model reasoning. “The model can call a tool” does not prove the tool is authorized, accurate, fast, affordable, or allowed.
Opportunity lanes
The 17 GPT-Realtime idea signals compile into reusable lanes rather than 17 pages:
| Lane | Included signals | Default authority |
|---|---|---|
| Dedicated communication | multilingual event host | Use a translation session and language-pair evals; it is not a normal tool-calling voice-agent session |
| Advisory copilot | coding companion, podcast researcher, sales coach | Suggest, ground, and explain; obtain call/recording consent and gate external writes or deployment |
| Bounded operations | field-service dispatch, invoice follow-up, Airbnb support | Read freely within scope; gate ordering, scheduling, payment terms, dispatch, access, and external communication with typed limits and receipts |
| Regulated or high-stakes support | contract negotiation, trading, medical intake, auction bidding, deposition prep, property analysis, insurance calls, law-firm intake, manufacturing inspection | Human/professional review owns consequential decisions; never present capability as legal, clinical, financial, housing, insurance, or product-safety authority |
| Ambient/minor safety | baby monitor | Do not use a general voice model as a validated cry detector or diagnosis system; require a separately validated detector, local-first privacy, explicit parent escalation, and product-safety review |
This preserves the post's valuable services-as-software map while rejecting its
unsupported “silent mode,” “price of an API call,” 128K-equals-one-hour, and
“impossible six months ago” claims. Source: X 2061129813750915508; audited
against current OpenAI primary sources in .brain/artifacts/x/2061129813750915508/gpt-realtime-startup-ideas-review/source-audit.md
Current OpenAI Route
Freeze these as separate products and endpoints; do not treat “Realtime” as one interchangeable mode:
| Outcome | Current route | Important boundary |
|---|---|---|
| Reasoning speech-to-speech agent with tools | gpt-realtime-2.1 on /v1/realtime |
Text/audio in and out plus image input; no video; function calling but no Structured Outputs; start reasoning.effort at low, then benchmark task/latency tradeoffs |
| Continuous live interpretation | gpt-realtime-translate on /v1/realtime/translations |
Dedicated continuous translation lifecycle; no function calling; 70+ input and 13 output languages were launch claims that still require pair-specific evaluation |
| Streaming transcript without agent response | Current supported transcription session/model | Separate transcript lifecycle; do not pay agent latency or grant tool authority for transcript-only work |
Use WebRTC for browser/mobile capture and playback, WebSocket for server-owned media pipelines, and SIP for supported telephony. Mint ephemeral client credentials on the server. Keep secrets, privileged tools, changing instructions, and business logic on a server/sideband control channel connected to the same session. Send a stable, privacy-preserving safety identifier for identified end users. Source: OpenAI Realtime overview and server-controls docs, captured 2026-08-11
For SDK function tools, set needsApproval on consequential calls, run deterministic
input guardrails before the approval request and again before execution, validate the
arguments independently because the model lacks Structured Outputs, and execute the
frozen proposal idempotently. A Realtime session cannot process a new user request
while it waits on the SDK approval event, so announce the pause, provide visible
approve/reject controls, define expiry/cancel behavior, and move long approvals into
durable job state. Output-transcript guardrails may interrupt speech, but they do not
replace pre-tool authority checks. Source: OpenAI Agents SDK voice build guide,
captured 2026-08-11
Frozen Experiment Contract
Record one manifest before the first benchmark:
| Field | Required detail |
|---|---|
| Source identity | package version and digest or repository commit; client/app commit |
| Transport | WebSocket/WebRTC, codec, sample rates, chunk size, buffering, region |
| Turn layer | VAD/smart-turn model, thresholds, silence/prefix padding, interruption policy |
| STT/audio input | model revision, language, device, streaming/finalization settings |
| LLM | provider, endpoint, model revision, reasoning, prompt, tools, timeout/fallback |
| TTS/audio output | model/voice revision, streaming mode, language, device, output format |
| Runtime | CPU/GPU/Apple Silicon, memory, OS/container, concurrency, warm/cold state |
| Network | client/backend/provider regions, controlled latency/loss profile |
| Sensor semantics | camera/mic source, current-versus-pinned frame, orientation/zoom, sampling, mute, bystander state, voice-only fallback |
| Identity and authority | user/session/room/job identity, token TTL, track/tool scopes, confirmation actor, expiry, impersonation boundary |
| Data policy | every audio/transcript/camera/search/model/tool/vault/log processor, purpose, retention, recording, deletion, analytics/crash default |
| Evaluator | corpus revision, target users/languages/noise/devices, scorer versions |
Changing any verdict-bearing field creates a new experiment revision.
Runbook
- Define the user job and authority. State who is speaking, what the agent may hear/see/store, what tools it may call, which actions require confirmation, and what silent/text fallback exists.
- Select the narrowest architecture. Prefer a cascaded VAD → STT → LLM → TTS path when inspectability, replaceability, transcripts, or local components matter. Consider native audio only when it wins the same task/latency/privacy evaluation.
- Freeze and isolate. Use a project environment, exact dependencies/model revisions, loopback by default, and a test identity/provider project. Do not globally install or expose an unauthenticated realtime server.
- Draw two loops before one agent. Record the sensor → transport → realtime-model → playback perception loop separately from the task → action-agent → tool → receipt loop. Name every provider, model, gateway, vault, search, app, and persistence hop; never let “the agent” hide different authority or data processors.
- Build the state machine first. Define signed-out/ready/connecting/connected-without-worker/model-starting/listening/user-speaking/processing/search/action-awaiting-confirmation/action-running/assistant-speaking/interrupted/degraded/error/stopped states and legal transitions. One state owner drives transport, transcript, controls, audio, animation, and recovery.
- Bind identity and capabilities. Derive user identity server-side; use short-lived session/room tokens; scope room, publish source, subscribe, model, search, tool, app, and storage capabilities separately. A service credential plus caller-supplied user header is not identity proof.
- Define visual reference. State whether “this” means the latest live frame or an explicitly pinned frame. Preserve orientation/crop/zoom metadata, show the pinned state, and attach the authoritative image to downstream work instead of relying on another model's lossy description.
- Make confirmation a human state. Side-effecting or policy-gated work announces the proposed action, target, material parameters, and consequence; accepts an explicit approve/deny; expires on silence, hangup, session change, or input-hash change; and emits a receipt. The model, transport, recovery loop, or tool gateway may never answer its own
always_ask/confirmation event. - Instrument every boundary. Emit monotonic timestamps for input capture, speech start/stop, final transcript, request start, first model token, first TTS chunk, first playback, local buffer clear, server cancellation, search/action dispatch, confirmation request/answer, tool start/end, late-result enqueue/delivery, response completion, and disconnect.
- Design long work as a durable job. Assign an idempotency key and user/session owner, acknowledge after a bounded synchronous wait, report coarse progress without fabricated completion, persist through worker restart, and deliver the final result at most once in the current or next authorized session. A detached in-process promise is not durable execution.
- Budget context explicitly. Cap realtime-session duration, accumulated audio/video context, action-history briefing, frame size/rate, proactive listening, and search/tool spend. Prefer a bounded recent-task ledger over replaying unbounded history; keep memory writes off the latency-critical path until measured value justifies them.
- Run deterministic component checks. Test audio encoding/resampling, VAD boundaries, stale transcript rejection, event ordering, cancellation, tool argument assembly, playback buffer clearing, session/room recreation, token expiry, pin/unpin semantics, confirmation deny/timeout/reconnect, job dedupe/restart/single delivery, and empty/error cases without provider calls.
- Run the representative corpus. Cover target accents/languages, background noise, echo, short/long turns, pauses, corrections, overlap, interruption, tool calls, dense visual text, moving/pinned frames, camera loss, worker absence, provider errors, mobile/wearable devices, and cold/warm starts.
- Compare routes under one contract. Hold prompt, corpus, network, tools, concurrency, and evaluator constant. Report component and end-to-end results; do not compare a local cold run with a hosted warm demo or merge platform results from divergent architectures.
- Review privacy and security. Trace every byte of audio, transcript, camera image, search query, tool result, prompt, vault credential, analytics/crash event, and log. Verify consent/bystander indicators, mute/stop, retention/deletion, secret isolation, auth/rate limits, TLS/origin/egress policy, tool approval, OAuth revoke, tenant isolation, and impersonation resistance.
- Review the interface at normal and degraded states. Prove silent operation, visible transcript/state, keyboard focus, 44 px targets, 360 px layout, reduced motion, mute, stop, pin/unpin, voice-only fallback, reconnect, absent worker, provider failure, acoustic-echo-cancellation versus half-duplex state, and slow-network behavior.
- Canary with real users only after synthetic proof. Start with short, non-sensitive, low-authority sessions. Preserve anonymized aggregate traces and explicit user feedback without retaining raw audio or camera data by default.
- Promote or hold. Bind the accepted route to the project/tool owner, preserve the manifest and receipts, document fallback/rollback, and reopen review on any client, model, provider, transport, permission, processor, storage, or data-policy revision.
Multimodal Processor Map
For voice-plus-camera systems, complete this table rather than writing “uses AI”:
| Boundary | Record and prove |
|---|---|
| Capture client / wearable SDK | hardware, SDK revision/terms, mic/camera indicators, analytics/crash defaults, current/pinned frame semantics, local retention |
| Realtime transport | room/session identity, token issuer/TTL, media-source grants, region, encryption, reconnect and fresh-session rules |
| Realtime model | provider/model revision, audio/video formats, interruption behavior, context/session limits, retention, cost, fallback |
| Search path | provider, query derivation, grounding/citations, timeout, cost, data handling, when it bypasses full action execution |
| Action gateway/model | user binding, model/environment/session/vault identity, network policy, history compaction, confirmation boundary |
| Apps and tools | exact MCP/API servers, OAuth scopes, read/write authority, approval policy, receipts, revocation/deletion |
| Deferred work | durable queue/store, idempotency, retries, cancellation, progress, late-result expiry and at-most-once delivery |
| Operator surface | health, worker/room/model liveness, spend, audit trail, emergency stop, rollback and processor change alerts |
Evaluation Matrix
| Axis | Required evidence |
|---|---|
| Turn latency | end-of-speech → final transcript; transcript → first token; first token → first audible audio; total p50/p95/p99 |
| Interruption | speech onset → local playback clear; server cancellation; stale output suppression; false barge-in rate |
| Recognition | WER plus task/slot accuracy on target languages, accents, noise, names, numbers, and domain terms |
| Response | instruction/tool correctness, hallucination/grounding, tool confirmation, response completeness |
| Speech output | intelligibility, pronunciation, naturalness rubric, first-chunk latency, glitches/dropouts |
| Transport | disconnect/reconnect, packet loss/jitter behavior, buffer growth, mobile/corporate-network compatibility |
| Reliability | session success, cold-start failure, provider timeout/error, concurrency degradation, availability |
| Privacy/security | processor/retention map, auth/rate-limit proof, egress capture, recording/camera indicators, deletion test |
| Economics | compute/provider/search/tool cost per successful minute and per completed user job |
| UX/accessibility | state comprehension, stop/mute/recovery success, transcript/silent fallback, keyboard/mobile/reduced-motion proof |
Interface Contract
GPT-Live-1 adds a useful architecture signal: keep interruptible listening and
speaking in a low-latency duplex layer, while a backend reasoner owns tools and
longer deliberation. The interface still needs explicit controls for interruption,
tone, pacing, emotion, language, and response length. The announcement's linked
official article was unavailable during review, so model-specific capability
claims remain provisional. Source: X/@WorldLabsAI
2098099269551149398, reviewed 2026-09-11
Voice UI needs perceptual redundancy. Audio alone cannot communicate state, and animation alone cannot communicate meaning.
- Map every runtime state to text, controls, and optional motion/color; never use color or sound as the only cue.
- Let actual input/output energy drive the primary voice visualization. Timer-driven breathing may support idle state but cannot impersonate live audio.
- Keep transcript/tool history reviewable while marking partial versus final text.
- Barge-in clears local buffered audio immediately and cancels server work; stale text/audio/tool output cannot reappear afterward.
- Stop and mute are always reachable. Camera and search tools are off until explicitly enabled and visibly active.
- Show whether a room is connected but waiting for its worker, and whether the model is starting, listening, thinking, speaking, awaiting confirmation, or running a tool.
- A pinned frame is visibly distinct from the live feed and survives only for its declared task/session lifetime. Camera failure falls back to an explicit voice-only state.
- Show degraded audio mode, relevant latency, and late-task state. Never use a cheerful acknowledgement or haptic as proof that a tool completed.
- Treat the HF Space's “color belongs to the voice” and mono-machine-label pattern as a useful local direction, not a global design-system mandate. Compile the accepted visual direction into project tokens and Design System constraints.
Promotion Gate
Promote a route only when:
- exact source/package/model/provider identities are reproducible;
- all deterministic protocol/state tests pass;
- representative quality and p95 latency meet the declared product SLO;
- interruption, tool approval, auth, rate limiting, retention/deletion, and degraded states are proven;
- a confirmation actor cannot approve its own request, and deny/timeout/disconnect paths leave no action behind;
- session identity, media-source grants, per-user tool/vault boundaries, deferred-job durability, and late-result single delivery are proven;
- cost and capacity fit the expected session profile;
- the interface passes keyboard, mobile, silent, reduced-motion, error, and recovery review;
- a fallback to text or the incumbent voice route exists.
A source-authored demo, star count, qualitative “natural” claim, or one median latency is never sufficient.
Run Contract
This workflow follows Workflow Run Contract. Preserve raw traces and media under their authority policy, publish only allowed aggregate evidence, and write durable route changes back to the tool, design, project, and graph owners. A blocked provider, model license, test corpus, privacy review, or hardware requirement remains explicit rather than becoming a no-op approval.
Timeline
-
2026-09-11 | Added GPT-Live-1 as a provisional duplex-layer signal and retained the backend reasoner/tool boundary plus interruption and expression controls as the stable product contract. Source: X
2098099269551149398; local media review -
2026-08-12 | Added Pipecat as the retained modular Python/provider/transport/multi-agent orchestration route from pinned commit
2a107a07; preserved the same component identity, consent, latency, interruption, authority, privacy, provider, cost, and failure proofs rather than treating its broad integration catalog as a production verdict. Source: X2077743623781965895; pinned Pipecat repository evidence -
2026-08-11 | Replayed the GPT-Realtime startup-ideas source and compiled it into a five-layer feasibility classifier, five opportunity lanes, and the current OpenAI route. Kept the services-as-software signal; rejected unsupported silent-mode, cost, duration, autonomy, and historical-impossibility claims; made regulated, monetary, legal, medical, insurance, housing, minor-safety, and product-safety actions explicitly human-owned. Source: X
2061129813750915508;.brain/artifacts/x/2061129813750915508/gpt-realtime-startup-ideas-review/source-audit.md -
2026-08-11 | Replayed current VisionClaw and expanded the workflow for wearable/multimodal systems: separate perception and action loops, processor maps, current-versus-pinned visual reference, scoped room identity, non-self-approvable spoken confirmation, durable late work, context budgets, liveness/degraded states, and platform-specific proof. Source:
.brain/artifacts/x/2037892504683716650/visionclaw-review/source-audit.md -
2026-08-11 | Created from a full replay of HF Realtime Voice and the current Hugging Face backend/Space. Added route selection, frozen component identity, stage timing, interruption/quality/security/privacy/economics evaluation, sensory state design, and release-versus-main proof requirements. Source: X
2072825424800006350; capture manifest