Aside: AI memory on 80K+ devicesHow Aside powers AI memory across 80,000+ devices · 113M documents · 24.8B tokens · 150+ countries

Read moreRead the case study
Moss
usemossStart Free
  1. Integrations
  2. /
  3. LiveKit

Moss + LiveKit

Real-Time Search for Voice Agents

Get StartedTalk to an Engineer

About LiveKit

LiveKit provides real-time audio and video infrastructure for voice agents. Moss integrates using a context injection pattern: on every user turn, Moss is queried automatically and results are injected into the chat context before the LLM generates a response. No tool-calling overhead, no dead air.

Why Use Moss with LiveKit

01

Context injection pattern: no LLM tool-calling step needed

Moss is queried automatically on every user turn.

02

Sub-10ms retrieval eliminates dead air

Results are injected before the LLM starts generating.

03

Works with LiveKit Agents framework

Using the `on_user_turn_completed` hook.

04

Combine with Deepgram STT, OpenAI LLM, and any TTS

Works with the full LiveKit ecosystem.

05

Pre-load your index at agent startup

load_index() for fastest queries.

Quick Start

Explore docs
Python
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from moss import MossClient, QueryOptions
from livekit.agents import Agent, RunContext, function_tool

KNOWLEDGE_INDEX = "product-knowledge"

class MossSemanticRetrievalAgent(Agent):
    def __init__(self, moss_client: MossClient):
        super().__init__(
            instructions="""
                You are a helpful customer support voice assistant.
                When you need facts about products or policies, call
                search_knowledge_base.
            """
        )
        self.moss = moss_client

    @function_tool
    async def search_knowledge_base(self, context: RunContext, query: str) -> str:
        """Search the product and support knowledge base."""
        results = await self.moss.query(
            KNOWLEDGE_INDEX, query, QueryOptions(top_k=5, alpha=0.8)
        )
        if not results.docs:
            return "No relevant entries found."
        return "\n".join(f"- {d.text}" for d in results.docs)

Get Started in 3 Steps

01

Install the SDKs

Run pip install moss python-dotenv to add the Moss SDK. Pair it with LiveKit Agents in your voice worker.

02

Create and load your index

Use client.create_index() to index your knowledge base (FAQs, product docs, etc.), then call load_index() at agent startup for sub-10ms queries.

03

Add Moss as a function tool

Expose search_knowledge_base with @function_tool so the agent can query Moss during a turn. Load the index at worker startup for sub-10ms lookups.

Frequently asked questions

Ready to ship faster AI products?

Moss gives you production-ready semantic retrieval without infrastructure complexity.

Test performanceTalk to an Engineer
Moss
AICPA SOC 2 Type 2HIPAA

Product

Founding AgentLocal Search

Use Cases

Voice AIAI CopilotsIn-App SearchOn-Device AI

Company

PricingBlogCareersBrand Kit

Resources

DocsGlossaryBenchmarks

Integrations

DSPyElevenLabsLangChainLiveKitMCP ServerNext.jsPipecatVAPIVercel AI SDKVitePress

© 2026 MOSS

Privacy PolicyTerms of ServiceTrust Center