AgentsEvents
Add the following line to your scenario code to use the events:
require(Modules.ElevenLabs);
Constants
Contains complete agent message. Sent with first audio chunk. Used for display and history. https://elevenlabs.io/docs/agents-platform/customization/events/client-events#agent_response
Parameters
client:
The ElevenLabs.AgentsClient instance.
data:
{customEvent: string, payload: Object}
OptionalThe 'payload' parameter contains the event's data.
Contains truncated response after interruption. Updates displayed message. Maintains conversation accuracy. https://elevenlabs.io/docs/agents-platform/customization/events/client-events#agent_response_correction
Parameters
client:
The ElevenLabs.AgentsClient instance.
data:
{customEvent: string, payload: Object}
OptionalThe 'payload' parameter contains the event's data.
Indicates when the agent has executed a tool function. Contains tool metadata and execution status. Provides visibility into agent tool usage during conversations. https://elevenlabs.io/docs/agents-platform/customization/events/client-events#agent_tool_response
Parameters
client:
The ElevenLabs.AgentsClient instance.
data:
{customEvent: string, payload: Object}
OptionalThe 'payload' parameter contains the event's data.
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/agents-platform/customization/events/client-events#client_tool_call
Parameters
client:
The ElevenLabs.AgentsClient instance.
data:
{customEvent: string, payload: Object}
OptionalThe 'payload' parameter contains the event's data.
Contains information about connector.
Parameters
client:
The ElevenLabs.AgentsClient instance.
data:
{customEvent: string, payload: Object}
OptionalThe 'payload' parameter contains the event's data.
Contains contextual information to be added to the conversation state. https://elevenlabs.io/docs/agents-platform/api-reference/agents-platform/websocket#receive.Contextual-Update
Parameters
client:
The ElevenLabs.AgentsClient instance.
data:
{customEvent: string, payload: Object}
OptionalThe 'payload' parameter contains the event's data.
Automatically sent when starting a conversation. Initializes conversation settings and parameters. https://elevenlabs.io/docs/agents-platform/customization/events/client-events#conversation_initiation_metadata
Parameters
client:
The ElevenLabs.AgentsClient instance.
data:
{customEvent: string, payload: Object}
OptionalThe 'payload' parameter contains the event's data.
The HTTP response event.
Parameters
client:
The ElevenLabs.AgentsClient instance.
data:
{customEvent: string, payload: Object}
OptionalThe 'payload' parameter contains the event's data.
Contains preliminary text from the agent. https://elevenlabs.io/docs/agents-platform/api-reference/agents-platform/websocket#receive.Internal-Tentative-Agent-Response
Parameters
client:
The ElevenLabs.AgentsClient instance.
data:
{customEvent: string, payload: Object}
OptionalThe 'payload' parameter contains the event's data.
Contains event id of interrupted event. https://elevenlabs.io/docs/agents-platform/api-reference/agents-platform/websocket#receive.Interruption
Parameters
client:
The ElevenLabs.AgentsClient instance.
data:
{customEvent: string, payload: Object}
OptionalThe 'payload' parameter contains the event's data.
Health check event requiring immediate response. Used to maintain WebSocket connection. https://elevenlabs.io/docs/agents-platform/customization/events/client-events#ping
Parameters
client:
The ElevenLabs.AgentsClient instance.
data:
{customEvent: string, payload: Object}
OptionalThe 'payload' parameter contains the event's data.
The unknown event.
Parameters
client:
The ElevenLabs.AgentsClient instance.
data:
{customEvent: string, payload: Object}
OptionalThe 'payload' parameter contains the event's data.
Contains finalized speech-to-text results. Represents complete user utterances. Used for conversation history. https://elevenlabs.io/docs/agents-platform/customization/events/client-events#user_transcript
Parameters
client:
The ElevenLabs.AgentsClient instance.
data:
{customEvent: string, payload: Object}
OptionalThe 'payload' parameter contains the event's data.
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/agents-platform/customization/events/client-events#vad_score
Parameters
client:
The ElevenLabs.AgentsClient instance.
data:
{customEvent: string, payload: Object}
OptionalThe 'payload' parameter contains the event's data.
The WebSocket error response event.
Parameters
client:
The ElevenLabs.AgentsClient instance.
data:
{customEvent: string, payload: Object}
OptionalThe 'payload' parameter contains the event's data.