Files
pipecat/examples/foundational
2025-06-24 16:00:28 -05:00
..
fmt
2025-06-24 15:59:40 -05:00
fmt
2025-06-24 15:59:40 -05:00

Pipecat Foundational Examples

This directory contains examples showing how to build voice and multimodal agents with Pipecat. Each example demonstrates specific features, progressing from basic to advanced concepts.

Learning Paths

Depending on what you're trying to build, these learning paths will guide you through relevant examples:

  • New to Pipecat: Start with examples 01, 02, 07
  • Building conversational bots: 07, 10, 38
  • Common add-on capabilities: 17, 24, 28, 34
  • Adding visual capabilities: 03, 12, 26
  • Advanced agent capabilities: 14, 20, 37

Quick Start

  1. Set up a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  2. Install dependencies:

    pip install -r requirements.txt
    
  3. Create a .env file with your API keys.

  4. Run any example:

    python 01-say-one-thing.py
    
  5. Open the web interface at http://localhost:7860 and click "Connect"

Running examples with other transports

It is possible to run most of the examples with other transports such as Twilio or Daily.

Daily

You need to create a Daily account at https://dashboard.daily.co/u/signup. Once signed up, you can create your own room from the dashboard and set the environment variables DAILY_SAMPLE_ROOM_URL and DAILY_API_KEY. Alternatively, you can let the example create a room for you (still needs DAILY_API_KEY environment variable). Then, start any example with -t daily:

python 07-interruptible.py -t daily

Twilio

It is also possible to run the example through a Twilio phone number. You will need to setup a few things:

  1. Install and run ngrok.
ngrok http 7860
  1. Configure your Twilio phone number. One way is to setup a TwiML app and set the request URL to the ngrok URL from step (1). Then, set your phone number to use the new TwiML app.

Then, run the example with:

python 07-interruptible.py -t twilio -x NGROK_HOST_NAME (no protocol)

Examples by Feature

Basics

Conversational AI

Common Utilities

Advanced LLM Features

Media Handling

Vision & Multimodal

Voice & Language

Integration Examples

Performance & Optimization

Utilities

Advanced Usage

Customizing Network Settings

python <example-name> --host 0.0.0.0 --port 8080

Troubleshooting

  • No audio/video: Check browser permissions for microphone and camera
  • Connection errors: Verify API keys in .env file
  • Missing dependencies: Run pip install -r requirements.txt
  • Port conflicts: Use --port to change the port

For more examples, visit our GitHub repository.