Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

memory-lancedb-local

🧠 Local embeddings support for OpenClaw/Clawdbot memory-lancedb plugin.

Works with Ollama, LM Studio, or any OpenAI-compatible /v1/embeddings endpoint. No API key required for local models.

Why?

The default memory-lancedb plugin requires OpenAI API for embeddings. This extension adds support for:

  • Ollamanomic-embed-text, mxbai-embed-large, etc.
  • LM Studio — Any loaded embedding model
  • Any OpenAI-compatible endpoint — Self-hosted, local, or alternative providers

Use cases:

  • Offline/air-gapped setups
  • Windows users without easy OpenAI access
  • Cost savings (local = free)
  • Privacy (embeddings never leave your machine)

Installation

# Clone into your extensions directory
git clone https://github.com/48Nauts-Operator/memory-lancedb-local.git ~/.clawdbot/extensions/memory-lancedb-local

# Or download and extract
curl -L https://github.com/48Nauts-Operator/memory-lancedb-local/archive/main.zip -o memory-local.zip
unzip memory-local.zip -d ~/.clawdbot/extensions/

Configuration

Add to your clawdbot.json (or openclaw.json):

{
  "plugins": {
    "slots": {
      "memory": "memory-lancedb-local"
    },
    "entries": {
      "memory-lancedb-local": {
        "enabled": true,
        "config": {
          "embedding": {
            "baseUrl": "http://localhost:11434/v1",
            "model": "nomic-embed-text",
            "apiKey": "ollama"
          },
          "dbPath": "~/.clawdbot/memory/lancedb"
        }
      }
    }
  }
}

Configuration Options

Option Description Default
embedding.baseUrl Embeddings API endpoint http://localhost:11434/v1
embedding.model Model name for embeddings nomic-embed-text
embedding.apiKey API key (optional for local) ollama
embedding.dimensions Vector dimensions (auto-detected if not set) Model default
dbPath LanceDB storage path ~/.clawdbot/memory/lancedb

Example Configurations

Ollama:

{
  "embedding": {
    "baseUrl": "http://localhost:11434/v1",
    "model": "nomic-embed-text",
    "apiKey": "ollama"
  }
}

LM Studio:

{
  "embedding": {
    "baseUrl": "http://localhost:1234/v1",
    "model": "text-embedding-e5-small-v2",
    "apiKey": "lmstudio"
  }
}

Remote/Custom:

{
  "embedding": {
    "baseUrl": "https://my-embeddings-server.com/v1",
    "model": "custom-model",
    "apiKey": "your-api-key"
  }
}

Supported Models

Model Dimensions Provider
nomic-embed-text 768 Ollama
mxbai-embed-large 1024 Ollama
all-minilm 384 Ollama
text-embedding-e5-small-v2 384 LM Studio
text-embedding-e5-large-v2 1024 LM Studio
Any OpenAI-compatible Varies Any

Testing

Verify your embeddings endpoint works:

curl http://localhost:11434/v1/embeddings \
  -H "Content-Type: application/json" \
  -d '{"model": "nomic-embed-text", "input": "Hello world"}'

Contributing

Issues and PRs welcome! This is a community extension by 48nauts.

License

MIT — Use it, fork it, ship it.


Built by agents. For agents. 🤖

Part of the 48nauts open source ecosystem.

About

Local embeddings support for OpenClaw/Clawdbot memory-lancedb plugin. Works with Ollama, LM Studio, any OpenAI-compatible endpoint.

Resources

Stars

9 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages