Build an AI tutor avatar students can talk to live
Add a live AI tutor to a learning app: your server sets the lesson and the student's history, the tutor drives on-screen exercises through your own functions, and each session comes back as a signed transcript for progress tracking.
A tutor built on Realtime Avatar is a voice and video call between a student and a teacher character you define, rendered in your web or React Native app. The platform runs the listening, the turn-taking, the language model's reply, the voice and the face. Your app owns the curriculum: what the lesson covers, what the student already knows, and what counts as progress.
The lesson is decided on your server
When a student starts a session, your connect route returns the policy for that call. instructions is the teacher's brief: the level, the target language, how to correct (for example, recast the mistake and ask again), and rules such as one question at a time. context replays up to 32 prior messages as memory, so a lesson can open with last week's summary and the words the student struggled with. A new session does not inherit memory on its own; what carries over is what your server chooses to send. maxSeconds sets a hard stop of up to 30 minutes, enforced on the platform side even if the client stops reporting. This is the session callback from the quickstart:
// What the character knows for THIS call. Whatever the browser sent for these
// concerns is discarded: this callback is the only source.
session: async ({ request, avatarId, mode }) => {
const user = await currentUser(request);
const character = await db.character(avatarId);
return {
instructions: character.prompt,
context: await db.recentTurns(user.id, avatarId),
maxSeconds: secondsTheBalanceAffords(user, mode),
};
},Speaking practice that behaves like a conversation
- Every call is full duplex. A student can interrupt mid-sentence and the tutor stops; a hesitation or an "um" is not taken as the end of their turn, because the end of a turn is judged by what was said rather than by how long the student has been quiet.
- The tutor follows a language change inside a single sentence, so a beginner who falls back to their first language for one word does not derail the exercise.
- A per-call
voiceoverride takesspeed,emotionandlanguageon a Fish voice, so a beginner class can hear the same teacher speak more slowly. - With
camera: trueauthorized by your server and switched on by the student, the tutor can look at what they hold up, such as a worksheet. It samples at most once every two seconds: occasional image understanding, not continuous video.
Exercises on screen, driven by tools
Grant clientTools: true at mint, and the tutor can call functions you register in the page: show the next card, check an answer, reveal a hint, record a score. They run in your app with your data, and each has 2.5 seconds to return. The useful split is that your code grades and the model talks. In the Math Studio demo the tutor has six tools (next_task, show, demonstrate, answer, progress and celebrate). The app, not the model, sets the difficulty, and the tutor is told never to say right or wrong before answer has checked it.
Put it in your app
The client half is one component pointed at your connect route, the same on every web framework. For a phone app, realtime-avatar/react-native wraps LiveKit's React Native room and owns the audio session.
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" />Track progress after each lesson
Register transcript at mint and a signed POST arrives after the call with both sides of the conversation and the tool calls the model acted on, with their results. The score of record is the one your answer-checking tool writes as it runs, because the check executes in your app; the transcript puts it next to what was said. Tag the session with metadata (a student id and a lesson id) and it comes back verbatim, so you can update the student's record and feed the next lesson's context without a lookup.
Can I build interactive character stories or learning experiences? Yes. Define an original or appropriately licensed character, its speaking style and the context your server supplies for each call. Your application owns the story, source material, permissions and consequences of a user's choices. A character-driven lesson or story is an application design, not a guarantee of historical accuracy, learning outcomes or professional advice. Start with the Studio to evaluate a character, then use the SDK to integrate the experience.
What it costs for a class
Assume 100 lessons a month at 12 minutes each: 1,200 minutes on air, with up to 5 running at the same time. Under those assumptions the lowest-cost published plan that fits is Developer at $75 a month, about $0.75 per lesson. Starter (3 simultaneous streams) cannot hold that peak, so it is not listed.
| Plan | Subscription | Included minutes | Overage | Estimated total |
|---|---|---|---|---|
| Developer | $24 | 600 | $51 (600 min at $0.085/min) | $75 |
| Studio | $119 | 3,000 | $0 | $119 |
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 Math Studio: a live tutor who works a problem through with you on a shared canvas. The student answers by dragging the diagram, and the tutor works from that workspace rather than from a chat box. It needs a free account, and an account's first 2 minutes of hosted demos are free.
Then read Calls for the session policy and voice options, Tool calling for the tool plane and the transcript, and React and React Native for the camera control and the native entry.
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.