# kael-bit/engram-rs [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/kael-bit/engram-rs  
**GitHub Stars:** 28  
**npm Downloads (last month):** 229  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/kael-bit-engram-rs

## Description
Hierarchical memory engine for AI agents with automatic decay, promotion, semantic dedup, and self-organizing topic tree. Single Rust binary, zero external dependencies.

## Tools
Capabilities this server exposes over MCP:

- **engram_store** — Store 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_recall** — Hybrid 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_recent** — List recent memories by creation time. Good for session context recovery.
- **engram_resume** — Full 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_extract** — Extract structured memories from raw text using LLM. Feed conversation logs or notes and get individual memories.
- **engram_search** — Quick keyword search. Lighter than recall — no scoring or budget logic.
- **engram_consolidate** — Run a memory consolidation cycle. Promotes important memories upward, drops decayed entries. With merge=true, uses LLM to merge similar memories.
- **engram_stats** — Get memory statistics: counts per layer, AI status, version.
- **engram_repair** — Repair FTS search index. Removes orphaned entries and rebuilds missing ones. Safe to run anytime — idempotent.
- **engram_health** — Detailed health check: uptime, RSS memory, embed cache stats, AI config status.
- **engram_triggers** — Fetch trigger memories for a specific action. Call before performing an action (e.g. git-push, deploy) to recall relevant lessons and rules.
- **engram_delete** — Delete a memory by ID. Use when a memory is outdated, incorrect, or redundant.
- **engram_update** — Update a memory's content, metadata (importance, tags, layer, kind). Use supersedes on store to replace with history.
- **engram_trash** — List soft-deleted memories. Recently deleted items can be restored.
- **engram_restore** — Restore a soft-deleted memory from trash back to its original layer.
- **engram_topic** — Drill into topic clusters by ID. Use after /resume to explore specific topics from the knowledge index.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "engram-rs": {
    "command": "npx",
    "args": ["-y","engram-rs-mcp"]
  }
}
```

## Documentation

## What kael-bit/engram-rs does

The kael-bit/engram-rs MCP server provides persistent memory for AI agents through a single Rust binary and one SQLite database file. It organizes entries across three layers: Buffer for newly stored or temporary items, Working for active knowledge, and Core for long-term information. New memories enter Buffer and can move upward as they are accessed and pass promotion checks.

The lifecycle is activity-driven. Consolidation can reduce the importance of memories that are not being used, while recalls provide an activation boost. Episodic memories decay faster than semantic memories, and procedural memories decay more slowly. Memories do not reach an absolute zero score, so precise searches can still find older entries.

The system also supports semantic deduplication, optional LLM-assisted merging, and an automatically maintained topic tree. Topic clustering lets an agent browse related knowledge instead of relying only on the wording of a search query. Tags can identify workspace context or action triggers such as deployment and database migration.

## How it works

Storage, retrieval, and maintenance are exposed as MCP tools. `engram_store` creates memories, while `engram_update`, `engram_delete`, `engram_trash`, and `engram_restore` manage changes and soft deletion. The `supersedes` option can link a replacement to an outdated memory. `engram_recall` combines semantic and keyword retrieval with a token budget; its optional query expansion uses an LLM and is intended for short or vague queries. `engram_search` provides a lighter keyword-only path.

For session continuity, `engram_resume` returns Core, Working, Buffer, recent activity, and session notes. Its compact mode reduces the amount of context returned, and workspace tags can narrow the result to the current work. `engram_recent` provides a simpler creation-time listing. `engram_topic` expands topic clusters, while `engram_triggers` retrieves memories associated with a named action.

Background consolidation handles decay, deduplication, triage, promotion decisions, and topic rebuilding. `engram_consolidate` can run this process manually and can optionally merge similar entries with an LLM. `engram_extract` turns raw notes or conversation text into structured memories.

## Setup and configuration

The kael-bit/engram-rs MCP server is distributed as a standalone Rust binary. The documented installation paths are an installation script for macOS and Linux, a PowerShell script for Windows, and a Docker image. The interactive installer prompts for embedding-provider configuration.

The application uses a local SQLite file and does not require Python, Redis, or a separate vector database. A single instance can separate projects with the `X-Namespace` header. This allows the same running service to keep memories for different projects isolated from one another.

## Tools and capabilities

- Store, update, supersede, delete, trash, and restore memories.
- Retrieve memories through semantic-plus-keyword recall or quick keyword search.
- Recover session context with compact or fuller resume data.
- Extract memories from raw text using an LLM.
- Run consolidation, inspect statistics, check health, and repair the full-text search index.
- Browse topic clusters and fetch action-specific trigger memories.

## Limitations and notes

LLM-backed features require an embedding provider configuration and may add latency. The default recall path is described as roughly 30 milliseconds when cached and about one second for a first query; query expansion adds approximately one to two seconds. Consolidation is activity-driven, so decay does not run merely because wall-clock time has passed while the system is idle.

Automatic promotion is not immediate for every memory. Procedural memories and entries tagged as lessons can promote to Working after two hours, while other promotion depends on access frequency and quality evaluation. Core and Working retention therefore reflects the configured lifecycle rather than a simple chronological archive.

The search index can be repaired safely with `engram_repair`; the operation is idempotent.

_Full upstream README: https://allmcps.com/mcp/kael-bit-engram-rs/readme_

