mossDocumentation and capabilities reference for Moss semantic search. Use for understanding Moss APIs, SDKs, and integration patterns.
Install via ClawdBot CLI:
clawdbot install CoderOMaster/mossMoss is the real-time semantic search runtime for conversational AI. It delivers sub-10ms lookups and instant index updates that run in the browser, on-device, or in the cloud - wherever your agent lives. Agents can create indexes, embed documents, perform semantic/hybrid searches, and manage document lifecycles without managing infrastructure. The platform handles embedding generation, index persistence, and optional cloud sync - allowing agents to focus on retrieval logic rather than infrastructure.
| JavaScript | Python | Description |
| --------------- | ---------------- | --------------------------- |
| createIndex() | create_index() | Create index with documents |
| loadIndex() | load_index() | Load index from storage |
| getIndex() | get_index() | Get index metadata |
| listIndexes() | list_indexes() | List all indexes |
| deleteIndex() | delete_index() | Delete an index |
| addDocs() | add_docs() | Add/upsert documents |
| getDocs() | get_docs() | Retrieve documents |
| deleteDocs() | delete_docs() | Remove documents |
| query() | query() | Semantic search |
All REST API operations go through POST /manage with an action field:
createIndex - Create index with seed documentsgetIndex - Get metadata for single indexlistIndexes - List all project indexesdeleteIndex - Remove index and assetsaddDocs - Upsert documents into indexgetDocs - Retrieve stored documentsdeleteDocs - Remove documents by IDcreateIndex() with documents and model (moss-minilm or moss-mediumlm)loadIndex() to prepare index for queriesquery() with search text and top_k parameterquery() with alpha parameter to blend semantic and keywordalpha: 1.0 = pure semantic, alpha: 0.0 = pure keyword, alpha: 0.6 = 60/40 blendaddDocs() with new documents and upsert: true optiondeleteDocs() to remove outdated documents by IDinferedge-moss SDKpipecat-moss package that auto-injects retrieval resultsSDK requires project credentials:
MOSS_PROJECT_ID: Project identifier from Moss PortalMOSS_PROJECT_KEY: Project access key from Moss Portal```bash theme={null}
export MOSS_PROJECT_ID=your_project_id
export MOSS_PROJECT_KEY=your_project_key
REST API requires headers:
- `x-project-key`: Project access key
- `x-service-version: v1`: API version header
- `projectId` in JSON body
### Package Installation
| Language | Package | Install Command |
| --------------------- | ----------------- | ----------------------------- |
| JavaScript/TypeScript | `@inferedge/moss` | `npm install @inferedge/moss` |
| Python | `inferedge-moss` | `pip install inferedge-moss` |
| Pipecat Integration | `pipecat-moss` | `pip install pipecat-moss` |
### Document Schematypescript theme={null}
interface DocumentInfo {
id: string; // Required: unique identifier
text: string; // Required: content to embed and search
metadata?: object; // Optional: key-value pairs for filtering
}
### Query Parameters
| Parameter | Type | Default | Description |
| ---------------- | ------ | ------- | ------------------------------------------- |
| `indexName` | string | - | Target index name (required) |
| `query` | string | - | Natural language search text (required) |
| `top_k` / `topK` | number | 5 | Max results to return |
| `alpha` | float | \~0.8 | Hybrid weighting: 0.0=keyword, 1.0=semantic |
| `filters` | object | - | Metadata constraints |
### Model Selection
| Model | Use Case | Tradeoff |
| --------------- | ----------------------------------- | ----------------- |
| `moss-minilm` | Edge, offline, browser, speed-first | Fast, lightweight |
| `moss-mediumlm` | Precision-critical, higher accuracy | Slightly slower |
### Performance Expectations
- Sub-10ms local queries (hardware-dependent)
- Instant index updates without reindexing entire corpus
- Sync is optional; compute stays on-device
- No infrastructure to manage
### Chunking Best Practices
- Aim for \~200–500 tokens per chunk
- Overlap 10–20% to preserve context
- Normalize whitespace and strip boilerplate
### Common Errors
| Error | Cause | Fix |
| -------------------------- | ------------------- | -------------------------------------------- |
| Unauthorized | Missing credentials | Set `MOSS_PROJECT_ID` and `MOSS_PROJECT_KEY` |
| Index not found | Query before create | Call `createIndex()` first |
| Index not loaded | Query before load | Call `loadIndex()` before `query()` |
| Missing embeddings runtime | Invalid model | Use `moss-minilm` or `moss-mediumlm` |
### Async Pattern
All SDK methods are async - always use `await`:typescript theme={null}
// JavaScript
await client.createIndex("faqs", docs, "moss-minilm");
await client.loadIndex("faqs");
const results = await client.query("faqs", "search text", 5);
python theme={null}
await client.create_index("faqs", docs, "moss-minilm")
await client.load_index("faqs")
results = await client.query("faqs", "search text", top_k=5)
```
For additional documentation and navigation, see: https://docs.usemoss.dev/llms.txt
Generated Mar 1, 2026
A customer service chatbot uses Moss to instantly search a knowledge base of product manuals and FAQs. When a user asks a question, the agent queries Moss for relevant context, enabling accurate, knowledge-grounded responses without tool-calling delays, improving resolution times.
A voice agent for healthcare professionals queries Moss to retrieve patient guidelines, drug interactions, or medical protocols during consultations. The offline-first capability ensures fast, secure access to sensitive information on-device, supporting clinical decision-making in real-time.
Law firms use Moss to index case files, statutes, and legal precedents. Attorneys perform hybrid searches blending semantic understanding with keyword matching to quickly find relevant documents, streamlining research and case preparation with high accuracy.
An e-learning platform integrates Moss to search through course materials and student queries. It injects relevant educational content into AI tutor responses, personalizing learning experiences based on semantic similarity and metadata like subject or difficulty level.
Companies deploy Moss to index internal documents, policies, and meeting notes. Employees use a conversational interface to query the system, enabling quick access to institutional knowledge with metadata filtering by department or project, enhancing productivity.
Offer Moss as a cloud-based service with tiered pricing based on usage, such as number of queries or document storage. This model targets businesses needing scalable semantic search without infrastructure management, generating recurring revenue from monthly or annual subscriptions.
Sell licenses for on-premise deployment of Moss, allowing organizations to run the search runtime locally for data security and compliance. This model appeals to regulated industries like finance or healthcare, with revenue from one-time license fees and optional support contracts.
Partner with voice agent frameworks like LiveKit or Pipecat to bundle Moss as a value-added component. Revenue is generated through referral fees, joint offerings, or white-label solutions, expanding market reach by leveraging existing ecosystems and customer bases.
💬 Integration Tip
Start by setting up environment variables for project credentials and use the basic semantic search workflow to quickly test retrieval with minimal code.
Work with Obsidian vaults (plain Markdown notes) and automate via obsidian-cli.
Create, search, and manage Bear notes via grizzly CLI.
Track water and sleep with JSON file storage
Notion API for creating and managing pages, databases, and blocks.
Smart ClawdBot documentation access with local search index, cached snippets, and on-demand fetch. Token-efficient and freshness-aware.
Work with Obsidian vaults as a knowledge base. Features: fuzzy/phonetic search across all notes, auto-folder detection for new notes, create/read/edit notes with frontmatter, manage tags and wikilinks. Use when: querying knowledge base, saving notes/documents, editing existing notes by user instructions.