Skip to main content

Memory infrastructure for AI agents. Your Qdrant, your hardware, our intelligence.

Project description

Engram Memory

Memory infrastructure for AI agents. Your Qdrant, your hardware, our intelligence.

npm · Dashboard · API Docs · Community Edition

pypi npm license

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

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

engrammemory_ai-0.2.0.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

engrammemory_ai-0.2.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file engrammemory_ai-0.2.0.tar.gz.

File metadata

  • Download URL: engrammemory_ai-0.2.0.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

Hashes for engrammemory_ai-0.2.0.tar.gz
Algorithm Hash digest
SHA256 fdbfd0c20fed6c0bea1b51290d4d6446862204b4dd40476084b6a524aca1acb0
MD5 df1efa9652bf3c6e5fd8f6cd3c93e84a
BLAKE2b-256 5855916a8cfbe6e42d512a418c2cef418929091001a2b39461f6987c07088102

See more details on using hashes here.

File details

Details for the file engrammemory_ai-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for engrammemory_ai-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a03047eb39efe4fc345dc2f7d83bfadf1df1f959ea0fbd75da9b080d23d6cbab
MD5 4b5f238d87966dcf5be4accf5914b4be
BLAKE2b-256 9b51cdf3c9d0b1ab41480871dcb8acc96d25b9d93aeb80b65459cb5430cbd214

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page