agents icon indicating copy to clipboard operation
agents copied to clipboard

feat: Add Moss plugin for sub 10ms semantic search integration

Open yatharthk2 opened this issue 3 weeks ago • 1 comments

Summary

This PR adds a new plugin for Moss semantic search integration into the LiveKit Agents ecosystem. The plugin provides a thin wrapper around the Moss SDK with LiveKit-friendly defaults, environment-based configuration, and index caching.

Quick Feature List of Moss :

  1. Sub-10ms semantic search — Retrieval from device memory for real-time voice agent responses
  2. Offline-first with cloud sync — Local searches work offline; optional cloud sync for persistence
  3. Multi-index management — Create, query, and manage multiple isolated search spaces

What's Included

  • New plugin package: livekit-plugins-moss
  • MossClient: Async wrapper for semantic search operations
  • Full index lifecycle support: Create, load, query, and manage indexes
  • Document management: Add, retrieve, and delete documents
  • Environment-based configuration: Uses MOSS_PROJECT_ID and MOSS_PROJECT_ID environment variables
  • Example implementation: Full lifecycle demo in examples/dev/MossLifecycle.py

Usage Example

from livekit.plugins.moss import DocumentInfo, MossClient

client = MossClient()
await client.create_index(
    "demo",
    [DocumentInfo(id="doc1", text="Semantic search is fast")],
    model_id="moss-minilm",
)
result = await client.query("demo", "fast search", top_k=5)

Dependencies

  • inferedge-moss>=1.0.0b2

Related

  • Example implementation: examples/dev/MossLifecycle.py
  • Moss documentation: Moss Docs

yatharthk2 avatar Nov 08 '25 00:11 yatharthk2