For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Connect
BlogHelp CenterAPI PricingSign up
OverviewElevenCreativeElevenAgentsElevenAPIReception AIAPI referenceChangelog
OverviewElevenCreativeElevenAgentsElevenAPIReception AIAPI referenceChangelog
  • Get started
    • Overview
    • Quickstart
  • Configure
    • Overview
    • Voice & language
    • Knowledge base
    • Tools
    • Personalization
    • Authentication
  • Deploy
    • Overview
    • Environment variables
    • WhatsApp
    • Batch calls
  • Monitor
    • Overview
    • Users
    • Testing
    • Experiments
    • Versioning
    • Conversation Analysis
    • Analytics
    • Real-time monitoring
    • OpenTelemetry traces
    • Privacy
    • Cost optimization
    • CLI
  • Advanced
    • Events
    • Custom models
    • LLM cascading
    • Post-call webhooks
  • Resources
    • UI components
  • Guides
    • Chat Mode
    • Burst pricing
    • ElevenLabs' docs agent
    • Scaling user interviews
    • Simulate Conversations
        • WSSAgent WebSockets
LogoLogo
Login
Login
Connect
BlogHelp CenterAPI PricingSign up
API reference

Agent WebSockets

WSS
/v1/convai/conversation
Handshake
URLwss://api.elevenlabs.io/v1/convai/conversation
MethodGET
Status101 Switching Protocols
Messages

Establish a WebSocket connection for real-time conversations with an AI agent.

Was this page helpful?
Previous

List agent branches

Next
Built with

Handshake

WSS
/v1/convai/conversation

Query parameters

agent_idanyRequired
The unique identifier for the voice to use in the TTS process.

Send

User Audio ChunkobjectRequired
Send audio data chunks from the user to the server for processing.
OR
PongobjectRequired
Response message to server ping requests for latency measurement.
OR
Conversation Initiation Client DataobjectRequired
Client configuration data to override default conversation settings.
OR
Client Tool ResultobjectRequired

Results from client-side tool execution requested by the server.

OR
Contextual UpdateobjectRequired

Non-interrupting content sent to update the conversation state without disrupting the flow.

OR
User MessageobjectRequired
Text message sent by the user to the conversation.
OR
User ActivityobjectRequired
Activity ping to prevent agent interruption and indicate user presence.
OR
Multimodal MessageobjectRequired
A message combining text and a file reference, sent by the user to the conversation.

Receive

Conversation Initiation MetadataobjectRequired
Initial metadata and configuration details for a new conversation.
OR
User TranscriptobjectRequired

Real-time transcriptions of user speech input.

OR
Agent ResponseobjectRequired
Text responses generated by the AI agent.
OR
Agent Response CorrectionobjectRequired
Correction to a previous agent response.
OR
Audio ResponseobjectRequired
Synthesized audio chunks of the agent's speech response.
OR
InterruptionobjectRequired
Notification that the agent's current response was interrupted.
OR
PingobjectRequired

Server-initiated ping messages for measuring connection latency.

OR
Client Tool CallobjectRequired
Requests from server for client to execute specific tool functions.
OR
Contextual UpdateobjectRequired

Non-interrupting content sent to update the conversation state without disrupting the flow.

OR
VAD ScoreobjectRequired
Voice Activity Detection scoring information.
OR
Internal Tentative Agent ResponseobjectRequired
Preliminary response from the agent before final confirmation.
OR
Agent Response CompleteobjectRequired
Fires when the agent has finished its response, including any pending tool calls. After this event, the agent will only produce further output if the user provides new input or a turn timeout triggers a new turn.