High-level overview of the official SDKs. For endpoint details, see the SDK Reference.Documentation Index
Fetch the complete documentation index at: https://docs.moss.dev/llms.txt
Use this file to discover all available pages before exploring further.
What’s included
- On-device vector search with optional cloud sync for indexes
- Semantic, keyword, and hybrid retrieval (tune via
alpha) - Metadata filtering with rich operators (
$eq,$ne,$gt/$gte/$lt/$lte,$in,$nin,$near, plus$and/$or) - Multi-index support with per-index embedding models
Use cases
- Knowledge base search with cloud backup
- Voice/agent knowledge with persistent indexes
- Personal/edge search with cloud fallback
Install
- JavaScript/TypeScript:
npm install @moss-dev/moss - Python:
pip install moss
Models
moss-minilm(default): fast, lightweight, great for edge/offlinemoss-mediumlm: higher accuracy with reasonable performance
Client lifecycle
- Create index with docs + model → Load index → Query (
top_k,alpha) → Upsert/delete docs → Delete index when done
Examples (JS/Python)
Common types
DocumentInfo–{ id: string; text: string; metadata?: Record<string,string>; embedding?: number[] }MutationOptions–{ upsert?: boolean; onProgress?: (progress) => void }QueryOptions- JavaScript:
{ topK?: number; alpha?: number; embedding?: number[]; filter?: MetadataFilter } - Python:
QueryOptions(top_k?: int, alpha?: float, embedding?: Sequence[float], filter?: dict)
- JavaScript:
alpha– blend semantic (1.0) vs keyword (0.0); default0.8(semantic-heavy)
Hybrid search controls
Sample code
- Repo: moss-samples
- JavaScript:
javascript/comprehensive_sample.ts,javascript/load_and_query_sample.ts - Python:
python/comprehensive_sample.py,python/load_and_query_sample.py - Python deps:
pip install -r python/requirements.txt, thenpython path/to/sample.py - Python walkthrough: