Skip to main content
A voice assistant inside your product that can act on the page — scroll to a product, open a form, apply a filter — not just talk about it.

The shape

Your server creates the call; your browser joins it. That split is what keeps your API key private.

1. Your server endpoint

OmniaSession sends your key with X-API-Key from wherever it runs. Constructed in the browser with a production key, that key is visible in devtools.Either do what’s shown here — create the call server-side and hand over only the URL — or point the SDK’s baseUrl at a proxy you control. Direct browser use is fine for internal tools and prototypes, not for a key that can spend credits.

2. Join from the browser

Start this from a real click. Browsers deny microphone permission far more often when it’s requested on page load, and they block audio playback entirely until the user has interacted with the page.

3. A client tool that drives the UI

Define the tool with type: "client" — no URL, because nothing is being called over HTTP:
Client tool parameters have no location — nothing is being placed into an HTTP request.
Then register a handler by name:
The SDK matches invocations to results for you — you never touch an invocationId.
The registered name must match modelToolName exactly. A mismatch is the most common reason a correctly-defined client tool never fires.

4. Feed the agent context mid-call

sendText injects text as though the user had said it. With deferResponse, the agent absorbs it without being prompted to reply:
That’s how you keep a voice assistant aware of what’s on screen.

5. Controls

React

HTTP or client?

Client tools do not exist on phone calls — there is no client to run them in. An agent that answers a phone number needs HTTP or system tools.

SDK reference

Every method and event.

Client tools

The protocol, with and without the SDK.