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")

MiroFish Integration

Replace Zep with Engram in your MiroFish .env:

MEMORY_PROVIDER=engram
ENGRAM_API_KEY=eng_live_xxx
ENGRAM_QDRANT_URL=http://localhost:6333

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.1.2.tar.gz (13.4 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.1.2-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: engrammemory_ai-0.1.2.tar.gz
  • Upload date:
  • Size: 13.4 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.1.2.tar.gz
Algorithm Hash digest
SHA256 858db34e5280bf0bd7e0377867c51ca9fde43ca50c8192d69d56d97015dbd4ef
MD5 b7294a9e2019579ed58b219c4dab4a86
BLAKE2b-256 930a18a641edc290d398f2cf1f6e8c4a3056a50f30c4dd702ac1c8006622b12c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for engrammemory_ai-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 33c6bd6b36173063cf61c36c4ac7c2b9596e78596ebb2bd33539271747f336a6
MD5 4e6e6c2f89c39dc7e98783e751f23f61
BLAKE2b-256 56d09661356449406f4f4028878fce5697cd010c933bb242c394ef343a8e6741

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