langgraph-store-dynamodb
Amazon DynamoDB long-term-memory store (BaseStore) for LangGraph — namespaced key/value agent memory with prefix search, Mongo-style filters, list_namespaces, sync + async, and native semantic search via DynamoDB vector search.
pip install langgraph-store-dynamodb
Usage
from langgraph_store_dynamodb import DynamoDBStore
store = DynamoDBStore(table_name="langgraph-store") # table auto-created (PAY_PER_REQUEST)
store.put(("users", "1", "memories"), "food", {"text": "loves sushi", "kind": "pref"})
item = store.get(("users", "1", "memories"), "food")
hits = store.search(("users", "1"), filter={"kind": "pref"}, limit=10)
spaces = store.list_namespaces(prefix=("users",))
graph = builder.compile(store=store) # as a LangGraph store
Semantic search (DynamoDB native vector search)
Pass a LangGraph IndexConfig and the store embeds the configured fields on put and ranks search(query=...) by cosine similarity using DynamoDB's SearchVectors — no external vector database.
from langgraph_store_core import bedrock_titan_embeddings
from langgraph_store_dynamodb import DynamoDBStore
store = DynamoDBStore(
table_name="langgraph-memory",
index={"dims": 1024, "embed": bedrock_titan_embeddings(dimensions=1024), "fields": ["text"]},
)
store.put(("memories", "kamal"), "k1", {"text": "the user loves sushi", "kind": "pref"})
hits = store.search(("memories", "kamal"), query="what food does the user like?", filter={"kind": "pref"})
print(hits[0].score, hits[0].value)
embed may be any LangChain Embeddings, a list[str] -> list[list[float]] callable, or a provider string. fields defaults to ["$"] (the whole value as JSON). put(..., index=False) skips embedding for one item; put(..., index=["title"]) overrides the fields.
The table is created with a vector index (embedding, cosine, dims, PK as an inline filter). A vector index can only be declared at table creation, so use a new table name when enabling semantic search on an existing store. SearchConditionExpression only allows equality on a string search-schema attribute, so a prefix search resolves to its concrete namespaces (keys-only scan) and runs one ANN query per namespace, merged by score — an exact namespace is a single call. Value filters cannot be expressed there (only top-level search-schema attributes), so the store oversamples and applies them on the returned candidates.
Requires boto3>=1.43.78 and a region where DynamoDB vector search is available (GA 2026-08-05). Bedrock model access is needed only for the default Titan embedder.
Upgrading from 0.1.x
0.2.0 is a rewrite on langgraph-store-core. Same table (PK = namespace, SK = key, value, created_at, updated_at), same constructor (max_read_request_units / max_write_request_units still accepted). New in 0.2.0: prefix search (not just exact namespace), filter, offset, list_namespaces, GetOp/ListNamespacesOp in batch, ordered abatch, semantic search, and region_name / boto_session / endpoint_url options. Namespaces are now joined with a unit separator instead of :; items written by 0.1.x are still read and are migrated on their next put. aioboto3 is no longer required.
AWS permissions
dynamodb:DescribeTable, CreateTable, GetItem, PutItem, DeleteItem, Query, Scan, and SearchVectors (for semantic search), plus bedrock:InvokeModel for the default embedder.
License
MIT · part of the langgraph-store family · docs: https://skamalj.github.io/agentstate-reducer/
Metadata
Release files for langgraph-store-dynamodb 0.2.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 | |
|---|---|---|---|---|
| langgraph_store_dynamodb-0.2.1.tar.gz | 8.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| langgraph_store_dynamodb-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.5 kB
Release files / langgraph_store_dynamodb-0.2.1.tar.gz
| Download URL | langgraph_store_dynamodb-0.2.1.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1a2e62b75b99386e8668acbcb4ca4ac9b2de0cbd497c98598a11ac90e1dd0215
|
|
BLAKE2b-256 checksum How to use checksums |
bb2a59d40a70e841ee04dc6e612b22f6f5d462cd3be924e9c9fb692f8a4bfa48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / langgraph_store_dynamodb-0.2.1-py3-none-any.whl
| Download URL | langgraph_store_dynamodb-0.2.1-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
92c4b351b80a24d50e910d5f8ce735e04cb5783b4251880a2f92ed6747f92361
|
|
BLAKE2b-256 checksum How to use checksums |
2bd04f835300ecae66490e78053e6871b1e4734c022222cb8574fb889a4806c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for langgraph-store-dynamodb 0.2.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.