https://retellai.com/?utm_source=discord&utm_medium=seo logo
Does the SDK support adding the function calls to ...
# ❓・ai-evy-support
j
Does the SDK support adding the function calls to the agent when creating/updating the agent? @AI Evy
a
Thanks for tagging me @joelwang_44675. I'll look through relevant sources and get back to you shortly.
### Answer Yes, the SDK supports adding function calls when creating agents [(1) ]() . The Create Agent API includes function calling capabilities through the response engine configuration . Here's an example from the JavaScript SDK for creating an agent with function calling support :
Copy code
javascript
import Retell from 'retell-sdk';

const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;

const agentResponse = await client.agent.create({
 response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
 voice_id: '11labs-Adrian',
}) ;

console.log(agentResponse.agent_id) ;
The agent creation supports pre-defined tool calling abilities such as call transfer, ending calls, and appointment booking [(2) ]() . You can also integrate custom functions by configuring them through the dashboard and then attaching them to agents [(3) ]() . For custom functions, you would first create the custom function through the dashboard (as described in the custom function documentation ) , and then the agent can utilize these functions during conversations [(2) ]() .
​ To learn more, see the sources I considered: [[1] Create Agent](https://docs.retellai.com/api-references/create-agent) [[2] Introducing Retell LLM Beta](https://www.retellai.com/changelog/introducing-retell-llm-beta) [[3] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Appreciate the feedback! Feel free to ask me again with additional guidance or context.
j
The example didn't show that it support function calls added to the agent.