deepgram-python-voice-agent

Builds a real-time voice agent using the Deepgram Python SDK and WebSocket protocol.

456|139|Updated May 12, 2021
One-click install
npx skills add https://github.com/deepgram/deepgram-python-sdk --skill deepgram-python-voice-agent
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: deepgram-python-voice-agent
Source: https://github.com/deepgram/deepgram-python-sdk/tree/main/.agents/skills/deepgram-python-voice-agent
Command: npx skills add https://github.com/deepgram/deepgram-python-sdk --skill deepgram-python-voice-agent

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Interacting with a voice agent can be complex; this skill provides a blueprint to build and test a real-time, full-duplex voice agent using the Deepgram Python SDK, covering connection, streaming, event handling, and dynamic updates.

Core Features & Use Cases

  • Full-duplex voice agent runtime: STT + LLM + TTS with live conversation and barge-in.
  • Dynamic mid-session updates: swap prompts, speak, or think settings without disconnecting; inject messages; keep-alive; manage conversation history for reconnects.
  • Tool calling and function execution: trigger function/tool calls from the model and handle responses within a single WebSocket session.
  • Durable connections and orchestration: host configuration and context persistence to resume conversations after disconnects.

Quick Start

Run the example to start a live, interactive voice agent connected to agent.deepgram.com and begin exchanging audio.

Frequently Asked Questions about deepgram-python-voice-agent

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a real-time voice agent with Python using Deepgram?

Build a real-time voice agent in Python by using a WebSocket-based SDK blueprint that connects to Deepgram, managing full-duplex audio streaming, STT, TTS, and LLM interactions within a single session.

How does function calling work in a live voice agent session?

Function calling in a live voice agent session triggers tool executions from the model and handles responses directly within the same WebSocket connection, allowing real-time interaction without breaking the audio stream.

Can I update LLM prompts or TTS settings mid-session without disconnecting?

You can dynamically swap prompts, speak, or think settings mid-session without disconnecting, enabling seamless updates to the voice agent's behavior during a live conversation.

How do I manage conversation history and handle reconnects for a voice agent?

Manage conversation history and handle reconnects by using durable connections and context persistence, allowing the voice agent to resume conversations automatically after unexpected disconnects.

Does the Deepgram Python SDK support full-duplex audio streaming with barge-in?

The Deepgram Python SDK supports full-duplex audio streaming with live conversation capabilities, allowing users to interrupt or barge-in during text-to-speech playback for natural interactions.

What is needed to maintain a WebSocket connection to agent.deepgram.com for voice interactions?

Maintaining a WebSocket connection to agent.deepgram.com requires correct provider configurations, robust error handling, and keep-alive management to ensure stable streaming audio and mid-session updates.