Hero Light

Overview

The general flow for a Daily Bot is as follows:

1

Client is initialized

The client application creates an RTVI component, called the DailyVoiceClient with the configuration for which type of bot (AI Agent) to launch, what settings and an internal endpoint to connect to.

2

Client is started

The client application calls start() on the DailyVoiceClient.

3

The internal endpoint is triggered

The DailyVoiceClient connects to the internal endpoint and sends the configuration and settings.

4

Call Daily's bots/start endpoint is called

The internal endpoint uses a stored Daily API Key to forward the configuration and settings to the Daily Bots REST endpoint (/bots/start).

5

Bot Launches

The Daily Bots REST endpoint launches the AI Agent in the cloud.

6

Communication Begins

The AI Agent connects directly to the DailyVoiceClient and the client application can now interact with the AI Agent.

The AI Agent will remain active until the client application calls disconnect() on the DailyVoiceClient or a max duration is reached. The AI Agent will then be shut down and the connection will be closed.