Skip to main content
Integrate Moss semantic search into a VAPI voice agent using the vapi-moss package. This setup lets your conversational AI perform sub-10ms knowledge base lookups through VAPI’s Custom Knowledge Base webhook, so your agent can answer questions instantly during live calls.
Note: For a complete FastAPI server example, see the vapi-moss app.

Why use Moss with VAPI?

VAPI’s Custom Knowledge Base webhook fires on every user turn, expecting fast document retrieval. Moss responds in under 10ms, keeping voice interactions natural and fluid without added latency from traditional RAG pipelines.

Required tools

  • Moss account with project credentials
  • VAPI account with a Conversational AI agent
  • Python 3.10+

Integration guide

1

Installation

2

Environment setup

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

Search and verify signatures

Use MossVapiSearch to query your index and verify_vapi_signature to validate incoming webhook requests.
4

Configure VAPI

In your VAPI dashboard:
  1. Navigate to your agent’s settings
  2. Under Knowledge Base, select Custom Knowledge Base
  3. Set the webhook URL to your server endpoint (e.g., https://your-server.com/webhook)
  4. Add your webhook secret to enable signature verification

Configuration

MossVapiSearch