Introduction

We’re excited to announce that Daily Bots is merging with Pipecat Cloud! This change brings more flexibility, customization options, and cost savings while maintaining the ease of use you expect.

Important Timeline: Daily Bots will be shutting down on July 1. To ensure uninterrupted service, we recommend migrating your applications to Pipecat Cloud as soon as possible.

Why We’re Making This Change

We’ve heard consistent feedback from developers: while Daily Bots offers a quick start, many of you want more control over your bot’s behavior and deeper customization capabilities.

Here’s how our products work together:

  • Daily Bots provides pre-configured agents with minimal setup required - perfect for getting started quickly
  • Pipecat is our open source framework that powers Daily Bots behind the scenes, giving you complete control over how your AI agents work
  • Pipecat Cloud is our new hosting platform that combines the best of both worlds - the flexibility of Pipecat with the simplicity of managed infrastructure

With Pipecat Cloud, you can deploy and scale custom Pipecat applications in minutes while maintaining full control over your agent’s behavior, components, and logic.

Key Benefits of Migration

  • Greater Customization: Gain direct access to the underlying pipeline architecture
  • More Control: Fine-tune each component of your bot for your specific use case
  • Cost Savings: Enjoy the same capabilities at half the cost
  • Improved Performance: Benefit from purpose-built infrastructure for AI agents
  • Simplified Maintenance: Manage everything through a unified platform

View Pricing Details

Check out our pricing page for detailed information about Pipecat Cloud pricing and plans.

Understanding the Pipecat Product Family

Before we dive into migration, let’s clarify the relationship between the different products in the Pipecat ecosystem:

  • Pipecat is our open source Python framework for building voice and multimodal AI applications. It consists of:

    • Pipecat Server: The Python framework where your bot logic lives, including pipelines, processors, and service integrations
    • Pipecat Client SDKs: Libraries for JavaScript, React, iOS, and Android that allow your applications to communicate with Pipecat servers
  • Daily Bots is a hosted Pipecat service built and operated by Daily. Each Daily Bots bot_profile is a predefined Pipecat server application that we run on your behalf. You only need to build the client-side application using the Pipecat client SDKs.

  • Pipecat Cloud is a hosting service that lets you run your own custom Pipecat server applications. In addition to using our predefined configurations, you can create and customize your own Pipecat server code and deploy it to our infrastructure.

Pipecat Overview

Pipecat is an open source Python framework that handles the complex orchestration of AI services, network transport, audio processing, and multimodal interactions. “Multimodal” means you can use any combination of audio, video, images, and/or text in your interactions. And “real-time” means that things are happening quickly enough that it feels conversational—a “back-and-forth” with a bot, not submitting a query and waiting for results.

Core Concepts

Understanding a few key concepts will help you during the migration process:

Frames

Frames are containers for data moving through your application - they can contain audio, text, images, or control signals. Think of them as packages on a conveyor belt, each with specific cargo.

Processors

Processors handle specific types of frames. Common examples include:

  • Speech-to-text processors that convert audio to text
  • LLM processors that generate responses
  • Text-to-speech processors that convert text to audio

But, they can be anything, even custom processors you create. This modular and flexible design allows you to mix and match processors to build your application.

Pipelines

Pipelines connect processors together, creating a path for frames to flow through your application. This architecture enables real-time, streaming interactions.

Learn more about Pipecat in the official documentation.

Migration Process

Let’s walk through the steps to migrate your Daily Bots application to a Pipecat application, then deploy that application on Pipecat Cloud.

Prerequisites

