Skip to main content
skill CX Codex

liveavatar-debug — Claude Code skill: debug LiveAvatar

Symptom-based troubleshooting for LiveAvatar integrations: a silent avatar, garbled audio, sessions that won't start. It walks from symptom to cause.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add heygen-com/liveavatar-agent-skills --skill liveavatar-debug -a claude-code
Open on GitHub

What liveavatar-debug does

The skill works as a symptom index. You open the section that matches your problem — silent avatar, distorted audio, a 401, missing events — and get a list of likely causes with checks. There are no scripts to run. It is text the agent reads and applies to your code.

The most common cause of a silent avatar in FULL Mode is a missing context_id. Without it the avatar drops into restricted mode: video streams, user input is ignored, and nothing errors out. Create a context with POST /v1/contexts including at least a prompt field, then pass the returned context_id into the session token's avatar_persona. In LITE Mode there is a separate trap around audio format: PCM 16-bit signed, 24KHz, base64, chunks under 1MB. A wrong format also passes without an error.

Auth differs per endpoint, and mixing it up produces a 401: POST /v1/sessions/token wants X-API-KEY, while POST /v1/sessions/start expects Authorization: Bearer <session_token>. A session dies after 5 minutes of inactivity, and the skill suggests sending keep-alive every 2-3 minutes. If network errors get in the way, make API calls from the backend rather than the browser.

What it helps with

  • find why the avatar stays silent and ignores speech
  • fix garbled LITE Mode audio by checking the format
  • sort out a 401 when a session starts
  • restore event delivery in FULL Mode
  • keep a session alive past the inactivity timeout

Example prompts for the agent

  • The avatar is silent but video streams — why?
  • LITE Mode audio sounds garbled, check the format
  • Session fails with 401 on start, what's wrong with the headers?

How to install liveavatar-debug

1Skills CLI (Vercel)

npx skills add heygen-com/liveavatar-agent-skills --skill liveavatar-debug -a claude-code

2Manually: put the files in place

~/.claude/skills/liveavatar-debug/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/liveavatar-debug/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about liveavatar-debug

How do I install liveavatar-debug in Claude?

Run npx skills add heygen-com/liveavatar-agent-skills --skill liveavatar-debug -a claude-code. The skill lands at ~/.claude/skills/liveavatar-debug/SKILL.md.

What does liveavatar-debug do?

It helps the agent debug a LiveAvatar integration, covering symptoms like a silent avatar, garbled audio, API errors and missing events, and pointing to the cause and the fix.

How do FULL and LITE Mode differ when debugging?

Event names differ: LITE uses agent.*, while avatar.* belongs to FULL. Keep-alive differs too — POST /v1/sessions/keep-alive in FULL, a session.keep_alive message over WebSocket in LITE.

Source text

SKILL.md · MIT
---
name: liveavatar-debug
description: "Troubleshoot and debug LiveAvatar integration issues. Use when the user's LiveAvatar integration isn't working, the avatar is silent, audio is garbled, sessions fail to start, events aren't received, or they're getting API errors."
license: MIT
metadata:
  author: heygen
  version: "1.0.0"
---

# LiveAvatar Debugging Guide

Symptom-based troubleshooting for LiveAvatar integrations. Find your symptom below and follow the fix.

## Avatar is silent / not responding to speech

**Most likely: Missing `context_id` in FULL Mode.**

Without a `context_id`, the avatar enters restricted mode — streams video but ignores user input. No error thrown.

**Fix:** Create a context via `POST /v1/contexts` with at least a `prompt` field. Include the returned `context_id` in your session token's `avatar_persona`.

**Other causes:**
- Browser mic permissions blocked (check `allow="microphone"` on iframe)
- Push-to-Talk enabled but PTT events not being sent
- OS-level mic mute

## Audio is garbled or distorted (LITE Mode)

**Most likely: Wrong audio format.**

Required: PCM 16-bit signed, 24KHz, base64. No error returned for wrong format.

**Checklist:**
- [ ] Sample rate is exactly 24,000 Hz
- [ ] Raw PCM (no WAV/MP3/OGG headers)
- [ ] 16-bit signed, not 8-bit or 32-bit float
- [ ] Base64 encoded
- [ ] Chunks under 1MB

**Quick test:** Send a known-good 440Hz test tone. If it works but your TTS doesn't, resample your TTS output.

## 401 error / session fails to start

**Most likely: Wrong auth header.**

| Endpoint | Correct auth |
|----------|-------------|
| `POST /v1/sessions/token` | `X-API-KEY: <api_key>` |
| `POST /v1/sessions/start` | `Authorization: Bearer <session_token>` |

Common mistakes: using API key on `/start`, using Bearer token on `/token`, putting API key in Bearer format.

## Events not received (FULL Mode)

- Subscribed to correct topics? Send to `agent-control`, receive from `agent-response`
- LiveKit room connected? Check connection state
- Parsing JSON correctly? Events have `event_type`, `event_id`, `session_id`

## WebSocket events silently dropped (LITE Mode)

**Most likely: Sending before `connected`.**

Wait for `{"type": "session.state_updated", "state": "connected"}` before sending any commands.

Also check:
- Using correct event names? LITE uses `agent.*`, not `avatar.*` (that's FULL)
- WebSocket still open? 5-min inactivity timeout

## Session times out

5 minutes of inactivity kills the session.

- **FULL:** `POST /v1/sessions/keep-alive` with `Bearer <session_token>`
- **LITE:** `{"type": "session.keep_alive", "event_id": "..."}` via WebSocket

Send every 2-3 minutes.

## Sandbox won't start

- [ ] `is_sandbox: true` set in session token
- [ ] Avatar ID is `dd73ea75-1218-4ef3-92ce-606d5f7fbc0a` (sessions) or `65f9e3c9-d48b-4118-b73a-4ae2e3cbb8f0` (embeds)
- [ ] Not using a different avatar with sandbox mode

~1 minute auto-termination is expected behavior.

## Image avatar fails / no audio

Image avatars have no auto-generated voice. Specify `voice_id` in `avatar_persona`. Browse voices at `GET /v1/voices`.

## Custom LLM / TTS not working

**LLM checklist:**
- [ ] Secret: `secret_type: "LLM_API_KEY"`
- [ ] Config: correct `model`, `secret_id`, `base_url`
- [ ] `llm_configuration_id` in session token
- [ ] Endpoint supports OpenAI `/chat/completions` protocol

**TTS checklist:**
- [ ] Secret: `secret_type: "ELEVENLABS_API_KEY"`
- [ ] Voice imported via `POST /v1/voices/third_party`
- [ ] Using the **returned LiveAvatar voice_id** (not the ElevenLabs ID)

## CORS / network errors

- API calls should come from backend, not browser
- Allow outbound `wss://` for LiveKit and WebSocket
- Allow `*.livekit.cloud`, `api.liveavatar.com`, `embed.liveavatar.com`

## General approach

1. Start with sandbox mode to eliminate billing issues
2. Check session state: `GET /v1/sessions/{id}`
3. Check transcript: `GET /v1/sessions/{id}/transcript`
4. Check credits: `GET /v1/users/credits`
5. Verify you're not mixing FULL and LITE event systems

© heygen · MIT · heygen-com/liveavatar-agent-skills

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set2

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor