Skip to main content

🧠 Engram: Fast, Local-First Memory for LLMs

Engram is a high-performance, local-first memory database designed specifically for AI agents and RAG (Retrieval-Augmented Generation) applications. It is built in Rust for speed and provides native Python bindings for ease of use.

Zero Config. Zero API Keys. Zero Latency.

✨ Features

  • 🚀 Blazing Fast: Core engine written in Rust with HNSW indexing for sub-10ms retrieval.
  • 🔒 Privacy First: Everything stays on your machine. No data is sent to external embedding providers.
  • 📦 All-in-One: Integrated vector storage, metadata management, and local embeddings (via FastEmbed).
  • 🔋 Battery Included: Auto-downloads and manages optimized ONNX embedding models locally.

🛠️ Installation

# Clone the repository
git clone https://github.com/yourusername/engram
cd engram

### Python
```bash
pip install maturin
maturin develop --features python

Node.js

npx napi build --release --features node

📖 Quick Start (RAG in 30 Seconds)

import engram

# 1. Initialize the database (Saves to a local folder)
db = engram.EngramDB("./my_knowledge_base")

# 2. Store documents with metadata
db.store(
    "Engram is a memory database written in Rust.", 
    {"source": "docs", "priority": "high"}
)

# 3. Recall based on semantic meaning
results = db.recall("How is Engram built?", limit=1)

for content, metadata in results:
    print(f"Retrieved: {content}")
    print(f"Metadata: {metadata}")

🏗️ Architecture

Engram uses a custom binary storage engine called Mnemo combined with HNSW (Hierarchical Navigable Small World) for ultra-fast vector search.

  1. Mnemo Engine: A low-level, append-only binary log that ensures your data is persisted safely to disk.
  2. HNSW Index: An in-memory graph structure rebuilt from disk on startup for lightning-fast nearest neighbor search.
  3. Local Embeddings: Uses fastembed-rs to run optimized ONNX models like all-MiniLM-L6-v2 locally on your CPU/GPU.

🤝 Contributing

We welcome contributions! Please feel free to submit a Pull Request.

📄 License

MIT License. See LICENSE for details.

Metadata

Release files for engram-db 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for engram-db 0.1.0
File Size Uploaded Provenance Actions
engram_db-0.1.0.tar.gz 47.3 kB Without provenance Details for engram_db-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for engram-db 0.1.0
File Interpreter ABI Platform Actions
engram_db-0.1.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for engram_db-0.1.0-cp313-cp313-win_amd64.whl

Total release size: 9.5 MB

Release files / engram_db-0.1.0.tar.gz

Download URL engram_db-0.1.0.tar.gz
Size 47.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3cc3dcad5ba4f771cc453fdc4b8699eb5e706976faa4e5fc979d3ae8bc9e202a
BLAKE2b-256 checksum
How to use checksums
e2737ef12d98025b0f89baa3941e687d72a6a44eee088add933eec7182166e89
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.11.5

Release files / engram_db-0.1.0-cp313-cp313-win_amd64.whl

Download URL engram_db-0.1.0-cp313-cp313-win_amd64.whl
Size 9.4 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
e13c71604d7eb81aed0fc92c527862bf4a080c12ae243fe6a9309b0b6fe6b678
BLAKE2b-256 checksum
How to use checksums
506cc35560bb61ae55d8c167a06f40f70cdef0c54e1bbeba44d4fef42db5fae7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.11.5

Security for engram-db 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page