Import the vapi_agent.vf file on your Voiceflow workspace by clicking on the import button.
Open your agent and be sure to test the Agent demo at least once to compile the version if your VOICEFLOW_VERSION_ID is set to development, or to click on the Publish button if you've set the VOICEFLOW_VERSION_ID to production.
Retrieve the Voiceflow API key from the Voiceflow integrations view.
Retrieve the Voiceflow project ID from the Voiceflow settings view.
Retrieve you private API key from the VAPI dashboard
cp .env.template .env
Update the .env file with your Voiceflow API key and project ID.
ngrok http 3101
Save the ngrok forwarding url for next step to update the Custom LLM endpoint in the VAPI assistant.
npm run setup
npm run cli
Welcome to the VF | VAPI Custom LLM Endpoint
1. Launch server
2. Create an assistant
Enter your choice (1 or 2):
Select 2 to create an assistant.
Enter assistant name: { any name }
Enter endpoint: { the ngrok forwarding url copied from previous step }
Enter VAPI API key: { the VAPI API key copied from previous step }
You can now start the server
Assistant {name} created successfully
Do you want to start the server now? (y/n): y
[ ready ] http://localhost:3101
npm run start
On VAPI, select the assistant you've just created and click on the Talk button to test your assistant.