Page cover

Pipecat

Pipecat is an open-source, real-time voice AI orchestration framework built for developers who want to create deeply interactive, multimodal conversational agents. It provides a flexible pipeline architecture for integrating speech recognition (STT), language models, and speech synthesis (TTS) components into low-latency, event-driven workflows. Designed for modularity and extensibility, Pipecat enables developers to compose custom voice agent stacks that handle audio streaming, turn-taking, and response timing with precision.

This tutorial will guide you through integrating Arcee AI models as the LLM backbone for your Pipecat voice agent. We'll integrate Arcee's models using OpenRouter.


Prerequisites

  • Python: >=3.10

  • OpenRouter API Key

    • If you don't have an account, set one up here.

  • uv package manager installed

Quickstart

Install the Pipecat CLI globally using uv

uv tool install pipecat-ai-cli

Run the Pipecat interactive setup wizard to create the scaffolding for a pipecat agent

pipecat init

You will be prompted with a few questions which determine how the project is setup. Use the following configuration:

Project name: arcee-pipecat
Bot type: Web/Mobile
Client framework: React
React dev server: Vite
Transport: SmallWebRTC
Add another transport for local testing? No
Pipeline architecture: Cascade (STT → LLM → TTS)
Speech-to-Text: Deepgram
Language model: OpenRouter
Text-to-Speech: Deepgram

Customize feature settings? Yes
Audio recording? Yes
Transcription logging? Yes
Smart turn-taking? Yes
Use video avatar service? No
Video input? No
Video output? No
Enable observability? No
Deploy to Pipecat Cloud? No

Setup the client

cd arcee-pipecat/client
npm install
npm run dev

Setup the server, install dependencies, and create a .env file

cd arcee-pipecat/server
uv sync
cp .env.example .env

In the .env file, populate your Deepgram and OpenRouter API Key and provide a Deepgram Voice ID and the Arcee AI LLM you want to use. For example:

# Deepgram (STT/TTS)
DEEPGRAM_API_KEY=<YOUR_DEEPGRAM_KEY>
DEEPGRAM_VOICE_ID=aura-2-thalia-en

# OpenRouter (LLM)
OPENROUTER_API_KEY=<YOUR_OPENROUTERR_KEY>
OPENROUTER_MODEL=arcee-ai/trinity-mini

A full list of Deepgram Voice IDs can be found here.

Edit the Voice Agent Kickoff System prompt

  1. Navigate to arcee-pipecat/server/bot.py

  2. Replace the content of the Kickoff system prompt (on line 139) with the following message:

You are a helpful voice ai assistant powered Arcee AI Language Models. Respond naturally and keep your answers conversational. Start by introducing yourself.

The full line should now look like the following:

        # Kick off the conversation
        messages.append({"role": "system", "content": "You are a helpful voice ai assistant powered Arcee AI Language Models. Respond naturally and keep your answers conversational. Start by introducing yourself."})

Run your Voice Agent, access at http://localhost:5173/, and click connect to start the conversation!

uv run bot.py

Last updated