For the complete documentation index, see llms.txt. This page is also available as Markdown.

Message Glossary

Complete glossary of all message types available in Convai's Live APIs for real-time communication between clients and the server.

Overview

This glossary provides a comprehensive reference for all message types used in Convai's Live APIs. Messages flow bidirectionally between your client application and the Convai server over WebRTC data channels.


Message Directions

Direction
Description

Client → Server

Messages you send to trigger actions, update state, or control the bot

Server → Client

Messages you receive for events, state changes, and real-time data


Message Format

Client → Server Messages

Messages sent from the client to the server use this structure:

{
  "type": "<message-type>",
  "data": { ... }
}
  • type (string, required): The message type identifier

  • data (object, optional): Message payload (structure varies by type)

Server → Client Messages

Messages sent from the server to the client are wrapped in an RTVI envelope:

  • label (string): Always "rtvi-ai"

  • type (string): Always "server-message" for custom server messages

  • data (object): Contains the actual message with its own type and payload fields

In the detailed message documentation pages, examples show only the inner data payload for clarity.


Server Response Messages

For every client-to-server message, the server automatically sends a server-response message to acknowledge receipt and indicate the processing status. This is similar to HTTP response codes in REST APIs.

Example Response:

Field
Type
Description

event_type

string

The original client message type that triggered this response

status

string

Processing status: "success", "error", "processing", "pending"

message

string

Human-readable description of the result (optional)

extras

object

Additional event-specific data (optional)

Status Values:

  • "success" - Message processed successfully

  • "error" - An error occurred (see message for details)

  • "processing" - Message is being processed asynchronously

  • "pending" - Message received but processing delayed


Client → Server Messages

Message Type
Purpose
Details Page

trigger-message

Trigger narrative events or send context

user_text_message

Send text input as user

update-template-keys

Update prompt template variables

update-scene-metadata

Update scene objects

update-dynamic-info

Update dynamic context (basic)

context-update

Update runtime context (with mode control)

tts-toggle

Enable/disable bot audio

stt-toggle

Mute/unmute speech recognition

interrupt-bot

Stop bot speech immediately

force-user-stopped-speaking

Signal end of user speech (push-to-talk)

reset-idle-timer

Reset idle timeout monitoring


Server → Client Messages

Message Type
Purpose
Format
Details Page

server-response

Response for every client message

Direct (legacy)

interaction-created

Interaction ID created

Server-message wrapped

usage-limit-reached

Quota exceeded notification

Server-message wrapped

bot-turn-completed

Bot finished speaking

Server-message wrapped

bot-emotion

Bot emotion for avatar

Server-message wrapped

behavior-tree-response

Behavior tree data

Server-message wrapped

moderation-response

Content moderation result

Server-message wrapped

action-response

Actions/animations to trigger

Server-message wrapped

final-user-transcription

User speech transcription

Server-message wrapped

visemes

Lip-sync data

Server-message wrapped

neurosync-blendshapes

Facial animation data

Server-message wrapped

chunked-neurosync-blendshapes

Batched facial animation

Server-message wrapped

blendshape-turn-stats

Turn statistics

Server-message wrapped

user-idle-warning

Idle timeout warning

Server-message wrapped

llm-no-response

LLM chose not to respond

Server-message wrapped

audio-data

Audio chunks via data channel (custom mode)

Server-message wrapped

See Audio Data via Data Channel

Format Key:

  • Server-message wrapped: Uses the full RTVI envelope format with "type": "server-message" and event data nested in data.type and subsequent fields

  • Direct (legacy): Uses data as a flat object with the event type and fields at the top level

All client messages receive a server-response acknowledgment with success/error status and additional data.


Common Response Extras by Event Type

When you receive a server-response message, the extras field may contain event-specific data:

Event Type
Extras Fields

context-update

token_count, max_tokens, remaining_tokens, content

tts-toggle

enabled

stt-toggle

muted

trigger-message

trigger_name, has_speak_tag

user_text_message

text


Error Response Examples

Invalid JSON

Missing Type Field

Unknown Message Type


Message Categories

Context & State Management

Messages for managing conversation context and bot state:

  • context-update - Unified context updates with mode control

  • update-dynamic-info - Basic dynamic context updates

  • update-template-keys - Update prompt template variables

  • update-scene-metadata - Update scene object descriptions

Audio Control

Messages for controlling audio input and output:

  • tts-toggle - Enable/disable text-to-speech output

  • stt-toggle - Mute/unmute speech-to-text input

  • interrupt-bot - Interrupt current bot speech

  • force-user-stopped-speaking - Signal end of user speech

Interaction & Events

Messages for triggering events and sending user input:

  • trigger-message - Trigger narrative events or contextual actions

  • user_text_message - Send text as user input

Session Management

Messages for managing the session lifecycle:

  • reset-idle-timer - Reset idle timeout

Animation & Visual Feedback

Messages containing animation and visual data:

  • bot-emotion - Emotion data for avatar expressions

  • visemes - Lip-sync blendshape data

  • neurosync-blendshapes - Facial animation blendshapes (single frame)

  • chunked-neurosync-blendshapes - Batched facial animation blendshapes

  • action-response - Actions and animations to perform

Transcription & Text

Messages containing text and transcription data:

  • final-user-transcription - Final transcription of user speech

System Events

Messages about system state and events:

  • server-response - Acknowledgment of client messages

  • interaction-created - Session interaction ID created

  • bot-turn-completed - Bot turn finished

  • usage-limit-reached - Usage quota exceeded

  • user-idle-warning - User idle timeout warning

  • llm-no-response - LLM chose not to respond

Voice Activity Detection

Messages from the VAD-based STT gating system:

  • vad-stt-started - STT service started transcribing

  • vad-stt-stopped - STT service stopped transcribing

  • vad-stt-debug - VAD debug events (debug mode only)



Last updated

Was this helpful?