{"id":49513082,"url":"https://github.com/deepgram/agent","last_synced_at":"2026-05-01T21:00:55.526Z","repository":{"id":354903442,"uuid":"1179868415","full_name":"deepgram/agent","owner":"deepgram","description":"Voice agent SDK, React components, and embeddable widget for the Deepgram Agent API","archived":false,"fork":false,"pushed_at":"2026-04-30T19:45:20.000Z","size":3616,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-30T21:17:54.765Z","etag":null,"topics":["agent","client-library","sdk","voice","voice-agent"],"latest_commit_sha":null,"homepage":"https://deepgram-agent-examples.fly.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deepgram.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-12T13:15:43.000Z","updated_at":"2026-04-30T19:45:15.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/deepgram/agent","commit_stats":null,"previous_names":["deepgram/agent"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/deepgram/agent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepgram%2Fagent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepgram%2Fagent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepgram%2Fagent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepgram%2Fagent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deepgram","download_url":"https://codeload.github.com/deepgram/agent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepgram%2Fagent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32512670,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","client-library","sdk","voice","voice-agent"],"created_at":"2026-05-01T21:00:54.646Z","updated_at":"2026-05-01T21:00:55.511Z","avatar_url":"https://github.com/deepgram.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deepgram Voice Agent\n\nVoice agent SDK and embeddable widget for the [Deepgram Agent API](https://developers.deepgram.com/docs/voice-agent).\n\n```\n@deepgram/agents  ←  @deepgram/react (external)  ←  @deepgram/ui (external)  ←  @deepgram/agents-widget\n```\n\n## Packages\n\n| Package | Description |\n|---------|-------------|\n| [`@deepgram/agents`](packages/sdk/) | Core SDK -- WebSocket session, microphone capture, audio playback |\n| [`@deepgram/agents-widget`](packages/widget/) | Self-contained widget (UMD + ESM) -- drop into any page, no framework needed |\n\nReact hooks and UI components live in their own repos:\n\n| Package | Repo |\n|---------|------|\n| [`@deepgram/react`](https://github.com/deepgram/react) | React provider and hooks for agent state, conversation, controls |\n| [`@deepgram/ui`](https://github.com/deepgram/ui) | Pre-built React UI components with Tailwind CSS theming |\n\n## Quick Start\n\n### Widget (no framework)\n\n```bash\nnpm install @deepgram/agents-widget\n```\n\n```ts\nimport { init } from \"@deepgram/agents-widget\";\n\ninit({\n  tokenFactory: () =\u003e fetch('/api/deepgram-token').then(r =\u003e r.text()),\n  agent: { think: { provider: { type: 'open_ai' }, model: 'gpt-4o-mini' } },\n});\n```\n\nThe package also ships a UMD bundle at `dist/widget.umd.js` for `\u003cscript\u003e`-tag usage; host it from your own server.\n\n### React\n\n```tsx\nimport { AgentProvider, useAgentState, useAgentConversation } from \"@deepgram/ui\";\nimport \"@deepgram/ui/styles.css\";\nimport { AgentConversation, AgentStartButton, AgentTextInput } from \"@deepgram/ui\";\n\nfunction App() {\n  return (\n    \u003cAgentProvider\n      config={{\n        auth: { tokenFactory: () =\u003e fetch('/api/deepgram-token').then(r =\u003e r.text()) },\n        agent: { think: { provider: { type: 'open_ai' }, model: 'gpt-4o-mini' } },\n      }}\n    \u003e\n      \u003cAgentStartButton /\u003e\n      \u003cAgentConversation /\u003e\n      \u003cAgentTextInput /\u003e\n    \u003c/AgentProvider\u003e\n  );\n}\n```\n\n### SDK only\n\n```ts\nimport { AgentSession, AgentMicrophone, AgentPlayer } from \"@deepgram/agents\";\n\nconst session = new AgentSession({\n  auth: { tokenFactory: () =\u003e fetch('/api/deepgram-token').then(r =\u003e r.text()) },\n  agent: { think: { provider: { type: 'open_ai' }, model: 'gpt-4o-mini' } },\n});\n\nconst player = new AgentPlayer();\nsession.on(\"audio\", (chunk) =\u003e player.queue(chunk));\n\nconst mic = new AgentMicrophone((data) =\u003e session.sendAudio(data));\nawait session.connect();\nawait mic.start();\n```\n\n## Authentication\n\nThe SDK authenticates via the `Sec-WebSocket-Protocol` header (not URL query params). Two auth modes:\n\n- **API key** (server-side only): `{ apiKey: \"your-deepgram-api-key\" }`\n- **Token factory** (browser-safe): `{ tokenFactory: () =\u003e fetch('/api/token').then(r =\u003e r.text()) }`\n\nThe token factory is called before every connection and reconnection attempt, so tokens can be short-lived and rotated automatically.\n\n## Theming\n\nAll styling comes from [`@deepgram/ui`](https://github.com/deepgram/ui)'s compiled Tailwind CSS. The widget exposes 26 CSS custom properties on `[data-dg-agent]` for runtime theming — see the [widget README](packages/widget/) for the full list.\n\n## Examples\n\n17 examples live in [`examples/`](examples/):\n\n| Range | Type | Examples |\n|-------|------|----------|\n| 01-07 | Widget (TypeScript) | sidebar, inline, floating, button, embedded, orb, floating-orb |\n| 10-15 | React | sidebar, inline, floating, standalone UI, voice button, orb |\n| 20-23 | UMD bundle | sidebar, inline, floating, console |\n\nRun locally:\n\n```bash\nbun run dev:examples    # Vite dev server on :5173\n```\n\nLive demo: [deepgram-agent-examples.fly.dev](https://deepgram-agent-examples.fly.dev)\n\n## Roadmap\n\n`@deepgram/react` and `@deepgram/ui` have been extracted into their own repos as generic Deepgram browser primitives:\n\n| Package | Repo |\n|---------|------|\n| `@deepgram/agents` | This repo (`packages/sdk/`) |\n| `@deepgram/agents-widget` | This repo (`packages/widget/`) |\n| `@deepgram/react` | [`deepgram/react`](https://github.com/deepgram/react) |\n| `@deepgram/ui` | [`deepgram/ui`](https://github.com/deepgram/ui) |\n| `@deepgram/browser` | Planned: browser instrumentation SDK (non-agent), may re-export agent bits |\n\n## Development\n\n**Prerequisites:** [Bun](https://bun.sh/) 1.3+\n\n```bash\ngit clone git@github.com:deepgram/agent.git\ncd agent\nbun install\n```\n\n```bash\nbun run build              # Build all packages\nbun run typecheck           # Type-check all packages\nbun run test                # Run tests\nbun run dev:examples        # Run examples dev server (:5173)\n```\n\n## Deployment\n\nThe examples app deploys to Fly.io:\n\n```bash\nfly deploy    # deploys to deepgram-agent-examples.fly.dev\n```\n\n## License\n\nMIT -- see [LICENSE](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepgram%2Fagent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeepgram%2Fagent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepgram%2Fagent/lists"}