Overview
MossRetrievalService performs low-latency semantic retrieval against
Moss vector indexes and injects the relevant
passages into your Pipecat agent’s LLM context. Its query() method returns a
MossIndexProcessor that you place in the pipeline to augment each user turn
with context-aware search results.
Source Repository
Source code, examples, and issues for the Moss integration
PyPI Package
The
pipecat-moss package on PyPIMoss
Learn more about Moss semantic retrieval
Moss Portal
Create a project and get your project ID and key
Installation
This is a community-maintained package distributed separately frompipecat-ai:
Prerequisites
Moss Project Setup
Before using the Moss retrieval service, you need:- Moss Project: Create a project in the Moss Portal
- Project Credentials: Get your project ID and project key from the portal
- A Moss Index: Create and populate an index before running your pipeline (see the source repository for the index-creation example)
Required Environment Variables
MOSS_PROJECT_ID: Your Moss project IDMOSS_PROJECT_KEY: Your Moss project key
Configuration
MossRetrievalService
Moss project ID. Can be supplied via the
MOSS_PROJECT_ID environment
variable.Moss project key. Can be supplied via the
MOSS_PROJECT_KEY environment
variable.Prefix prepended to the retrieved documents before they are added to the LLM
context.
load_index(index_name) method, then create a pipeline processor with
query(index_name, *, top_k=5, alpha=0.8).
query() parameters
Name of the Moss index to retrieve from.
Number of documents to retrieve per query.
Blends semantic vs. keyword scoring.
0.0 is keyword-only and 1.0 is
semantic-only.Usage
setup_indexes() must be awaited before the pipeline starts so the service
can load the Moss index. See the source
repository for a complete working
example.