Skip to content

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:

PlanIncludes
Free1 project, 3 indexes, 1,000 items per index, community support
Developer WorkspaceUnlimited 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.

Moss Portal walkthrough


1. Install the SDK

bash
npm install @inferedge/moss
bash
pip install inferedge-moss

2. Configure credentials

Grab your Project ID and Project Key from the Moss console. Store them as environment variables so both clients can reuse them.

bash
# .env
MOSS_PROJECT_ID="your-project-id"
MOSS_PROJECT_KEY="your-project-key"

Or export them in your shell:

bash
export MOSS_PROJECT_ID="your-project-id"
export MOSS_PROJECT_KEY="your-project-key"

3. Create an index and query

ts
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])
py
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-minilm for balanced performance, or switch to a larger embedding model for higher recall.
  • Batch updates — use addDocs / add_docs to append new knowledge as your content changes.

Sample code

The samples repository contains working examples covering authentication, batch context, and streaming replies.

Python samples

SampleDescription
comprehensive_sample.pyEnd-to-end flow with session creation, context building, and streaming
load_and_query_sample.pyIngest domain knowledge before querying
bash
pip install -r python/requirements.txt
python python/comprehensive_sample.py

Moss Python walkthrough

JavaScript samples

SampleDescription
comprehensive_sample.tsFull workflow in TypeScript, ready for Node
load_and_query_sample.tsIndex FAQs and issue targeted queries
bash
cd javascript && npm install
npm run start -- comprehensive_sample.ts

Next steps

If you spot gaps or want another language example, open an issue or PR in the samples repository.