Last verified: 2026-08-05
Overview
Use this integration to put a streaming LiveAvatar avatar in front of a deployed Cartesia Line agent. Your Line agent owns the prompt, tools, voice, and turn-taking; LiveAvatar’s Cartesia Agent Connector runs the bridge and renders lip-synced video from the agent’s audio. You pass anagent_id and a stored Cartesia API key when creating the session — no audio pipeline of your own.
Prerequisites
- Cartesia Line agent deployed with an
agent_id(Line quickstart, agents listed at play.cartesia.ai/agents) - Cartesia API key (
sk_car_...) from Cartesia keys - LiveAvatar API key from app.liveavatar.com/developers
- Node.js 22+ and pnpm 9+
Quick start
The LiveAvatar Web SDK repo ships a Next.js demo app with a LITE Mode session route. Add your Cartesia agent config to that route and run it.Store your Cartesia API key with LiveAvatar
LiveAvatar keeps the key by reference, so session requests carry a The response returns an
secret_id instead of the key itself.Set the environment variables used in the request:id. Use it as secret_id in the next step.Add your LiveAvatar API key
Set
API_KEY in apps/demo/app/api/secrets.ts. The demo ships with a working AVATAR_ID — swap it for one of your own avatars later.Point the LITE session at your Line agent
Add Both
cartesia_agent_config to the session token request in apps/demo/app/api/start-lite-session/route.ts:secret_id and agent_id are required. LiveAvatar provisions a LiveKit room and dispatches a worker that talks to your Line agent.Run the demo
Session events
Cartesia connector sessions use LiveAvatar’s FULL Mode event system over the LiveKit data channel, not LITE Mode WebSocket events.LiveAvatarSession emits them as typed events.
Run this in an ES module (for example, a "use client" module in the demo app) or wrap the body in an async function — the snippet uses top-level await.
Configuration
cartesia_agent_config fields on the create session token request:
Your Line agent owns its voice, prompt, and language, so LiveAvatar takes no per-session overrides for them.
To keep the config server-side, save it once as a stored voice agent of type
cartesia_agent and reference it by id instead — see the connector docs for that payload.