← Back to Plugins
Voice

Clawmem

DeepExtrema By DeepExtrema 👁 378 views ▲ 0 votes

Local-first memory slot plugin for OpenClaw: Markdown is source-of-truth, recall is durable, auditable, and reversible.

GitHub

Install

npm install -g

Configuration Example

{
  "plugins": {
    "slots": {
      "memory": "@clawmem/openclaw"
    }
  }
}

README

# ClawMem

> Local-first memory engine for OpenClaw β€” durable, auditable, reversible.

**"Markdown stays the source of truth, but recall is persistent, searchable, and graph-aware."**

[![CI](https://github.com/DeepExtrema/clawmem/actions/workflows/ci.yml/badge.svg)](https://github.com/DeepExtrema/clawmem/actions/workflows/ci.yml)
[![npm @clawmem/core](https://img.shields.io/npm/v/@clawmem/core)](https://www.npmjs.com/package/@clawmem/core)
[![npm @clawmem/openclaw](https://img.shields.io/npm/v/@clawmem/openclaw)](https://www.npmjs.com/package/@clawmem/openclaw)
[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)

---

## What is ClawMem?

ClawMem is a **standalone, open-source alternative to SuperMemory** β€” locally hostable, zero-server, and designed as a native memory-slot plugin for [OpenClaw](https://openclaw.ai).

### Why ClawMem over Supermemory or Mem0?

| Feature | Supermemory | Mem0 OSS | ClawMem |
|---------|-------------|----------|---------|
| Graph memory (UPDATE/EXTEND/DERIVE) | βœ… Neo4j required | βœ… Neo4j required | βœ… **KΓΉzu embedded** (zero ops) |
| Vector search | βœ… | βœ… | βœ… sqlite-vec |
| Hybrid search (vector + keyword) | βœ… | ❌ | βœ… FTS5 + vector |
| User profiles (static + dynamic) | βœ… | ❌ | βœ… |
| Contradiction resolution | βœ… | Partial | βœ… Graph UPDATE chains |
| Temporal reasoning | βœ… | ❌ | βœ… |
| Local-first (no cloud required) | ❌ | βœ… | βœ… |
| Zero-server (fully embedded) | ❌ | ❌ | βœ… |
| Markdown two-lane sync | ❌ | ❌ | βœ… |
| Reversible (full audit log) | ❌ | ❌ | βœ… |
| OpenClaw memory-slot plugin | βœ… | βœ… | βœ… **Native** |

---

## Quick Start

### As an OpenClaw plugin (30 seconds)

```bash
openclaw plugins install @clawmem/openclaw
```

Add to your OpenClaw config:

```json
{
  "plugins": {
    "slots": {
      "memory": "@clawmem/openclaw"
    }
  }
}
```

Configure ClawMem (point to your local LLM + embedder):

```json
{
  "clawmem": {
    "llm": { "baseURL": "http://127.0.0.1:8080/v1", "model": "deepseek-r1" },
    "embedder": { "baseURL": "http://127.0.0.1:8082/v1", "model": "nomic-embed-text" }
  }
}
```

### Standalone CLI

```bash
npm install -g clawmem
clawmem init
clawmem add "I prefer TypeScript over Python"
clawmem search "programming preferences"
clawmem profile
```

---

## Packages

| Package | Description | npm |
|---------|-------------|-----|
| [`@clawmem/core`](packages/core/) | Core memory engine (extraction, vector+graph, dedup, profiles) | `npm i @clawmem/core` |
| [`@clawmem/openclaw`](packages/openclaw-plugin/) | OpenClaw memory-slot plugin | `openclaw plugins install @clawmem/openclaw` |
| [`clawmem`](packages/cli/) | Standalone CLI | `npm i -g clawmem` |

---

## Storage Backends

| Layer | Default | Alternatives |
|-------|---------|-------------|
| Vector store | **sqlite-vec** | LanceDB, Qdrant |
| Graph store | **KΓΉzu** (embedded) | Neo4j |
| History | **SQLite** | β€” |
| LLM | OpenAI-compatible | Any |
| Embedder | OpenAI-compatible | Any |

All defaults are **embedded** β€” no servers, no Docker, no accounts.

---

## Safety by Default

- **No outbound calls** unless you explicitly configure a remote endpoint
- **Full audit log**: every memory mutation records previous value + diff
- **Reversible**: `clawmem history <id>` shows version chain, `clawmem revert <id> <version>` restores
- **Group-safe**: auto-skips capture in OpenClaw group chats
- **Hard caps**: configurable max memories, tokens, retention days

See [THREAT-MODEL.md](THREAT-MODEL.md) for the full security model.

---

## Architecture

```
packages/core          @clawmem/core
  β”œβ”€ Memory engine     add / search / get / getAll / delete / update
  β”œβ”€ Extraction        LLM β†’ structured facts (13 categories)
  β”œβ”€ Deduplication     hash + semantic + LLM merge
  β”œβ”€ Graph memory      KΓΉzu: entities, relationships, UPDATE/EXTEND/DERIVE
  β”œβ”€ User profiles     static (identity/prefs) + dynamic (projects/goals)
  β”œβ”€ Sleep mode        nightly consolidation + digest
  └─ Pluggable backends

packages/openclaw-plugin   @clawmem/openclaw
  β”œβ”€ Memory-slot plugin    plugins.slots.memory
  β”œβ”€ 7 tools               search, store, store_raw, list, get, forget, profile
  β”œβ”€ Auto-recall           injects memories before each agent turn
  β”œβ”€ Auto-capture          extracts facts after each agent turn
  β”œβ”€ Markdown sync         two-lane: workspace .md ↔ vector+graph store
  └─ Identity mapping      multi-channel user resolution

packages/cli               clawmem
  └─ Standalone CLI        init, add, search, forget, profile, graph, sleep, doctor
```

---

## Development

```bash
# Prerequisites: Node 20+, pnpm 9+
git clone https://github.com/DeepExtrema/clawmem
cd clawmem
pnpm install
pnpm build
pnpm test
```

See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines.

---

## License

[Apache 2.0](LICENSE) Β© 2026 DeepExtrema
voice

Comments

Sign in to leave a comment

Loading comments...