← Examples

Embedded Layout TS Source

Fills the container width with an aspect-ratio height. Includes full chat — transcript, text input, mic and speaker controls. Drop it into any content area.

Code

import { init } from '@deepgram/agent-widget';

init({
  tokenFactory: () => fetch('/api/token').then(r => r.json()).then(d => d.token),
  agent: { /* ... */ },
  layout: 'embedded',
  containerId: 'agent-embed',
});