elevenlabs-moss package. This setup gives your voice agent real-time access to a knowledge base during live conversations, with sub-10ms retrieval that keeps responses natural and fluid.
Note: For a complete working example, see the elevenlabs-moss app.
Why use Moss with ElevenLabs?
ElevenLabs Conversational AI agents support client tools that run during live voice sessions. Moss plugs into this system to deliver instant knowledge base lookups, so your agent can answer questions accurately without noticeable delays or hallucination.Required tools
- Moss account with project credentials
- ElevenLabs account with a Conversational AI agent
- Python 3.10+
Integration guide
Configure the ElevenLabs agent
In the ElevenLabs dashboard:
- Open your Conversational AI agent settings
- Navigate to Tools and add a new Client tool
- Set Tool name to
search_knowledge_base(case-sensitive) - Add a parameter: name =
query, type =string, required =true - Set the parameter description to: “The user’s question to search the knowledge base for”
- Enable Wait for response so tool output feeds back into the conversation
Configuration
MossClientTool
| Parameter | Type | Default | Description |
|---|---|---|---|
project_id | str | None | Your Moss Project ID. Falls back to MOSS_PROJECT_ID env var. |
project_key | str | None | Your Moss Project Key. Falls back to MOSS_PROJECT_KEY env var. |
index_name | str | Required | The name of the Moss index to query. |
tool_name | str | "search_knowledge_base" | ElevenLabs tool name. Must match the name configured in the dashboard (case-sensitive). |
top_k | int | 5 | Number of results to retrieve per query. |
alpha | float | 0.8 | Hybrid search weighting. 0.0 = keyword only, 1.0 = semantic only. |
result_prefix | str | "Relevant knowledge base results:\n\n" | Prefix added before formatted results. |