---
updatedAt: 2026-05-26T16:20:11.000Z
agentTools:
  projectIndex: https://docs.d-id.com/llms.txt
---

# Overview

How Agents Streams V2 works and how to choose an integration path

Agents Streams V2 is the streaming layer for **Expressive Agents**. It is built on [LiveKit](https://livekit.io/).

> **Note**: V2 works only with Expressive Agents. Other agent types continue to use [Agents Streams V1](/reference/agents-streams).

## How It Works

```mermaid
flowchart LR
    App(["fa:fa-laptop Your App"]) --> Session(["fa:fa-key Session Credentials"])
    Session --> LiveKit(["fa:fa-signal LiveKit Room"])
    LiveKit -- "speak / chat" --> Agent(["fa:fa-circle-user Expressive Agent"])
    Agent -- "video + events" --> LiveKit
    LiveKit --> App
```

After you create a session, your app connects to a LiveKit room using the returned URL and token. All commands (`speak`, `chat`) and responses (video events, partial answers) flow through the LiveKit data channel — no separate HTTP calls once connected.

## Integration Paths

Pick the path that matches what you are building.

<Cards>
  <Card title="Embed Code" icon="fa-code">
    One script tag, no backend. Best for marketing sites, portals, and landing pages.
  </Card>

  <Card title="D-ID Agents SDK" icon="fa-rocket">
    Client-side SDK for custom UI in web apps. Session creation and LiveKit wiring are handled for you.
  </Card>

  <Card title="LiveKit SDK" icon="fa-server">
    Direct LiveKit access for backend orchestration and native mobile apps. Full control over rooms and data channels.
  </Card>
</Cards>

| Path        | Setup    | Code required      | Best for                        |
| ----------- | -------- | ------------------ | ------------------------------- |
| Embed Code  | Instant  | None               | Content sites, quick embeds     |
| D-ID SDK    | Moderate | JavaScript         | Custom web UIs                  |
| LiveKit SDK | Advanced | Backend + frontend | Backend services, native mobile |

## FAQ

<CoolAccordionBox>
  <CoolAccordion title="Do I have to call Create Session V2 directly?">
    <p>Only if you use the LiveKit SDK directly. The D-ID Agents SDK and Embed Code create the session internally.</p>
  </CoolAccordion>

  <CoolAccordion title="Which platforms are supported?">
    <p>Any platform with a LiveKit SDK — JavaScript/TypeScript, Python, Kotlin/Java (Android), Swift (iOS), Flutter, React Native, Unity.</p>
  </CoolAccordion>

  <CoolAccordion title="What happens if the connection drops?">
    <p>Reconnect to the same LiveKit room if the session is still active. If the session has expired, create a new one.</p>
  </CoolAccordion>
</CoolAccordionBox>