Before starting, make sure you have:

  1. Your existing Daily Bots configuration details
  2. The API keys for services you’re using (Deepgram, OpenAI, etc.)
  3. A Pipecat Cloud account (sign up at https://pipecat.daily.co if you haven’t already)

Step 1: Finding the Right Image for Your Bot Profile

Pipecat Cloud comes with ready-made images that correspond directly to Daily Bots profiles. Identify which image matches your current bot_profile:

Daily Bots: bot_profilePipecat Cloud Image
voice_2024_10dailyco/pipecat-starters-voice
vision_2024_10dailyco/pipecat-starters-vision
twilio_ws_voice_2024_09dailyco/pipecat-starters-twilio
gemini_multimodal_live_2024_12dailyco/pipecat-starters-gemini_multimodal_live
natural_conversation_2024_11dailyco/pipecat-starters-natural_conversation
openai_realtime_beta_2024_10dailyco/pipecat-starters-openai_realtime

This image will serve as your starting point, which you’ll customize in the following steps.

You can find the source code for all of these images in Github. You can use the images as a starter project to customize your Pipecat application.

Step 2: Migrating Services Configuration

In Daily Bots, all configuration happens in the RTVIClient. With Pipecat, this configuration moves to the server-side.

Identify Your Current Services and Configuration

Examine your RTVIClient configuration to identify both the services you’re using and their configuration:

const voiceClient = new RTVIClient({
  params: {
    // ... other params ...
    requestData: {
      // 1. Identify which services you're using
      services: {
        stt: "deepgram",
        tts: "cartesia",
        llm: "openai",
      },

      // 2. Note the detailed configuration for each service
      config: [
        // Speech-to-Text (STT) settings
        {
          service: "stt",
          options: [
            {
              name: "language",
              value: "en-US",
            },
            // ... other STT options
          ],
        },

        // Text-to-Speech (TTS) settings
        {
          service: "tts",
          options: [
            {
              name: "voice",
              value: "79a125e8-cd45-4c13-8a67-188112f4dd22",
            },
            {
              name: "language",
              value: "en",
            },
            {
              name: "model",
              value: "sonic-english",
            },
            // ... other TTS options
          ],
        },

        // LLM settings
        {
          service: "llm",
          options: [
            {
              name: "model",
              value: "gpt-4o",
            },
            {
              name: "initial_messages",
              value: [
                {
                  role: "system",
                  content:
                    "You are an assistant called Daily Bot. You can ask me anything. Keep responses brief and legible. Start by briefly introducing yourself.\n\nYour responses will be converted to audio. Please do not include any special characters in your response other than '!' or '?'.",
                },
              ],
            },
            // ... other LLM options
          ],
        },
      ],
    },
  },
  // ... other options ...
});

Make a note of:

  1. Which services you’re using (Deepgram, Cartesia, OpenAI, etc.)
  2. The configuration options for each service (voice IDs, models, languages, etc.)
  3. Any custom prompts or initial messages for your LLM
  4. Any function call definitions you might be using

You’ll need this information to properly configure your Pipecat services in the next steps.

Create Corresponding Services in Pipecat

Open the bot.py file for your corresponding Pipecat starter image. For each service in your Daily Bots configuration, add the corresponding Pipecat service:

For Speech-to-Text (e.g., Deepgram):

# Import dependencies
from deepgram import LiveOptions
from pipecat.services.deepgram import DeepgramSTTService
from pipecat.transcriptions.language import Language

# Configure your service
stt = DeepgramSTTService(
    api_key=os.getenv("DEEPGRAM_API_KEY"),
    live_options=LiveOptions(
        language=Language.US,
    )
)

For LLM services (e.g., OpenAI, Anthropic, Gemini):

# Import dependencies
from pipecat.services.openai import OpenAILLMContext, OpenAILLMService

# Configure your service
llm = OpenAILLMService(
    api_key=os.getenv("OPENAI_API_KEY"),
    model="gpt-4o"
)

# Configure any messages to add to the context
messages = [
    {
        "role": "system",
        "content": "You are an assistant called Daily Bot. You can ask me anything. Keep responses brief and legible. Start by briefly introducing yourself.\n\nYour responses will be converted to audio. Please do not include any special characters in your response other than '!' or '?'."
    }
]

# Configure and create your context
context = OpenAILLMContext(messages)
context_aggregator = llm.create_context_aggregator(context)

For Text-to-Speech (e.g., Cartesia):

# Import dependencies
from pipecat.services.cartesia import CartesiaTTSService
from pipecat.transcriptions.language import Language

# Configure your service
tts = CartesiaTTSService(
    api_key=os.getenv("CARTESIA_API_KEY"),
    voice_id="79a125e8-cd45-4c13-8a67-188112f4dd22",
    params=CartesiaTTSService.InputParams(
        language=Language.EN,
    ),
)

You can find all available Pipecat services in the documentation.

Set Up the Pipeline

Create a pipeline that connects your services:

pipeline = Pipeline(
    [
        transport.input(),                # Receives audio input
        rtvi_processor,                   # Enables client/server communication
        stt,                              # Transcribes user speech
        context_aggregator.user(),        # Captures user input in context
        llm,                              # Processes with LLM
        tts,                              # Converts response to speech
        transport.output(),               # Outputs audio
        context_aggregator.assistant(),   # Captures bot output in context
    ]
)

If you’re building a client/server application, your pipeline will also include an RTVIProcessor, which is used to send and receive information between the client and server application.

Step 3: Configuring the Transport

The transport connects your client and server applications. The predefined images already include the correct transport configuration, but you can customize it if needed:

# Import the appropriate transport
from pipecat.audio.vad.silero import SileroVADAnalyzer
from pipecat.transports.services.daily import DailyParams, DailyTransport

# Configure the transport
transport = DailyTransport(
    room_url,
    token,
    "Respond bot",
    DailyParams(
        audio_out_enabled=True,
        vad_enabled=True,
        vad_analyzer=SileroVADAnalyzer(),
        vad_audio_passthrough=True,
    ),
)

For more information about configuring transports, see the documentation for Daily or Twilio.

Step 4: Implementing Function Calls

In Daily Bots, function calls were managed through:

  • client/server apps: an LLMHelper in your client-side code
  • telephony use cases: via webhooks in your Daily Bots server app

While client-side management of function calls is still possible with Pipecat, as long as an RTVIProcessor is in your pipeline, the best practice is to migrate your function calls to your Pipecat server code. Making this change will consolidate the LLM logic in one place and will simplify your code. It also eliminates round-trips between client and server which can reduce latency for your function call response times.

To configure function calls:

# Import dependencies
from pipecat.adapters.schemas.function_schema import FunctionSchema
from pipecat.adapters.schemas.tools_schema import ToolsSchema

# Define function call handler
async def fetch_weather_from_api(function_name, tool_call_id, args, llm, context, result_callback):
    # Implement your function logic here
    await result_callback({"conditions": "nice", "temperature": "75"})

# Register function call handlers
llm.register_function(None, fetch_weather_from_api)

# Configure tools
weather_function = FunctionSchema(
    name="get_current_weather",
    description="Get the current weather",
    properties={
        "location": {
            "type": "string",
            "description": "The city and state, e.g. San Francisco, CA",
        },
        "format": {
            "type": "string",
            "enum": ["celsius", "fahrenheit"],
            "description": "The temperature unit to use.",
        },
    },
    required=["location", "format"],
)
tools = ToolsSchema(standard_tools=[weather_function])

# Update your context with tools
context = OpenAILLMContext(messages, tools)
context_aggregator = llm.create_context_aggregator(context)

Step 5: Simplifying Client Code

With the configuration now moved to the Pipecat server code, your client code becomes much simpler. The client code must:

  • Provide a transport to connect to the Pipecat server
  • Create a baseUrl and connect endpoint to connect to the Pipecat server

Additionally, you can configure initial device states for the camera and mic and set up callbacks.

const rtviClient = new RTVIClient({
  transport,
  params: {
    baseUrl: "your-endpoint-here",
    endpoints: {
      connect: "/connect",
    },
  },
  enableMic: true,
  enableCam: false,
  callbacks: {
    onBotReady: () => {
      console.log("Bot is ready!");
    },
  },
});

Refer to the Pipecat client SDK documentation for more information.

Step 6: Updating Your Agent Start Endpoint

With Daily Bots, you would start your bot using the /bots/start endpoint:

// Daily Bots approach
const response = await fetch("https://api.daily.co/bots/start", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${DAILY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    bot_profile: "voice_2024_10",
    services: {
      stt: "deepgram",
      tts: "cartesia",
      llm: "openai",
    },
    // ... other configuration options
  }),
});

