npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

moltbot-memory-local

v0.1.2

Published

Privacy-first local memory plugin for Moltbot: SQLite for structured/temporal queries + local embeddings for semantic search. Zero cloud calls.

Downloads

309

Readme

moltbot-memory-local

Privacy-first local memory plugin for Moltbot

One plugin. Two search modes. Zero cloud calls.

Combines SQLite (structured/temporal) + LanceDB (semantic/vector) into a single unified memory system. Everything runs locally on your machine.

Why This Exists

Most AI memory plugins send your data to cloud APIs for embedding. Your "local" memory phones home before storing anything.

This plugin fixes that:

  • SQLite for structured storage, timestamps, full-text search
  • LanceDB + local embeddings for semantic similarity search
  • Smart routing automatically picks the right backend
  • 100% local — no cloud calls, ever

Installation

npm install moltbot-memory-local

Configuration

{
  "plugins": {
    "slots": {
      "memory": "moltbot-memory-local"
    },
    "entries": {
      "moltbot-memory-local": {
        "enabled": true,
        "config": {
          "dataDir": "~/.moltbot/memory",
          "maxMemories": 10000,
          "embeddingModel": "Xenova/all-MiniLM-L6-v2",
          "enableEmbeddings": true
        }
      }
    }
  }
}

Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | dataDir | string | ~/.moltbot/memory | Data directory | | maxMemories | number | 10000 | Max before pruning | | embeddingModel | string | Xenova/all-MiniLM-L6-v2 | Local embedding model | | enableEmbeddings | boolean | true | Enable semantic search | | defaultImportance | number | 0.7 | Default memory importance |

How It Works

Automatic Query Routing

The plugin detects query type and routes automatically:

"What did you do Thursday at 14:04?"  →  SQLite (temporal)
"Find conversations about dark mode"  →  Vector search (semantic)
"What is my email address?"           →  SQLite (exact lookup)
"Similar ideas to X"                  →  Vector search (semantic)

Manual Mode Selection

Override automatic routing:

// Force semantic search
await memory_recall({ query: "...", mode: "semantic" });

// Force structured search
await memory_recall({ query: "...", mode: "structured" });

// Let plugin decide (default)
await memory_recall({ query: "...", mode: "auto" });

Usage

Store

await memory_store({
  text: "User prefers dark mode in all applications",
  category: "preference",  // preference|fact|decision|entity|conversation|other
  importance: 0.9          // 0-1, higher = kept longer
});

Memories are stored in both SQLite (full data) and LanceDB (vector for semantic search).

Recall

// Temporal query → routed to SQLite
const thursdayMemories = await memory_recall({
  query: "what happened last Thursday",
  limit: 5
});

// Semantic query → routed to vector search
const similarMemories = await memory_recall({
  query: "display and theme preferences",
  limit: 5
});

// With filters
const decisions = await memory_recall({
  query: "project architecture",
  category: "decision",
  dateFrom: "2025-01-01"
});

Forget (GDPR)

// By ID
await memory_forget({ memoryId: "uuid-here" });

// By query (deletes from both SQLite and vectors)
await memory_forget({ query: "sensitive information" });

Architecture

┌─────────────────────────────────────────────────────────────┐
│                    moltbot-memory-local                      │
├─────────────────────────────────────────────────────────────┤
│                                                              │
│   ┌──────────────────┐      ┌──────────────────┐           │
│   │     SQLite       │      │     LanceDB      │           │
│   │  ──────────────  │      │  ──────────────  │           │
│   │  Full text       │      │  Vector store    │           │
│   │  Timestamps      │      │  Local embeddings│           │
│   │  Metadata        │      │  Semantic search │           │
│   │  Categories      │      │                  │           │
│   └────────┬─────────┘      └────────┬─────────┘           │
│            │                         │                      │
│            └──────────┬──────────────┘                      │
│                       │                                     │
│              ┌────────▼────────┐                           │
│              │  Query Router   │                           │
│              │  ────────────── │                           │
│              │  "Thursday?" →  │ → SQLite                  │
│              │  "Similar?" →   │ → Vectors                 │
│              └─────────────────┘                           │
│                                                              │
└─────────────────────────────────────────────────────────────┘
         ❌ No cloud     ✅ 100% Local     ✅ Your data

Data Storage

~/.moltbot/memory/
├── memories.db      # SQLite database (structured data)
└── vectors/         # LanceDB vector store (embeddings)

Embedding Models

Default: Xenova/all-MiniLM-L6-v2 (384 dimensions, ~23MB)

Alternatives:

  • Xenova/e5-small-v2 — Better quality, similar size
  • Xenova/all-MiniLM-L12-v2 — More accurate, larger

Models download automatically on first use.

Fallback Behavior

  • If LanceDB fails → falls back to SQLite-only search
  • If embeddings disabled → SQLite full-text search only
  • If embedding fails for a memory → stored in SQLite, skipped in vectors

License

MIT © Andre Wolke

Links