Memory that sticks. Universal memory layer for AI agents.
Project description
ENGRAM
Memory that sticks. For every AI agent.
Universal memory layer for AI agents — persistent, searchable, zero-config.
from engram import Memory
mem = Memory()
mem.store("User prefers Python", type="preference", importance=8)
results = mem.search("programming language")
context = mem.recall(limit=10)
Features
- Zero config —
pip install engram-coreand go. SQLite out of the box, no external services. - 5-line API — Store, search, recall. That's it.
- MCP Server — First-class Model Context Protocol integration for Claude Code and other MCP clients.
- REST API — FastAPI server with WebSocket real-time updates.
- Multi-agent — Namespace isolation + cross-namespace search for agent teams.
- Privacy-first — Runs 100% locally. Your data never leaves your machine.
- Smart dedup — SHA-256 content hashing prevents duplicate memories.
- Full-text search — SQLite FTS5 for fast, typo-tolerant search.
- Optional embeddings — Plug in
sentence-transformersfor semantic search. - Memory decay — Automatic forgetting curve for stale memories.
Installation
pip install engram-core
With optional extras:
pip install engram-core[server] # REST API + WebSocket
pip install engram-core[mcp] # MCP server
pip install engram-core[embeddings] # Semantic search
pip install engram-core[all] # Everything
Quick Start
Python SDK
from engram import Memory
mem = Memory()
# Store
mem.store("User prefers dark mode", type="preference", importance=8)
mem.store("Fixed bug by adding null check", type="error_fix", importance=7)
# Search
results = mem.search("dark mode")
for r in results:
print(f"{r.memory.content} (score: {r.score:.2f})")
# Recall priority context
for entry in mem.recall(min_importance=7):
print(f"[{entry.memory_type.value}] {entry.content}")
# Multi-agent namespaces
agent1 = Memory(namespace="researcher")
agent2 = Memory(namespace="coder")
REST API
# Start server
engram-server
# Store
curl -X POST http://localhost:8100/v1/memories \
-H "Content-Type: application/json" \
-d '{"content": "Important fact", "importance": 8}'
# Search
curl -X POST http://localhost:8100/v1/search \
-H "Content-Type: application/json" \
-d '{"query": "fact"}'
MCP Server (Claude Code)
Add to your MCP config:
{
"mcpServers": {
"engram": {
"command": "python",
"args": ["-m", "mcp_server.server"],
"cwd": "/path/to/engram"
}
}
}
Want automatic memory recall? Check out the Claude Code Hook example — every new session starts with your important memories pre-loaded, zero manual steps.
Docker
docker compose -f docker/docker-compose.yml up
Comparison
| Feature | Engram | Mem0 | Letta | Zep |
|---|---|---|---|---|
| Self-hosted (Zero Infra) | SQLite out-of-box | Cloud-only | Complex setup | Graph DB needed |
| pip install + 5 lines | Yes | ~10 lines + API key | ~20 lines setup | SDK + config |
| MCP Server | First-class | No | No | No |
| Open Source | MIT | Partial | Apache 2.0 | BSL |
| Multi-Agent Namespaces | Native | User/Session/Agent | Single Agent | User-level |
| Privacy-First | Local by default | Cloud by default | Local possible | Cloud-focused |
| Cost | Free (self-hosted) | $0.01+/memory | Free | Enterprise pricing |
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file engram_core-0.3.0.tar.gz.
File metadata
- Download URL: engram_core-0.3.0.tar.gz
- Upload date:
- Size: 63.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c814e20da0487dbe121f4207d377ff0d5d844e2469f20c29aa57ac1b062232e
|
|
| MD5 |
f5ee3f9fdc5cf0cdc7a9c2108d269b48
|
|
| BLAKE2b-256 |
1461fffd3d0757d20fa1ff1eef08b2331e81b80a240b87e3d2685e66bb8d0449
|
Provenance
The following attestation bundles were made for engram_core-0.3.0.tar.gz:
Publisher:
publish.yml on engram-memory/engram
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
engram_core-0.3.0.tar.gz -
Subject digest:
6c814e20da0487dbe121f4207d377ff0d5d844e2469f20c29aa57ac1b062232e - Sigstore transparency entry: 947492286
- Sigstore integration time:
-
Permalink:
engram-memory/engram@8ebfed6e5facc461a238d2ab3f1e4a309ddf7406 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/engram-memory
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8ebfed6e5facc461a238d2ab3f1e4a309ddf7406 -
Trigger Event:
release
-
Statement type:
File details
Details for the file engram_core-0.3.0-py3-none-any.whl.
File metadata
- Download URL: engram_core-0.3.0-py3-none-any.whl
- Upload date:
- Size: 44.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67f1b73061618997007263685215a0556763c79f27aec1ee6ea5726001896da6
|
|
| MD5 |
5258ac3431b8c0fb06d545ac53a4fa36
|
|
| BLAKE2b-256 |
9d9dbf5c35e4cc78dbd604baf3a1dc1be693433fc70fe64501cbf13cf0f1df64
|
Provenance
The following attestation bundles were made for engram_core-0.3.0-py3-none-any.whl:
Publisher:
publish.yml on engram-memory/engram
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
engram_core-0.3.0-py3-none-any.whl -
Subject digest:
67f1b73061618997007263685215a0556763c79f27aec1ee6ea5726001896da6 - Sigstore transparency entry: 947492288
- Sigstore integration time:
-
Permalink:
engram-memory/engram@8ebfed6e5facc461a238d2ab3f1e4a309ddf7406 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/engram-memory
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8ebfed6e5facc461a238d2ab3f1e4a309ddf7406 -
Trigger Event:
release
-
Statement type: