Empower Langchain agents to interact with the real world via phone calls
This example shows how to use Vocode as a tool augmenting the abilities of a Langchain agent. By providing it with access to Vocode, a Langchain Agent can now make autonomous phone calls and take action based on the outcome of the calls.
Our demo will walk through how to instruct the agent to lookup a phone number and make the appropriate call.
Note: gpt-4
is required for this to work. gpt-3.5-turbo
or older models are not smart enough to parse JSON responses in Langchain agents reliably out-of-the-box.
To get started, clone the Vocode repo or copy the Langchain agent app directory.
.env.template
and fill in your API keys. You’ll need:Fill in the TELEPHONY_SERVER_BASE_URL
environment variable with your ngrok base URL: don’t include https://
so should be something like:
OUTBOUND_CALLER_NUMBER
environment variable. Include +
and the area code, so for a US phone number, it would look something like.Run the following setups from the langchain_agent
directory.
docker-compose
virtualenv
TelephonyServer
:With the self-hosted telephony server running:
tools/contacts.py
main.py
🚧 Under construction
Empower Langchain agents to interact with the real world via phone calls
This example shows how to use Vocode as a tool augmenting the abilities of a Langchain agent. By providing it with access to Vocode, a Langchain Agent can now make autonomous phone calls and take action based on the outcome of the calls.
Our demo will walk through how to instruct the agent to lookup a phone number and make the appropriate call.
Note: gpt-4
is required for this to work. gpt-3.5-turbo
or older models are not smart enough to parse JSON responses in Langchain agents reliably out-of-the-box.
To get started, clone the Vocode repo or copy the Langchain agent app directory.
.env.template
and fill in your API keys. You’ll need:Fill in the TELEPHONY_SERVER_BASE_URL
environment variable with your ngrok base URL: don’t include https://
so should be something like:
OUTBOUND_CALLER_NUMBER
environment variable. Include +
and the area code, so for a US phone number, it would look something like.Run the following setups from the langchain_agent
directory.
docker-compose
virtualenv
TelephonyServer
:With the self-hosted telephony server running:
tools/contacts.py
main.py
🚧 Under construction