Architecture
Use the same pipeline as any LemonSlice voice agent: speech-to-text, your LLM (with persona and memory), text-to-speech, then LemonSlice for video. Start from the quickstart, or add the avatar to an existing agent with LiveKit, Pipecat, Agora or a WebSocket. Companions are often anime, cartoon, fantasy or stylized characters. Any single image works; see avatar image tips.Choose a model
See pricing for plan details.
Add emotions and actions
Companions feel more alive when they react. With CWM-1 or CWM-1 Lite, setaction_engine="natural" and the Action Machine picks contextually appropriate actions and emotions automatically. On LiveKit, publish the user’s speaking state so the character also reacts while listening.
For story moments (a laugh, a wave, a surprised look), trigger specific actions yourself from your companion’s state. See CWM-1 for automatic, LLM-driven and manual control.
Change outfits and scenes mid-call
Companion apps often let users change the character’s look or move the story to a new place. Real-time avatar updates swap the reference image during a call in about 600 ms. Call it from an LLM tool (for example, “change into your rain jacket”), from your backend, or from a user upload.Plan for long sessions
Companion conversations can be long and quiet at times. Check these 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 passagent_idand to 60 seconds otherwise; on Agora it defaults to 120 seconds and is set withactivity_idle_timeout. Raise it for conversations 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 for multi-hour sessions.
Keep costs predictable
Video minutes cost more than text or voice. Common patterns in companion apps:- Offer video as a premium mode, and keep text and voice-only chat for quick check-ins.
- Cap video minutes per user per day.
- Use CWM-1 Lite for high-volume tiers.
- End sessions as soon as the user leaves (listen for disconnects as described in the production checklist).

