Skip to main content
Keep the Deepgram project key in Node. When a user starts a call, the browser requests a temporary token, connects to your configured Voice Agent, and displays final conversation messages next to the orb. The transcript tells the reader what was said. The orb shows whose audio is active.

Issue temporary tokens in Node

You need a Deepgram Voice Agent ID, a project API key that can grant temporary tokens, and Node 22 or newer. Save this as token-server.mjs. Run node --env-file=.env.local token-server.mjs with DEEPGRAM_API_KEY set in the server environment. A live call uses your Deepgram account.
This local server accepts requests from the demo origin through the proxy below. For a hosted app, use your existing authenticated backend to authorize each caller and enforce a usage limit before issuing a grant. Deepgram token grant

Connect Vite to the token server

Add this server option to your existing vite.config.ts. Open the app at http://localhost:5173. The proxy preserves the browser origin and sets the upstream Host header to the loopback server.

Show the conversation alongside the orb

Run npm install orb-ui @deepgram/agents@0.1.2. Save this component as DeepgramAssistant.tsx and render it with your agent ID. The adapter creates a fresh session and player on each start. Each new call also begins a fresh transcript.
Start a call, ask one question, and interrupt the answer. You should see the user’s words and the assistant’s response in the list. The orb should follow audible playback and return to listening on interruption. A transcript arriving early is normal. If text appears while the speakers stay silent, check playback permission and the 24 kHz player configuration. Deepgram adapter and audio lifecycle
Last modified on November 26, 2026