Skip to main content
Integrate Moss Semantic Search directly into a Pipecat pipeline using the pipecat-moss package. This setup allows your voice AI to perform search with sub-10ms latency, ensuring your agents answer questions naturally without awkward “thinking” pauses.
Note: To explore a complete example of deploying pipecat-moss, please visit Moss Samples.

Why Use Moss with Pipecat?

Moss retrieval operates with exceptional speed, seamlessly injecting results into the LLM context before the user completes their turn. This eliminates reliance on slow “tool calling” loops, ensuring interactions remain natural and fluid.

Required Tools

To integrate Moss with Pipecat, you will need the following tools: Additional references:

Integration Guide

1

Installation

Install the official Pipecat-Moss integration package.
2

Environment Setup

Create a .env file in your project root.
.env
3

Create Knowledge Base

Before running the bot, ensure your Moss index is uploaded. Use the provided script:
Run the script using the following command:
4

Build the Pipeline

The MossRetrievalService integrates as a processor in the Pipecat pipeline. It sits between the user input and the LLM, injecting relevant context automatically.
Run the bot using the following command:

Configuration

The MossRetrievalService allows you to tune how results are retrieved and presented to the LLM.

Initialization

Pipeline Processor

When adding moss_service.query() to your pipeline, you can adjust the following: