Skip to main content
This quickstart guide will help you build and deploy your first Pipecat voice AI bot. You’ll create a simple conversational agent that you can talk to in real-time, then deploy it to production on Pipecat Cloud. Two steps: Local Development (5 min) → Production Deployment (5 min)

Step 1: Local Development

Prerequisites

Environment
  • Python 3.11 or later
  • uv package manager installed
Adding Pipecat to an existing project instead of scaffolding a new one? See Installation for manual setup.
AI Service API Keys This quickstart uses three AI services working together in a pipeline. You’ll need API keys from each service:

Deepgram (STT)

Create an account and generate your API key for real-time speech recognition.

OpenAI (LLM)

Create an account and generate an API key for intelligent conversation responses.

Cartesia (TTS)

Sign up and generate your API key for natural voice synthesis.
Have these API keys ready. You’ll add them to your environment file in the next section.

Setup

  1. Install the Pipecat CLI and scaffold the quickstart project
  1. Configure your API keys
Create your environment file:
Open the .env file in your text editor and add your API keys:
  1. Set up virtual environment and install dependencies

Run your bot locally

Now you’re ready to run your bot! Start it with
You should see output similar to this:
Open http://localhost:7860/client in your browser and click Connect to start talking to your bot.
First run note: The initial startup may take ~20 seconds as Pipecat downloads required models and imports. Subsequent runs will be much faster.
🎉 Success! Your bot is running locally. Now let’s deploy it to production so others can use it.

Step 2: Deploy to Production

Transform your local bot into a production-ready service. Pipecat Cloud handles scaling, monitoring, and global deployment.

Prerequisites

  1. Sign up for Pipecat Cloud
Create your Pipecat Cloud account to deploy and manage your bots.
  1. Pipecat CLI
Log in to Pipecat Cloud using the CLI to get started:
Select Allow to authenticate your CLI session in the browser page that opens.

Your deployment configuration

The pcc-deploy.toml file tells Pipecat Cloud how to build and deploy your bot:
Understanding the configuration:
  • agent_name: Your bot’s name in Pipecat Cloud
  • secret_set: Where your API keys are stored securely
  • min_agents: Number of bot instances to keep ready (1 = instant start)

Configure secrets

Upload your API keys to Pipecat Cloud’s secure storage:
This creates a secret set called pipecat-quickstart-secrets (matching your TOML file) and uploads all your API keys from .env.

Build and Deploy

Build and deploy your bot to Pipecat Cloud:
The CLI automatically builds your image using the pcc-deploy.toml file and Dockerfile in your project and deploys it to Pipecat Cloud — no container registry needed.
Want to use your own container registry? See the container registries guide for advanced deployment options.

Connect to your agent

  1. Open your Pipecat Cloud dashboard
  2. Select your pipecat-quickstart agent → Sandbox
  3. Allow microphone access and click Connect
🎉 Your bot is now live in production!

Ready to scale?

Explore advanced Pipecat Cloud features like scaling, monitoring, secrets management, and production best practices.

Understanding the Quickstart Bot

Let’s walk through the generated bot.py to understand what’s happening. When you speak to your bot, here’s the real-time pipeline that processes your conversation:
  1. Audio Capture: Your browser captures microphone audio and sends it via WebRTC
  2. Voice Activity Detection: Silero VAD detects when you start and stop speaking
  3. Speech Recognition: Deepgram converts your speech to text in real-time
  4. Language Processing: OpenAI’s GPT model generates an intelligent response
  5. Speech Synthesis: Cartesia converts the response text back to natural speech
  6. Audio Playback: The generated audio streams back to your browser
Each step happens with minimal latency, typically completing the full round-trip in under one second.

AI Services

Your bot uses three AI services, each configured with API keys from your .env file:
Pipecat supports many different AI services. You can swap out Deepgram for Soniox, OpenAI for Anthropic, or Cartesia for ElevenLabs without changing the rest of your code. See the supported services documentation for all available options.

Context and Messages

Your bot maintains conversation history using a context object, enabling multi-turn interactions where the bot remembers what was said earlier. The context is initialized and used to store the conversation history by the context aggregators:

RTVI Protocol

When building web or mobile clients, you can use Pipecat’s client SDKs that communicate with your bot via the RTVI (Real-Time Voice Interaction) protocol. Pipecat comes with RTVI enabled by default, allowing your the Pipecat server and client to exchange messages and events in real-time.

Pipeline Configuration

The core of your bot is a Pipeline that processes data through a series of processors:
Data flows through the pipeline as “frames”, objects containing audio, text, or other data types. The ordering is crucial: audio must be transcribed before it can be processed by the LLM, and text must be synthesized before it can be played back. The pipeline is managed by a PipelineWorker:
The worker handles pipeline execution, collects metrics, and manages RTVI events through observers.

Event Handlers

Event handlers manage the bot’s lifecycle and user interactions:
When a client connects, the bot adds a greeting instruction and queues a context frame to initiate the conversation. When disconnecting, it properly cancels the worker to clean up resources.

Running the Pipeline

Finally, the pipeline is executed by a WorkerRunner:
The runner manages the pipeline’s execution lifecycle. Note that handle_sigint=False because the main runner handles system signals.

Bot Entry Point

The quickstart uses Pipecat’s runner system:
This runner automatically handles WebRTC connection setup and management, making it easy to get started with minimal configuration. The same code works for both local development and production deployment.
Production ready: This bot pattern is fully compatible with Pipecat Cloud, meaning you can deploy your bot without any code changes.

Troubleshooting

  • Browser permissions: Make sure to allow microphone access when prompted by your browser.
  • Connection issues: If the WebRTC connection fails, first try a different browser. If that fails, make sure you don’t have a VPN or firewall rules blocking traffic. WebRTC uses UDP to communicate.
  • Audio issues: Check that your microphone and speakers are working and not muted.

Next Steps

Congratulations! You’ve built and deployed your first Pipecat bot. Here’s what to do next based on your goals:

🚀 Ready to Build Your Own Application?

The quickstart gave you a working example, but the Pipecat CLI helps you scaffold production-ready projects with your choice of platform (phone vs web/mobile), transport providers, and AI services—all tailored to your specific use case.

Build Your Next Bot

Use the CLI to scaffold phone or web/mobile projects customized for your needs

🧠 Want to Understand How It Works?

Dive deeper into Pipecat’s architecture and learn how to build custom solutions.

Learn Core Concepts

Master pipelines, processors, transports, and context management

Browse Examples

30+ production-ready examples for inspiration