Use when writing or reviewing Go code in this repo that runs a Deepgram Voice Agent session over WebSockets, including runtime settings, prompt updates, speak updates, injected messages, and event handling. Route standalone STT/TTS work to deepgram-go-speech-to-text or deepgram-go-text-to-speech.
78
72%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
Optimize this skill with Tessl
npx tessl skill review --optimize ./.agents/skills/deepgram-go-voice-agent/SKILL.mdUse this skill for live Voice Agent runtime flows in pkg/client/agent.
Use a different skill when:
deepgram-go-speech-to-text)deepgram-go-text-to-speech)deepgram-go-management-api)Set DEEPGRAM_API_KEY before opening the agent connection.
export DEEPGRAM_API_KEY="your_api_key"package main
import (
"context"
"fmt"
"log"
agentws "github.com/deepgram/deepgram-go-sdk/v3/pkg/api/agent/v1/websocket"
agent "github.com/deepgram/deepgram-go-sdk/v3/pkg/client/agent"
)
func main() {
if err := run(); err != nil {
log.Fatal(err)
}
}
func run() error {
ctx := context.Background()
settings := agent.NewSettingsConfigurationOptions()
handler := agentws.NewDefaultChanHandler()
conn, err := agent.NewWSUsingChanWithDefaults(ctx, settings, handler)
if err != nil {
return err
}
defer conn.Stop()
if ok := conn.Connect(); !ok {
return fmt.Errorf("connect failed")
}
conn.Start()
// The handler receives Welcome, ConversationText, FunctionCallRequest, and audio events.
// Stream audio frames, watch agent events, and respond to function calls as needed.
return nil
}agent.NewSettingsConfigurationOptions()agent.NewWSUsingChanWithDefaults(...)agent.NewWSUsingChan(...)Connect, Start, ProcessMessage, Stream, Write, KeepAliveAttemptReconnect and error handling helpers in the WS clientpkg/api/agent/v1/websocket/interfaces/types.go
UpdatePromptUpdateSpeakInjectAgentMessageInjectUserMessageFunctionCallResponseWelcomeResponse, ConversationTextResponse, FunctionCallRequestResponse, AgentStartedSpeakingResponse, AgentAudioDoneResponseREADME.mdpkg/client/agent/client.gopkg/client/agent/v1/websocket/client_channel.gopkg/client/agent/v1/websocket/new_using_chan.gopkg/client/interfaces/v1/types-agent.gopkg/api/agent/v1/websocket/interfaces/types.gohttps://developers.deepgram.com/openapi.yamlhttps://developers.deepgram.com/asyncapi.yaml/llmstxt/developers_deepgram_llms_txthttps://developers.deepgram.com/reference/voice-agent/voice-agenthttps://developers.deepgram.com/docs/voice-agenthttps://developers.deepgram.com/docs/configure-voice-agenthttps://developers.deepgram.com/docs/voice-agent-message-flowAgentMessageChan handler; events are routed there rather than pulled from the client.defer conn.Stop(), and remember that Connect() returns bool rather than error.examples/agent/websocket/simple/main.goexamples/agent/websocket/no_mic/main.goexamples/agent/websocket/arbitrary_keys/main.gotests/unit_test/agent/agent_speak_test.goFor 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/skillsThis SDK ships language-idiomatic code skills; deepgram/skills ships cross-language product knowledge (see api, docs, recipes, examples, starters, setup-mcp).
b7c92f4
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.