https://retellai.com/?utm_source=discord&utm_medium=seo logo
I am trying to create an agent for the first time
# ❓・ai-evy-support
d
@AI Evy I am trying to create an agent for the first time. What is the Custom LLM URL?
a
Thanks for tagging me @drfrex. I'll look through relevant sources and get back to you shortly.
### Answer The Custom LLM URL is the WebSocket endpoint URL where Retell's servers will connect to communicate with your custom LLM backend server [(1) ]() . When you create an agent with a custom LLM, Retell establishes a WebSocket connection to your
llm_websocket_url
. Your LLM server needs to handle this WebSocket connection and follow the communication protocol to exchange messages with Retell's system [(1) ]() [(2) ]() . To set up a Custom LLM URL, you need to: 1. Create a WebSocket server endpoint (like
/llm-websocket/
) on your backend [(2) ]() 2. Deploy your server to get a production URL, or use ngrok for local testing 3. The final URL format would be something like
wss://your_domain_name/llm-websocket/
or
wss://xxxxx.ngrok-free.app/llm-websocket/
When creating agents via API, the
llm_websocket_url
parameter is required [(3) ]() . For Retell's built-in LLMs, you would first need to get the LLM websocket URL from the list-retell-llms API call, then use that URL when creating the agent . The Custom LLM integration allows you to use your own language model while Retell handles the voice processing and telephony aspects [(1) ]() .
​ To learn more, see the sources I considered: [[1] Custom LLM Overview](https://docs.retellai.com/integrate-llm/overview) [[2] Setup WebSocket Server](https://docs.retellai.com/integrate-llm/setup-websocket-server) [[3] Create agent via API, llm_websocket_url required](https://discord.com/channels/1186424376300679209/1247914407909130241) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Thanks for the feedback, glad I was helpful.