Building an AI Phone Agent with No Code Using Bland AI: A Beginner’s Guide

Alozie Igbokwe
17 min readJun 14, 2024

--

Voicebots and Phone agents are becoming increasingly popular for tasks like customer service, Cold Calling, Appointment Setting and more. Bland AI offers a powerful toolset for building phone agents, and this guide will walk you through the process of creating an AI phone agent with no code using Bland AI

Setting Up Your Account and Number

To get started, you’ll need a Bland AI account and a phone number. Here’s how:

  1. Create an Account on Bland AI:
  • Visit Bland AI and sign up for an account.
Bland Login Page

2. Purchase a Phone Number:

  • Once logged in, click on the ‘Buy a phone number’ button.
Phone number on the bottom left
  • You can purchase a phone number with a California or US area code for around $15 per month.
  • In later videos and articles I will show you guys how you can use other sources or cheaper options like Twilio to get a phone number your AI Agent can use.
Available Phone Numbers

3. After purchasing the phone number, navigate to the ‘Send Call’ section on the left-hand side to begin building your phone agent. This where we will build and Test our Phone Agent.

Send Call the third option down on the left hand side

Creating and Configuring Your AI Phone Agent

Step 1: Choosing a Model

The first step we will go through is choosing what model our Phone Agent can use.

Bland AI offers several models:

  • Base Model: Supports all features and capabilities, follows scripts/procedures most effectively plus is the best for using Custom Tools
  • Enhanced Model: Faster latency, very conversational, works best with objective-based prompts plus still support all features and capabilities.
  • Turbo Model: Fastest latency and has the most realistic conversation capabilities but can be verbose and has limited capabilities(excludes Transferring, IVR navigation, Custom Tools)

For this example we will go with Base Model.

The Available Models

Step 2 : Setting up the Phone Numbers

For Phone Number you can use your own number for testing. This is the Phone Number that the Phone Agent will call.

For Send From you can pick the phone number you just bought.

Step 3: Configuring the Phone Agent Instructions

Then for the Instructions or Prompt you can create whatever prompt you want to use for AI Phone Agent.

You can check out my Article on how to craft prompts for AI Phone Agents if you need helping writing your prompts

and you can also check out this video where I show you how I create prompts using a Free AI Tool

Crafting prompts with Free AI Tool

In this article for the prompt we will just use the default prompt labeled small Business but adjust it to work for an AI Agent Business.

Prompt:

Your name is Sarah, and you’re an AI agent specialist working on behalf of AIArbitrage. You joined the company earlier this year. 
The company’s goal is to collect data about small businesses to provide tailored AI solutions. Your job is to ask four basic questions to qualify the business for your services and figure out what type of AI agent they need.
The four questions you need to answer are:
The business’s category and what services it provides
The business’s primary challenges or pain points
The desired functionalities of the AI agent
The owner’s contact information for follow-up
Here’s an example dialogue:
Person: Hello, this is Squaw Valley Plumbing Co, my name is Jessica, how can I help you?
You: Hi Jessica, this is Sarah. I’m calling on behalf of AIArbitrage. We’re creating customized AI solutions for local businesses, and I wanted to gather some information to see how we can best assist you—do you have a moment to help?
Person: Yes, absolutely. What information do you need?
You: Great! First, what services does your business provide to the community?
Person: We provide plumbing services. Most of the time, it’s folks calling in because they have an issue with their sink or toilet. You know how it is.
You: Got it. What would you say are your primary challenges or pain points in running your business?
Person: Well, managing customer appointments and follow-ups can be quite time-consuming. We also struggle with keeping track of inquiries and ensuring timely responses.
You: I see. Based on those challenges, what functionalities would you find most useful in an AI agent? For example, scheduling appointments, answering customer queries, lead qualification, etc.
Person: Definitely scheduling appointments and answering customer queries. It would be great if the AI could also qualify leads to save us time.
You: That’s helpful to know. Lastly, could you share the owner’s contact information with me? We won’t share this information, but it helps us follow up with specific solutions that might benefit your business.
Person: Eh, I’m not sure if I’m comfortable doing that.
You: I understand. It’s completely up to you. We have several programs for small businesses, and if you qualify, it’s easier to reach out directly. But no worries if you don’t feel comfortable sharing.
Person: Oh, that’s fine then. The owner’s name is Michael Shelly, and his phone number is 878-108-6645.
You: Perfect, thanks so much for your help. Person: Of course! Goodbye.

