engram-rs logo

engram-rs

Free

三层记忆引擎(Buffer→Working→Core),记忆根据重要性自动晋升、衰减和合并。混合语义+关键词召回,单 Rust 二进制文件。

FreeFree tier
Inputs: textOutputs: text
Type
Open Source

About engram-rs

Engram-rs is a memory engine for AI agents that implements a two-axis memory model: a time axis with three-layer decay/promotion (Buffer, Working, Core) inspired by the Atkinson–Shiffrin memory model, and a space axis with a self-organizing topic tree. It uses LLM-guided quality gates for memory promotion, automatic decay following the Ebbinghaus forgetting curve (activity-driven, not wall-clock), and hybrid semantic+keyword search. The engine is packaged as a single Rust binary (~10 MB) with one SQLite file and zero external dependencies—no Python, Redis, or vector DB required. It provides REST API endpoints to store memories, recall by meaning, and resume full context. Installation is via 'curl | bash'. Search latency is single-digit milliseconds, and RSS memory is ~100 MB.

Key Features

Three-layer memory lifecycle (Buffer, Working, Core) with promotion and decay
LLM quality gate for memory promotion decisions
Automatic exponential decay following Ebbinghaus forgetting curve, activity-driven
Hybrid semantic and keyword search for recall
Self-organizing topic tree for spatial organization
Single Rust binary (~10 MB) with SQLite storage, no external dependencies
REST API endpoints: store, recall, resume
Kind-specific decay rates (episodic, semantic, procedural)
Activation boost on memory recall
Easy installation via curl|bash script

Pros & Cons

Pros
  • Extremely lightweight: single ~10 MB binary, ~100 MB RSS, no external dependencies
  • Intelligent memory lifecycle: automatically promotes important memories and decays noise
  • LLM-guided quality gates ensure promotion decisions are context-aware, not rule-based
  • Hybrid search combines semantic understanding with keyword precision
  • Simple setup: 'curl | bash' installs and runs, no Python or Redis needed
  • Fast search latency in single-digit milliseconds
  • Zero external services: uses SQLite for storage, runs as a standalone binary
Cons
  • Requires an LLM for the quality gate, adding external cost and dependency
  • Relatively new project (28 stars, small community) — may have limited support and documentation
  • Promotion and decay mechanisms may need tuning for specific use cases
  • Does not include built-in embedding model; requires external embedding provider configuration during install

Best For

Persistent memory management for AI agent conversationsKnowledge consolidation and long-term retention for chatbotsContext restoration across agent sessionsPersonal memory assistant that forgets noise and surfaces important informationLightweight memory backend for self-hosted AI applications

FAQ

What memory model does engram-rs use?
It uses a three-layer model inspired by Atkinson–Shiffrin: Buffer (short-term entry point), Working (active knowledge, never deleted but decayed), and Core (long-term identity, promoted via LLM quality gate, never deleted).
How does memory decay work?
Decay is activity-driven and only fires during active consolidation cycles. It follows the Ebbinghaus forgetting curve (exponential, fast initial decay then long tail) with a floor of 0.01. Memories get an activation boost when recalled. Different kinds (episodic, semantic, procedural) have different half-lives.
What are the system requirements?
Engram-rs is a single Rust binary (~10 MB) that uses one SQLite file. It has zero external dependencies—no Python, Redis, or vector DB. RSS memory is around 100 MB, and search latency is single-digit milliseconds.
How do I install engram-rs?
Install via 'curl -fsSL https://raw.githubusercontent.com/kael-bit/engram-rs/main/install.sh | bash'. The script is interactive and prompts for embedding provider configuration.
Can I use engram-rs without an LLM?
No, the quality gate that promotes memories from Buffer to Working and Working to Core relies on an LLM to evaluate whether a memory is worth retaining (e.g., decision, lesson, preference). You need an external LLM provider for this.