Skip to main content

engramport-langchain

Persistent memory for AI bots and agents, powered by EngramPort + MandelDB.

3 lines to give your bot a brain:

from engramport_langchain import EngramPortMemory

memory = EngramPortMemory(api_key="ek_bot_...")
memory.remember("User prefers dark mode and lives in Tampa, FL")

Install

pip install engramport-langchain

For LangChain integration:

pip install engramport-langchain[langchain]

Quick Start

Standalone (no LangChain required)

from engramport_langchain import EngramPortMemory

memory = EngramPortMemory(api_key="ek_bot_...")

# Store memories
memory.remember("User's name is Alex")
memory.remember("User prefers concise answers")
memory.remember("User lives in Tampa, FL and checks weather often")

# Semantic recall — no keyword matching needed
results = memory.recall("What do I know about this user?")
for m in results.memories:
    print(f"  {m.content} (score: {m.relevance_score:.2f})")

# Synthesize insights across all memories
insights = memory.reflect(topic="user preferences")
for i in insights.insights:
    print(f"  {i.content} (confidence: {i.confidence:.0%})")

# Check stats
stats = memory.stats()
print(f"Memories: {stats.memory_count}, Insights: {stats.insight_count}")

Async

Every method has an async counterpart:

await memory.aremember("User mentioned they love hiking")
results = await memory.arecall("outdoor activities")
insights = await memory.areflect()
stats = await memory.astats()

LangChain Integration

Drop-in memory for any LangChain conversation chain:

from engramport_langchain.langchain import EngramPortChatMemory
from langchain.chains import ConversationChain
from langchain_openai import ChatOpenAI

memory = EngramPortChatMemory(
    api_key="ek_bot_...",
    recall_limit=5,        # memories per turn
    auto_reflect=True,     # synthesize insights automatically
    reflect_interval=10,   # every 10 interactions
)

chain = ConversationChain(llm=ChatOpenAI(), memory=memory)

# Memories persist across sessions automatically
chain.invoke({"input": "My name is Alex and I live in Tampa"})
# ... restart your app ...
chain.invoke({"input": "What's the weather like where I live?"})
# Bot recalls Tampa without being told again

API Reference

Method Description
remember(content, context?, session_id?) Store a memory
recall(query, limit=5) Semantic search across memories
reflect(topic?) LLM-powered insight synthesis
stats() Memory and insight counts

All methods return typed Pydantic models. Async versions prefixed with a.

Get Your API Key

curl -X POST https://mandeldb.com/api/v1/portal/register \
  -H "Content-Type: application/json" \
  -d '{"bot_name": "my-bot", "bot_type": "custom", "owner_email": "you@example.com"}'

Why EngramPort?

Feature EngramPort Mem0
Semantic recall Yes Yes
Insight synthesis Yes — /reflect No
Cryptographic provenance (AEGIS) Yes No
Graph-based reasoning Yes (MandelDB) No
Category-aware memory decay Yes No
Self-hosted option Yes Paid only
Pricing (hobby) Free tier $49/mo

Metadata

Release files for engramport-langchain 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 engramport-langchain 0.1.0
File Size Uploaded Provenance Actions
engramport_langchain-0.1.0.tar.gz 7.0 kB Without provenance Details for engramport_langchain-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for engramport-langchain 0.1.0
File Interpreter ABI Platform Actions
engramport_langchain-0.1.0-py3-none-any.whl Python 3 none any Details for engramport_langchain-0.1.0-py3-none-any.whl

Total release size: 15.4 kB

Release files / engramport_langchain-0.1.0.tar.gz

Download URL engramport_langchain-0.1.0.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
80bb25c29c8922c1689f2666d807a0a99af0dd9cea68fb832db1d8d8ca0fb62e
BLAKE2b-256 checksum
How to use checksums
e00830fe9a22692f523535567aa70d28d53d144e59cf2e11c33f25bec01e54d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / engramport_langchain-0.1.0-py3-none-any.whl

Download URL engramport_langchain-0.1.0-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
19d5d906487a266fc93a6dd8112309ae7b37627486ff7518a06939dbfe022dcf
BLAKE2b-256 checksum
How to use checksums
479ba23f16144d5930ac656205f27f8b9311d3fc5e0592cc3cd45ee975ce5745
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Security for engramport-langchain 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