const { room_url, token } = await response.json();

With Pipecat Cloud, you’ll use the agent-specific endpoint to start your session:

// Pipecat Cloud approach
const response = await fetch(
  `https://api.pipecat.daily.co/v1/public/${agentName}/start`,
  {
    method: "POST",
    headers: {
      Authorization: `Bearer ${PIPECAT_PUBLIC_API_KEY}`, // Note: This uses a PUBLIC API key
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      createDailyRoom: true,
      // Optional: Pass custom data to your agent
      dailyRoomProperties: {
        // Add Daily Room properties as needed
      },
      body: {
        // Custom data that will be accessible in your bot.py file
      },
    }),
  }
);

const { dailyRoom, dailyToken } = await response.json();

Key Differences:

  1. The endpoint path changes from /bots/start to /{agent_name}/start
  2. You need a Pipecat Cloud PUBLIC API key (create one in the Pipecat Cloud dashboard)
  3. Service configuration moves from the request body to your server code
  4. The response returns dailyRoom and dailyToken (instead of room_url and token)
  5. You can pass custom data through the body parameter instead of service configuration

Alternative Methods for Starting Agents

Pipecat Cloud also offers additional ways to start your agent:

Using the Python SDK:

import asyncio
from pipecatcloud.session import Session, SessionParams

async def start_agent():
    session = Session(
        agent_name="my-agent",
        api_key="pk_your_public_api_key",
        params=SessionParams(
            use_daily=True,
            data={"custom": "data"}
        )
    )

    response = await session.start()
    daily_url = f"{response['dailyRoom']}?t={response['dailyToken']}"
    return daily_url

# Call this function from your application code

Using the CLI:

pcc agent start my-agent --api-key pk_your_public_api_key

For more information on starting sessions, see the Pipecat Cloud Starting Sessions documentation.

Next Steps

Congratulations! You’ve successfully migrated your application from Daily Bots to Pipecat Cloud.

Client / Server Example App

To help you get started, we’ve built a full client/server example using Pipecat’s client SDKs and Pipecat server. This example shows:

Client:

  • RTVI connection between the RTVIClient and your backend route
  • Creating a Daily room with properties
  • Passing custom data from client to server at /start time

Server:

  • Handling room, token, and data coming from the /start endpoint call from the client
  • Function calling
  • Initializing an agent with different services

Pipecat Cloud Simple Chatbot Example

See a fully functioning client/server application using Pipecat Cloud

Pipecat Documentation & Examples

Refer to the Pipecat docs and examples to learn more about all the things Pipecat can do!

Learn the Ropes with Pipecat Cloud

The best way to get started is to complete the Quickstart. This will walk you through deploying your first agent on Pipecat Cloud. From there, you can apply those learnings to deploy either one of the ready-made images or your custom agent image.

If you need any assistance with your migration, our team is here to help! Reach out on Discord or contact help@daily.co.