getmnemo-langchain
LangChain adapter for Mnemo Memory — drop-in conversational memory and retriever backed by the getmnemo SDK.
Install
pip install getmnemo-langchain
Requires getmnemo>=0.2.
Quickstart
from getmnemo import Mnemo
from langchain.chains import ConversationChain
from langchain_openai import ChatOpenAI
from langchain_getmnemo import MnemoMemory
mem_client = Mnemo(api_key="prfly_live_...", default_container_tag="user:jane")
chain = ConversationChain(
llm=ChatOpenAI(model="gpt-4o-mini"),
memory=MnemoMemory(client=mem_client, top_k=5),
)
print(chain.invoke({"input": "Remember that my favourite framework is FastAPI."}))
print(chain.invoke({"input": "What is my favourite framework?"}))
Every call is scoped to a container — a "<type>:<id>" string such as
"user:jane". Set it once on the client (default_container_tag=) or per
component (container_tag=):
memory = MnemoMemory(client=mem_client, container_tag="user:jane")
Retriever for RAG
from langchain_getmnemo import MnemoRetriever
retriever = MnemoRetriever(client=mem_client, top_k=8)
docs = retriever.invoke("show me what I said about deployments")
for doc in docs:
print(doc.metadata.get("score"), doc.page_content)
What you get
MnemoMemory— implementslangchain_core.memory.BaseMemory. Auto-saves every user / AI turn and rehydrates the top-K relevant prior turns by semantic search. An optionalnamespacepartitions threads that share one container.MnemoRetriever— implementslangchain_core.retrievers.BaseRetriever. Returns LangChainDocumentobjects with the memory's metadata plusscore,memory_id, and (for document-derived hits)document_id.
License
MIT — see LICENSE.
Metadata
Release files for getmnemo-langchain 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| getmnemo_langchain-0.2.0.tar.gz | 6.6 kB | Without provenance | Details for getmnemo_langchain-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| getmnemo_langchain-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for getmnemo_langchain-0.2.0-py3-none-any.whl |
Total release size: 12.7 kB
Release files / getmnemo_langchain-0.2.0.tar.gz
| Download URL | getmnemo_langchain-0.2.0.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
119415c74342e1eb2639bb6a06b2db1da3905b28349e2834f99e37cd9e1ff5f8
|
|
BLAKE2b-256 checksum How to use checksums |
4cac4daf87e44b063d2e6f72dc428e6799fa35eb18190251a4f7d745f5b518c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.15
|
Release files / getmnemo_langchain-0.2.0-py3-none-any.whl
| Download URL | getmnemo_langchain-0.2.0-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f5ea61427c05f71e25e7070aced972d4e1cd0c77da244026c85c3cfa4607fb51
|
|
BLAKE2b-256 checksum How to use checksums |
0850dc9190021fff8502659e970d1fffdcdbd5db9eb69d79bb9dbf3d7ec2a17c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.15
|
Security for getmnemo-langchain 0.2.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.