Skip to content

de-id/agents-sdk-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

D-ID Agents SDK Demo - Vite & Vanilla JavaScript

This demo showcases the core features of the @d-id/client-sdk with Vite and vanilla JavaScript. It’s meant as a starting point for your own customizations, demonstrating the SDK’s basic functionality in a simple, approachable way — not as a production-ready application.

Features

  • Real-time video and audio streaming with D-ID Agents
  • Chat and Speak modes (Chat: D-ID’s LLM responses, Speak: repeats textbox input for custom implementations)
  • New: Fluent streaming + response interruption (Agents with V3 Pro Avatars only)
  • Speech-to-text example using the open-source WebSpeech API
  • Modern UI with responsive design

Getting Started

1. Clone the Repository

git clone https://github.com/de-id/agents-sdk-demo.git
cd agents-sdk-demo-main

2. Install Dependencies

npm install

3. Project Structure

  • index.html — Main HTML file
  • main.js — Application logic and D-ID SDK integration
  • webSpeechAPI.js — WebSpeech API Speech-to-text support
  • style.css — Styling
  • package.json — Project configuration

4. Scripts

The package.json includes the following scripts:

"scripts": {
  "dev": "vite --port 3000",
  "build": "vite build",
  "preview": "vite preview"
}
  • npm run dev — Start the development server on http://localhost:3000
  • npm run build — Build for production
  • npm run preview — Preview the production build

5. Configure Your Agent

  1. Fetch your data-client-key and data-agent-id from the D-ID Studio or API (see the Agents SDK Overview).

  2. Paste them at the top of main.js:

    let auth = { type: 'key', clientKey: "<your-client-key>" };
    let agentId = "<your-agent-id>";

6. Run the App

npm run dev

Then open http://localhost:3000 in your browser.

Notes


© D-ID. MIT License.

About

D-ID Agents SDK Demo APP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages