AI COMPANIONS · VOICE AGENTS
Give your AI companiona character that feels alive.
THE SHORT ANSWER
Give it a stylised character rather than a realistic face, and make it react to the state of the conversation, not only to its words: idle when nothing happens, listening while the user speaks, thinking while the AI prepares its answer, talking while it speaks, plus a few reactions such as laughing or celebrating. With Masko you make that character and every state from a description or your own design, give it a voice, and play it with the open-source Masko player, which follows the state your voice agent already reports (LiveKit, ElevenLabs, Pipecat or Vapi) on a transparent background.
Why a character, not a realistic face.
The companions people talk to every day, such as Tolan’s alien or Duolingo’s Lily, are stylised characters, not realistic people. A drawn character carries a personality at a glance, never falls into the uncanny valley, and is forgiven for a mouth that is not perfectly in sync. It also belongs to your brand, so users remember your app rather than a stock face.
What makes a companion feel alive is less the talking than the moments between the lines. A character that freezes while the user speaks, or stares blankly while the AI thinks, feels like a picture. One that leans in to listen and looks up while it thinks feels like someone.
The states every AI companion needs.
Make one short animation per state, all from the same picture of your character, each starting and ending in the same resting pose so any state can follow any other.
| State | What the character does |
|---|---|
| Idle | Breathes and blinks, almost still, for long stretches. |
| Listening | Leans in, nods a little while the user speaks. |
| Thinking | Looks up or aside while the AI prepares its answer. |
| Talking | Moves its mouth and hands while the voice plays. |
| Reactions | Laughs, gets surprised, celebrates or comforts, once each. |
| Welcome back and asleep | Greets the user when they return, dozes when they are away. |
- Keep listening and thinking short. Short loops let the character switch the moment the conversation changes, so it never waits on a long clip.
- One character, many moods. Reactions are what users remember; start with three and add more as you see which moments your users share.
Give it a voice.
Each Masko character can have its own voice. For the lines you know in advance, such as a greeting, the onboarding or a daily check-in, Masko makes talking animations with the mouth in sync and the voice included, $1.25 for five seconds. For live replies from your AI, play the talking state while your voice agent speaks, with the voice from your own text-to-speech.
Follow your voice agent’s state.
Voice platforms already tell your app what the agent is doing. Pass that state to the Masko player and it plays the right animation and the move between them. The character plays inside your app with a transparent background, so it can sit on your own screen instead of in a video box.
In Masko the states live in a canvas with inputs named after them. Release the canvas, then set those inputs from your agent’s state.
import { useEffect, useRef } from 'react';
import { useVoiceAssistant } from '@livekit/components-react';
import { MaskoPlayer, type MaskoHandle } from '@masko/player/react';
export function CompanionCharacter({ url }: { url: string }) {
const mascot = useRef<MaskoHandle>(null);
const { state } = useVoiceAssistant();
useEffect(() => {
mascot.current?.set('listening', state === 'listening');
mascot.current?.set('thinking', state === 'thinking');
mascot.current?.set('talking', state === 'speaking');
}, [state]);
return <MaskoPlayer ref={mascot} url={url} style={{ width: 240, height: 240 }} />;
}- ElevenLabs Agents. Use the conversation’s speaking and listening mode to set talking and listening.
- Pipecat and Vapi. Use the events sent when the bot or the user starts and stops speaking.
- Reactions. Let your agent call a tool such as react("laugh"), and fire that reaction on the character.
