Install
openclaw skills install moss-semanticDocumentation and capabilities reference for Moss semantic search. Use for understanding Moss APIs, SDKs, and integration patterns.
openclaw skills install moss-semanticMoss 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 Portalexport MOSS_PROJECT_ID=your_project_id
export MOSS_PROJECT_KEY=your_project_key
REST API requires headers:
x-project-key: Project access keyx-service-version: v1: API version headerprojectId in JSON body| 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 |
interface DocumentInfo {
id: string; // Required: unique identifier
text: string; // Required: content to embed and search
metadata?: object; // Optional: key-value pairs for filtering
}
| 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 | Use Case | Tradeoff |
|---|---|---|
moss-minilm | Edge, offline, browser, speed-first | Fast, lightweight |
moss-mediumlm | Precision-critical, higher accuracy | Slightly slower |
| 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 |
All SDK methods are async - always use await:
// JavaScript
await client.createIndex("faqs", docs, "moss-minilm");
await client.loadIndex("faqs");
const results = await client.query("faqs", "search text", 5);
# Python
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