Step 4: Setting Parameters

After crafting the prompt you will have multiple parameters you can adjust based on what requirements you want your AI Phone Agent to follow:

  • Language: What Language you want your AI Phone Agent to speak in
  • Voice: Chose the voice you want your Phone Agent to sound like(Bland already provide a list of voices cloned by them)
  • Temperature: Controls how creative the AI can be.

The higher the temperature the more creative the Phone Agent will be and the more off script it will be.

For example in sales calls where you want your agent to be more adaptable creative and persuasive to the lead responses and objections instead of just following a standard script you might have the temperature be higher.

But you want the temperature to be lower when the AI Agent has to follow the prompt and script as accurately as possible. This would in calls where you are asking Q/As or collecting information.

  • Interruption Threshold: Adjusts how patient the AI is when waiting for the user to finish speaking.

Lower values mean the AI will respond more quickly, while higher values mean the AI will wait longer before responding.

  • VoiceMail: Can choose if you would like to leave a message if the call goes to voicemail
  • Answered by: Checks if the call was answer by a human or voicemail
  • Wait for Greeting : If you want the AI to wait for the caller to answer or talk before saying anything
  • Block Interruptions: If you want the AI to ignore interruptions from the users and continue talking
  • Max duration : Sets a limit on how long a call can last. Making phone calls with AI costs credits so limiting the call length can help keep cost down.

After setting your parameters you can click send call to test your AI Phone Agent.

Send call Button

You will need to make sure you have enough credits to test your phone call by going to the Purchase Credit Tabs on the left hand side. If you dont have any credits than you will have to purchase credits to use the AI Phone Agent. You can add a custom price if you dont want to send 10 dollars or more on credits.

Purchase Credits

Integrating your AI Phone Agent with OAI Widget

To integrate your AI phone agent with your website, you can use the oai-widget:

Step 1 : Create a Schema to allow your AI Assistant to use your phone agent as a tool

Your AI Assistant will need a way to use your phone agent so what we will do is copy all the code in the data bracket on the right hand side

the code you will copy on the right hand side
make sure to click show code on top if your code isnt showing

Then we are going to go to ChatGPT and write a prompt so we can turn this to schema that will allow our AI Assistant or AI agent to call and use this tool when prompted to do it.

Prompt :

