Voice Platform
Moss + Pipecat: Real-Time Search for Voice Pipelines
Pipecat is an open-source framework for building voice and multimodal agents. The pipecat-moss package provides MossRetrievalService, a pipeline processor that queries Moss on every user turn and injects context before the LLM generates a response. No tool calling needed. Sub-10ms retrieval keeps conversations flowing without dead air.
Benefits
Why Use Moss with Pipecat
MossRetrievalService is a native Pipecat pipeline processor - insert it between STT and LLM
Context injection pattern: search runs automatically on every user utterance, no LLM tool-calling overhead
Sub-10ms retrieval eliminates dead air in the STT -> retrieval -> LLM -> TTS pipeline
Works with Deepgram STT, Cartesia TTS, OpenAI, Anthropic, and other Pipecat plugins
Pre-load indexes at pipeline startup with load_index() for fastest first-query latency
Integration
Quick Start
from pipecat_moss import MossRetrievalService
from moss import MossClient
from pipecat.pipeline.pipeline import Pipeline
from pipecat.pipeline.task import PipelineTask
# Initialize Moss retrieval service
client = MossClient("your-project-id", "your-project-key")
moss_service = MossRetrievalService(client)
await moss_service.load_index("knowledge-base")
# Insert into Pipecat pipeline
pipeline = Pipeline([
transport.input(),
stt, # Deepgram STT
moss_service.query( # Moss retrieval (sub-10ms)
index_name="knowledge-base",
top_k=5,
alpha=0.8,
),
llm, # OpenAI LLM
tts, # Cartesia TTS
transport.output(),
])
task = PipelineTask(pipeline)
await task.run()Setup
Get Started in 3 Steps
Install pipecat-moss
Run pip install pipecat-moss to install the Pipecat pipeline processor for Moss.
Create and load your index
Use the Moss SDK to create_index() with your knowledge base documents, then call moss_service.load_index() at pipeline startup.
Insert into your pipeline
Add moss_service.query() between your STT and LLM processors. Moss retrieves context on every user turn and injects it into the LLM prompt automatically.
FAQ
Frequently asked questions
Explore