https://retellai.com/?utm_source=discord&utm_medium=seo logo
d
@AI Evy if. I want to use an outbound agent with a custom tool calling on my code. How can I do this instead of using the agent builder on the platform? Is there a way to give access to the agent tools from my codebase?
a
Thanks for tagging me @danielgarcia_85844. I'll look through relevant sources and get back to you shortly.
### Answer I don't have specific information about creating agents programmatically with custom tool calling in the available sources. The documentation I have access to covers phone number management, call registration, and dynamic variables, but doesn't include details about creating agents with custom tools via API instead of using the platform's agent builder. For outbound calls, I can see that you can register phone calls programmatically using the Register Phone Call API [(1) ]() :
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const phoneCallResponse = await client.call.registerPhoneCall({
 agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
}) ;
console.log(phoneCallResponse.agent_id) ;
And you can pass dynamic variables to customize the agent's behavior for specific calls [(2) ]() :
Copy code
javascript
{
 "user_name": "John Smith",
 "product_name": "Premium Plan",
 "account_status": "active"
}
However, the specific details about creating agents with custom tool calling programmatically aren't covered in these sources. Check out these potentially useful resources: - [Contact Sales]() - [) Would you like a general answer based on my knowledge instead?
​ To learn more, see the sources I considered: [[1] Register Phone Call](https://docs.retellai.com/api-references/register-phone-call) [[2] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.