https://retellai.com/?utm_source=discord&utm_medium=seo logo
I want to create agent with llm type as custom_llm
# ❓・ai-evy-support
y
@AI Evy I want to create agent with llm type as custom_llm. Can I still use live call transfer feature? If so how can I achieve this?
a
Thanks for tagging me @Yash. I'll look through relevant sources and get back to you shortly.
### Answer Yes, you can use call transfer with a custom LLM agent. You trigger a transfer by including the
transfer_number
field in your response event sent back to Retell via the LLM WebSocket. [(1) ]() How to implement: In your response event, set the
transfer_number
field to the destination phone number:
Copy code
javascript
const res = {
  response_type: "response",
  response_id: request.response_id,
  content: "Let me transfer you now.",
  content_complete: true,
  end_call: false,
  transfer_number: "+12137771234"
};
ws.send(JSON.stringify(res) ) ;
You can also use
agent_interrupt
to trigger an immediate transfer:
Copy code
javascript
const res = {
  response_type: "agent_interrupt",
  content: "",
  content_complete: true,
  end_call: false,
  interrupt_id: 1,
  transfer_number: "+12162023041"
};
[(2) ]() Important limitations with custom LLM: - This performs a cold transfer (direct transfer without briefing the next agent) . [(3) ]() - Warm transfer with three-way bridging, hold music, and human detection are not available when using custom LLM. - Configuring the caller ID (showing the user's number vs. the agent's number) during transfer is not currently documented for custom LLM integrations. , [(2) ]()
​ To learn more, see the sources I considered: [[1] LLM WebSocket](https://docs.retellai.com/api-references/llm-websocket) [[2] User caller ID for call transfers when using custom LLM](https://discord.com/channels/1186424376300679209/1425072734785769472) [[3] Phone transfer with custom LLM](https://discord.com/channels/1186424376300679209/1395018119050952825) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
y
Can you help me out with pythos sdk or REST API endpoint example? Treat me as a junior engineer and explain the steps involved to implement this flow. Also dont assume anything ask me followup questions if any ambiguity