engram_consolidate
Run a memory consolidation cycle. Promotes important memories upward, drops decayed entries. With merge=true, uses LLM to merge similar memories.
Memory for an agent that forgets on purpose — new notes start in a buffer, important ones get promoted, decayed ones drop out, and a session can be resumed from what survived.
LABSCO SUMMARY
Most agent memory is a flat pile with keyword search over it; here memories are promoted or decayed by how often they earn their keep, so what a session resumes with is a small set of things that survived rather than everything ever written. Two tools are worth building habits around: engram_triggers pulls the rules tied to an action before you take it, and engram_resume rebuilds a working context at the start of a session instead of leaving the model to search blind. Note that this is a client to a server you run yourself — nothing works until that binary is up.
A memory engine with a lifecycle. Memories move through three layers — Buffer, Working and Core — by access frequency and quality gating, so what matters is promoted and noise decays. It is a single Rust binary with one SQLite file behind an HTTP API, and this package is the MCP client to it.
The engram server running — a single binary with a SQLite file, no Python, Redis or vector database, installed by its own script and listening on http://localhost:3917 by default. The MCP side runs as npx -y engram-rs-mcp with ENGRAM_URL pointing at that server, ENGRAM_API_KEY if it is behind bearer auth, and ENGRAM_NAMESPACE to keep projects separate. Semantic search needs an embedding provider, which the installer prompts for.
Follow the published steps — curl -fsSL https://raw.githubusercontent.com/kael-bit/engram-rs/main/install.sh | bash
USE CASES
Resume the session — core knowledge, ongoing context and recent activity in one call — instead of re-explaining the project.
Before the risky action, fetch the memories tied to it — the lesson about deploys arrives before the deploy.
Extract structured memories from the transcript, then store the ones worth keeping with tags and importance.
Search semantically within a token budget, filtered by layer, tag or time, and expand the query only when it is too vague to match.
Run a consolidation cycle to promote what is used and drop what has decayed, merging near-duplicates as it goes.
Update or supersede the memory so history is kept, delete what is simply wrong, and restore it from trash if you were too quick.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
engram_consolidateRun a memory consolidation cycle. Promotes important memories upward, drops decayed entries. With merge=true, uses LLM to merge similar memories.
engram_deleteDelete a memory by ID. Use when a memory is outdated, incorrect, or redundant.
engram_extractExtract structured memories from raw text using LLM. Feed conversation logs or notes and get individual memories.
engram_healthDetailed health check: uptime, RSS memory, embed cache stats, AI config status.
engram_recallHybrid semantic + keyword search with budget-aware retrieval. Fast by default (~30ms cached, ~1s first query). Optional expand adds LLM query expansion (+1-2s) — only use for short/vague queries.
engram_recentList recent memories by creation time. Good for session context recovery.
engram_repairRepair FTS search index. Removes orphaned entries and rebuilds missing ones. Safe to run anytime — idempotent.
engram_restoreRestore a soft-deleted memory from trash back to its original layer.
engram_resumeFull memory bootstrap for session recovery. Returns core (permanent knowledge), working (ongoing context/decisions), buffer (transient), recent activity, and session notes. Use workspace tags to filter by current work context. Compact mode (default) minimizes token usage.
engram_searchQuick keyword search. Lighter than recall — no scoring or budget logic.
engram_statsGet memory statistics: counts per layer, AI status, version.
engram_storeStore a memory. All memories start in Buffer and promote to Working/Core through access frequency and LLM quality gating. Procedural memories and lessons (tag=lesson) auto-promote to Working after 2h. Use supersedes to replace outdated memories by their ids.
engram_topicDrill into topic clusters by ID. Use after /resume to explore specific topics from the knowledge index.
engram_trashList soft-deleted memories. Recently deleted items can be restored.
engram_triggersFetch trigger memories for a specific action. Call before performing an action (e.g. git-push, deploy) to recall relevant lessons and rules.
engram_updateUpdate a memory's content, metadata (importance, tags, layer, kind). Use supersedes on store to replace with history.
BEFORE YOU INSTALL
16 tools when we connected; the project documents 17.
npx on PATH
All 4 documented clients run the server on your machine.
INSTALLATION
curl -fsSL https://raw.githubusercontent.com/kael-bit/engram-rs/main/install.sh | bash
npx engram-rs-mcpclaude mcp add -s user engram -- npx -y engram-rs-mcp{
"mcpServers": {
"engram": {
"command": "npx",
"args": [
"-y",
"engram-rs-mcp"
],
"env": {
"ENGRAM_URL": "http://localhost:3917",
"ENGRAM_API_KEY": "",
"ENGRAM_NAMESPACE": ""
}
}
}
}