MCPInstall

deepgram-js-voice-agent

Use when writing or reviewing JavaScript/TypeScript in this repo that builds an interactive voice agent via agent.deepgram.com/v1/agent/converse. Covers client.agent.v1.createConnection() / connect(), sendSettings, sendMedia, runtime updates, event handling, and function-call responses. Use deepgram-js-text-to-speech for one-way synthesis, deepgram-js-speech-to-text or deepgram-js-conversational-stt for transcription only, and deepgram-js-management-api for project/model admin rather than live agent runtime. Triggers include "voice agent", "agent converse", "full duplex", "barge-in", "function calling", and "agent.v1".

Installs
53
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/deepgram/deepgram-js-sdk --skill deepgram-js-voice-agent
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads deepgram-js-voice-agent automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Using Deepgram Voice Agent (JavaScript / TypeScript SDK)

Full-duplex voice agent runtime over wss://agent.deepgram.com/v1/agent/converse: audio in, LLM orchestration, audio out, plus function calling and prompt/runtime updates.

When to use this product

  • You want an interactive voice assistant where the user speaks, the agent thinks, and the agent responds with speech.
  • You need function / tool calling inside the conversation loop.
  • You want Deepgram to host the STT + think + TTS orchestration.

Use a different skill when:

  • You only need transcription → deepgram-js-speech-to-text or deepgram-js-conversational-stt.
  • You only need synthesis → deepgram-js-text-to-speech.
  • You want project keys, usage, models, or other admin APIs → deepgram-js-management-api.

Authentication

require("dotenv").config();

const { DeepgramClient, DeepgramEnvironment } = require("@deepgram/sdk");

const deepgramClient = new DeepgramClient({
  apiKey: process.env.DEEPGRAM_API_KEY,
  environment: DeepgramEnvironment.Agent,
});

The websocket itself is routed to the agent host by src/CustomClient.ts, but the repo example uses DeepgramEnvironment.Agent so client.agent.v1.settings.think.models.list() also points at the agent base.

Quick start

From examples/09-voice-agent.ts:

const deepgramConnection = await deepgramClient.agent.v1.createConnection();

deepgramConnection.on("message", (data) => {
  if (data.type === "ConversationText") {
    console.log("Conversation text:", data);
  } else if (typeof data === "string") {
    console.log("Audio received (length):", data.length);
  }
});

deepgramConnection.connect();
await deepgramConnection.waitForOpen();

deepgramConnection.sendSettings({
  type: "Settings",
  audio: {
    input: { encoding: "linear16", sample_rate: 24000 },
    output: { encoding: "linear16", sample_rate: 16000, container: "wav" },
  },
  agent: {
    language: "en",
    listen: { provider: { type: "deepgram", version: "v1", model: "nova-3" } },
    think: {
      provider: { type: "open_ai", model: "gpt-4o-mini" },
      prompt: "You are a friendly AI assistant.",
    },
    speak: { provider: { type: "deepgram", model: "aura-2-thalia-en" } },
    greeting: "Hello! How can I help you today?",
  },
});

The same example also shows client.agent.v1.settings.think.models.list() for discovering supported think models.

Key parameters / API surface

  • Connection setup: client.agent.v1.createConnection() / connect().
  • First outbound control message: sendSettings(AgentV1Settings).
  • Runtime updates: sendUpdatePrompt(...), sendUpdateThink(...), sendUpdateSpeak(...), sendInjectUserMessage(...), sendInjectAgentMessage(...), sendFunctionCallResponse(...), sendKeepAlive(...), sendMedia(...).
  • Important inbound events from src/api/resources/agent/resources/v1/client/Socket.ts: Welcome, SettingsApplied, ConversationText, UserStartedSpeaking, AgentThinking, FunctionCallRequest, AgentStartedSpeaking, AgentAudioDone, Warning, Error, plus audio payloads.

Limitations

This SDK exposes the live agent runtime plus settings.think.models.list(), but it does not expose persisted Voice Agent configuration CRUD endpoints in the current generated surface.

API reference (layered)

  1. In-repo reference: reference.md → Agent V1 Settings Think Models; live websocket behavior is defined in src/CustomClient.ts and src/api/resources/agent/resources/v1/client/{Client,Socket}.ts.
  2. Canonical OpenAPI (REST): https://developers.deepgram.com/openapi.yaml
  3. Canonical AsyncAPI (WSS): https://developers.deepgram.com/asyncapi.yaml
  4. Context7: library ID /llmstxt/developers_deepgram_llms_txt
  5. Product docs:

Gotchas

  1. Settings must be first. Send sendSettings({ type: "Settings", ... }) immediately after the socket opens.
  2. Audio and JSON events share the same message stream. Your message handler must branch on typeof data and data.type.
  3. Keepalive matters. examples/09-voice-agent.ts sends KeepAlive every 5 seconds to preserve long sessions.
  4. Encoding/sample rates must line up on both sides. Mismatches cause distorted uploads or unusable playback.
  5. Think-model discovery is separate from the websocket. Use client.agent.v1.settings.think.models.list() before choosing providers.
  6. Function-call requests arrive as arrays. Inspect data.functions[], then answer with sendFunctionCallResponse({ type: "FunctionCallResponse", id, name, content }).
  7. Persisted agent configurations are not in this SDK today. If you need stored configs, use raw HTTP or another SDK surface.

Example files in this repo

  • examples/09-voice-agent.ts
  • examples/34-agent-custom-providers.ts
  • examples/35-agent-provider-combinations.ts
  • examples/36-agent-inject-message.ts

