Main Objective

Our goal is to build an agent that can help customers troubleshoot their technical issues over the phone. To achieve this, we’ll start by setting up our voice agent, assigning it a dedicated phone number.

1

Create an Agent

// Install: npm i voiceos
import VoiceOS from 'voiceos';

const voiceos = new VoiceOS('your-api-key');

const customer_support = await voiceos.agent.create_agent({
    "initial_message": "Hello, how can I help you today?",
    "prompt": "You're a technical support agent helping a customer troubleshoot their computer.",
    "language_model": {
        "provider": "openai",
        "model": "gpt-3.5-turbo-1106"
    },
    "voice": {
        "provider": "azure",
        "model": "en-US-AvaNeural"
    },
    "transcriber": {
        "provider": "deepgram",
        "model": "nova-2"
    }
});
2

Setup Inbound Agent

voiceos.phoneNumbers.updatePhoneNumber(
    "your-voiceos-number", 
    {
        "inbound_agent_id": customer_support.id
    }
)
3

Ready to Call

Your agent is now ready to take calls. You can test it by calling your phone number and speaking to the agent.