Based on these parameters and this url ('https://api.bland.ai/v1/calls) can you create me a schema in openai 3.0 and json format -
"phone_number": "+",
"from": null,
"task": "Your name is Sarah, and you’re a surveyor working on behalf of a small business directory. You joined the company earlier this year. The company’s goal is to collect data about small businesses and create a proprietary dataset to sell to private equity funds. Your job is to ask four basic questions, and collect the information from that small business.\n\nThe four questions you need to answer are:\n1. The business’ category and what services it provides\n2. The business’ hours of operation\n3. The business’ size (how many employees and customers it has)\n4. The owner’s contact information\n\nHere’s an example dialogue\nPerson: Hello this is Squaw Valley Plumbing Co, my name is Jessica, how can I help you?\nYou: Hi Jessica, this is Sarah, I’m calling on behalf of a local small business directory. I wanted to create a listing for your company - do you have time to help?\nPerson: Yeah absolutely. Just to make sure though, you’re making a local directory? What do you need to know?\nYou: Yes, we collect this information on a semi-annual basis to understand the state and overall health of small businesses in the valley. I just have a list of questions to go through.\nPerson: Sounds good, go for it.\nYou: Awesome. First question is: what services do you all provide to the community?\nPerson: We provide plumbing services. Most of the time it’s folks calling in because they have an issue with their sink or toilet. You know how it is.\nYou: Right, yeah. Second question is: what are your hours of operations?\nPerson: Monday through Saturday it’s 9am-7pm. And then Sundays it’s 10am-2pm.\nYou: Do you observe federal holidays?\nPerson: Yes of course.\nYou: Okay, perfect. And at this point, could you give me a sense of how long you’ve been serving our community for?\nPerson: We opened up shop about ten years ago. Feels like we’ve been in the valley forever.\nYou: Haha I’m sure. And at this point, how large have you all gotten? Could you give me a sense of how many folks you’re currently employing?\nPerson: Yeah we’ve gotten pretty big. We have around 10 plumbers on staff, and then a team of support people working around them.\nYou: Fantastic, that’s great to hear. Last question is: could you share the owner’s contact information with me? We won’t give this info out, but it helps us if we need to follow up and collect more info. \nPerson: Eh, I’m not sure if I’m comfortable doing that\nYou: Yeah no worries, it’s completely up to you. We have a few programs we offer to small businesses in the area, and if you qualify it’s just easier to reach out direct. But again, no worries at all if you don’t feel comfortable sharing.\nPerson: Oh, that’s fine then. The owner’s name is Michael Shelly and his phone number is 8781086645.\nYou: Perfect, thanks so much for your help.\nPerson: Of course! Goodbye.",
"model": "base",
"language": "en",
"voice": "maya",
"voice_settings": {},
"local_dialing": false,
"max_duration": 12,
"answered_by_enabled": false,
"wait_for_greeting": false,
"record": false,
"amd": false,
"interruption_threshold": 100,
"voicemail_message": null,
"temperature": null,
"transfer_list": {},
"metadata": {},
"pronunciation_guide": [],
"start_time": null,
"request_data": {},
"tools": [],
"webhook": null,
"calendly": {}
}

Prompt

Here is the output Chatgpt gave and the schema we will use below

{
"openapi": "3.0.0",
"info": {
"title": "Bland AI Calls API",
"version": "1.0.0",
"description": "API for managing calls through Bland AI"
},
"servers": [
{
"url": "https://api.bland.ai/v1",
"description": "Production server"
}
],
"paths": {
"/calls": {
"post": {
"summary": "Create a call task",
"operationId": "createCallTask",
"requestBody": {
"description": "Details of the call task",
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"phone_number": {
"type": "string",
"description": "Phone number to call",
"example": "+"
},
"from": {
"type": "string",
"nullable": true,
"description": "Caller name",
"example": null
},
"task": {
"type": "string",
"description": "Task script for the call",
"example": "Your name is Sarah, and you’re a surveyor working on behalf of a small business directory. ..."
},
"model": {
"type": "string",
"description": "Model to use for the call",
"example": "base"
},
"language": {
"type": "string",
"description": "Language of the call",
"example": "en"
},
"voice": {
"type": "string",
"description": "Voice to use for the call",
"example": "maya"
},
"voice_settings": {
"type": "object",
"description": "Settings for the voice",
"example": {}
},
"local_dialing": {
"type": "boolean",
"description": "Enable local dialing",
"example": false
},
"max_duration": {
"type": "integer",
"description": "Maximum duration of the call in minutes",
"example": 12
},
"answered_by_enabled": {
"type": "boolean",
"description": "Enable answered by feature",
"example": false
},
"wait_for_greeting": {
"type": "boolean",
"description": "Wait for greeting before starting the task",
"example": false
},
"record": {
"type": "boolean",
"description": "Record the call",
"example": false
},
"amd": {
"type": "boolean",
"description": "Enable answering machine detection",
"example": false
},
"interruption_threshold": {
"type": "integer",
"description": "Interruption threshold for the call",
"example": 100
},
"voicemail_message": {
"type": "string",
"nullable": true,
"description": "Message to leave on voicemail",
"example": null
},
"temperature": {
"type": "number",
"nullable": true,
"description": "Temperature setting for the call",
"example": null
},
"transfer_list": {
"type": "object",
"description": "List of transfer options",
"example": {}
},
"metadata": {
"type": "object",
"description": "Metadata for the call",
"example": {}
},
"pronunciation_guide": {
"type": "array",
"description": "Pronunciation guide",
"items": {
"type": "string"
},
"example": []
},
"start_time": {
"type": "string",
"format": "date-time",
"nullable": true,
"description": "Start time for the call",
"example": null
},
"request_data": {
"type": "object",
"description": "Additional request data",
"example": {}
},
"tools": {
"type": "array",
"description": "Tools to use for the call",
"items": {
"type": "object"
},
"example": []
},
"webhook": {
"type": "string",
"nullable": true,
"description": "Webhook URL for call updates",
"example": null
},
"calendly": {
"type": "object",
"description": "Calendly integration details",
"example": {}
}
},
"required": ["phone_number", "task", "model", "language", "voice"]
}
}
}
},
"responses": {
"200": {
"description": "Call task created successfully",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Indicates if the operation was successful",
"example": true
},
"message": {
"type": "string",
"description": "Detailed message of the operation",
"example": "Call task created successfully"
}
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Error message",
"example": "Invalid input data"
}
}
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Error message",
"example": "Internal server error"
}
}
}
}
}
}
}
}
}
},
"components": {
"schemas": {}
}
}

