Voice Platform
Moss + ElevenLabs: Real-Time Search for Conversational AI
ElevenLabs provides conversational AI agents with speech synthesis. The elevenlabs-moss package provides MossClientTool, which registers Moss search as an ElevenLabs client tool named "search_knowledge_base". When the agent needs context, it calls the tool and Moss returns results in under 10ms.
Benefits
Why Use Moss with ElevenLabs
MossClientTool registers as an ElevenLabs client tool - the agent calls search_knowledge_base when it needs context
Sub-10ms retrieval means the agent gets context before the user notices any delay
Configure in the ElevenLabs dashboard: add a Client tool with parameter name=query, type=string
Hybrid search via alpha parameter for balancing semantic and keyword matching
Pre-load indexes at startup with load_index() for consistent low-latency responses
Integration
Quick Start
from elevenlabs_moss import MossClientTool
from elevenlabs.conversational_ai.conversation import Conversation
from moss import MossClient
# Initialize Moss client tool
client = MossClient("your-project-id", "your-project-key")
moss_tool = MossClientTool(
client=client,
index_name="knowledge-base",
tool_name="search_knowledge_base",
top_k=5,
alpha=0.8,
)
# Load index and register with ElevenLabs
await moss_tool.load_index()
client_tools = moss_tool.register(client_tools={})
# Use in ElevenLabs conversation
conversation = Conversation(
agent_id="your-agent-id",
client_tools=client_tools,
# ... other config
)
conversation.start_session()Setup
Get Started in 3 Steps
Install elevenlabs-moss
Run pip install elevenlabs-moss to install the ElevenLabs integration package for Moss.
Configure the ElevenLabs dashboard
In the ElevenLabs agent dashboard, add a Client tool. Set the tool name to search_knowledge_base with a parameter named "query" of type string.
Register and start conversation
Create a MossClientTool, call load_index(), then register() it into your client_tools dict. Pass client_tools to the ElevenLabs Conversation constructor.
FAQ
Frequently asked questions
Explore