ConversationalAIEvents
Constants
AgentResponse
Contains complete agent message. Sent with first audio chunk. Used for display and history. https://elevenlabs.io/docs/conversational-ai/customization/events/client-events#agent_response
Parameters
client:
The ElevenLabs.ConversationalAIClient instance.
data:
Object
OptionalThe event's data.
AgentResponseCorrection
Contains truncated response after interruption. Updates displayed message. Maintains conversation accuracy. https://elevenlabs.io/docs/conversational-ai/customization/events/client-events#agent_response_correction
Parameters
client:
The ElevenLabs.ConversationalAIClient instance.
data:
Object
OptionalThe event's data.
ClientToolCall
Represents a function call the agent wants the client to execute. Contains tool name, tool call ID, and parameters. Requires client-side execution of the function and sending the result back to the server. https://elevenlabs.io/docs/conversational-ai/customization/events/client-events#client_tool_call
Parameters
client:
The ElevenLabs.ConversationalAIClient instance.
data:
Object
OptionalThe event's data.
ContextualUpdate
Contains contextual information to be added to the conversation state. https://elevenlabs.io/docs/conversational-ai/api-reference/conversational-ai/websocket#receive.Contextual-Update
Parameters
client:
The ElevenLabs.ConversationalAIClient instance.
data:
Object
OptionalThe event's data.
ConversationInitiationMetadata
Automatically sent when starting a conversation. Initializes conversation settings and parameters. https://elevenlabs.io/docs/conversational-ai/customization/events/client-events#conversation_initiation_metadata
Parameters
client:
The ElevenLabs.ConversationalAIClient instance.
data:
Object
OptionalThe event's data.
HTTPResponse
The HTTP response event.
Parameters
client:
The ElevenLabs.ConversationalAIClient instance.
data:
Object
OptionalThe event's data.
InternalTentativeAgentResponse
Contains preliminary text from the agent. https://elevenlabs.io/docs/conversational-ai/api-reference/conversational-ai/websocket#receive.Internal-Tentative-Agent-Response
Parameters
client:
The ElevenLabs.ConversationalAIClient instance.
data:
Object
OptionalThe event's data.
Interruption
Contains event id of interrupted event. https://elevenlabs.io/docs/conversational-ai/api-reference/conversational-ai/websocket#receive.Interruption
Parameters
client:
The ElevenLabs.ConversationalAIClient instance.
data:
Object
OptionalThe event's data.
Ping
Health check event requiring immediate response. Used to maintain WebSocket connection. https://elevenlabs.io/docs/conversational-ai/customization/events/client-events#ping
Parameters
client:
The ElevenLabs.ConversationalAIClient instance.
data:
Object
OptionalThe event's data.
Unknown
The unknown event.
Parameters
client:
The ElevenLabs.ConversationalAIClient instance.
data:
Object
OptionalThe event's data.
UserTranscript
Contains finalized speech-to-text results. Represents complete user utterances. Used for conversation history. https://elevenlabs.io/docs/conversational-ai/customization/events/client-events#user_transcript
Parameters
client:
The ElevenLabs.ConversationalAIClient instance.
data:
Object
OptionalThe event's data.
VadScore
Voice Activity Detection score event. Indicates the probability that the user is speaking. Values range from 0 to 1, where higher values indicate higher confidence of speech. https://elevenlabs.io/docs/conversational-ai/customization/events/client-events#vad_score
Parameters
client:
The ElevenLabs.ConversationalAIClient instance.
data:
Object
OptionalThe event's data.