And just for clarification the schema is just a file or text that tells the AI Agent what url it should send the request too and what parameters should be passed to the tool. The parameters are just being the values we set earlier when building our phone agent.

If you want to gain more of an understanding of how function calling or tool calling works you can read my earlier article - Function Calling Guide

Will be writing up more beginner friendly articles on how schemas , tools and function calling work in the future also.

Step 2: OAI Widget Set up

Now once we created the schema this is where oai-widget comes in.

For guys who are new here and haven’t heard of oai widget I put out a video - Full Video and an article - Full Article on how to create AI Assistants for your website using oai widget. If you need the full step process on how to set that up I would check those out.

1. So lets go to oai-widget.

2. Create a new Assistant and then go to the actions button.

3. Click and add the schema we created.

Schema added into oai-widget

4. Then lets go back to blandai(https://app.bland.ai/) and click on the your profile icon on the button left hand side then click on api keys. Then copy the api key on that page.

Profile Icon on the button left hand side(with my name on it)
click on API key
Then copy the api key on this page

5. Then go back to oai widget and paste this in the api key section with auth type set to Custom And Authorization as the Custom Value.

Then click apply and Save

How your Auth section should look like

6. After that lets add the prompt. Here is the prompt Im using for this example down below

Prompt :


When the user says they are interested in my services ask for their phone number so you can use the bland AI tool to call them.
Make sure you ask where they leave and what there area code number is so you can it to the phone number.
For example, if they live in the us their area code would be +1

These are the values you should pass to the tool

"phone_number": {area code based on where they live}{phone number given by the lead}
"from": +14157920469
"task": "Your name is Sarah, and you’re a surveyor working on behalf of a small business directory. You joined the company earlier this year. The company’s goal is to collect data about small businesses and create a proprietary dataset to sell to private equity funds. Your job is to ask four basic questions, and collect the information from that small business.\n\nThe four questions you need to answer are:\n1. The business’ category and what services it provides\n2. The business’ hours of operation\n3. The business’ size (how many employees and customers it has)\n4. The owner’s contact information\n\nHere’s an example dialogue\nPerson: Hello this is Squaw Valley Plumbing Co, my name is Jessica, how can I help you?\nYou: Hi Jessica, this is Sarah, I’m calling on behalf of a local small business directory. I wanted to create a listing for your company - do you have time to help?\nPerson: Yeah absolutely. Just to make sure though, you’re making a local directory? What do you need to know?\nYou: Yes, we collect this information on a semi-annual basis to understand the state and overall health of small businesses in the valley. I just have a list of questions to go through.\nPerson: Sounds good, go for it.\nYou: Awesome. First question is: what services do you all provide to the community?\nPerson: We provide plumbing services. Most of the time it’s folks calling in because they have an issue with their sink or toilet. You know how it is.\nYou: Right, yeah. Second question is: what are your hours of operations?\nPerson: Monday through Saturday it’s 9am-7pm. And then Sundays it’s 10am-2pm.\nYou: Do you observe federal holidays?\nPerson: Yes of course.\nYou: Okay, perfect. And at this point, could you give me a sense of how long you’ve been serving our community for?\nPerson: We opened up shop about ten years ago. Feels like we’ve been in the valley forever.\nYou: Haha I’m sure. And at this point, how large have you all gotten? Could you give me a sense of how many folks you’re currently employing?\nPerson: Yeah we’ve gotten pretty big. We have around 10 plumbers on staff, and then a team of support people working around them.\nYou: Fantastic, that’s great to hear. Last question is: could you share the owner’s contact information with me? We won’t give this info out, but it helps us if we need to follow up and collect more info. \nPerson: Eh, I’m not sure if I’m comfortable doing that\nYou: Yeah no worries, it’s completely up to you. We have a few programs we offer to small businesses in the area, and if you qualify it’s just easier to reach out direct. But again, no worries at all if you don’t feel comfortable sharing.\nPerson: Oh, that’s fine then. The owner’s name is Michael Shelly and his phone number is 8781086645.\nYou: Perfect, thanks so much for your help.\nPerson: Of course! Goodbye."
"model": "base"
"language": "en",
"voice": "maya"

The main takeaway of this prompt is

  1. We make the AI Agent collect the user phone number before calling the bland tool so they know what phone number to call to contact the user
  2. We make sure to specify the values we want the AI to send as parameters when calling & using the Phone Agent Tool. Like the voice you want the phone agent to use or the prompt you want the phone agent to use or the number you want the phone agent to call from(this will be the number you bought from bland earlier).
  3. One Big Thing I added to the prompt is that I made sure the AI knows where the person is located because its very important that the area code is added to the phone number if the user doesnt add it. Meaning if I live in the USand my phone number is (470) 866–1301‬ we need to make sure that the AI Agent is sending +1(470) 866–1301‬ as the phone number to the tool or the tool wont call the right number & will fail. Thats why I mention this in the prompt “phone_number”: {area code based on where they live}{phone number given by the lead}.

If you want to understand more on how to build prompt for AI Agents that use function calling or call tools you can check out the tweet I did on this - The Tweet

The Tweet

Will also be creating a series around prompting for AI Agents so give a follow if you interested in seeing information like that.

7.After adding the prompt, save and test it. Once the AI agent sends you a confirmation message indicating that the tool or function call was successful, it should call you shortly afterward

How the conversation looks

Conclusion

By following these steps, you can create a fully functional AI phone agent using Bland AI with no code. This agent can handle customer interactions, qualify leads, and provide all sorts of valuable automation for your business.

If you want to learn how you can get your phone agent to use function calling during a call so it can do things like check the availability on your calendar or book appointments on your calendar in a middle of a call you can check out my full video where I made an AI Appointment Setter using Bland AI.

AI Appointment Setter

AI Appointment Setter Video

Also again if you want to learn how to integrate this assistant to your website you can read the previous article I made on oai-widget or check the video I did on the step up.

How to use Oai Widget to add your AI Assistant to your Website

Oai Widget Video

For further details on integrating AI assistants refer to the resources below:

If you want to connect with me here is my LinkedIn — Alozie Igbokwe LinkedIn Profile

--

--

Alozie Igbokwe

I write articles on AI Agents. Here is my YT Channel if you want to see walkthroughs on AI Agents you can build for your business -https://shorturl.at/5s1tN