Memory infrastructure for AI agents. Your Qdrant, your hardware, our intelligence.
Project description
Memory infrastructure for AI agents. Your Qdrant, your hardware, our intelligence.
npm · Dashboard · API Docs · Community Edition
pip install engrammemory-ai
Quick Start
from engrammemory import Engram
client = Engram(
api_key="eng_live_xxx",
qdrant_url="http://localhost:6333"
)
# Store — embedded & deduplicated by Engram, stored in YOUR Qdrant
client.store("User prefers TypeScript and dark mode", category="preference")
# Search — three-tier recall (hot → hash → vector)
results = client.search("What does the user prefer?")
for r in results:
print(f"[{r.tier}] {r.content} ({r.score:.2f})")
# Forget
client.forget("mem_abc123")
Why Engram?
| Engram | Mem0 | Supermemory | Zep | |
|---|---|---|---|---|
| Data ownership | Your Qdrant, your hardware | Their cloud | Their cloud | Their cloud |
| Three-tier recall | Hot → Hash → Vector | Single-tier | Single-tier | Two-tier |
| Stateless intelligence | Embeds + classifies, never stores | Stores everything | Stores everything | Stores everything |
| Edge/fleet support | Per-device agents, zone isolation | No | No | Limited |
| Local-first + overflow | Store locally, overflow to cloud | Cloud only | Cloud only | Cloud only |
| Open community edition | OpenClaw skill, full recall engine | No | Partial | No |
Three-Tier Recall
Every search flows through three tiers automatically:
results = client.search("database config")
for r in results:
print(f"[{r.tier}] {r.content} ({r.score:.2f})")
# [hot] PostgreSQL 15 with read replicas (0.94) — sub-ms, cached
# [hash] Migrated from MongoDB last quarter (0.81) — O(1) LSH lookup
# [vector] Old DB credentials in vault (0.67) — full ANN fallback
Auto-Recall for Agent Prompts
# Inject relevant memories into your agent's system prompt
memories = client.recall("User is asking about their database setup")
system_prompt = f"You know: {', '.join(m.content for m in memories)}"
Async
from engrammemory import AsyncEngram
async with AsyncEngram(api_key="eng_live_xxx") as client:
await client.store("User prefers TypeScript")
results = await client.search("language preferences")
Multi-Agent / Fleet
# Each agent gets its own namespace
client = Engram(api_key="eng_live_xxx", project="icu-floor-3")
# Store with agent tracking
client.store("Patient allergic to penicillin", category="fact", agent="tablet-icu-3a")
# Search scoped to project
results = client.search("allergies", agent="tablet-icu-3a")
API Reference
Constructor
Engram(
api_key: str, # Your Engram API key
qdrant_url: str = "http://localhost:6333", # Your Qdrant instance
base_url: str = "https://api.engrammemory.ai",
collection: str = "agent-memory",
project: str | None = None, # Memory isolation namespace
max_retries: int = 3,
timeout: float = 30.0,
)
Methods
| Method | Description |
|---|---|
store(content, category?, importance?, metadata?, agent?) |
Store a memory (embedded + deduplicated + compressed) |
search(query, limit?, min_score?, category?, agent?) |
Three-tier recall: hot → hash → vector |
recall(context, top_k?, agent?) |
Auto-inject relevant memories for agent prompts |
get(memory_id) |
Get a specific memory by ID |
forget(memory_id) |
Remove from all three tiers |
forget_by_query(query) |
Forget memories matching a search |
list(limit?, offset?, category?, agent?) |
List memories with filtering |
health() |
Check Engram + Qdrant connectivity |
Models
from engrammemory import Memory, SearchResult, StoreResult, HealthStatus
| Model | Fields |
|---|---|
Memory |
id, content, category, metadata, created_at, access_count |
SearchResult |
memory, score, tier ("hot", "hash", "vector") |
StoreResult |
id, stored, deduplicated |
HealthStatus |
status, qdrant_connected, version |
Exceptions
from engrammemory import EngramError, AuthenticationError, RateLimitError, NotFoundError, ValidationError
| Exception | HTTP Code | When |
|---|---|---|
AuthenticationError |
401 | Invalid or missing API key |
RateLimitError |
429 | Too many requests (auto-retries with Retry-After) |
NotFoundError |
404 | Memory ID doesn't exist |
ValidationError |
400/422 | Invalid request body |
EngramError |
Other | Base class for all errors |
Community Edition
Don't need cloud? The community edition runs the full three-tier recall engine locally as an OpenClaw skill with no API dependency.
Links
- Node SDK —
npm install engrammemory-ai - Dashboard
- API Docs
- GitHub
- Community Edition
Project details
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 engrammemory_ai-0.1.3.tar.gz.
File metadata
- Download URL: engrammemory_ai-0.1.3.tar.gz
- Upload date:
- Size: 13.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5902f9e0149a0f253497543ee790b5883e81dfd16b977927b60f375f069082be
|
|
| MD5 |
d855a52e98c3fbaa38270c46f693db81
|
|
| BLAKE2b-256 |
7642d78ed4343cc923bae7ea2d1c4691ddb5289765edf557be798a0241c49af0
|
File details
Details for the file engrammemory_ai-0.1.3-py3-none-any.whl.
File metadata
- Download URL: engrammemory_ai-0.1.3-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1675ae8be9c35e18be38fb9340beacf75a652b0120afea048de8990e1c40e7eb
|
|
| MD5 |
a85b0a2d0363929499257338e2464b6a
|
|
| BLAKE2b-256 |
11319e1d7a3c42f39f7b6f161b762ece61d87e49b42c76fecb79b20f3da72a36
|