Voice AI SDK Features.

A precise, technical look at every feature of the Voxide client-side SDK: AI function calling, live agent state awareness, a drop-in voice widget for React, and domain-locked publishable keys. The core is headless and runs on any framework, or on a plain script tag.

AI function calling, state awareness, and guardrails

Capability Registry

Register your app's real JavaScript functions with a plain-English description and typed params. ai.register() is all it takes, the agent calls your actual code, not a script.

Live State Awareness

ai.bindState() feeds the agent your current UI state on every turn, so it reasons over what the user is actually looking at instead of a stale snapshot.

Confirmation Guardrails

Mark any action dangerous: true and wire onConfirmation(), mutating or destructive calls pause for explicit user approval before they run.

Middleware Pipelines

ai.use() lets you intercept, validate, or block executions before they run, check auth state, rate-limit, or log every call the agent makes.

Idempotent Manifest Sync

Every init ships a versioned snapshot of your capabilities. If a sync fails or a project's manifest is locked, the SDK simply keeps running on the last known-good version.

Domain Whitelisting & CORS

Every project locks down exactly which origins may open a Voxide connection, enforced with strict CORS checks at the WebSocket handshake, not just a dashboard toggle.

Knowledge Bases (RAG)

Upload documents, let Voxide chunk and embed them, and attach a knowledge base to any project so the agent answers grounded in your content.

Themeable, Multi-language Widget

On React and Next.js, ship <VoxideWidget> with your accent color, position, and title out of the box. Anywhere else the headless core gives you the same agent and voice session to render however you want, and ai.setLanguage() switches voice language at runtime either way.

Graceful Fallbacks

setFallback() gives the agent a custom message and suggested next steps for anything it can't do, no dead-end "I don't understand."

Wake Word Activation

Pro

Set a phrase like "hey acme" and visitors start talking without clicking, detected on-device, so nothing streams until it's heard. An accessibility path for anyone who can't see or reach the launcher. Pro.

Human Handoff

Pro

When a request is beyond the agent, it offers to connect the visitor to a real person and files a support request, to your inbox, a webhook, or your dashboard, with the conversation attached. You write when to escalate in plain English. Pro.

Personal-data Redaction

All plans

Emails, phone numbers, card and ID numbers are stripped before anything is stored, not hidden afterwards, removed. So the data your visitors speak isn't visible to you, to us, or in a backup. On every plan.

How the SDK talks to your app

Data flow architecture
1. Client Audio

User speaks. Mic samples at 16kHz. Float32 array is converted to PCM-16 and chunked over active WebSocket.

2. State Injection

Browser automatically appends latest bindState() JSON frame to request context before matching tools.

>>
3. Action Executed

Gemini matches tools, triggers client-side handler in browser context, and returns status output to stream.