Getting started
Moss is a high-performance runtime for real-time semantic search. It delivers sub-10 ms lookups, instant index updates, and zero infrastructure overhead. Moss runs where your agent lives — cloud, in-browser, or on-device — so search feels native and users never wait.
View samples on GitHub | Join our Discord
Create an account
Visit Moss Portal to create an account, confirm your email, and sign in.
Inside the default project you will see two plans:
| Plan | Includes |
|---|---|
| Free | 1 project, 3 indexes, 1,000 items per index, community support |
| Developer Workspace | Unlimited projects and indexes, 100 GB storage, 100 GB ingestion, 1 TB egress, priority support |
Enter valid card details to start the free trial, then select Create Index to provision a new index.
1. Install the SDK
npm install @inferedge/mosspip install inferedge-moss2. Configure credentials
Grab your Project ID and Project Key from the Moss console. Store them as environment variables so both clients can reuse them.
# .env
MOSS_PROJECT_ID="your-project-id"
MOSS_PROJECT_KEY="your-project-key"Or export them in your shell:
export MOSS_PROJECT_ID="your-project-id"
export MOSS_PROJECT_KEY="your-project-key"3. Create an index and query
import { MossClient, DocumentInfo } from '@inferedge/moss'
const client = new MossClient(
process.env.MOSS_PROJECT_ID!,
process.env.MOSS_PROJECT_KEY!
)
await client.createIndex(
'support-faqs',
[
{ id: '1', text: 'Track an order from the dashboard.' },
{ id: '2', text: 'Return window lasts 30 days.' }
],
'moss-minilm'
)
await client.loadIndex('support-faqs')
const response = await client.query('support-faqs', 'How do I track my order?')
console.log(response.docs[0])import asyncio
from inferedge_moss import MossClient, DocumentInfo
client = MossClient("$MOSS_PROJECT_ID", "$MOSS_PROJECT_KEY")
async def main():
await client.create_index(
"support-faqs",
[
DocumentInfo(id="1", text="Track an order from the dashboard."),
DocumentInfo(id="2", text="Return window lasts 30 days."),
],
"moss-minilm",
)
await client.load_index("support-faqs")
results = await client.query("support-faqs", "How do I track my order?")
print(results.docs[0])
asyncio.run(main())4. Tailor retrieval
- Choose a model — start with
moss-minilmfor balanced performance, or switch to a larger embedding model for higher recall. - Batch updates — use
addDocs/add_docsto append new knowledge as your content changes.
Sample code
The samples repository contains working examples covering authentication, batch context, and streaming replies.
Python samples
| Sample | Description |
|---|---|
comprehensive_sample.py | End-to-end flow with session creation, context building, and streaming |
load_and_query_sample.py | Ingest domain knowledge before querying |
pip install -r python/requirements.txt
python python/comprehensive_sample.pyJavaScript samples
| Sample | Description |
|---|---|
comprehensive_sample.ts | Full workflow in TypeScript, ready for Node |
load_and_query_sample.ts | Index FAQs and issue targeted queries |
cd javascript && npm install
npm run start -- comprehensive_sample.tsNext steps
- Dive deeper into the JavaScript SDK and Python SDK references.
- Check out the Moss YC Launch Post.
If you spot gaps or want another language example, open an issue or PR in the samples repository.
