Use case

Add a live AI avatar support agent to your website

Put a talking AI support agent on your site: your server sets its brief and the customer's context, your own functions look up orders and tickets mid-call, and a signed transcript reaches your backend after every call.

A support avatar on Realtime Avatar is a live voice and video call between a customer and a character you define, embedded in your own page. You write three pieces: a server route that starts the call and briefs the agent, the functions it may call to look things up, and a webhook that receives the conversation afterwards. Listening, turn-taking, the language model's reply, the voice and the rendered face are the platform's job, metered together by the second.

How the pieces fit

  1. Your server starts the call. A connect route mounted with the SDK (for example createRealtimeAvatarRoute from realtime-avatar/nextjs) checks that the visitor may call and returns the session policy. instructions is the agent's brief: its tone, what it may promise, when to hand off. context (initial_context on the wire) replays up to 32 prior messages, which is where a returning customer's last conversation or the open ticket summary goes. Whatever the browser sends for these fields is discarded.
  2. Your page registers tools. Grant clientTools: true at mint, then declare functions such as check_order after the room connects. They run in your page against your own API, with your credentials and your authorization rules. The platform never hosts or executes them.
  3. Your backend gets the record. Register transcript with an https URL and a secret, and a signed POST arrives after the call with both sides of the conversation and the tool calls the model acted on.

Answers come from your systems

There is no hosted knowledge base to upload to. The agent knows what its instructions and context say, plus whatever your tools return during the call. For support that is the boundary you want: order status, refund eligibility and account details come from the systems that own them, called with the customer's own session, so the agent can only see what your API would show that customer. This is the tool from the Tool calling docs:

// Server: the connect route opts the call in. Policy, like everything else.
session: async () => ({ instructions, clientTools: true }),

// Page: after room.connect(). The name she calls is the record key.
import { attachAvatarTools, type AvatarTool } from "realtime-avatar/tools";

const check_order: AvatarTool<{ order_id: string }> = {
  description: "Look up the status of an order by id",
  parameters: {
    type: "object",
    properties: { order_id: { type: "string" } },
    required: ["order_id"],
  },
  execute: async ({ order_id }) =>
    await fetch("/api/orders/" + order_id).then((r) => r.json()),
};

const { accepted, rejected } = await attachAvatarTools(room, { check_order });

Each tool has 2.5 seconds to return. That is a conversational floor, not a setting: past it the platform abandons the call and tells the agent it failed. For a slow lookup, have the agent say it is checking, return an acknowledgement inside the deadline, and put the full answer on screen when it lands. Read the rejected list: a tool whose schema was refused is one the agent simply does not have.

Two steering calls cover the lines that must not drift, with the text decided by your server. sendTurn(text, { instructions }) steers one reply with a lookup result, and the instructions apply to that turn only, so the result does not leak into later answers. sendClosingTurn(text) speaks a closing line verbatim, never routed through the model, then ends the call: the place for a required disclosure or the case number in a goodbye.

Hand-off and escalation

Escalation is your product decision, built with the same tool plane: a tool such as escalate_to_human can open your existing chat or create a ticket, and the agent tells the customer what happens next. The call itself behaves like a conversation with nothing to configure: a customer can interrupt mid-sentence and the agent stops, a cough or an "mm-hm" does not cut it off, and a pause is not taken as the end of their turn.

Put it on your page

The client half is one component pointed at your connect route. Use mode="voice" for an audio-only widget; the default renders the agent's face as live video over LiveKit WebRTC. The same SDK ships a React Native entry for a mobile support screen.

import { AvatarCall, createProxyClient } from "realtime-avatar/react";

const client = createProxyClient({ proxyUrl: "/api/realtime-avatar" });

<AvatarCall client={client} avatarId={avatarId} />

// Audio only: no video track is requested, so nothing renders and
// nothing decodes.
<AvatarCall client={client} avatarId={avatarId} mode="voice" />

After the call

The transcript webhook carries the full two-sided transcript (segments) and the tool calls with their arguments, results and durations (tool_calls). It is signed with HMAC-SHA256 (x-rta-signature over the timestamp and the raw body), delivered at least once, and echoes the metadata you set at mint, so a customer or ticket id attributes it without a lookup. Store it next to the ticket.

You get the transcript and decide where it lives: register a transcript webhook when your server mints the call, and after it ends the platform POSTs the full two-sided transcript and the tool calls the model made to your HTTPS endpoint, signed with HMAC-SHA256 over the timestamp and body so you can verify it before storing it. Separately, the platform keeps private session logs for diagnostics; they can contain conversation text, are kept while the account exists, and are removed when the account is deleted. Request diagnostics, billing records and model-provider processing follow the retention rules in the privacy policy.

What it costs at support volume

Assume 400 support calls a month at 5 minutes each: 2,000 minutes on air, with up to 5 running at the same time. Under those assumptions the lowest-cost published plan that fits is Studio at $119 a month, about $0.30 per support call. Starter (3 simultaneous streams) cannot hold that peak, so it is not listed.

PlanSubscriptionIncluded minutesOverageEstimated total
Studio$1193,000$0$119
Developer$24600$119 (1,400 min at $0.085/min)$143

The estimate is the monthly subscription plus any minutes beyond the plan's included minutes at its published overage rate. Speech recognition, the language model, the voice and the rendered video are all inside a live minute. It excludes avatar creation, taxes, annual discounts and your own hosting. Try your own volume in the cost calculator, or see every plan on the pricing page.

See it, then build it

The closest working demo is Live shopping: a live storefront where every price, offer and stock claim comes from a tool. A support agent answering order and stock questions is the same pattern: the prompt forbids stating a price, stock count or delivery time that a tool did not just return. It needs a free account, and an account's first 2 minutes of hosted demos are free.

Then read Calls for everything the session policy decides, Tool calling for the deadline and the transcript format, and React and React Native to embed the call.

Create a free Sandbox workspace to try it: it includes 480 credits once per account, which is 8 realtime minutes if you spend them all on air, and you can start on an example avatar before making your own. The quickstart takes you from a key to a live call.