Central product skills

For cross-language Deepgram product knowledge — the consolidated API reference, documentation finder, focused runnable recipes, third-party integration examples, and MCP setup — install the central skills:

npx skills add deepgram/skills

This SDK ships language-idiomatic code skills; deepgram/skills ships cross-language product knowledge (see api, docs, recipes, examples, starters, setup-mcp).

FAQ

What does the deepgram-js-voice-agent skill do?

Use when writing or reviewing JavaScript/TypeScript in this repo that builds an interactive voice agent via agent.deepgram.com/v1/agent/converse. Covers client.agent.v1.createConnection() / connect(), sendSettings, sendMedia, runtime updates, event handling, and function-call responses. Use deepgram-js-text-to-speech for one-way synthesis, deepgram-js-speech-to-text or deepgram-js-conversational-stt for transcription only, and deepgram-js-management-api for project/model admin rather than live agent runtime. Triggers include "voice agent", "agent converse", "full duplex", "barge-in", "function calling", and "agent.v1".

How do I install deepgram-js-voice-agent?

Run npx skills add https://github.com/deepgram/deepgram-js-sdk --skill deepgram-js-voice-agent in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/deepgram-js-voice-agent/ (personal) or .claude/skills/deepgram-js-voice-agent/ (project).

Which AI agents can use deepgram-js-voice-agent?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is deepgram-js-voice-agent safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains deepgram-js-voice-agent?

It is published by deepgram in deepgram/deepgram-js-sdk, and it is an official skill from the maker of the technology it covers. It has 53 recorded installs.

More from deepgram/deepgram-js-sdk

View all →

deepgram-js-speech-to-text

deepgram/deepgram-js-sdk

Open the skill to read its SKILL.md instructions.

OfficialMedia & Creative81 installs

deepgram-js-conversational-stt

deepgram/deepgram-js-sdk

Open the skill to read its SKILL.md instructions.

Official66 installs

deepgram-js-text-to-speech

deepgram/deepgram-js-sdk

Open the skill to read its SKILL.md instructions.

OfficialMedia & Creative62 installs

deepgram-js-audio-intelligence

deepgram/deepgram-js-sdk

Open the skill to read its SKILL.md instructions.

OfficialMedia & Creative59 installs

deepgram-js-management-api

deepgram/deepgram-js-sdk

Open the skill to read its SKILL.md instructions.

OfficialBackend & APIs56 installs

Popular media & creative skills

View category →

hyperframes

heygen-com/hyperframes

Read first to make, edit, animate or render any video with HyperFrames (HTML rendered to video), including launch films, explainers, music videos, charts, maps, vertical clips, title cards, captions and overlays. Holds the render contract, the work loop and what each kind of video needs.

Media & Creative1.2M installs

media-use

heygen-com/hyperframes

Get or make any media for a HyperFrames video - music, sound effects, images, icons, logos, voiceover, avatar and generated video, transcripts, cutouts, colour grades and looks - with HeyGen or free local tools, and mix placed audio. Also for footage that looks dark, flat or dull, or should be stylized or hidden.

Media & Creative1.1M installs

hyperframes-registry

heygen-com/hyperframes

About 450 ready-made HyperFrames blocks and components installed as editable source - transitions, overlays, titles, kinetic type, captions, charts, map overlays, 3D, camera moves. Use it before hand-building any named visual (CRT scanlines, glitch, film grain, a chart); also for hyperframes add and catalog.

Media & Creative1M installs

hyperframes-creative

heygen-com/hyperframes

Non-animation creative direction for HyperFrames videos. Use for design spec (frame.md / design.md) handling, palettes, typography, narration, beat planning, audio-reactive visuals, composition patterns, and brand / style decisions. For atomic motion patterns and scene blueprints, use hyperframes-animation.

Media & Creative916.5K installs

ai-video-generation

101-skills/superpowers

Generate AI videos with Google Veo, Seedance 2.0, HappyHorse, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 2.0, HappyHorse 1.0, Wan 2.5, Grok Imagine Video, OmniHuman, Fabric, HunyuanVideo. Capabilities: text-to-video, image-to-video, reference-to-video, video editing, lipsync, avatar animation, video upscaling, foley sound. Use for: social media videos, marketing content, explainer videos, product demos, AI avatars. Triggers: video generation, ai video, text to video, image to video, veo, animate image, video from image, ai animation, video generator, generate video, t2v, i2v, ai video maker, create video with ai, runway alternative, pika alternative, sora alternative, kling alternative, seedance, happyhorse

Media & Creative881.5K installs

ai-image-generation

101-skills/superpowers

Generate AI images with GPT-Image-2, FLUX, Gemini, Grok, Seedream, Reve and 50+ models via inference.sh CLI. Models: GPT-Image-2, FLUX Dev LoRA, FLUX.2 Klein LoRA, Gemini 3 Pro Image, Grok Imagine, Seedream 4.5, Reve, ImagineArt. Capabilities: text-to-image, image-to-image, inpainting, LoRA, image editing, upscaling, text rendering. Use for: AI art, product mockups, concept art, social media graphics, marketing visuals, illustrations. Triggers: flux, image generation, ai image, text to image, stable diffusion, generate image, ai art, midjourney alternative, dall-e alternative, text2img, t2i, image generator, ai picture, create image with ai, generative ai, ai illustration, grok image, gemini image, gpt image, openai image, chatgpt image

Media & Creative880.3K installs