AsyncAPI 2.6 description of Retell AI's real-time **Custom LLM WebSocket** surface, documented at https://docs.retellai.com/api-references/llm-websocket. Unlike a one-way HTTP stream, this is a true bidirectional WebSocket. When an agent whose `response_engine.type` is `custom-llm` starts a call, the Retell server **connects out to your** WebSocket server at `{your-llm-websocket-url}/{call_id}`. Over that single connection Retell pushes transcript/turn-taking events and requests agent responses, and your server pushes back the agent's speech content, tool-call bookkeeping, live agent-config updates, and interrupts. A separate WebRTC/WebSocket audio channel carries the actual call audio and is handled by the Retell Web Client / mobile SDKs (opened with the `access_token` returned by `POST /v2/create-web-call`); that media transport is not modeled at message level here. Direction convention in this document: * Retell server -> your server = the `receive` (publish) messages * your server -> Retell server = the `send` (subscribe) messages
The single bidirectional channel for one call. Retell sends ping_pong / call_details / update_only / response_required / reminder_required events to your server; your server replies with config / ping_pong / response / agent_interrupt / tool_call_invocation / tool_call_result / update_agent / metadata events.
Messages
✉
PingPongRequest
Ping (Retell -> your server)
Keep-alive ping sent by Retell.
✉
CallDetails
Call details
Initial call metadata, sent once at connection if enabled in config.
✉
UpdateOnly
Update only
Transcript and turn-taking update that does not require a response.
✉
ResponseRequired
Response required
Retell requests an agent response for the given response_id.
✉
ReminderRequired
Reminder required
Retell requests a reminder utterance after user silence.
✉
ConfigResponse
Config
Optional initial config your server sends to Retell.
✉
PingPongResponse
Pong (your server -> Retell)
Keep-alive acknowledgment.
✉
Response
Response
Streams the agent's spoken content for a response_id.
✉
AgentInterrupt
Agent interrupt
Injects an immediate agent utterance out of the normal response cycle.
✉
ToolCallInvocation
Tool call invocation
Records that the agent invoked a tool (for the transcript/logs).
✉
ToolCallResult
Tool call result
Records the result returned from a previously invoked tool.
✉
UpdateAgent
Update agent
Applies runtime agent-config changes mid-call.
✉
Metadata
Metadata
Arbitrary JSON forwarded to the frontend / web client.
Servers
wss
custom-llm{yourLlmWebsocketUrl}/{callId}
Your WebSocket endpoint. Retell establishes the connection to this URL, appending the call_id as the final path segment, at the start of every call served by a custom-llm agent.