solomon32184
10/26/2025, 10:18 PMAI Evy
10/26/2025, 10:18 PMAI Evy
10/26/2025, 10:18 PMwss://yourdomain.com/llm-websocket/{call_id}) [(2) ]() [(4) ]()
2. **Configure in Retell Dashboard**: Go to your agent settings and select "Custom LLM" option, then paste your WebSocket URL (format: wss://your-server-websocket-endpoint/{call_id}) [(3) ]() [(4) ]()
3. **Implement the WebSocket protocol**: Your server needs to handle the specific communication protocol Retell uses, including sending initial responses and handling various event types like response_required and update_only [(3) ]()
The WebSocket endpoint must conform to Retell's LLM WebSocket protocol, where Retell initiates the connection when a call starts . Your server should be prepared to send the first message (which can be an empty response if you want the user to speak first) [(2) ]() [(3) ]() .
**Important**: Custom LLM works through the LLM WebSocket and doesn't require any special setting to bAI Evy
10/26/2025, 10:18 PMAI Evy
10/26/2025, 10:18 PMsolomon32184
10/26/2025, 10:20 PMAI Evy
10/26/2025, 10:20 PMAI Evy
10/26/2025, 10:20 PMwebhook_url parameter [(1) ]() [(2) ]() .
Key characteristics:
- The webhook receives events like call_started, call_ended, and call_analyzed [(3) ]()
- You can set it to null to remove the webhook URL from the agent [(1) ]()
- If an Agent Level Webhook is set, the account level webhook will not be triggered for that agent [(3) ]()
- You can also configure webhook_timeout_ms (default is 10000ms if not set) [(1) ]() [(2) ]()
Example configuration:
json
{
"webhook_url": "<https://webhook-url-here%22,>
"webhook_timeout_ms": 10000
}
[(1) ]()
The webhook endpoint you provide should accept POST requests with JSON data containing the event type and call details [(3) ]() .
**AI Evy
10/26/2025, 10:20 PMAI Evy
10/26/2025, 10:20 PMsolomon32184
10/26/2025, 10:21 PMAI Evy
10/26/2025, 10:21 PMAI Evy
10/26/2025, 10:21 PMwss://your-server-websocket-endpoint/{call_id}
The custom function URL you configure in the dashboard (as described in the source about custom functions) is for tool calling - allowing your agent to call external APIs during conversations - not for replacing the LLM engine itself .
If you're looking to integrate an external system or API that your agent can call during conversations, that's what custom functions are for, and you would configure that in the Tools section of your agent settings .AI Evy
10/26/2025, 10:21 PMAI Evy
10/26/2025, 10:21 PMsolomon32184
10/26/2025, 10:22 PMAI Evy
10/26/2025, 10:22 PMAI Evy
10/26/2025, 10:22 PMwss://your_domain_name/llm-websocket/
Important notes:
- The URL must use the wss:// protocol (secure WebSocket)
- You can use either your production domain URL or a tool like ngrok for local testing
- If testing locally with ngrok, your URL would look like: wss://xxxxx.ngrok-free.app/llm-websocket/
After adding the URL to the dashboard, you can click "Make a web call" to test your agent .
Note: When you add a Custom LLM URL, you cannot edit the prompt in the dashboard because the custom LLM has control of the prompt [(2) ]() .AI Evy
10/26/2025, 10:22 PMAI Evy
10/26/2025, 10:22 PMsolomon32184
10/26/2025, 10:24 PMAI Evy
10/26/2025, 10:24 PMAI Evy
10/26/2025, 10:24 PMwss://your-server-websocket-endpoint/{call_id} [(1) ]() [(2) ]() .
**AI Evy
10/26/2025, 10:24 PMAI Evy
10/26/2025, 10:24 PMsolomon32184
10/26/2025, 10:25 PMAI Evy
10/26/2025, 10:25 PMAI Evy
10/26/2025, 10:25 PMAI Evy
10/26/2025, 10:25 PMAI Evy
10/26/2025, 10:25 PM