Agent WebSockets
Establish a WebSocket connection for real-time conversations with an AI agent.
Handshake
WSS
/v1/convai/conversation
Query parameters
agent_id
The unique identifier for the voice to use in the TTS process.
Send
User Audio Chunk
Send audio data chunks from the user to the server for processing.
OR
Pong
Response message to server ping requests for latency measurement.
OR
Conversation Initiation Client Data
Client configuration data to override default conversation settings.
OR
Client Tool Result
Results from client-side tool execution requested by the server.
OR
Contextual Update
Non-interrupting content sent to update the conversation state without disrupting the flow.
OR
User Message
Text message sent by the user to the conversation.
OR
User Activity
Activity ping to prevent agent interruption and indicate user presence.
OR
Multimodal Message
A message combining text and a file reference, sent by the user to the conversation.
Receive
Conversation Initiation Metadata
Initial metadata and configuration details for a new conversation.
OR
User Transcript
Real-time transcriptions of user speech input.
OR
Agent Response
Text responses generated by the AI agent.
OR
Agent Response Correction
Correction to a previous agent response.
OR
Audio Response
Synthesized audio chunks of the agent's speech response.
OR
Interruption
Notification that the agent's current response was interrupted.
OR
Ping
Server-initiated ping messages for measuring connection latency.
OR
Client Tool Call
Requests from server for client to execute specific tool functions.
OR
Contextual Update
Non-interrupting content sent to update the conversation state without disrupting the flow.
OR
VAD Score
Voice Activity Detection scoring information.
OR
Internal Tentative Agent Response
Preliminary response from the agent before final confirmation.
OR
Agent Response Complete
Emitted when the agent has finished responding and no further responses are expected without additional user input. Only fires when turn_timeout is disabled.