> ## Documentation Index
> Fetch the complete documentation index at: https://lemonslice.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Build an AI tutor avatar

> Give an AI tutor or language-learning app a real-time video tutor with LemonSlice: architecture, choosing a model, characters for young learners, low-latency conversation practice, lesson length and cost per student.

LemonSlice is a real-time interactive avatar API. In a tutoring or language-learning app, it turns your tutor's image into a live, lip-synced video tutor that listens, explains and practices with students. Your app keeps its own LLM, curriculum, lesson logic, grading and student data; LemonSlice adds the face.

This guide covers the choices that matter most for tutoring apps.

## Architecture

Use the same pipeline as any LemonSlice voice agent: speech-to-text, your LLM (with the lesson plan and the student's progress), text-to-speech, then LemonSlice for video. Start from the [quickstart](https://lemonslice.com/docs/introduction/quickstart.md), or add the avatar to an existing agent with [LiveKit](https://lemonslice.com/docs/livekit/index.md), [Pipecat](https://lemonslice.com/docs/pipecat/index.md), [Agora](https://lemonslice.com/docs/agora/index.md) or a [WebSocket](https://lemonslice.com/docs/websocket/index.md).

LemonSlice works with any LLM and any text-to-speech voice, so the tutor speaks any language your TTS supports. For language practice, pick a TTS voice and a speech-to-text model for the language being taught.

No-code option: create a tutor with the [widget](https://lemonslice.com/docs/widget/overview.md), add your course material to its knowledge base, and embed it on your course site.

## Choose a model

| Model | Use it when | Availability |
| - | - | - |
| LemonSlice-2.1 | Default choice for photoreal and most stylized tutors | All paid plans |
| [Cartoon](https://lemonslice.com/docs/reference/cartoon-model.md) | Animal, mascot or storybook tutors for young learners | All paid plans |
| [Flash](https://lemonslice.com/docs/reference/flash-model.md) | Conversation practice, where lag breaks the flow | Ultra and Enterprise |
| [CWM-1](https://lemonslice.com/docs/reference/cwm-1.md) | The tutor should react with emotions and actions, such as celebrating a right answer | Ultra and Enterprise |
| [CWM-1 Lite](https://lemonslice.com/docs/reference/lite-model.md) | Many students at once, where cost per minute matters most (from about \$0.05/min) | Ultra and Enterprise |

See [pricing](https://lemonslice.com/pricing) for plan details.

## Pick the tutor's character

Any single image works: a photo, an illustration or a mascot. Children often engage more with a character than with a text box, so consider a cartoon tutor for younger students. See [avatar image tips](https://lemonslice.com/docs/prompting-guide/avatar-image-tips.md).

## Show exercises and track progress

Use tool calling in your agent to show a problem on screen, check an answer or record progress while the tutor talks. See the [tool calling example](https://lemonslice.com/blog/form-filling-demo). With CWM-1, you can also trigger an action when a student gets something right; see [CWM-1](https://lemonslice.com/docs/reference/cwm-1.md).

To change the tutor's look or scene for a new lesson or unit during a call, use [real-time avatar updates](https://lemonslice.com/docs/reference/realtime-updates.md).

## Keep replies fast

Conversation practice depends on quick turn-taking. Budget latency across the whole pipeline, not just the avatar: see [Budget your latency](https://lemonslice.com/docs/reference/production-checklist.md#budget-your-latency). The [Flash](https://lemonslice.com/docs/reference/flash-model.md) model has the lowest avatar time-to-first-byte.

## Plan for lesson length

Lessons can include pauses while students think or write. Check these [timeouts](https://lemonslice.com/docs/reference/production-checklist.md#check-timeouts) before launch:

* **Idle timeout** ends a session when the avatar has not spoken for a while. On LiveKit, Pipecat and WebSocket sessions it is set with `idle_timeout`, which defaults to your avatar's configured idle timeout when you pass `agent_id` and to 60 seconds otherwise; on [Agora](https://lemonslice.com/docs/agora/index.md) it defaults to 120 seconds and is set with `activity_idle_timeout`. Raise it for lessons with long pauses, and end sessions yourself so you don't pay for stale calls.
* **GPU timeout** (default 30 minutes) caps session length. Contact [support@lemonslice.com](mailto:support@lemonslice.com) for longer lessons.

## Keep cost per student predictable

* When the student leaves, end the LemonSlice session yourself instead of waiting for the idle timeout: disconnect the room or terminate the session on [LiveKit](https://lemonslice.com/docs/livekit/index.md), call the leave API on [Agora](https://lemonslice.com/docs/agora/index.md), send `terminate` on a [WebSocket](https://lemonslice.com/docs/websocket/index.md#end-the-session), or send a `force-end` control event for [hosted Daily sessions](https://lemonslice.com/docs/reference/production-checklist.md#check-timeouts).
* Use video for speaking practice and live explanations; keep text for quick questions.
* Use CWM-1 Lite for high-volume programs.

## Safety and accuracy

Ground explanations in your own curriculum and check answers before students rely on them. Age-appropriate content rules, moderation and student privacy belong in your LLM layer and your data policies, before text reaches TTS and the avatar. Tell students they are talking to an AI.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.