Inbound customer support
Overview
Build a banking support agent with function tools, CSV knowledge bases, and voice test suites. The agent handles account verification, balance inquiries, and transaction history via phone calls.
Agent Capabilities:
- Account lookup and verification via phone number
- Balance and transaction history retrieval
What You’ll Build:
- Retrieval tools and CSV knowledge bases for account/transaction data
- Voice test suites for automated quality assurance
- Inbound phone number configuration for 24/7 availability
Prerequisites
- A Vapi account.
Scenario
We will be creating a customer support agent for VapiBank, a bank that wants to provide 24/7 support to consumers.
1. Create a Knowledge Base
Upload the files
Dashboard
TypeScript (Server SDK)
Python (Server SDK)
cURL
- Navigate to Files in your Vapi Dashboard
- Click Choose file and upload both
accounts.csv
andtransactions.csv
- Note the file IDs for use in creating tools
2. Create an Assistant
Dashboard
TypeScript (Server SDK)
Python (Server SDK)
cURL
3. Configure an Assistant
Update the introduction message
Dashboard
TypeScript (Server SDK)
Python (Server SDK)
cURL
Update First Message
to:
Update the system prompt
First, create this system prompt:
Then update your assistant:
Dashboard
TypeScript (Server SDK)
Python (Server SDK)
cURL
Copy the system prompt above and paste it into the System Prompt
field in your assistant configuration.
Configure LLM settings (optional)
Dashboard
TypeScript (Server SDK)
Python (Server SDK)
cURL
Configure the LLM settings to your liking.
- Select any provider and model you like (you will see cost and latency estimates).
- You can configure the files available to the LLM as knowledge base.
- You can specify the temperature and max tokens of the LLM.
4. Add Tools to an Assistant
Dashboard
TypeScript (Server SDK)
Python (Server SDK)
cURL
Create a tool for retrieving account balance
-
Click
Create Tool
. -
Select
Function
as your tool type. -
Change tool name to
get_balance
. -
Add the following function description:
Function Description -
Scroll down to the
Knowledge Bases
section and add the following knowledge base:- Name:
accounts
Description:Use this to retrieve account information
File IDs:<File ID of your accounts.csv file>
- Name:
Create a tool for retrieving account transactions
-
Click
Create Tool
. -
Select
Function
as your tool type. -
Change tool name to
get_recent_transactions
. -
Add the following function description:
Function Description -
Scroll down to the
Knowledge Bases
section and add the following knowledge bases:-
Name:
accounts
Description:Use this to retrieve account information
File IDs:<File ID of your accounts.csv file>
-
Name:
transactions
Description:Use this to retrieve transactions
File IDs:<File ID of your transactions.csv file>
-
Create a tool for looking up account
-
Click
Create Tool
. -
Select
Function
as your tool type. -
Change tool name to
lookup_account
. -
Add the following function description:
Function Description -
Scroll down to the
Knowledge Bases
section and add the following knowledge bases:- Name:
accounts
Description:Use this to retrieve account information
File IDs:<File ID of your accounts.csv file>
- Name:
5. Assign a Phone Number to an Assistant
Dashboard
TypeScript (Server SDK)
Python (Server SDK)
cURL
6. Create a Test Suite for an Assistant
Dashboard
TypeScript (Server SDK)
Python (Server SDK)
cURL
Create a new test suite
- On the
Test Suites
page, clickCreate Test Suite
. - Click on
New Test Suite
and change the name toSupport Hotline Test Suite
. - Set the
Assistant
toTom
. - Set the
Phone Number
toVapi Support Hotline
. - Under
Test Cases
, clickGenerate Tests
. - Use the following prompt to generate the test case:
- Accept the generated test case.
- Click
Run Test Suite
to execute the tests.
Next Steps
Just like that, you’ve built a 24/7 customer support hotline that can handle inbound calls, create support tickets, and run automated tests to ensure it’s working as expected.
Consider the reading the following guides to further enhance your assistant:
- Knowledge Bases - Learn more about knowledge bases to build knowledge-based agents.
- External Integrations - Configure integrations with Google Calendar, Google Sheets, Slack, etc.
- Workflows - Learn about workflows to build voice agents for more complex use cases.