← Back to Plugins
Tools

Lancedb Openrouter

martinsen-assistant By martinsen-assistant 👁 14 views ▲ 0 votes

OpenRouter-compatible LanceDB memory plugin for OpenClaw

GitHub

Install

npm install @openclaw/memory-lancedb-or

Configuration Example

{
  "plugins": {
    "memory-lancedb-or": {
      "embedding": {
        "apiKey": "sk-or-v1-...",
        "baseURL": "https://openrouter.ai/api/v1",
        "model": "qwen/qwen3-embedding-8b"
      },
      "dbPath": "~/.openclaw/memory/lancedb",
      "autoCapture": true,
      "autoRecall": true
    }
  }
}

README

# @openclaw/memory-lancedb-or

An OpenRouter-compatible LanceDB memory plugin for OpenClaw.

## Overview

This is a fork of the LanceDB memory plugin modified to support OpenRouter's embedding models. It provides long-term semantic memory capabilities for OpenClaw assistants using vector embeddings stored in LanceDB.

## Features

- **OpenRouter Support**: Use any OpenRouter-compatible embedding model (e.g., `qwen/qwen3-embedding-8b`)
- **OpenAI Compatible**: Also works with standard OpenAI embedding models
- **Semantic Search**: Store and retrieve memories based on semantic similarity
- **Auto-Capture**: Automatically capture important information from conversations
- **Auto-Recall**: Automatically inject relevant memories into context
- **Persistent Storage**: Memories persist across sessions in LanceDB

## Installation

```bash
npm install @openclaw/memory-lancedb-or
```

## Configuration

Add to your OpenClaw configuration:

```json
{
  "plugins": {
    "memory-lancedb-or": {
      "embedding": {
        "apiKey": "sk-or-v1-...",
        "baseURL": "https://openrouter.ai/api/v1",
        "model": "qwen/qwen3-embedding-8b"
      },
      "dbPath": "~/.openclaw/memory/lancedb",
      "autoCapture": true,
      "autoRecall": true
    }
  }
}
```

### Configuration Options

| Option | Description | Required |
|--------|-------------|----------|
| `embedding.apiKey` | API key for embeddings (OpenRouter or OpenAI) | Yes |
| `embedding.baseURL` | OpenAI-compatible endpoint URL | No (defaults to OpenAI) |
| `embedding.model` | Embedding model ID | No (has sensible default) |
| `embedding.dimensions` | Override embedding dimensions | No (auto-detected for known models) |
| `dbPath` | Path to store LanceDB data | No |
| `autoCapture` | Auto-capture important info | No |
| `autoRecall` | Auto-inject relevant memories | No |
| `captureMaxChars` | Max message length for auto-capture | No |

## OpenRouter Models

Popular embedding models on OpenRouter:

- `qwen/qwen3-embedding-8b` - Good balance of quality and speed
- `text-embedding-3-small` - OpenAI's efficient model
- `text-embedding-3-large` - OpenAI's high-quality model

## License

MIT
tools

Comments

Sign in to leave a comment

Loading comments...