LlamaCalls: AI agents that join your calls. Try it now

Guides · How-to

How to build an AI tutor that talks on a video call

A tutor asks, waits and hints rather than lecturing. Here is how to get an AI agent to do that on a live call, and how to wire it into your learning app.

Updated

A good tutor doesn't lecture. They ask a question, wait, notice where the student is stuck, and give the smallest hint that gets them moving. Text chatbots can do some of this, but a lot of learners, younger ones especially, do better talking out loud to someone who talks back. An AI tutor on a voice or video call is now practical to build. Here's what goes into one and how to set it up with LlamaCalls.

What makes an AI tutor work

The teaching instructions matter most

A language model's default is to explain everything and give the answer, which is the opposite of tutoring. The instructions have to say otherwise, explicitly: ask one question at a time, never hand over the answer, ask what the student tried first, give the smallest useful hint, and ask the student to explain their reasoning back. Short turns matter too. A tutor that talks for a minute at a time loses a teenager fast.

Fast turn-taking

Students pause to think, start a sentence, stop, and start again. The agent has to wait through a thinking pause without jumping in, and stop talking straight away when the student cuts in. This is mostly a property of the voice pipeline. Our guide to the voice agent architecture explains where the delays come from.

Seeing the work

Maths and science tutoring often depends on seeing what the student wrote. A tutor that can see the camera can look at a worked problem held up to it, or at a document the student shares on screen. A tutor that can share its own screen can draw on a whiteboard or open the page you're working from.

Knowing the student

A tutor that starts from zero every session is frustrating. Your app should pass in what the student is working on, what they struggled with last time, and the lesson goal, either in the instructions or through tools the agent can call.

Building it with LlamaCalls

LlamaCalls runs the call and the agent behind one request: speech recognition, the model, the voice, an optional video face, and the media transport. You describe the tutor per call, so each student can get their own lesson plan without storing an agent for each one.

1. Start a call for a student

// On your server. The key spends your credit, so keep it out of the browser.
const res = await fetch('https://llamacalls.com/api/calls', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.LLAMACALLS_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    agent: {
      name: 'Ms Rivera',
      instructions: [
        'You are Ms Rivera, a patient maths tutor for a 14-year-old student.',
        'Today: solving linear equations. Ask one question at a time.',
        'Never give the answer straight away. Ask what they tried, then give the smallest hint that helps.',
        'When they get one right, ask them to explain why it works before moving on.',
        'Keep turns short. Check understanding every few minutes.',
      ].join(' '),
      greeting: 'Hi! Ready to look at some equations? Tell me what you remember about solving for x.',
      capabilities: {
        language: 'en',
        avatarId: process.env.TUTOR_AVATAR_ID,
        vision: true,
        screenShare: true,
        recording: 'transcript',
      },
      mcpServers: [
        { name: 'lessons', url: 'https://tutor.example.com/mcp', token: studentToken },
      ],
    },
    metadata: { studentId: student.id, lesson: 'linear-equations-1' },
  }),
});
if (!res.ok) throw new Error((await res.json()).error);
const { room, joinUrl } = await res.json();
  • avatarId gives the tutor a face, chosen from the stock faces or a portrait you upload. Leave it out for a voice-only call at a lower rate.
  • vision lets the tutor see the student's camera and screen share. screenShare lets it open its own browser and share it, including a whiteboard it draws on and PDFs it opens.
  • mcpServers connects the tutor to your own tools for this call, such as a server that returns the student's last scores or records progress. Pass a token scoped to one student.
  • language can be any of the 13 supported languages, which is useful for language practice as well as for teaching in a student's first language.

2. Put the call in your app

Embed joinUrl in an iframe with allow="microphone; camera; autoplay". On iOS, the Swift package joins the same call natively. The step-by-step guide to adding an agent to a video call covers both.

3. Steer the lesson from your server

When something happens in your app during the call, like a worksheet submitted or a timer running out, send the tutor a note. It uses the note in its next reply, never reads it aloud, and with speakNow responds straight away if nobody is speaking.

curl https://llamacalls.com/api/calls/$ROOM/notes \
  -H "Authorization: Bearer $LLAMACALLS_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "text": "The student just submitted the worksheet with question 3 wrong. Go over it.", "speakNow": true }'

4. Afterwards

GET /api/calls/:room/transcript returns the conversation line by line, which your app can summarise into notes for the next session or for a parent or teacher. Transcripts are free.

Safety and honesty

  • Tell students and parents they're talking to an AI, and give the tutor a name that doesn't pretend to be a real teacher.
  • Language models make mistakes, including in maths. For graded work, check answers with your own tools rather than trusting the model, and let the tutor call those tools through MCP.
  • Recording children raises legal questions that vary by country, such as parental consent. Decide what you record and keep, and check the rules where your students live before you launch.

What it costs, and the alternatives

A voice lesson is $0.05 a minute and a lesson with a video face is $0.08 a minute, billed by the second from prepaid credit, with speech, model and voice included. A 30-minute lesson with a face costs $2.40.

You can also build a tutor yourself on LiveKit Agents or Pipecat, which gives full control over every model and turn timing, and supports phone calls, at the cost of running the pipeline. For a text-first study app, a chat interface with a strong model may be all you need. A call makes the most sense when speaking matters: younger students, language practice, oral exams and anyone who learns better by talking it through.

FAQ

Questions, answered

Can an AI tutor see the student’s work?

With vision on, a LlamaCalls agent sees the student’s camera and screen share, so it can look at a worked problem held up to the camera. With screen sharing on, it can open its own browser and whiteboard and share them.

How do I stop the AI tutor giving away answers?

Say so explicitly in its instructions: ask one question at a time, ask what the student tried, give the smallest useful hint, and ask the student to explain their reasoning. Short turns help too.

How much does an AI tutoring call cost?

On LlamaCalls a voice lesson is $0.05 a minute and a lesson with a video face is $0.08 a minute, billed by the second with speech, model and voice included.

Which languages can the tutor speak?

LlamaCalls agents support 13 languages, set per call: English, Spanish, French, German, Hindi, Russian, Portuguese, Japanese, Italian, Dutch, Chinese, Malay and Tamil.

More guides

Make your first call today

Sign up, describe your agent and ring it.

Browser and Google MeetA lifelike face or just a voiceYour tools, your accounts