agents
agents copied to clipboard
feat: Add Moss plugin for sub 10ms semantic search integration
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 :
- Sub-10ms semantic search — Retrieval from device memory for real-time voice agent responses
- Offline-first with cloud sync — Local searches work offline; optional cloud sync for persistence
- 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_IDandMOSS_PROJECT_IDenvironment 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