Prerequisites:
- Node.js 20.4+ or Python 3.10+
- Valid Moss project credentials (
MOSS_PROJECT_ID,MOSS_PROJECT_KEY) - JS:
@moss-js/moss; Python:moss
1
Install
Versions below 1.9.0 will stop loading models when the legacy download path is retired. Upgrade to 1.9.0+ before then.
Moss for Node moved from
@moss-dev/moss to @moss-js/moss with 1.8.0. @moss-dev/moss is a frozen 1.7.1 package. Versions below 1.9.0 will stop loading models when the legacy download path is retired. Upgrade to @moss-js/moss 1.9.0+ before then. The date will be announced in the changelog. @moss-dev/moss-web is the browser SDK and is not this package.2
Configure credentials
From the Moss portal, copy your Project ID and create a key on the API Keys page. Set them as env vars:
3
Create and query an index
Save and run
npx tsx quickstart.ts or python quickstart.py):Example output
Next steps
You just created a cloud index and queried it. Moss does much more:Core concepts
Indexes, embeddings, retrieval, sessions, and sync in one place.
Sessions
Local-first, real-time indexing during a live interaction.
Hybrid search
Blend semantic and keyword scoring with
alpha.Metadata filtering
Narrow results with
$eq, $in, $near, and more.Custom embeddings
Bring your own vectors instead of the built-in model.
Multi-index search
Query several indexes at once for a global top-K.
Data hydration & sync
Hydrate on-device indexes and keep them fresh.
SDK Overview
Full per-language API: Python, JavaScript, Swift, Elixir, Browser, C.