Build a Voice Agent

Build a Voice Agent using Deepgram's Voice Agent WebSocket

HandshakeTry it

WSS
wss://agent.deepgram.com/v1/agent/converse

Headers

AuthorizationstringRequired

API key for authentication. Format should be be either ‘token <DEEPGRAM_API_KEY>’ or ‘Bearer <JWT_TOKEN>’

Send

sendSettingsobjectRequired
Send settings configuration to Deepgram's Voice Agent API
OR
sendUpdateSpeakobjectRequired
Send update speak to Deepgram's Voice Agent API
OR
sendInjectUserMessageobjectRequired
Send inject user message to Deepgram's Voice Agent API
OR
sendInjectAgentMessageobjectRequired
Send inject agent message to Deepgram's Voice Agent API
OR
sendFunctionCallResponseobjectRequired
Send a function call response from the client to the server after executing a requested function
OR
sendKeepAliveobjectRequired
Send keep alive to Deepgram's Voice Agent API
OR
sendPromptUpdateobjectRequired
Send a prompt update to Deepgram's Voice Agent API

Receive

receiveFunctionCallResponseobjectRequired

Receive a function call response from the server containing information about an agent-initiated function call

OR
receivePromptUpdateobjectRequired
Receive prompt update from Deepgram's Voice Agent API
OR
receiveSpeakUpdateobjectRequired
Receive speak update from Deepgram's Voice Agent API
OR
receiveInjectionRefusedobjectRequired
Receive injection refused message from Deepgram's Voice Agent API
OR
receiveWelcomeobjectRequired
Receive welcome message from Deepgram's Voice Agent API
OR
receiveSettingsAppliedobjectRequired
Receive settings applied message from Deepgram's Voice Agent API
OR
receiveConversationTextobjectRequired
Receive conversation text from Deepgram's Voice Agent API
OR
receiveUserStartedSpeakingobjectRequired
Receive user started speaking message from Deepgram's Voice Agent API
OR
receiveAgentThinkingobjectRequired
Receive agent thinking message from Deepgram's Voice Agent API
OR
receiveFunctionCallRequestobjectRequired
Receive function call request from Deepgram's Voice Agent API
OR
receiveAgentStartedSpeakingobjectRequired
Receive agent started speaking message from Deepgram's Voice Agent API
OR
receiveAgentAudioDoneobjectRequired
Receive agent audio done message from Deepgram's Voice Agent API
OR
receiveErrorobjectRequired
Receive error response from Deepgram's Voice Agent API
OR
receiveAgentWarningobjectRequired
Receive warning messages from Deepgram's Voice Agent API