langraph-store-mongodb
LangGraph long-term memory using MongoDB.
Installation
pip install -U langgraph-store-mongodb
Usage
For more detailed usage examples and documentation, please refer to the MongoDB LangGraph documentation.
from langgraph.store.mongodb import MongoDBStore, create_vector_index_config
from langchain_voyageai import VoyageAIEmbeddings
# Vector search index configuration with client-side embedding
index_config = create_vector_index_config(
embed = VoyageAIEmbeddings(),
dims = <dimensions>,
fields = ["<field-name>"],
filters = ["<filter-field-name>", ...] # Optional
)
# Store memories in MongoDB collection
with MongoDBStore.from_conn_string(
conn_string=MONGODB_URI,
db_name="<database-name>",
collection_name="<collection-name>",
index_config=index_config
) as store:
store.put(
namespace=("user", "memories"),
key=f"memory_{hash(content)}",
value={"content": content}
)
# Retrieve memories from MongoDB collection
with MongoDBStore.from_conn_string(
conn_string=MONGODB_URI,
db_name="<database-name>",
collection_name="<collection-name>",
index_config=index_config
) as store:
results = store.search(
("user", "memories"),
query="<query-text>",
limit=3
)
for result in results:
print(result.value)
# To delete memories, use store.delete(namespace, key)
# To batch operations, use store.batch(ops)
Metadata
Release files for langgraph-store-mongodb 0.4.1
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 |
|---|---|---|---|---|
| langgraph_store_mongodb-0.4.1.tar.gz | 190.6 kB | Without provenance | Details for langgraph_store_mongodb-0.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langgraph_store_mongodb-0.4.1-py3-none-any.whl | Python 3 | none | any | Details for langgraph_store_mongodb-0.4.1-py3-none-any.whl |
Total release size: 203.0 kB
Release files / langgraph_store_mongodb-0.4.1.tar.gz
| Download URL | langgraph_store_mongodb-0.4.1.tar.gz |
|---|---|
| Size | 190.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
51c7822213413eb6cd30b035ef7b59971f8fea869fb3190e2b6b9b336199d8bd
|
|
BLAKE2b-256 checksum How to use checksums |
4264b43b6e2f547829cc9ef0b0d5f1bb1894adc904fa09e358c927eb49cc4550
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / langgraph_store_mongodb-0.4.1-py3-none-any.whl
| Download URL | langgraph_store_mongodb-0.4.1-py3-none-any.whl |
|---|---|
| Size | 12.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
71d5dee0e4364be178c44b57c1d8d942832d44df122f28b223f1409f8f699d1f
|
|
BLAKE2b-256 checksum How to use checksums |
2287b69136e627a3b59b27ae786d17b126240e93cc632ca3d225341edeea8fb4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for langgraph-store-mongodb 0.4.1
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.